vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   "Who Posted" Enhancement: View All Posts By User In This Thread (https://vborg.vbsupport.ru/showthread.php?t=32784)

bira 11-27-2001 10:00 PM

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

bira 11-28-2001 06:37 PM

Forgot to say this has been tested and works on 2.03 and up, including the latest version (2.2.1)

Bane 11-28-2001 06:54 PM

Great Idea Bira :)

Lesane 11-28-2001 07:04 PM

Nice Hack Bira, Thanks

FWC 11-28-2001 08:37 PM

Very cool! Thanks, Bira! :D

itstd 11-28-2001 10:05 PM

Pretty cool! A lot of times the mems on my forum are only interested in what a Mod replys to their question (especially a technical one) and this is perfect for that. Thanks!

Martz 11-28-2001 11:29 PM

Fantastic, I love these hacks with no file editing, just tweak a template and your away :)


Great work bria. :D

Hooper 11-29-2001 05:27 AM

Very nice. Works super. Thank you.

Admin 11-29-2001 01:18 PM

I like it, and I'm gonna install it (sometime ;)), but I have something to say.

Why do you need a whole new file just for getting X's posts?

Right now you have this, right?
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
");

(in showthread.php)
You can just change it to something like:
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
");

And that's it! :)
(unless I'm missing something you had special in showposts.php)

Just constructive criticism. :):)

bira 11-29-2001 02:09 PM

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:

check in which order to show the posts - newest first or oldest first?

check whether the thread is visible

get permissions

do the posts-per-page routine

draw the navbar

bbcode et. al.

page nav

admin options or not


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 :)


All times are GMT. The time now is 12:32 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.01317 seconds
  • Memory Usage 1,738KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete