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

RESOLVED: Hello


Tricky

Rekomendowane odpowiedzi

Okay, a menu on each code.

If you just make some code, i will add links and such ^^,) i do the easy work^^

and is it possible to make the lines under the images go away??^^ http://wallbase.org

heres the codes:

Gallery:

<table class='ipb_table' cellspacing="100">
   <tbody>
       <tr>
           <td class='row1'>

<div class='moderation_bar rounded  clear'>
<?php
       /* Init */
       $return  = "";
       $to_show = 28;
       $per_row = 7;
       $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.comments ',
                                                        '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>";

               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 border="2" src="uploads/{$row['directory']}/tn_{$row['masked_file_name']}" alt="{$row['caption']}"/>
               </a><br />
               <i>By:</i><a href='index.php?app=gallery&module=user&user={$row['member_id']}'><b> {$row['uname']}</b></a></strong><br />{$row['number']}
               <br />
               <a href="index.php?app=gallery&module=post&section=comment&do=postcomment&img={$row['picid']}">Comment?</a> - <a href="index.php?app=gallery&module=images&section=viewimage&img={$row['picid']}"><b>{$row['comments']}</b></a>

      </td>
EOF;

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

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

       /* Return */
       print $return;
?>
          </td>
       </tr>
   </tbody>
</table>

Files:

<table class='ipb_table' cellspacing="1">
   <tbody>
       <tr>
           <td class='row2'>

<?php
       /* Init */
       $return  = "";
       $to_show = 28;
       $per_row = 7;
       $count   = 0;

       /* Query */
       $this->DB->build( array( 'select'   => 'f.file_id, f.file_name, f.file_ssname',
                                                        'from'     => array( 'downloads_files' => 'f' ),
                                                        'add_join' => array( 0 => array( 'select' => 'm.name as uname',
                                                                                                                         'from'   => array( 'members' => 'm' ),
                                                                                                                         'where'  => 'f.file_submitter=m.member_id',
                                                                                                                         'type'   => 'left' ) ),
                                                        'order'    => 'f.file_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++;
                       $return .= <<<EOF
<td class='short'>
       <a href="index.php?app=downloads&showfile={$row['file_id']}">
EOF;

                       if ( $row['file_ssname'] )
                       {
                               $return .= <<<EOF
               <img src="index.php?app=downloads&module=display&section=screenshot&id={$row['file_id']}" width='128' height='100'  alt="{$row['file_name']}" />
EOF;
                       }
                       else
                       {
                               $return .= <<<EOF
               <em>No Screenshot Available</em>
EOF;
                       }

                       $return .= <<<EOF
       </a><br />
       <i>By:</i> <strong>{$row['uname']}</strong><br> In <a href="http://wallbase.org/index.php?app=downloads"> Skins & Themes</a>
</td>
EOF;

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

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

       /* Return */
       print $return;
?>

           </td>
       </tr>
   </tbody>
</table>

Remember Daw, if you are kind enaugh to do this i will always be SO thankfull!

(you should join my site btw ^^,) so i can make you the Pro Coder^^,) + you can do the changes live instead of waiting for me ^^,))

Edytowane przez Tricky
Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

To remove bottom line you should find in CSS this code:

table.ipb_table tr td {
border-bottom:1px solid #B1C3B5;
padding:10px 8px 8px;
}

And change:

border-bottom:1px solid #B1C3B5;

To:

border-bottom:0px solid #B1C3B5;

Should work. In my FireBug works fine. :P

Ok, now i'm trying add this menu. :P I think my code will be without fancy rounded corners, though. :D

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

  • Manager

Lul, try this:

<table class='ipb_table' cellspacing="100">
   <tbody>
       <tr>
           <td class='row1'>

<div class='moderation_bar rounded  clear'>
<?php
       /* Init */
       $return  = "";
       $to_show = 28;
       $per_row = 7;
       $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.comments ',
                                                        '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>";

               $return .= "<tr>
   						<td rowspan='{$this->DB->getTotalRows()}'> </td>
   						<td> </td>
 							</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 border="2" src="uploads/{$row['directory']}/tn_{$row['masked_file_name']}" alt="{$row['caption']}"/>
               </a><br />
               <i>By:</i><a href='index.php?app=gallery&module=user&user={$row['member_id']}'><b> {$row['uname']}</b></a></strong><br />{$row['number']}
               <br />
               <a href="index.php?app=gallery&module=post&section=comment&do=postcomment&img={$row['picid']}">Comment?</a> - <a href="index.php?app=gallery&module=images&section=viewimage&img={$row['picid']}"><b>{$row['comments']}</b></a>

      </td>
EOF;

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

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

       /* Return */
       print $return;
?>
          </td>
       </tr>
   </tbody>
</table>

UNTESTED! :P

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

  • Manager

Now:

<table class='ipb_table' cellspacing="100">
   <tbody>
       <tr>
           <td class='row1'>

<div class='moderation_bar rounded  clear'>
<?php
       /* Init */
       $return  = "";
       $to_show = 28;
       $per_row = 7;
       $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.comments ',
                                                        '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>";

               $return .= "<tr>
                                               <td rowspan='{$this->DB->getTotalRows()}'> menu dude ;] </td>
                                                       </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 border="2" src="uploads/{$row['directory']}/tn_{$row['masked_file_name']}" alt="{$row['caption']}"/>
               </a><br />
               <i>By:</i><a href='index.php?app=gallery&module=user&user={$row['member_id']}'><b> {$row['uname']}</b></a></strong><br />{$row['number']}
               <br />
               <a href="index.php?app=gallery&module=post&section=comment&do=postcomment&img={$row['picid']}">Comment?</a> - <a href="index.php?app=gallery&module=images&section=viewimage&img={$row['picid']}"><b>{$row['comments']}</b></a>

      </td>
EOF;

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

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

       /* Return */
       print $return;
?>
          </td>
       </tr>
   </tbody>
</table>

?

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

  • Manager

Code for files:

<table class='ipb_table' cellspacing="1">
   <tbody>
       <tr>
           <td class='row2'>

<?php
       /* Init */
       $return  = "";
       $to_show = 28;
       $per_row = 7;
       $count   = 0;

       /* Query */
       $this->DB->build( array( 'select'   => 'f.file_id, f.file_name, f.file_ssname',
                                                        'from'     => array( 'downloads_files' => 'f' ),
                                                        'add_join' => array( 0 => array( 'select' => 'm.name as uname',
                                                                                                                         'from'   => array( 'members' => 'm' ),
                                                                                                                         'where'  => 'f.file_submitter=m.member_id',
                                                                                                                         'type'   => 'left' ) ),
                                                        'order'    => 'f.file_id DESC',
                                                        'limit'    => array( 0, $to_show ),
                                       )          );
       $this->DB->execute();

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

               $return .= "<tr>
                           <td rowspan='{$this->DB->getTotalRows()}'> menu dude ;] </td>
                           </tr>";


               while ( $row = $this->DB->fetch() )
               {
                       $count++;
                       $return .= <<<EOF
<td class='short'>
       <a href="index.php?app=downloads&showfile={$row['file_id']}">
EOF;

                       if ( $row['file_ssname'] )
                       {
                               $return .= <<<EOF
               <img src="index.php?app=downloads&module=display&section=screenshot&id={$row['file_id']}" width='128' height='100'  alt="{$row['file_name']}" />
EOF;
                       }
                       else
                       {
                               $return .= <<<EOF
               <em>No Screenshot Available</em>
EOF;
                       }

                       $return .= <<<EOF
       </a><br />
       <i>By:</i> <strong>{$row['uname']}</strong><br> In <a href="http://wallbase.org/index.php?app=downloads"> Skins & Themes</a>
</td>
EOF;

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

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

       /* Return */
       print $return;
?>

           </td>
       </tr>
   </tbody>
</table>

On top.. Change this:

<td rowspan='{$this->DB->getTotalRows()}'> menu dude ;] </td>

To:

<td rowspan='{$this->DB->getTotalRows()}' valign='top'> menu dude ;] </td>

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

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ę.