PDA

View Full Version : Show all posts on one page


Andreas
01-30-2005, 10:00 PM
Did you ever want to display all posts of a certain thread on just one page?

So here you go:

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

If you want to have a link, put the this in template SHOWTHREAD (Thx to AshEbed!)

<if condition="$show['pagenav']"><a href="showthread.php?$session[sessionurl]t=$threadid&amp;&showall=1">View All</a></if>

nexialys
01-31-2005, 12:30 AM
genial...

(i usually have nothing to say on these hacks, but it's from KirbyDE, so...)

Paul M
01-31-2005, 12:50 AM
While 2147483648 may be technically correct - tbh, I think 999999 would suffice for most threads ;) - and convey the significance of it somewhat better ....

Tekton
01-31-2005, 12:52 AM
While 2147483648 may be technically correct - tbh, I think 999999 would suffice for most threads ;) - and convey the significance of it somewhat better ....
maybe 999999999 to be on the safe side, ne?

Though, wouldn't showing more than a thousand cause some big lag/processing problems? or not?

7ABD
01-31-2005, 06:09 AM
Hi , Mr .KirbyDE

thankyou for this hack , but this hack awe working slow inside posts ?


thanks :)

zurih
01-31-2005, 09:07 AM
does this makes the page more time to load?

sabret00the
01-31-2005, 09:42 AM
a thread showing 10 posts will load faster than that of 40 posts, however if you've got this set to show all and theirs only 5 posts in the thread it should load just as though their were 10 posts in terms of speed.

zurih
01-31-2005, 02:49 PM
how can I apply this to be default?
I mean that by default in all of the threads we'll se all of the posts on one page?

Guy G
02-01-2005, 03:05 PM
if its a big thread wouldnt it excute loads of queries?

zurih
02-01-2005, 04:09 PM
if its a big thread wouldnt it excute loads of queries?

I think that no metter what u'll have the same queries.. (am I right?!)
for example I have a thread with 2 replies and a thread with 14 replies and both of them - same queries.

Sebastian
02-02-2005, 05:12 PM
it will produce the same amout of queries, but it will just select more posts, the array will be bigger = more memory usage, bandwidth, etc..

i don't suggest anyone use this unless you are certain you aren't going to have large threads.. eg, 100+ replies

say you have a thread with a 1000 replies.
1) the viewers' browser will take a year to load because of all the content and will probably bog down their system (browser would use more cpu to process)
2) server bandwidth usage will skyrocket because of the large pages.
3) waste of server resources

Cibox.de
02-03-2005, 10:41 PM
thx for this mod

Lumina
02-24-2005, 05:41 AM
Mike Sullivan says it is a potential DoS:
http://www.vbulletin.com/forum/showpost.php?p=822044

underESTIMATED
03-23-2005, 07:58 PM
It's useful on most occasions.

Thank you for this...

coffee
04-10-2005, 02:29 AM
Very nice hack KirbyDE : )


If you want to have a link, put the this in template SHOWTHREAD (Thx to AshEbed!)

<if condition="$show['pagenav']"><a href="showthread.php?$session[sessionurl]t=$threadid&amp;&showall=1">View All</a></if>


I guess it will look better when doing the above this way (Don't edit template "SHOWTHREAD"):

Note: My version is vB 3.0.7

1. Open the file "/includes/adminfunctions_template.php" and find this line:'array', // used for checkingBelow that add:
'strpos', // used for checking
2. Go to template "pagenav" and find this:</tr>
</table>
</div>Above that add:<if condition="strpos($address, 't=')"><td class="alt1"><a class="smallfont" href="$address&amp;showall=1" title="View all posts in a single page">Show All</a></td></if>

Gutspiller
08-15-2005, 03:57 PM
Actually... From the looks of it, this code only shows 2.1 trillion posts per page, not "all". :p

coffee
03-27-2008, 04:56 PM
Waiting for version 2.00