The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||
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] Code:
<a href="showposts.php?s=$session[sessionhash]&threadid=$threadid&postuserid=$post[userid]" target="_blank">$post[posts]</a> ![]() Cheers, Bira Show Your Support
|
Comments |
#12
|
||||
|
||||
![]()
[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 ![]() |
#13
|
||||
|
||||
![]()
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 |
#14
|
||||
|
||||
![]()
... 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 ![]() |
#15
|
||||
|
||||
![]()
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") { Code:
if (($goto=="nextnewest") && (!isset($postuserid))) { Code:
if ($goto=="nextoldest") { Code:
if (($goto=="nextoldest") && (!isset($postuserid))) { 3) Find Code:
// draw nav bar $navbar=makenavbar($threadid,"thread",0); Code:
// draw nav bar if (isset($postuserid)) { $navbar=makenavbar($threadid,"thread",1); } else { $navbar=makenavbar($threadid,"thread",0); } Code:
if ($thread[pollid]) { Code:
if (($thread[pollid]) && (!isset($postuserid))) { Code:
$postscount=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE post.threadid='$threadid' AND post.visible=1"); 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"); 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 "); 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"); Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid".iif(isset($postuserid), "&postuserid=$postuserid", "")."&perpage=$perpage"); Cheers, Bira |
#16
|
||||
|
||||
![]()
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", "")."); |
#17
|
||||
|
||||
![]()
redid that line for clarity's sake
![]() |
#18
|
||||
|
||||
![]()
You forgot to remove the dot between post and userid in that line.
![]() Sorry for being petty. ![]() |
#19
|
||||
|
||||
![]()
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
![]() |
#20
|
||||
|
||||
![]()
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? |
#21
|
||||
|
||||
![]()
[QUOTE]Originally posted by Martz
What are the disadvantages of using many files? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|