nocive
03-31-2011, 01:41 PM
hi, i have a problem with "forums community statistics" specifically with the "Members: xxxxxx" counter , this show me 42600 users but i have more than 62000, why i?m sure of that?? because i have one statistics widget in home forum page and this reveals the true numbers of members in my forum.
other test is when I send emails from the forum to users, this sends it to more than 62000 members
http://www.xtreme-addictions.com.ar/foro/content.php HOME FORUM
http://www.xtreme-addictions.com.ar FORUM
I show you the codes as I have in my forum, maybe here is the problem
FORUMHOME CODE
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" <vb:if condition="!is_browser('ie') OR is_browser('ie',8)"> dir="{vb:stylevar
textdirection}"</vb:if> lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
{vb:raw headinclude}
<title>{vb:raw vboptions.bbtitle}</title>
<vb:if condition="$vboptions['storecssasfile']">
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}forumhome-rollup.css" />
<vb:else />
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}forumbits.css,forumhome.css,tagcloud.css" />
</vb:if>
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}forumbits-ie.css" /><![endif]-->
<vb:if condition="$show['sidebar']">
<script type="text/javascript" src="{vb:stylevar yuipath}/animation/animation-min.js?v={vb:raw
vboptions.simpleversion}"></script>
<script type="text/javascript">
var sidebar_align = '<vb:if condition="$vboptions['sidebarposition'] == 0">left<vb:else />right</vb:if>';
var content_container_margin = parseInt('{vb:math {vb:stylevar forum_sidebar_width}+{vb:math {vb:stylevar
padding}*2}}');
var sidebar_width = parseInt('{vb:stylevar forum_sidebar_width}');
</script>
<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw
vboptions.simpleversion}"></script>
</vb:if>
{vb:raw headinclude_bottom}
</head>
<body>
{vb:raw header}
{vb:raw navbar}
<vb:if condition="$show['sidebar']">
<div id="content_container"<vb:if condition="$vboptions['sidebarposition'] == 0"> class="contentright"</vb:if>>
<div id="content">
</vb:if>
<!-- main -->
{vb:raw template_hook.forumhome_above_forums}
<ol id="forums" class="floatcontainer">
{vb:raw forumbits}
</ol>
{vb:raw template_hook.forumhome_below_forums}
<!-- /main -->
<div style="padding:12px 10px 0 10px;">
<a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:ra w bbuserinfo.securitytoken}">
{vb:rawphrase mark_forums_read}</a>
<vb:if condition="$vboptions['forumleaders']">|
<a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a></vb:if>
</div>
{vb:raw forumhome_markread_script}
{vb:raw ad_location.ad_forumhome_afterforums}
<!-- what's going on box -->
<div id="wgo" class="collapse wgo_block">
<h2>
<span>{vb:rawphrase whats_going_on}</span>
</h2>
<div class="floatcontainer">
{vb:raw template_hook.forumhome_wgo_pos1}
<vb:if condition="$show['loggedinusers']">
<!-- logged-in users -->
<div id="wgo_onlineusers" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase
currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
<div>
<p>{vb:rawphrase there_are_x_online, {vb:raw totalonline}} <span class="shade">
{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw
recorddate}, {vb:raw recordtime}}</p>
<ol class="commalist" id="wgo_onlineusers_list">
{vb:raw activeusers}
</ol>
</div>
</div>
<!-- end logged-in users -->
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos2}
<vb:if condition="$show['upcomingevents']">
<div id="wgo_events" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}"
/><vb:if condition="$show['todaysevents']">{vb:rawphrase todays_events}<vb:else />{vb:rawphrase
upcoming_events_for_the_next_x_days, {vb:raw vboptions.showevents}}</vb:if></h3>
<ol>
{vb:raw upcomingevents}
</ol>
</div>
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos3}
<vb:if condition="$show['birthdays']">
<!-- today's birthdays -->
<div id="wgo_birthdays" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}"
/>{vb:rawphrase todays_birthdays}</h3>
<ol class="commalist">
{vb:raw birthdays}
</ol>
</div>
<!-- end today's birthdays -->
[B] </vb:if>
{vb:raw template_hook.forumhome_wgo_pos4}
<div id="wgo_stats" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics,
{vb:raw vboptions.bbtitle}}" />{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}</h3>
<div>
<dl>
<dt>{vb:rawphrase threads}</dt>
<dd>{vb:raw totalthreads}</dd>
<dt>{vb:rawphrase posts}</dt>
<dd>{vb:raw totalposts}</dd>
<dt>{vb:rawphrase members}</dt>
<dd>{vb:raw numbermembers}</dd>
<vb:if condition="$show['activemembers']">
<dt>{vb:rawphrase active_members}</dt>
<dd>{vb:raw activemembers}</dd>
</vb:if>
</dl>
<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw
newuserinfo}}, {vb:raw newuserinfo.username}}</p>
{vb:raw template_hook.forumhome_wgo_stats}
</div>
</div>
{vb:raw template_hook.forumhome_wgo_pos5}
</div>
</div>
<!-- end what's going on box -->
{vb:raw ad_location.board_below_whats_going_on}
<vb:if condition="$show['sidebar']">
</div>
</div>
<div id="sidebar_container"<vb:if condition="$vboptions['sidebarposition'] == 0"> class="sidebarleft"</vb:if>>
<a id="sidebar_button_link" href="#">
<vb:if condition="$vboptions['sidebarposition'] == 0">
<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed-left.png" alt="" />
<vb:else />
<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed.png" alt="" />
</vb:if>
</a>
<ul id="sidebar">
{vb:raw sidebar}
</ul>
</div>
</vb:if>
{vb:raw footer}
</body>
</html>
this show me 42600 users in my forum
WIDGET IN HOME FORUM 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>Number of Members: </strong> '.$numbermembers.'<br /> <strong>Total Threads: </strong>'. $totalthreads.'<br /> <strong>Total Posts: </strong>'. $totalposts.'<br /> <strong>Currently Online: </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();
this show me more than 62000 users in my forum
I can?t find where the problem is, anybody can help me with this?
other test is when I send emails from the forum to users, this sends it to more than 62000 members
http://www.xtreme-addictions.com.ar/foro/content.php HOME FORUM
http://www.xtreme-addictions.com.ar FORUM
I show you the codes as I have in my forum, maybe here is the problem
FORUMHOME CODE
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" <vb:if condition="!is_browser('ie') OR is_browser('ie',8)"> dir="{vb:stylevar
textdirection}"</vb:if> lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
{vb:raw headinclude}
<title>{vb:raw vboptions.bbtitle}</title>
<vb:if condition="$vboptions['storecssasfile']">
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}forumhome-rollup.css" />
<vb:else />
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}forumbits.css,forumhome.css,tagcloud.css" />
</vb:if>
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}forumbits-ie.css" /><![endif]-->
<vb:if condition="$show['sidebar']">
<script type="text/javascript" src="{vb:stylevar yuipath}/animation/animation-min.js?v={vb:raw
vboptions.simpleversion}"></script>
<script type="text/javascript">
var sidebar_align = '<vb:if condition="$vboptions['sidebarposition'] == 0">left<vb:else />right</vb:if>';
var content_container_margin = parseInt('{vb:math {vb:stylevar forum_sidebar_width}+{vb:math {vb:stylevar
padding}*2}}');
var sidebar_width = parseInt('{vb:stylevar forum_sidebar_width}');
</script>
<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw
vboptions.simpleversion}"></script>
</vb:if>
{vb:raw headinclude_bottom}
</head>
<body>
{vb:raw header}
{vb:raw navbar}
<vb:if condition="$show['sidebar']">
<div id="content_container"<vb:if condition="$vboptions['sidebarposition'] == 0"> class="contentright"</vb:if>>
<div id="content">
</vb:if>
<!-- main -->
{vb:raw template_hook.forumhome_above_forums}
<ol id="forums" class="floatcontainer">
{vb:raw forumbits}
</ol>
{vb:raw template_hook.forumhome_below_forums}
<!-- /main -->
<div style="padding:12px 10px 0 10px;">
<a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:ra w bbuserinfo.securitytoken}">
{vb:rawphrase mark_forums_read}</a>
<vb:if condition="$vboptions['forumleaders']">|
<a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a></vb:if>
</div>
{vb:raw forumhome_markread_script}
{vb:raw ad_location.ad_forumhome_afterforums}
<!-- what's going on box -->
<div id="wgo" class="collapse wgo_block">
<h2>
<span>{vb:rawphrase whats_going_on}</span>
</h2>
<div class="floatcontainer">
{vb:raw template_hook.forumhome_wgo_pos1}
<vb:if condition="$show['loggedinusers']">
<!-- logged-in users -->
<div id="wgo_onlineusers" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase
currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
<div>
<p>{vb:rawphrase there_are_x_online, {vb:raw totalonline}} <span class="shade">
{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw
recorddate}, {vb:raw recordtime}}</p>
<ol class="commalist" id="wgo_onlineusers_list">
{vb:raw activeusers}
</ol>
</div>
</div>
<!-- end logged-in users -->
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos2}
<vb:if condition="$show['upcomingevents']">
<div id="wgo_events" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}"
/><vb:if condition="$show['todaysevents']">{vb:rawphrase todays_events}<vb:else />{vb:rawphrase
upcoming_events_for_the_next_x_days, {vb:raw vboptions.showevents}}</vb:if></h3>
<ol>
{vb:raw upcomingevents}
</ol>
</div>
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos3}
<vb:if condition="$show['birthdays']">
<!-- today's birthdays -->
<div id="wgo_birthdays" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}"
/>{vb:rawphrase todays_birthdays}</h3>
<ol class="commalist">
{vb:raw birthdays}
</ol>
</div>
<!-- end today's birthdays -->
[B] </vb:if>
{vb:raw template_hook.forumhome_wgo_pos4}
<div id="wgo_stats" class="wgo_subblock">
<h3><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics,
{vb:raw vboptions.bbtitle}}" />{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}</h3>
<div>
<dl>
<dt>{vb:rawphrase threads}</dt>
<dd>{vb:raw totalthreads}</dd>
<dt>{vb:rawphrase posts}</dt>
<dd>{vb:raw totalposts}</dd>
<dt>{vb:rawphrase members}</dt>
<dd>{vb:raw numbermembers}</dd>
<vb:if condition="$show['activemembers']">
<dt>{vb:rawphrase active_members}</dt>
<dd>{vb:raw activemembers}</dd>
</vb:if>
</dl>
<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw
newuserinfo}}, {vb:raw newuserinfo.username}}</p>
{vb:raw template_hook.forumhome_wgo_stats}
</div>
</div>
{vb:raw template_hook.forumhome_wgo_pos5}
</div>
</div>
<!-- end what's going on box -->
{vb:raw ad_location.board_below_whats_going_on}
<vb:if condition="$show['sidebar']">
</div>
</div>
<div id="sidebar_container"<vb:if condition="$vboptions['sidebarposition'] == 0"> class="sidebarleft"</vb:if>>
<a id="sidebar_button_link" href="#">
<vb:if condition="$vboptions['sidebarposition'] == 0">
<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed-left.png" alt="" />
<vb:else />
<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed.png" alt="" />
</vb:if>
</a>
<ul id="sidebar">
{vb:raw sidebar}
</ul>
</div>
</vb:if>
{vb:raw footer}
</body>
</html>
this show me 42600 users in my forum
WIDGET IN HOME FORUM 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>Number of Members: </strong> '.$numbermembers.'<br /> <strong>Total Threads: </strong>'. $totalthreads.'<br /> <strong>Total Posts: </strong>'. $totalposts.'<br /> <strong>Currently Online: </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();
this show me more than 62000 users in my forum
I can?t find where the problem is, anybody can help me with this?