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)
-   -   How many posts did a user make in which forum (https://vborg.vbsupport.ru/showthread.php?t=44790)

the_sisko 10-19-2002 10:00 PM

How many posts did a user make in which forum
 
What does it do?
OK, this is one off my many hack I made a long time ago, it was very bad as my sql was very bad. Today I improved it a little bit as I learned some more sql :D
Some time ago I needed to get some new mods and wanted a fast way to find out where a specific user posted most. So I created this little stats script which shows up the number of posts in very forum. I took the function from forum.php and modified it a little bit.
For better understanding see screenshot in next post.
https://vborg.vbsupport.ru/attachment.php?postid=311900

Installation

Edit /admin/user.php
Find:
PHP Code:

  <li>".makelinkcode("View the profile for $user[username]","../member.php?s=$session[sessionhash]&action=getinfo&userid=$userid",1)."</li

under it put:
PHP Code:

  <li>".makelinkcode("Show in which forum $user[usernameposted","countpost.php?s=$session[sessionhash]&userid=$userid&username=$user[username]")."</li

Upload countposts.php
Put countposts.php in your admin folder.


You will find a new link on the CP under edit user called:
[Show in which forum USERNAME posted]

When you click on it, you will see a page which shows a statistic in which forum the user posts how many posts.



EDIT
Protection
I limited this function to the admins added under the config.php file. If you want this hack to be used be any admin just do this:
Find:
PHP Code:

if (($action=="modify") && checklogperms($canviewadminlog,1,"<p>Page viewing restricted.</p>")) { 

and replace it with
PHP Code:

if ($action=="modify") { 


the_sisko 10-20-2002 05:03 PM

Screenshot

JohnWoo 10-20-2002 05:04 PM

Some screenshots plz ?!

Matt87 10-20-2002 05:04 PM

Very Nice job!

JohnWoo 10-20-2002 05:05 PM

Ohh.. sorry... I`ll post before you attach it .. :) :lol:

the_sisko 10-20-2002 05:11 PM

Tested on 2.2.5 only but should work on any version above and below.

Floris 10-20-2002 05:24 PM

My members might have an interest in this being a public page. Is that possible? Or does that include some security issue? like showing forums they shouldn't see?

I'd love such an overview (public)

Matt87 10-20-2002 05:26 PM

Yes I agree... :D

Schorsch 10-20-2002 05:58 PM

public would be great !!!! :p

N9ne 10-20-2002 06:34 PM

Yeah public would be great :)


All times are GMT. The time now is 08:19 PM.

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.01407 seconds
  • Memory Usage 1,737KB
  • 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_php_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