vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [VB3 RC3] Most active user in the forums (https://vborg.vbsupport.ru/showthread.php?t=60391)

Detomah 01-29-2004 08:57 PM

Would there be any way to do this so it does not include certain usergroups?

I would like to use this hack, but it's fairly obvious at the moment that I would be the most active user on my forum as admin, followed cloesly behind by my moderators. I'd like to be able to use it but only with my registered users counting towards it.

Kentaurus 02-01-2004 08:42 PM

Quote:

Originally Posted by Detomah
Would there be any way to do this so it does not include certain usergroups?

I would like to use this hack, but it's fairly obvious at the moment that I would be the most active user on my forum as admin, followed cloesly behind by my moderators. I'd like to be able to use it but only with my registered users counting towards it.

This query:

Code:

$maxposter = $DB_site->query_first("SELECT user.username,user.userid,count(*) total FROM ".TABLE_PREFIX."user AS user,".TABLE_PREFIX."post AS post WHERE user.userid=post.userid AND post.dateline BETWEEN $start AND $end GROUP BY post.userid ORDER BY total DESC LIMIT 1");
change it to:

Code:

$maxposter = $DB_site->query_first("SELECT user.username,user.userid,count(*) total FROM ".TABLE_PREFIX."user AS user,".TABLE_PREFIX."post AS post WHERE user.userid=post.userid AND post.dateline BETWEEN $start AND $end AND usergroupid NOT IN (5,6) GROUP BY post.userid ORDER BY total DESC LIMIT 1");
and change for your wanted usergroups

Boofo 02-15-2004 07:55 AM

Wouldn't this change actually work better because it would follow the server time like most other things do on the forumhome. ;)

HTML Code:

// <!-- MOST ACTIVE MEMBER -->
 $maxposter = $DB_site->query_first("
  SELECT user.username,user.userid,count(*) AS total
  FROM ".TABLE_PREFIX."user AS user,".TABLE_PREFIX."post AS post
  WHERE user.userid=post.userid
  AND post.dateline
  AND usergroupid NOT IN (5,7)
  And dateline >= $starttime
  GROUP BY post.userid
  ORDER BY total
  DESC LIMIT 1

And does this include thread counts AND post counts? I'm trying to set up the percentage of posts this user has made out of the ones for that day. But I keep getting a divison by zero error (which I think i may have stopped, I'm still testing).

VAN 02-24-2004 04:06 AM

How about modifying this so it shows the # of posts the most active member has made during the time period?

Something like...

Todays Most Active Member: Username with 125 Posts.

Boofo 02-24-2004 07:44 AM

It already does that. ;)

Mike Gaidin 02-24-2004 08:29 PM

Mine doesn't do that. Mine just has the member name.

Boofo 02-24-2004 10:02 PM

Try using this for the post count. ;)

Quote:

$maxposter[total]

Mike Gaidin 02-25-2004 12:05 AM

Thanks Bob. Works like a charm.

MikeXP 03-21-2004 02:22 AM

Thanks Bob and the creator of the hack it worked great :)

http://GlobalBoards.com

Parmstig 03-24-2004 10:55 AM

Quote:

Originally Posted by Boofo
Try using this for the post count. ;) $maxposter[total]

Thanks, is it possible in a easy way to make it similiar to $recordusers (most ever was online)

Like "Most Active user ever was xxx with xxx in one day" ?


All times are GMT. The time now is 01:46 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.00950 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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