Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2005, 06:27 AM
Sin City Sin City is offline
 
Join Date: May 2003
Location: Florida
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Member post request

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
Reply With Quote
  #2  
Old 01-09-2005, 07:24 PM
Sin City Sin City is offline
 
Join Date: May 2003
Location: Florida
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

shameless bump
Reply With Quote
  #3  
Old 01-10-2005, 09:16 PM
Sin City Sin City is offline
 
Join Date: May 2003
Location: Florida
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

:surprised: must...put...back...on...top
Reply With Quote
  #4  
Old 01-11-2005, 06:48 AM
FWF FWF is offline
 
Join Date: Feb 2003
Location: Indianapolis, IN
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that would be a very useful hack.
Reply With Quote
  #5  
Old 01-11-2005, 07:08 AM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-11-2005, 09:57 PM
Sin City Sin City is offline
 
Join Date: May 2003
Location: Florida
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool... i guess i'll mess around and see if it works, thanks
Reply With Quote
  #7  
Old 01-11-2005, 10:15 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Threads (started by this user):
[sql]SELECT forumid, COUNT( threadid ) AS threads FROM thread WHERE postuserid = 1234 GROUP BY forumid ORDER BY forumid ASC LIMIT 0, 30[/sql]

Posts:
[sql]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[/sql]

Another aproach
[sql]
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
[/sql]

This should give you both figures in one query.

I've attached a quick'n'dirty ACP script that might do what you want.
Attached Files
File Type: php postlookup.php (1.7 KB, 9 views)
Reply With Quote
  #8  
Old 01-12-2005, 12:46 AM
Sin City Sin City is offline
 
Join Date: May 2003
Location: Florida
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome KirbyDE.... you are the man ... thank you
Reply With Quote
  #9  
Old 01-17-2005, 04:12 AM
Sin City Sin City is offline
 
Join Date: May 2003
Location: Florida
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 01-17-2005, 06:03 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just go to the url: www.myboard.com/admincp/postlookup.php
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:39 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09057 seconds
  • Memory Usage 2,260KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete