Default number of entries shown
Moderator: Thorsten
Default number of entries shown
How can I change the default number of entries that are shown per page? I believe that the current default is 10.
Austin Linford
Hi,
just look into the inc/functions.php and search for the function printThemes($category). Then chnage the following line
to this
bye
Thorsten
just look into the inc/functions.php and search for the function printThemes($category). Then chnage the following line
Code: Select all
$result = $db->query("SELECT DISTINCT ".$sqltblpre."faqdata.id, ".$sqltblpre."faqdata.lang, ".$sqltblpre."faqdata.thema, ".$sqltblpre."faqdata.rubrik, ".$sqltblpre."faqvisits.visits FROM ".$sqltblpre."faqdata LEFT JOIN ".$sqltblpre."faqvisits ON ".$sqltblpre."faqdata.id = ".$sqltblpre."faqvisits.id WHERE ".$sqltblpre."faqdata.active = 'yes' AND ".$sqltblpre."faqdata.rubrik = '".$category."' GROUP BY ".$sqltblpre."faqdata.id ORDER BY ".$sqltblpre."faqdata.id LIMIT ".$first.",".$last);
Code: Select all
$result = $db->query("SELECT DISTINCT ".$sqltblpre."faqdata.id, ".$sqltblpre."faqdata.lang, ".$sqltblpre."faqdata.thema, ".$sqltblpre."faqdata.rubrik, ".$sqltblpre."faqvisits.visits FROM ".$sqltblpre."faqdata LEFT JOIN ".$sqltblpre."faqvisits ON ".$sqltblpre."faqdata.id = ".$sqltblpre."faqvisits.id WHERE ".$sqltblpre."faqdata.active = 'yes' AND ".$sqltblpre."faqdata.rubrik = '".$category."' GROUP BY ".$sqltblpre."faqdata.id ORDER BY ".$sqltblpre."faqdata.id");
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Worked, but...
This change put all of the entries on a single page, but it shows that there are multiple pages. If I go to the second page, it shows all of the entries just like the first page. It only shows the multiple pages once I get over 10 entries.
Austin Linford
Hi,
I'll post you the code changes tomorrow!
bye
Thorsten
I'll post you the code changes tomorrow!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi Austin,
just remove this part
in the function printThemes().
bye
Thorsten
just remove this part
Code: Select all
if ($seiten > 1) {
$output .= "<p align=\"center\"><b>";
$previous = $seite - 1;
$next = $seite + 1;
if ($previous != 0) {
$output .= "[ <a href=\"".$_SERVER["PHP_SELF"]."?".$sids."aktion=anzeigen&rubrik=".$category."&seite=".$previous."\">".$msgPrevious."</a> ]";
}
$output .= " ";
if ($next <= $seiten) {
$output .= "[ <a href=\"".$_SERVER["PHP_SELF"]."?".$sids."aktion=anzeigen&rubrik=".$category."&seite=".$next."\">".$msgNext."</a> ]";
}
$output .= "</b></p>";
}
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist