vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Display most active users (https://vborg.vbsupport.ru/showthread.php?t=266685)

qpurser 08-05-2011 01:25 PM

I tried to add this but got an error.
Any help why this is happening?
Thanks

Database error in vBulletin 4.1.5:

Invalid SQL:
select count(postid) as count, post.userid, user.username from V4post INNER JOIN V4user on user.userid = post.userid where post.dateline > 1311952983 GROUP BY post.userid ORDER BY count DESC LIMIT 1;

MySQL Error : Unknown column 'post.userid' in 'field list'
Error Number : 1054
Request Date : Friday, August 5th 2011 @ 11:23:03 AM
Error Date : Friday, August 5th 2011 @ 11:23:04 AM
Script : http://xxx.com/V4/forum.php
Referrer : http://xxx.com/V4/forum.php
IP Address :
Username :
Classname :
MySQL Version : 5.0.91-log

mchll9898 01-20-2020 06:29 PM

Quote:

Originally Posted by Badshah93 (Post 2219722)
Create New Plugin:

Hook: forumhome_complete
Title: Most Actived Member Of The Week
Execution Order : 5

Code

Code:

$cutofftime = TIMENOW - 7*86400;
$mostactive = $db->query_first("select count(postid) as count, post.userid, user.username from ".TABLE_PREFIX."post INNER JOIN ".TABLE_PREFIX."user on user.userid = post.userid where post.dateline > $cutofftime GROUP BY post.userid ORDER BY count DESC LIMIT 1");

vB_Template::preRegister('FORUMHOME',array('mostactive' => $mostactive));


Now To Display Username of the Most Active Member

Use:

Code:

{vb:raw mostactive.username}


anywhere in the FORUMHOME TEMPLATE



I know this is old, but maybe someone can help. This works great - I have vb 4.2.5.

I was wondering what I would need to add to the code to exclude my user id, so I'm not showing up as the most active member of my site.


All times are GMT. The time now is 12:38 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.04783 seconds
  • Memory Usage 1,715KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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