Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-27-2001 Last Update: Never Installs: 5
 
No support by the author.

Hi all,

Don't know if there will be much interest here, but my users asked for this so I wrote a hack.

What is it?

When you click on the total replies in vBulletin, you can see a list of all posters who participated in the thread, and how many posts each had in that thread.

The hack adds a link to this pop-up window -- allowing you to view all posts by User X in that thread.

Where can I see a Demo?

I'm probably explaining it badly, so here's a demonstration:

Go to my bulletin board, at http://www.atlasf1.com/bb/index.php

Visit any one of the forums and click on the # of replies for any one of the threads (select one with lots of posts for better demonstration).

Click on the # of posts next to a username in the "Who Posted"
pop-up window

The result: you will get a page looking and behaving exactly like showthread for that thread, however it will include ONLY posts by that specific poster.

You can reply to the thread, quote a post, everything as if you were in the full thread.

You can also jump directly to the location of a specific post, by clicking on the post count to the right side of the post (you need to have Post Count hack installed for this).


How do I install it?

With almost no work at all.

Download the attachment - showposts.txt - and rename it to showposts.php. Upload it to your forums' main directory.

Edit template whopostedbit and replace

Code:
$post[posts]
with

Code:
<a href="showposts.php?s=$session[sessionhash]&threadid=$threadid&postuserid=$post[userid]" target="_blank">$post[posts]</a>
That's it

Cheers,

Bira

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 11-29-2001, 02:33 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by bira
FireFly you must have the same checks or this file will become a way for users to look at hidden threads, for example.

I stripped off what clearly isn't needed (like go to next/last thread, like go to newest post, etc).

But you still have to make the same "work" as you would for showthread:
[...]
In short, you treat it almost exactly like you'd treat a thread. Well, it IS a thread. Just only one poster's messages in it
Reply With Quote
  #13  
Old 11-29-2001, 02:41 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh, I see what you mean, sorry! ahahaha, sorry - I completely misunderstood you

That's nifty - I didn't think of doing what you did :blush:

I can only see one small change, really, but that can be overcome easily, so I'll edit the first post now and post the new lean version of the hack

Thanks
Reply With Quote
  #14  
Old 11-29-2001, 02:48 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

... or has Kaizen would say, "the penny has dropped for you".

[QUOTE]Originally posted by bira
I can only see one small change, really, but that can be overcome easily, so I'll edit the first post now and post the new lean version of the hack
Reply With Quote
  #15  
Old 11-29-2001, 03:12 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually I prefer it in a separate file, FireFly - less calls and code parsing. There's no need to parse the entire showthread.php code for this function, hence I'd rather separate them and be more economic.

If, however, you prefer to only edit showthread.php, then what you did is not enough. Do the following:

1) Find

Code:
if ($goto=="nextnewest") {
And change it to:

Code:
if (($goto=="nextnewest") && (!isset($postuserid))) {
2) Find

Code:
if ($goto=="nextoldest") {
And change it to:

Code:
if (($goto=="nextoldest") && (!isset($postuserid))) {

3) Find

Code:
// draw nav bar
$navbar=makenavbar($threadid,"thread",0);
And change it to:

Code:
// draw nav bar
if (isset($postuserid)) {
	$navbar=makenavbar($threadid,"thread",1);
} else {
	$navbar=makenavbar($threadid,"thread",0);
}
4) Find

Code:
if ($thread[pollid]) {
And change it to:

Code:
if (($thread[pollid]) && (!isset($postuserid))) {
5) Find

Code:
$postscount=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE post.threadid='$threadid' AND post.visible=1");
And change it to:

Code:
$postscount=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE post.threadid='$threadid' ".iif(isset($postuserid), "AND post.userid='$postuserid'", "")." AND post.visible=1");
6) Find

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
");
And change it to (this is the change you already made):

Code:
$getpostids=$DB_site->query("
	SELECT post.postid FROM post
	WHERE post.threadid='$threadid' ".iif(isset($postuserid), "AND post.userid='$postuserid'", "")." AND post.visible=1
	ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");

7) Find

Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");
And change it to
Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid".iif(isset($postuserid), "&postuserid=$postuserid", "")."&perpage=$perpage");
These are the changes I could pick up off the top of my head. Personally I prefer to separate the two, so as not to add more procedures to showthread, and at the same time to deduct unnecessary procedures from showposts

Cheers,

Bira
Reply With Quote
  #16  
Old 11-29-2001, 04:26 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks bira for letting me know.

I actually only did the 3rd, 5th, 6th and 7th changes you listed, the others are really minor and not worth it.

Oh, and you have one ." too many here, and also something else:
Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($postuserid), "&post.userid='$postuserid", "").");
Reply With Quote
  #17  
Old 11-29-2001, 04:36 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

redid that line for clarity's sake
Reply With Quote
  #18  
Old 11-29-2001, 04:42 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You forgot to remove the dot between post and userid in that line.
Sorry for being petty.
Reply With Quote
  #19  
Old 11-29-2001, 04:53 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

argh, bloody hell, heh. I'm not focused today, think I'll go have dinner and watch telly. Shouldn't be messing with code in my state
Reply With Quote
  #20  
Old 11-29-2001, 10:49 PM
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Location: UK
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A seperate file is very appealing, ease of installation and bug hunting, less rehacking to do before an upgrade and if all hacks were *somehow* made this way we could keep our support for unedited files. Just a thought, as they say.

What are the disadvantages of using many files?
Reply With Quote
  #21  
Old 11-29-2001, 11:14 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Martz
What are the disadvantages of using many files?
Reply With Quote
 


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:40 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.04777 seconds
  • Memory Usage 2,315KB
  • Queries Executed 25 (?)
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
  • (17)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete