PDA

View Full Version : Forum Post Breakdown (Per User)


TWTCommish
02-12-2002, 10:00 PM
This hack was inspired by Lesane's recent hack, How many threads a user started in a forum (https://vborg.vbsupport.ru/showthread.php?threadid=34694). It achieves the same thing, only with post totals, instead of thread totals.

Short description: it turns your post totals on your forumhome template (and your forumdisplay forumbit templates, if you want) into clickable links that brink up a popup window showing you how many posts each user has in that forum. It orders them by total number of posts there. Right now it only displays the top 3, however, as too many, for larger boards, would get REALLY cray-zay. You can change the part in whoposts.php that says "LIMIT 30" to whatever you want, though.

I find that this hack is quite useful when used along with Lesane's hack. I love to turn virtually EVERYTHING into a link leading to relevant/useful information. :)

Attached is a ZIP archive. In it are 3 files: whoposts.php, templates.txt, and instructions.txt. They should all be pretty self-explanatory. Screenshots available below. Enjoy. :)

Lesane
02-13-2002, 02:06 PM
Nice hack, well done. :up:

TWTCommish
02-13-2002, 02:08 PM
The original screensoht I had was too big, so, instead, I'm attaching a shot of an individual forum, and the resulting popup window when the link is clicked on. Here's the forumbit:

TWTCommish
02-13-2002, 02:09 PM
Originally posted by Lesane
Nice hack, well done. :up:
Thanks. :)

Here's the other shot: of the popup itself.

Lesane
02-13-2002, 02:11 PM
Originally posted by TWTCommish
This hack was inspired by FireFly's recent hack, Number of threads use started in a certain forum (https://vborg.vbsupport.ru/showthread.php?threadid=33811). It achieves the same thing, only with post totals, instead of thread totals.


I guess you mean this hack:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=34694

Because firefly's hack displays, how many threads a user started in a specified forum, in the postbit ;)

Tim Wheatley
02-13-2002, 02:12 PM
Excellent, absolutely excellent. :)

TWTCommish
02-13-2002, 02:13 PM
D'oh! Sorry...I'll do that now. :) 'Twas you that wrote it, then? Great hack. :up: I installed it and sat there looking at my forum, and thought "I MUST TURN THAT OTHER NUMBER INTO A LINK!" :D

Tim Wheatley
02-13-2002, 02:15 PM
Modified my frontpage a little, so had to modify, but works PERFECTLY.

TWTCommish
02-13-2002, 02:17 PM
Oh, glad you got it working. :) If anyone has any trouble let me know, and I'll be glad to help. I'm glad that it seems to be well-received so far. My popups load a little on the slow side...but that might just be me, because the script only has two queries to deal with.

Lesane
02-13-2002, 02:19 PM
Originally posted by TWTCommish
D'oh! Sorry...I'll do that now. :) 'Twas you that wrote it, then? Great hack. :up: I installed it and sat there looking at my forum, and thought "I MUST TURN THAT OTHER NUMBER INTO A LINK!" :D

haha :D :up:

Tim Wheatley
02-13-2002, 02:21 PM
*puts on show off size of forum hat*

Here's a screenshot of one of my forums...

TWTCommish
02-13-2002, 02:25 PM
Yeah, yeah, yeah. :) How'd it load, BTW? Didn't take too long, even with 30 posters with massive post counts?

Tim Wheatley
02-13-2002, 02:27 PM
No we have our server admin contracted that they have to upgrade our server when it reaches 70% capacity... I'm also on a fast 'net connection. It took at most 3/4 of a second to load.

TWTCommish
02-13-2002, 02:28 PM
Hey, noticed a problem with your forums: your post AND thread popup links both lead to the post popup...

Tim Wheatley
02-13-2002, 02:31 PM
I did that on purpose. :)

TWTCommish
02-13-2002, 02:33 PM
Ehhhh....ok. :confused: :)

Tim Wheatley
02-13-2002, 02:39 PM
I haven't installed any hack yet which gives a list of how many threads a user has started in said forum, when I do I'll change it. Until then it would look messy having the top half linking somewhere and the bottom not. Or maybe that's just me. :)

Gamingforce
02-14-2002, 01:10 PM
Excellent hack but it takes a bit to get some results and makes server loads through the roof. I made a hack like this a while back but didn't release it because of the massive cpu usage.

We have hundreds of thousands of posts on our message board and for the larger forums, it takes about 10-20 seconds to load.

Our server setup:
Web server: Dual P3 933 MHz with 2 GB of memory on Linux
Database server: Dual P3 933 MHz with 2 GB of memory on Linux

Before the hack, database server loads were around .15-.20, after the hack as people were testing it out, it hit 1.75-2.00. It's a cool feature to have, but I don't think an increase in server load that much justifies it.

Excellent job on it!

TWTCommish
02-14-2002, 01:12 PM
Yeah, it does lag a bit. Same things happen for me with the thread-related counterpart hack sometimes. Only thing I would advise then, to perhaps ease the pain, is to reduce it to only display the top 10 for each forum, rather than the top 30.

Tim Wheatley
02-15-2002, 06:02 AM
That's what I did. ;)

I've also installed the threads hack now, so my links are 'proper' ;)

Shadowwalker
02-17-2002, 02:37 AM
Will it work on 2.2.1, well I'll try it anyways.

TWTCommish
02-17-2002, 03:01 AM
Yes, this should work on ALL 2.x versions. I don't see why it wouldn't...

eva2000
02-22-2002, 11:04 AM
nice hack.. is it possible to make is viewable only in the admin control panel ?

TWTCommish
02-22-2002, 11:51 AM
I 'spose so -- or to make it viewable only to admins of usergroupid 6. But where in the Admin CP would it be?

eva2000
02-22-2002, 12:35 PM
Originally posted by TWTCommish
I 'spose so -- or to make it viewable only to admins of usergroupid 6. But where in the Admin CP would it be? i'd like to use this as tool for helping me determine who will become potential moderators on my forums

so maybe in admin panel under statistics category have heading

forum totals

when clicked

lists a hyperlinked list

forumtitle | total posts

when that's clicked reveals the totals for each member ?

TWTCommish
02-22-2002, 12:36 PM
ooooh, tricky. I'll take a look and see what I can do. :)

Lucky
02-24-2002, 06:13 AM
Works great on 2.2.2

Thank you.

Overgrow
02-24-2002, 07:30 AM
Great little hack. Not your fault but it took too long (8 seconds on the larger forums and this is in the middle of the night with a small load.. 140k posts, 700k total). A quick modification and the link is now only visible to admins, normal users don't get the link:

open index.php, find:

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");


above that add:

// *HACK: FORUM POST COUNTS

if ($bbuserinfo[usergroupid]==6) {
$replycountlink="<a href=\"javascript:whoposts($forum[forumid])\">$forum[replycount]</a>";
} else {
$replycountlink="$forum[replycount]";
}
// *HACK : FORUM POST COUNTS


And then in the forumhome_forumbit_level1_post, etc templates, replace the link:

<a href="javascript:whoposts($forum[forumid])">$forum[replycount]</a>


with


$replycountlink

eGoR
04-08-2002, 04:20 PM
great addie, Over
thx alot

and thx to hack writer :p