View Full Version : Display all posts from a thread on one page
AshAbed
01-28-2005, 11:36 PM
I'm looking for a hack which puts a link that lets you view all posts in a thread with multiple pages on one page. So what I'm saying is next to the 'Page 1 2 3 > >>' links there should be a link that says 'view all' and that'd let you see all the posts on one page. I don't think this would be too hard to make, there's a chance it'd only take template editing.
Thanks for any help,
Ashraf Abed
tgmorris
01-29-2005, 08:39 PM
The number of posts displayed is based on configuration settings (Maximum Displayed Posts Before Page Split and User-Settable Maximum Displayed Posts) in the ACP -> Thread Display Options.
In theory you could allow the user to select a ridiculously high number like 1000 or some such simply by adding it to the list in User-Settable Maximum Displayed Posts. It's very easy to change and give it a try. However this could have a significant performance impact if you have busy forum and a lot of large threads.
If you do change it to try it out you then need to go into your User CP -> Edit Profile and select the number in Number of Posts to Show Per Page.
AshAbed
01-29-2005, 10:02 PM
I know I could let users select how many posts viewable per page, but if they select a high amount then every thread would show every post on one page - I'm looking for them to see the page with lets say 20 posts per thread and have a link that says view all for only that thread. There may be some threads users would like to see all on one page and others they would like divided up.
Thanks for the suggestion though.
Andreas
01-29-2005, 10:19 PM
In showthread.php FIND
// ************************************************** *******************************
// set post order
ABOVE that ADD
if ($_REQUEST['showall'] == 1) {
$perpage = 2147483648;
}
Then call the thread as showthread.php?t=ID&showall=1
AshAbed
01-29-2005, 10:30 PM
Thank you very much, I'll try it out when I get to my desktop.
Thanks again.
Incase anyone else wants to use this this is the code you put in the showthread template:
<if condition="$show['pagenav']"><a href="showthread.php?$session[sessionurl]t=$threadid&&showall=1">View All</a></if>
Put that where you want the link to show up.
kash2k
07-07-2005, 11:02 AM
Did this work???
alyster4k
08-15-2005, 05:11 PM
Bump. Did it?
Any way to limit the amount in case they try to open like a 50 page thread?
alyster4k
09-01-2005, 07:29 PM
Bump.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.