Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-28-2003, 07:15 AM
Osmosis's Avatar
Osmosis Osmosis is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default View all posts in a thread

I searched for about a half hour and couldnt find this hack, but it seems pretty simple and I'm surprised it wasn't easy to find. I would like to replace the 'Last Page' link (or add a new link) and have it link to a page showing all of the posts in a particular thread.

I'll be trying to solve this myself since it seems like no-one is interested in doing this, but its a feature on another forum I frequent and I'd like to have it for mine. I'm using 2.3.0
Reply With Quote
  #2  
Old 11-28-2003, 02:54 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wouldn't recomend this is you have any large threads. I hate to think of the problems it will cause when someone trys to view a thread with a few hundred posts in it.

However you'll want to change the LIMIT part of the main query in showthread.php, I don't use vB2 any more and don't have a copy handy, but it would be similar to the following:

PHP Code:
LIMIT ".($limitlower - 1).",$perpage 
Reply With Quote
  #3  
Old 11-28-2003, 06:23 PM
Osmosis's Avatar
Osmosis Osmosis is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not that worried about it on my forum, its very rare to see a thread with even 50 posts, but I do understand how that could get hard on the database on a busier forum. I'm confused as to which query you call the 'main' query, as there are quite a few queries in showthread.php. There is no reference to LIMIT in $post, the LIMIT in $getlastpost is DESC LIMIT as is the case with most other occurances. In fact, your PHP is almost the exact $postorder variable.

I'm sorry if I am posting the obvious, I havent attempted any unknown hacks before but only predeveloped hacks with documentation.
Reply With Quote
  #4  
Old 12-01-2003, 07:02 AM
Osmosis's Avatar
Osmosis Osmosis is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ba-bump? I havent been able to solve this problem, and I have users begging me for this feature. Can anyone help?
Reply With Quote
  #5  
Old 12-01-2003, 09:29 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find:

PHP Code:
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
"); 
Replace with:

PHP Code:
ORDER BY dateline $postorder ".iif($action != 'showall', "LIMIT ".($limitlower-1).",$perpage", '')
); 
Then use showthread.php?action=showall&threadid=THETHREADID (ie add action=showall to the URL).

Untested but it should work.
Reply With Quote
  #6  
Old 12-04-2003, 07:12 AM
Osmosis's Avatar
Osmosis Osmosis is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant find any queries resembling that in showthread.php, I think I understand the premise behind them and so I will experiment with different iterations of those. The two places in showthread.php which might be the ones you're referring to are
Code:
if ($posts=$DB_site->query_first("SELECT postid,dateline FROM post WHERE post.threadid=$threadid AND post.visible=1 AND post.dateline>'$bbuserinfo[lastvisit]' ORDER BY dateline LIMIT 1")) {
or
Code:
ORDER BY dateline $postorder
. I suspect the one I need to work on is the second.

Thanks for the push in the right direction, NTLDR. I really do appreciate you taking the time to give this thought.
Reply With Quote
  #7  
Old 12-04-2003, 10:50 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the full query to find from an unhacked 2.3.3:

PHP Code:
$getpostids=$DB_site->query("
    SELECT post.postid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage
"
); 
Reply With Quote
  #8  
Old 12-18-2003, 08:52 PM
Osmosis's Avatar
Osmosis Osmosis is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There appears to be no pretty way to do this with 2.3.0, as adding that to my (currently blank) $getpostids=""; causes a parse error whenever I try to navigate pages. I'm going to see about upgrading my VB to 2.3.3 and then I'll try this again, but upgrading may introduce a whole new host of problems with my moderately modified forum.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06396 seconds
  • Memory Usage 2,235KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete