Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Widget: Top 5 Posters this Month Details »»
Widget: Top 5 Posters this Month
Version: 1.0.0, by MaryTheG(r)eek MaryTheG(r)eek is offline
Developer Last Online: Mar 2012 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.0 Rating:
Released: 12-21-2009 Last Update: Never Installs: 100
Auto-Templates
 
No support by the author.

..............................................

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 04-27-2010, 12:06 PM
SLY LS1's Avatar
SLY LS1 SLY LS1 is offline
 
Join Date: May 2007
Location: Melbourne Australia
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by neudimenxion View Post
i'vw got the same problem too.


Me to
Reply With Quote
  #43  
Old 05-16-2010, 09:10 AM
xabo xabo is offline
 
Join Date: Apr 2010
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to ignore some usernames from the list?
Reply With Quote
  #44  
Old 07-20-2010, 08:07 PM
TazDevilLooney TazDevilLooney is offline
 
Join Date: Jan 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This fixes the display problem with IE7

Code:
$posts = "Posts";
  ob_start();
  require_once('./includes/functions_user.php');
  require_once('./includes/functions_bigthree.php');
  // Current Week Top Posters
  $starttime = mktime(0, 0, 0, date('n'), date('j'), date('Y')) - ((date('N')-1)*3600*24);
  // Get Top Members for current week
  $mostactiveweek_get = vB::$db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle,
     COUNT(".TABLE_PREFIX."post.postid) AS postcount
    FROM ".TABLE_PREFIX."user
     LEFT JOIN ".TABLE_PREFIX."post
      ON ".TABLE_PREFIX."post.userid=".TABLE_PREFIX."user.userid
       AND dateline>'".$starttime."'
WHERE usergroupid=2

   GROUP BY ".TABLE_PREFIX."user.userid
   ORDER BY postcount DESC
   LIMIT 5");
  $topposter = true;
  $output_bits = '';
  while($user = vB::$db->fetch_array($mostactiveweek_get))
  {
        $percentage = round(($user[postcount]/$totalposts[postcount]) * 100);
        if($topposter == true)
        {
           $avatarurl = fetch_avatar_url($user[userid]);
           if (!$avatarurl) {
               $useravatar = 'images/misc/avatar.png';
           } else  {
              $useravatar = $avatarurl[0];
           }
           $output_bits .='<div align="center">
                           <img border="0" src="'.$useravatar.'"><br />
                           <a target="_self" href="member.php?u='.$user[userid].'">'.$user[username].'</a><br />
                           '.$user[usertitle].'<br />
                           '.$posts.': '.$user[postcount].'<br />
                           </div><hr />';
           $topposter = false;
        } else {
           $output_bits .= '<a target="_self" href="member.php?u='.$user[userid].'">'.$user[username].'</a><div style="text-align: right;margin-top:-15px;">'.$user[postcount].'</div>';
        }
  }
  $output = $output_bits;
  ob_end_clean();

Enjoy TazDevilLooney
Reply With Quote
  #45  
Old 07-30-2010, 03:09 PM
Yurified Yurified is offline
 
Join Date: Mar 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome! Thanks xD
Is there a way that we can have this for forum sideblock?
Reply With Quote
  #46  
Old 07-30-2010, 06:02 PM
cs28702 cs28702 is offline
 
Join Date: Apr 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed, much appreciated. I just set my for 2 hours . If its slow, I dont care
Reply With Quote
  #47  
Old 07-30-2010, 08:10 PM
TazDevilLooney TazDevilLooney is offline
 
Join Date: Jan 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you sould be able to add it to a forum block. Try this....

AdminCP -> Forums and Moderators -> Forum Block Manager -> Add Block

Pick -> Custom HTML/PHP

Change title to what you want!
Content type -> PHP
Copy the code in to the Content Box

That sould be it....

TazDevilLooney

-> Update <-

Tested it my self and works fine enjoy.............
Reply With Quote
  #48  
Old 07-30-2010, 08:48 PM
LuisManson LuisManson is offline
 
Join Date: Jun 2010
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can make it as a forum and with MANY groups....
Code:
Database error in vBulletin 4.0.5:

Invalid SQL:

    SELECT user.userid, user.username, user.usertitle,
     COUNT(post.postid) AS postcount
    FROM user
     LEFT JOIN post
      ON post.userid=user.userid
       AND dateline>'1277953200'
   WHERE usergroupid IN (Array)
    GROUP BY user.userid
   ORDER BY postcount DESC
   LIMIT 5;

MySQL Error   : Unknown column 'Array' in 'where clause'
Error Number  : 1054
Request Date  : Friday, July 30th 2010 @ 06:47:57 PM
Error Date    : Friday, July 30th 2010 @ 06:47:57 PM
Script        : http://www.ccccc.com/forum.php
Referrer      : http://www.cccc.com/admincp/index.php?do=head
IP Address    : 201.253.32.50
Username      : xxxxxx
Classname     : vB_Database
MySQL Version : 5.0.90

Code used:

Code:
$grouparray = "2,28,23,26,24,25";
$groupids = explode(',',$grouparray);
$posts = "Posts";
  ob_start();
  require_once('./includes/functions_user.php');
  require_once('./includes/functions_bigthree.php');
  // Current Month Top Posters
  $starttime = mktime(0, 0, 0, date('m'), 1, date('Y'));
  // Get Top Members for current month
  $mostactivemonth_get = vB::$db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle,
     COUNT(".TABLE_PREFIX."post.postid) AS postcount
    FROM ".TABLE_PREFIX."user
     LEFT JOIN ".TABLE_PREFIX."post
      ON ".TABLE_PREFIX."post.userid=".TABLE_PREFIX."user.userid
       AND dateline>'".$starttime."'
   WHERE usergroupid IN ($groupids)
    GROUP BY ".TABLE_PREFIX."user.userid
   ORDER BY postcount DESC
   LIMIT 5");
  $topposter = true;
  $output_bits = '';
  while($user = vB::$db->fetch_array($mostactivemonth_get))
  {
        $percentage = round(($user[postcount]/$totalposts[postcount]) * 100);
        if($topposter == true)
        {
           $avatarurl = fetch_avatar_url($user[userid]);
           if (!$avatarurl) {
               $useravatar = 'images/misc/avatar.png';
           } else  {
              $useravatar = $avatarurl[0];
           }
           $output_bits .='<div align="center">
                           <img border="0" src="'.$useravatar.'"><br />
                           <a target="_blank" href="member.php?u='.$user[userid].'">'.$user[username].'</a><br />
                           '.$user[usertitle].'<br />
                           '.$posts.':&nbsp;'.$user[postcount].'<br />
                           </div><hr />';
           $topposter = false;
        } else {
           $output_bits .= '<a target="_blank" href="member.php?u='.$user[userid].'">'.$user[username].'</a><div style="float: right;">'.$user[postcount].'</div><br />';
        }
  }
  $output = $output_bits;
  ob_end_clean();
Reply With Quote
  #49  
Old 07-31-2010, 02:44 PM
Yurified Yurified is offline
 
Join Date: Mar 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TazDevilLooney View Post
Yes you sould be able to add it to a forum block. Try this....

AdminCP -> Forums and Moderators -> Forum Block Manager -> Add Block

Pick -> Custom HTML/PHP

Change title to what you want!
Content type -> PHP
Copy the code in to the Content Box

That sould be it....

TazDevilLooney

-> Update <-

Tested it my self and works fine enjoy.............
I tried it and I have blank block
Reply With Quote
  #50  
Old 08-01-2010, 01:38 AM
apokphp apokphp is offline
 
Join Date: Nov 2002
Posts: 440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TazDevilLooney View Post
Yes you sould be able to add it to a forum block. Try this....

AdminCP -> Forums and Moderators -> Forum Block Manager -> Add Block

Pick -> Custom HTML/PHP

Change title to what you want!
Content type -> PHP
Copy the code in to the Content Box

That sould be it....

TazDevilLooney

-> Update <-

Tested it my self and works fine enjoy.............
Not sure what code you used...but it definitely isn't the op's listed code on a 4.0.5 board. Full of sql errors when you try to use it as a forum widget.
Reply With Quote
  #51  
Old 08-08-2010, 11:29 PM
TazDevilLooney TazDevilLooney is offline
 
Join Date: Jan 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you sould be able to add it to a forum block. Try this....

AdminCP -> Forums and Moderators -> Forum Block Manager -> Add Block

Quote:
Pick -> Custom HTML/PHP

Change title to what you want!
Content type -> PHP
Copy the code in to the Content Box

That sould be it....

TazDevilLooney

-> Update <-

Tested it my self and works fine enjoy.............
I had no problem with this.

Code:
$posts = "Posts";
  ob_start();
  require_once('./includes/functions_user.php');
  require_once('./includes/functions_bigthree.php');
  // Current Week Top Posters
  $starttime = mktime(0, 0, 0, date('n'), date('j'), date('Y')) - ((date('N')-1)*3600*24);
  // Get Top Members for current week
  $mostactiveweek_get = vB::$db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle,
     COUNT(".TABLE_PREFIX."post.postid) AS postcount
    FROM ".TABLE_PREFIX."user
     LEFT JOIN ".TABLE_PREFIX."post
      ON ".TABLE_PREFIX."post.userid=".TABLE_PREFIX."user.userid
       AND dateline>'".$starttime."'
WHERE usergroupid=2

   GROUP BY ".TABLE_PREFIX."user.userid
   ORDER BY postcount DESC
   LIMIT 5");
  $topposter = true;
  $output_bits = '';
  while($user = vB::$db->fetch_array($mostactiveweek_get))
  {
        $percentage = round(($user[postcount]/$totalposts[postcount]) * 100);
        if($topposter == true)
        {
           $avatarurl = fetch_avatar_url($user[userid]);
           if (!$avatarurl) {
               $useravatar = 'images/misc/avatar.png';
           } else  {
              $useravatar = $avatarurl[0];
           }
           $output_bits .='<div align="center">
                           <img border="0" src="'.$useravatar.'"><br />
                           <a target="_self" href="member.php?u='.$user[userid].'">'.$user[username].'</a><br />
                           '.$user[usertitle].'<br />
                           '.$posts.': '.$user[postcount].'<br />
                           </div><hr />';
           $topposter = false;
        } else {
           $output_bits .= '<a target="_self" href="member.php?u='.$user[userid].'">'.$user[username].'</a><div style="text-align: right;margin-top:-15px;">'.$user[postcount].'</div>';
        }
  }
  $output = $output_bits;
  ob_end_clean();





VB 4.0.5
Server Errors In Log = 0/None
Reply With Quote
Reply


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 09:27 AM.


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.09278 seconds
  • Memory Usage 2,321KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete