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)

RedHacker 02-27-2010 12:05 PM

Quote:

Originally Posted by cory_booth (Post 1991904)
I didn't quite understand your request, but I made the change I think you wanted:

PHP Code:

ob_start(); 
global 
$vbulletin$db$vbphrase
//Begin Forum Stats 
// forum stats start 
$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 COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " TABLE_PREFIX "post"); 
$totalposts=number_format($counter['posts']); 
$countthreads $db->query_first("SELECT COUNT(*) AS threads FROM " TABLE_PREFIX "thread"); 
$totalthreads=number_format($countthreads['threads']); 
// forum stats end 

// total online start 
$datecut TIMENOW $vbulletin->options['cookietimeout']; 
$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "session WHERE userid=0 AND lastactivity>$datecut"); 
$headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " TABLE_PREFIX "session WHERE " TABLE_PREFIX "session.userid>0 AND " TABLE_PREFIX "session.lastactivity>$datecut"); 
$headerguests=$headerguests[count]; 
$headerusers=$headerusers[count]; 
$totalonline=$headerguests+$headerusers
// total online end 

// get newest member name and userid start 
$getnewestmember=$db->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid=$numbersmembers[max]"); 
$newusername $getnewestmember['username']; 
$newuserid $getnewestmember['userid']; 
// get newest member name and userid end 

 //End Forum Status 
//SideBar - Begin forum Stats 
$sb_stats=
<table width="100%" align="center"> <tr> <td class="" align="left"> <div class="smallfont"> <strong>Members: </strong> '
.$numbermembers.'<br /> <strong>Total Threads: </strong>'$totalthreads.'<br /> <strong>Total Posts: </strong>'$totalposts.'<br /> <strong>Online Users: </strong>'$totalonline.'<br /> <br /> <strong>Newest Member:</strong> <a href="'.$vboptions[bburl].'/member.php?u='.$newuserid.'"><b>'.$newusername.'</b></a> </td> </tr> </table>'
//SideBar = End forum Status 
echo $sb_stats
$output=ob_get_contents(); 
ob_end_clean(); 

Just replace the code with this...

Thanks..

webspider 02-27-2010 12:41 PM

Actually with this code all I get is the date.

What I was asking for was attachment statistics. In the AdminCP > Attachments > Attachment Statistics you get data for several things:

Unique / Total Attachments 83,938
Attachment Filesize Sum 12.61 GB
Disk Space Used 12.34 GB
Storage Type Attachments are currently being stored in the filesystem at /var/www/site/
Average Attachment Filesize 157.6 KB
Total Downloads 3,840,776

cory_booth 03-05-2010 06:03 PM

Quote:

Originally Posted by webspider (Post 1992810)
Actually with this code all I get is the date.

What I was asking for was attachment statistics. In the AdminCP > Attachments > Attachment Statistics you get data for several things:

Unique / Total Attachments 83,938
Attachment Filesize Sum 12.61 GB
Disk Space Used 12.34 GB
Storage Type Attachments are currently being stored in the filesystem at /var/www/site/
Average Attachment Filesize 157.6 KB
Total Downloads 3,840,776

Hmm...
Sorry this was not the purpose of this widget.

Ricsca 03-19-2010 08:46 PM

If the forum in is in the forum folter?

iyama 03-25-2010 11:34 AM

Maybe include Top poster ?

nul7 04-03-2010 06:59 PM

^^^Yeah I was going to say the same thing...kind of like 3.8 had on vbadvance module.

Members: 1,976
Threads: 8,585
Posts: 111,082
Top Poster: XXXXXXXX (6536)

Welcome to our newest member:
XXXXXXXXX

nul7 04-03-2010 07:08 PM

great mod, installed and works great, for the guys/gals getting the time stamp only...make sure you are configuring the php and not putting it in the description box...same thing I did until I realized I was being silly.

just if we could get the top posted code... Me + PHP Coding = fail

axix20xx 04-20-2010 06:57 AM

Quote:

Originally Posted by Brew (Post 1989892)
All I get is today's date :(

Same Here for this and Recent Thread az so ...

Quote:

Originally Posted by cory_booth (Post 1991902)
Huh... I have no idea about this one...

So how can we fix It ?

zulfiqar.halari 04-20-2010 12:35 PM

This widget is not working in my Forum as i am not using CMS, rather i want to use it in side bar of my vBulletin forum but its not working and showing as blank.

Let me know whats the correct code to display it in our forum widget side bar.

Regards

Reef Man 04-23-2010 06:07 PM

Installed and working.

If you want it translated to spanish, here you have the code:

Code:

ob_start();
global $vbulletin, $db, $vbphrase;
//Begin Forum Stats
// forum stats start
$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 COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post");
$totalposts=number_format($counter['posts']);
$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread");
$totalthreads=number_format($countthreads['threads']);
// forum stats end

// total online start
$datecut = TIMENOW - $vbulletin->options['cookietimeout'];
$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE " . TABLE_PREFIX . "session.userid>0 AND " . TABLE_PREFIX . "session.lastactivity>$datecut");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];
$totalonline=$headerguests+$headerusers;
// total online end

// get newest member name and userid start
$getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid=$numbersmembers[max]");
$newusername = $getnewestmember['username'];
$newuserid = $getnewestmember['userid'];
// get newest member name and userid end

 //End Forum Status
//SideBar - Begin forum Stats
$sb_stats='
<table width="100%" align="center"> <tr> <td class="" align="left"> <div class="smallfont"> <strong>Numero de Miembros: </strong> '.$numbermembers.'<br /> <strong>Temas: </strong>'. $totalthreads.'<br /> <strong>Mensajes: </strong>'. $totalposts.'<br /> <strong>Usuarios en linea: </strong>'. $totalonline.'<br /> <br /> <strong>?ltimo miembro registrado:</strong> <a href="'.$vboptions[bburl].'/member.php?u='.$newuserid.'"><b>'.$newusername.'</b></a> </td> </tr> </table>';
//SideBar = End forum Status
echo $sb_stats;
$output=ob_get_contents();
ob_end_clean();



All times are GMT. The time now is 04:24 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.01120 seconds
  • Memory Usage 1,771KB
  • 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_php_printable
  • (4)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