vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Display all posts from a thread on one page (https://vborg.vbsupport.ru/showthread.php?t=75338)

AshAbed 01-28-2005 11:36 PM

Display all posts from a thread on one page
 
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
PHP Code:

// *********************************************************************************
// set post order 

ABOVE that ADD
PHP Code:

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:
PHP Code:

<if condition="$show['pagenav']"><a href="showthread.php?$session[sessionurl]t=$threadid&amp;&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.


All times are GMT. The time now is 03:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01180 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete