Blätterfunktion einbauen

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Blätterfunktion einbauen

    hallo zusammen,

    ich möchte in meine gallery eine blätterfunktion einbauen!
    400 thumbs zu laden dauert......
    es sollten max 5 zeilen a 4 bilder pro seite erscheinen!
    ich kriege das nicht gepackt!

    kann mir jemand helfen?

    danke


    PHP-Code:

    echo "<table width=\"600\" border=\"0\" align=\"center\">";
    if (!isset(
    $iid)) {

        
    $rows round(count($th)/$cols);
        if ((
    $rows $cols) < (count($th))) {
            
    $rows++;
        }

        for (
    $i 1$i <= $rows$i++) {
            echo 
    "<tr>";
            for (
    $j 1$j <= $cols$j++) {
                
    $td = (($i 1) * $cols) + $j;
                
    $iu = ($td 1); 

  • #2
    gehts dir um das problem mit der schleife und einer sauberen tabelle, oder um was gehts?
    **********
    arkos
    **********

    Kommentar


    • #3
      hi,

      ich hatte mir mal eine funktion dafür geschrieben. funktioniert ganz einfach, du machst deine DB abfrage (limit) und packst deine ergebnisse in ein array. danach rufst du die funktion auf.

      PHP-Code:

      /*=========================== */
      /* funktion:  ergebnis pro reihe ====== */
      /*=========================== */
        
      function showTABLE($array$row$table_css$td_css)  
      {  
         
      $count count($array);  
         
      $td round(100/$row); 
          
         print 
      '<table class="'.$table_css.'" cellspacing="0">'."\n";
         for(
      $i=0$i<$count$i+=$row)  
         {  
            print 
      '<tr>'."\n";  
            for(
      $z=0$z<$row$z++)  
            {  
                if(
      $i+$z $count)
                      {
                          print 
      '<td class="'.$td_css.'" width="'.$td.'%">'.$array[$i+$z].'</td>'."\n";
                      }  
              else
              {
                  print 
      '<td class="'.$td_css.'" width="'.$td.'%">&nbsp;</td>'."\n";
              } 
            }  
            print 
      '</tr>'."\n";  
         }  
         print 
      '</table>'."\n";  
      }  

      showTABLE($array2'table_css''td_css'); 
      gruss
      Zuletzt geändert von Malaga; 30.06.2006, 22:39.

      Kommentar

      Lädt...
      X