vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   vBulletin CMS Widgets - Widget: Top 5 Posters this Week (https://vborg.vbsupport.ru/showthread.php?t=230794)

javivi0 01-27-2010 01:52 PM

hi, thanks for mod !!!!! I installed !!!

one question??? can I add this code in vbblock for sidebar of the forum?

thanks

k1klass 01-29-2010 04:23 PM

Changed the id to guild group, but top poster displays - Posts:%u00A066

any idea's?

CORSO 02-14-2010 07:05 PM

Me too

rikmac 03-01-2010 04:51 PM

Me Too.

rikmac 03-01-2010 05:17 PM

Ok, try this code, and ad your group id: in $grouparray = "2,3,4,5,"; in the first line.

Code:


$grouparray = "2";
$groupids = explode(',',$grouparray);

$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."'
      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="_blank" 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="_blank" href="member.php?u='.$user[userid].'">'.$user[username].'</a><div style="float: right;">'.$user[postcount].'</div><br />';
        }
  }
  $output = $output_bits;
  ob_end_clean();


MOGmartin 03-01-2010 05:25 PM

Quote:

Originally Posted by javivi0 (Post 1967996)
hi, thanks for mod !!!!! I installed !!!

one question??? can I add this code in vbblock for sidebar of the forum?

thanks

Ive tried, no luck, althought Id love this for the forum area only...

any ideas anyone?

MedellinStyle 03-03-2010 07:13 AM

hi Maria, How to apply this code in a sidebar block?????

pcalloway 03-03-2010 06:38 PM

Having to uninstall this - it crashed my website with mysql errors as well.

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Lost connection to MySQL server during query
/home/authent/public_html/forum/includes/class_core.php on line 312
MySQL Error :
Error Number :
Request Date : Wednesday, March 3rd 2010 @ 03:31:44 PM
Error Date : Wednesday, March 3rd 2010 @ 03:31:44 PM
Script : http://www.authentic-campaigner.com/...and=1267648292
Referrer : http://www.authentic-campaigner.com/forum/content.php?
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version :

KHALIK 03-03-2010 07:41 PM

I've installed this on vb 4.0.2 and is working fine.

Installed it on my home page.

neudimenxion 03-07-2010 11:48 PM

Installed. Just the member's profile photo didn't appear though already add in the photo in the profile page. I want exactly like the screen shot. What's the matter with my installation.

TQ.


All times are GMT. The time now is 04:39 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.01074 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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