Pagination settings
 
Notifications
Clear all

Pagination settings

7 Posts
3 Users
0 Reactions
1,941 Views
(@grace)
Posts: 19
Active Member
Topic starter
 

Is it possible to set a different style of pagination in different sections? I mean, can I set the pagination in 'recent stories' to 10 items per page, and have no pagination at all (or a larger one, maybe 100 items per page) in the author's account?

I obviously tried the pagination panel, but as I expected, it set the pagination style sitewide.

Sorry for my English, but I'm Italian. Just hope this made sense.
Thanks!


 
Posted : 16/03/2007 6:56 pm
(@tammy)
Posts: 2577
Member Moderator
 

You'd have to hack the files.  There's no way to do it using an admin panel.  You could probably do it with an extra_header.php. 


<?php
if(!defined("_CHARSET")) exit( );
// The Recent page set to 10 items per page.
if($current == "browse" && $_GET['type'] == "recent") {
$linkrange = 10;
}
// The author's account page
if($current == "viewuser") {
$linkrange = 100;
}
?>

This is completely untested.  Use at your own risk.


 
Posted : 16/03/2007 7:05 pm
(@grace)
Posts: 19
Active Member
Topic starter
 

Thanks for your flash reply.

I'll try and let you know the results!


 
Posted : 16/03/2007 7:59 pm
 Saya
(@saya)
Posts: 30
Eminent Member
 

Wanted to ask... an extra_header.php to put in the skin directory, the one like in your AlienGreen skin??? °°


URL to your eFiction: http://kawaii-hito.org/fic/index.php and http://www.silverblood.net/MS
Your version of eFiction: 3.5
Latest patch: YES
Mods: only Challenges and translated to Italian
Version of PHP: 4.3.11
Version of MySQL: 4

 
Posted : 18/03/2007 12:33 pm
(@tammy)
Posts: 2577
Member Moderator
 

You can put it in the individual skin or if you want the site to pick it up and use it for all skins put it in the main directory.


 
Posted : 18/03/2007 12:40 pm
(@grace)
Posts: 19
Active Member
Topic starter
 

Pity, the code you gave me so set the pagination for items per page doesn't seem to work.
I also tried to put it into a single skin, or to define just one event (I left the site setting at 100 items per page, and I corrected the code just to display10 itemps per page in the recent, to no avail). It just seems to be unable to override the setting given to the site by the admin control panel.
Any other idea?

Thanks, anyway!


 
Posted : 18/03/2007 1:25 pm
(@grace)
Posts: 19
Active Member
Topic starter
 

I blame it on PURE LUCK.

I tried again with the code you gave me, but I changend the variable: I didn't set $linksrange, but $itemsperpage, and IT WORKED!!!
(Now I just hope I didn't destroy anything...)

Thanks anyway for the hint!


 
Posted : 18/03/2007 5:36 pm
Share: