Skocz do zawartości
Hosting webh.pl - 20%

RESOLVED: Help with a Code

Rekomendowane odpowiedzi

Opublikowano
  • 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, IC5

Opublikowano
  • Autor

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?

Opublikowano
  • Autor

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?

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.

Ostatnio przeglądający 0

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

Konto

Nawigacja

Szukaj

Szukaj

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.