vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - [WIDGET] Forum Stats (https://vborg.vbsupport.ru/showthread.php?t=236403)

Joe Blow 02-27-2011 07:07 PM

Quote:

Originally Posted by Robert Carver (Post 2031143)
1. The total number of members shown in the widget does not correspond with the total number shown on the forumhome page.

I am experiencing the same issue. I have a private forum that I do not want included in the Total Posts. I would like to know how to get the widget to display the same number of posts as the Forum Home displays.

Joe Blow 05-20-2011 04:10 PM

Quote:

Originally Posted by Joe Blow (Post 2167634)
I am experiencing the same issue. I have a private forum that I do not want included in the Total Posts. I would like to know how to get the widget to display the same number of posts as the Forum Home displays.

Anyone?

toxin 07-01-2011 01:23 PM

You can change the first few lines to get more accurate thread and post counts (and to display the same numbers as the stats block on the forumhome):


PHP Code:


// forum stats start 
$vboptions[bburl] = $vbulletin->options[bburl];
$numbersmembers $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " TABLE_PREFIX "user"); 
$numbermembers number_format($numbersmembers['users']); 

$counter=$db->query_first("SELECT sum(replycount) as posts FROM " TABLE_PREFIX "forum");
$totalposts=number_format($counter['posts']); 

$counter=$db->query_first("SELECT sum(threadcount) as threads FROM " TABLE_PREFIX "forum");
$totalthreads=number_format($counter['threads']); 

// forum stats end 


MySaltyreef 07-10-2011 12:12 AM

just what the doctor ordered, thanks ! nominated

Joe Blow 07-18-2011 07:29 AM

Quote:

Originally Posted by toxin (Post 2215452)
You can change the first few lines to get more accurate thread and post counts (and to display the same numbers as the stats block on the forumhome):


PHP Code:


// forum stats start 
$vboptions[bburl] = $vbulletin->options[bburl];
$numbersmembers $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " TABLE_PREFIX "user"); 
$numbermembers number_format($numbersmembers['users']); 

$counter=$db->query_first("SELECT sum(replycount) as posts FROM " TABLE_PREFIX "forum");
$totalposts=number_format($counter['posts']); 

$counter=$db->query_first("SELECT sum(threadcount) as threads FROM " TABLE_PREFIX "forum");
$totalthreads=number_format($counter['threads']); 

// forum stats end 


You da man toxin!!!!!

Thank you, much appreciated! :)

kylek 08-06-2011 12:06 AM

Works great except for the new member link it makes. In our case it adds an "s" to forum in the link to the members profile.

/forums/member.php?

Anyone know how to change that?

mikkster 08-29-2011 12:12 PM

works fine with 4.1.4

Thank you for this one!

doctorsexy 08-29-2011 01:30 PM

Works with 4.1.5...thank you

ptceuro 04-01-2012 10:00 PM

Awesome! I tried to do this a while ago but failed miserably. Thanks

Onkeltyson 05-18-2012 03:34 PM

Thanks for this ;-)


All times are GMT. The time now is 07:33 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.01143 seconds
  • Memory Usage 1,755KB
  • 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_php_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