vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Show last post of previous page as first on next? (https://vborg.vbsupport.ru/showthread.php?t=308284)

ia7 02-13-2014 01:33 PM

Show last post of previous page as first on next?
 
Hi vB coding gurus, I have a question that's probably been asked maybe a number of times (a google search is hard to get right).

Is it possible to create a plug-in that will make 'showthread' show the last post of the previous page as the first post on the next page?

Example: Say 20 posts per page. I want that 20th post to show as the first post on Page 2 and so on. Why? Well as you get on a bit you forget what you saw 5secs earlier and so having that topic of discussion being readily available will make it easier to continue it on... hopefully! :D

I'm not looking for a global first page or anything, I've already seen them. :)

I had a look at showthread.php but it made me cry a little so I'm asking you, the wise ones, if this is possible to do and how.

Thanks.

kh99 02-13-2014 10:44 PM

Hmm...I guess you could try subtracting 1 from $lowerlimit if it's not 0, then I think you'd also need to increase the number of posts read when $perpage is used, to be $perpage + 1. I haven't tried it but I have a feeling if you were to just add one to $perpage, the page counters wouldn't work right.

Maybe another approach would be to only display $perpage posts, but calculate the first post based on the page (that's what's done now, but it just uses $limitlower = ($vbulletin->GPC['pagenumber'] - 1) * $perpage) But that way, I don't know if the page numbers make sense. It might be easier to just have the post from the previous page be in addition to $perpage.

ia7 02-17-2014 02:51 PM

Thanks kh99 I'll try some of those suggestions out on my test board. Appreciate the reply.


All times are GMT. The time now is 03:28 PM.

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.01008 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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