vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How to make a post that FORCES a page break? (https://vborg.vbsupport.ru/showthread.php?t=214998)

z0diac 05-31-2009 03:06 PM

How to make a post that FORCES a page break?
 
In the nature of my forums, there are some threads that have LOOOONG posts - far too much to display 10 of them on 1 page (and no, knocking the posts/page display down would screw other parts up).

Is there a way to FORCE an end-page? So that, say after 1 post, it automatically shows "Page 1 of X, 1, 2, 3" etc... at the bottom of that post ?

Lynne 05-31-2009 05:26 PM

The only thing I can think to do is write a plugin that changes the posts display for certain threadids.

z0diac 05-31-2009 06:41 PM

Quote:

Originally Posted by Lynne (Post 1820760)
The only thing I can think to do is write a plugin that changes the posts display for certain threadids.

Hmm, it would have to be for various new threads. Some are just regular posts, which I'd still like to have 10 per page. Other contain copy/pasted info and attachments with thumbnails. These just *really* slow down load time as the pages are HUGE if they have 10 posts like that.

I posted another request for end the page based on # of attachments being displayed on the page. THat would work too (might be easier?) Count # of attachments in the posts on that page and end the page as soon as it hits say, 100. ( ??)

Lynne 05-31-2009 06:59 PM

Why not limit the amount of characters and attachments per post. Then, if needed, the user can make a couple of posts regarding whatever they are writing about.

z0diac 06-01-2009 03:38 PM

Quote:

Originally Posted by Lynne (Post 1820807)
Why not limit the amount of characters and attachments per post. Then, if needed, the user can make a couple of posts regarding whatever they are writing about.

Not possible with my setup. It's basically to limit the # of attachment thumbnails displayed on each page.

Right now I have it set up to 10 posts per page - which is perfect for half the forums (chit chat and what not). The forums that contain lots of pictures, threads are taking forever to display. I *need* 100 pictures post limit (minimum).

Many threads will only have 5 or 10 pictures - works fine at 10 posts displayed per page.

But on the posts that have 100 pictures, I want to insert a "bottom of page" post so that it will just skip to the "Page 1 of X" part without displaying more.

I need to be able to FORCE that "Page 1 of X" part.

I could make a post with secret code as the post like.. "[[endpage]]" as the message body. When showthread comes across that text it doesn't display more posts on that page and shows the "Page 1 of X" part.

Lynne 06-01-2009 03:51 PM

Maybe write a plugin that checks the number of attachments and if it is more than x then set the number of posts to display to y? I'm not really sure here.

z0diac 06-01-2009 08:06 PM

Quote:

Originally Posted by Lynne (Post 1821392)
Maybe write a plugin that checks the number of attachments and if it is more than x then set the number of posts to display to y? I'm not really sure here.

THat would probably work.

Or, if the code that displays the posts of a thread is a loop, have it exit the loop as soon as # of displayed thumbnails >= the set limit.

Hopefully someone can figure it out...

if there's any people who know vB code reading this thread, I'd be willing to pay for a working code modification. (vB v3.6.8 although the showthread code probably hasn't changed much)


All times are GMT. The time now is 05:43 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.00918 seconds
  • Memory Usage 1,724KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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