i am using this paginate code with another code, it should count 20 images on page, page 1 and 2 works, but if i cant get to next images, in this gallery is 45 images, only gets 40 images....?
http://www.koddinn.c...dir/album/born/
see links below Fyrri - Nęsta
whats wrong here
<span style="font-weight: bold;"> </span>$c = $_GET['count'];if( $c == null ) $c = 20;
$o = $_GET['offset'];if( $o == null ) $o = 0;
$ = fim_query_images($_GET['album'],$o,$c);
$fim .= "<p>";
if( $o > 0 ) $o = $o - $c; if( $o < 0 ) $o = 0; $fim .= "<a href=\"?offset=".$o."&count=".$c."\">< Fyrri síða</a> ";
$fim .="<a href=\"?offset=".($o+$c)."&count=".$c."\">Næsta síða ></a>";
$fim .="</p>";
$fim .= "</div>";
return $fim;
}
function fim_get_image()
{
return "<a href='$path_'>".__("", "fgallery")."</a>";
function fim_query_images($catid,$offset=0, $rowcount=0)
{
if( $rowcount > 0 )
return $wpdb->get_results("SELECT * FROM $table_image WHERE cat = '$catid' AND status <> 'exclude' ORDER BY '$order_by' $order_type LIMIT $offset,$rowcount");
else
return $wpdb->get_results("SELECT * FROM $table_image WHERE cat = '$catid' AND status <> 'exclude' ORDER BY '$order_by' $order_type");
}
Edited by hafdis, 06 February 2007 - 03:29 PM.
