five questions posted most recently - changed to 10 or 20.

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
hydn
Posts: 16
Joined: Tue Sep 20, 2005 1:50 am

five questions posted most recently - changed to 10 or 20.

Post by hydn »

Can you tell me the code and files to edit to change the value of "five questions posted most recently" on the index.php page to "20 questions posted most recently" please?


THanks

Hayden
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

open inc/functions.php and look for the function generateNewestData(). Then look for the line

Code: Select all

while (($row = $db->fetch_object($result)) && $i < $count ) {
and change it to

Code: Select all

while (($row = $db->fetch_object($result)) && $i < 20) {
or whatever you want.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
hydn
Posts: 16
Joined: Tue Sep 20, 2005 1:50 am

Post by hydn »

thanks
vikont
Posts: 3
Joined: Mon Jun 06, 2005 6:59 am
Location: Canada

Re: five questions posted most recently - changed to 10 or 20.

Post by vikont »

Hello, I have same question as Hayden.
However the answer given at the time is not applicable to version that I am trying to customise (2.0.3).
Unless i am missing something.

It would be greatly appreciated if you can give me answer that would work with versio in question 2.0.3.

Thank you,
Vik
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: five questions posted most recently - changed to 10 or 20.

Post by Thorsten »

Hi,

you can change that in version 2.0 in the file inc/constants.php:

Code: Select all

/**
 * Number of records for the latest entries
 *
 * @var const   5
 */
define('PMF_NUMBER_RECORDS_LATEST', 5);
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply