Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

RESOLVED: Help with a Code


Tricky

Rekomendowane odpowiedzi

  • Manager

Try change this code into:

<center>
<i><b>Be aware:</b> We allow nudity Wallpapers & Photographs and it may appear on front page<br><font size="1">(Guests are <b>Not</b> allowed to Download such wallpapers)</font></i>
<br><br>
</center>
<?php
       /* Init */
       $return  = "";
       $to_show = 24;
       $per_row = 6;
       $count   = 0;

       /* Query */
       $this->DB->build( array( 'select'   => 'i.id AS picid, i.masked_file_name, i.directory, i.caption, i.member_id, i.ratings_count, i.ratings_total, i.medium_file_name',
                                                        'from'     => array( 'gallery_images' => 'i' ),
                                                        'add_join' => array( 0 => array( 'select' => 'g.rate AS number',
                                                                                         'from'   => array( 'gallery_ratings' => 'g' ),
                                                                                         'where'  => 'i.id=g.img_id',
                                                                                         'type'   => 'left' ) ),
                                                        'add_join' => array( 1 => array( 'select' => 'm.name as uname',
                                                                                         'from'   => array( 'members' => 'm' ),
                                                                                         'where'  => 'i.member_id=m.member_id',
                                                                                         'type'   => 'left' ) ),


                                                        'order'    => 'i.id DESC',
                                                        'limit'    => array( 0, $to_show ),
                                       )          );
       $this->DB->execute();

       /* Got some rows */
       if ( $this->DB->getTotalRows() )
       {
               $return .= "<div><table><tr>";

               while ( $row = $this->DB->fetch() )
               {
                       $count++;
                       $row['rate']['id'] = intval( $row['picid'] );
                       $row['rate']['number'] = intval( $row['number'] );
                       $row['rate']['canrate']         = 1;
                       $row['rate']['_rate_int'] = $row['ratings_count'] ? round( $row['ratings_total'] / $row['ratings_count'], 0 ) : 0;

                       $row['number'] = $this->registry->output->getTemplate( 'gallery_imagelisting' )->rate_form( $row['rate'] );

                       $return .= <<<EOF
       <td class='short'>
               <a href="index.php?app=gallery&module=images&section=viewimage&img={$row['picid']}">
                       <img src="uploads/{$row['directory']}/tn_{$row['medium_file_name']}" alt="{$row['caption']}" />
               </a><br />
               <i>Uploaded By:</i><br>
               <a href='index.php?app=gallery&module=user&user={$row['member_id']}'><b>{$row['uname']}</b></a></strong><br /><i>Rating:</i> {$row['number']} out of 5

       </td>
EOF;

                       /* New row */
                       if ( $count && $count % $per_row == 0 )
                       {
                               $return .= "</tr><tr>";
                       }
               }

               $return .= "</tr></table></div>";
       }

       /* Return */
       print $return;
?>

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

One more thing, i uploaded a avatar @ 88x31, but the img didn't appear on the last submitted walls...

I notice, when i set Down the thumbnails to 50x50, i can see a smaaaaaal img, but when i set it up to original thumbnail size it wont appear!

So how can i get the img to show up when the thumbnail are at 128x128 without setting the thumbnail img size down?

Odnośnik do komentarza
Udostępnij na innych stronach

hmm.. forget about the thing above :)

But, i have another question.

How can i do like:

"i allow nude wallpapers,

and i wanna have a "Waring" screenshot on the front page instead of the "nude" wallpapers..

is it possible to make a code who will do that or do i have to "not allow nude walls?

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.