News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

How can i increase the number of pages in "action.recent"?

Started by FragaCampos, July 31, 2009, 05:24:15 PM

Previous topic - Next topic

FragaCampos

Hello there.

I've realized that the page where the last messages are shown (action,recent) only has 10 pages.
Is there a way to increase the number of pages shown there?

Thanks in advance.

Kill Em All



My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

FragaCampos

Thanks, but that's not what i asked. That's for the last messages in the forum's info center, it doesn´t change the number of pages of "action,recent".
If you click on the link i provided in the first message, you'll know what i mean.

kat

I don't think that feature's available in v1.1.x, is it?

SlammedDime

In Recent.php, find someting similar to the following, and edit it accordingly... if you want to display 20 pages, change it to 195.  If you want 30 pages, 295.

if (isset($_REQUEST['start']) && $_REQUEST['start'] > 95)
$_REQUEST['start'] = 95;


That *should* do it.

Keep in mind, that this can/will create a performance hit, thus why it's limited at 10 pages by default.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

FragaCampos

Quote from: SlammedDime on August 01, 2009, 08:10:12 PM
In Recent.php, find someting similar to the following, and edit it accordingly... if you want to display 20 pages, change it to 195.  If you want 30 pages, 295.

if (isset($_REQUEST['start']) && $_REQUEST['start'] > 95)
$_REQUEST['start'] = 95;


That *should* do it.

Keep in mind, that this can/will create a performance hit, thus why it's limited at 10 pages by default.

Thanks, SlammedDime, but I changed it to 195 and it didn't work. It still shows 10 pages.


I hope i'm not being too dubious, here what i want to change:


kat

Still not totally sure what you mean...

If I've got this right, go to:

Admin>Posts and Topics>Topic Settings and make "Max topic size to show "All" posts" whatever you like.

From your original post, though, it's the number of pages posted that changes that.

If you want it increased, either post more, or alter the number of posts per page.

SlammedDime

#7
No Kat, the default maximum number of pages to display is 10.  There is no setting to adjust this in the admin panel, it has to be changed in code.

Click on the link in his first post and perhaps you might understand.

Fraga - Make one more change that this should do it...

Code (Find) Select

// !!! This isn't accurate because we ignore the recycle bin.
$context['page_index'] = constructPageIndex($scripturl . '?action=recent', $_REQUEST['start'], min(100, $modSettings['totalMessages']), 10, false);
}
Code (replace) Select

// !!! This isn't accurate because we ignore the recycle bin.
$context['page_index'] = constructPageIndex($scripturl . '?action=recent', $_REQUEST['start'], min(200, $modSettings['totalMessages']), 10, false);
}


(We're changing the 'min' function call from 100 to 200.)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     


FragaCampos

It worked!
Thanks a lot for your time and patience, SlammedDime8)

Just for others to see:



Advertisement: