View Full Version : Member post request
Sin City
01-09-2005, 06:27 AM
i know there is a hack that tells what each user's "favorite" forum to post in.... but i searched and did not find quite what i was looking for
i was wondering if someone could make a hack which allows admins and smods to see what each forum a person has posted in
like it will show their name and divide up their posts and threads created by forum... for example:
Bob
Sports
Threads - 3
Posts - 45
Music
Threads - 6
Posts - 145
hope i made it clear enough what i am looking for
Sin City
01-09-2005, 07:24 PM
shameless bump
Sin City
01-10-2005, 09:16 PM
:surprised: must...put...back...on...top
that would be a very useful hack.
Tekton
01-11-2005, 07:08 AM
Well, for the threads.... query the thread table and grab all threads by the user (postusername or postuserid), and then do a while that sorts them all by the forumid. Then you should have the number for each (of threads at least), and then grab the highest one and then query that forumid to the forum table if you want it's name.
Sorry for not writing that out in actual code, but it'd be something like that. For posts in forum, it'd be another step(s) added on due to having to search for the threadid's that each post belonged to and then matching those to a forum each time.
Sin City
01-11-2005, 09:57 PM
cool... i guess i'll mess around and see if it works, thanks
Andreas
01-11-2005, 10:15 PM
Threads (started by this user):
SELECT forumid, COUNT( threadid ) AS threads FROM thread WHERE postuserid = 1234 GROUP BY forumid ORDER BY forumid ASC LIMIT 0, 30
Posts:
SELECT thread.forumid AS forumid, COUNT( post.postid ) AS posts FROM post LEFT JOIN thread ON ( thread.threadid = post.threadid ) WHERE post.userid = 1234 GROUP BY thread.forumid ORDER BY forumid ASC
Another aproach
SELECT thread.forumid AS forumid, COUNT( post.postid ) AS posts, SUM(IF(thread.postuserid = 1234 AND thread.firstpostid = post.postid, 1, 0) ) AS threads FROM post LEFT JOIN thread ON ( thread.threadid = post.threadid ) WHERE post.userid = 1234 GROUP BY thread.forumid ORDER BY forumid ASC
This should give you both figures in one query.
I've attached a quick'n'dirty ACP script that might do what you want.
Sin City
01-12-2005, 12:46 AM
awesome KirbyDE.... you are the man :) ... thank you
Sin City
01-17-2005, 04:12 AM
ok i uploaded the .php file KirbyDE set up for me into my admincp folder... but in order to see it in my admincp i'd need to edit the index.php file... i looked in the actual file and i have somewhat of an idea of what i'd need to imput, but if someone could tell me the coding to put into it, that'd be greatly appreciated... thanks in advance
Marco van Herwaarden
01-17-2005, 06:03 AM
Just go to the url: www.myboard.com/admincp/postlookup.php
Sin City
01-17-2005, 08:01 AM
i'd like to, but a certain piece of the board gets rewarded depending on how many posts and threads they've made per week... the hack i am requesting would just make that easier to do
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.