The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to exclude usergroups condition
I have the following stats code from the widget that displays the total number of users etc. unfortunately, it shows all users, including the ones from waiting for confirmation etc.
What's the condition to exclude them from usergroups 3 and 4? 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 nobody can help me? |
#2
|
||||
|
||||
soo..any help pls?
|
#3
|
||||
|
||||
How about replacing this:
PHP Code:
PHP Code:
|
#4
|
||||
|
||||
tnx alot Lynne, wonderful as always
|
#5
|
|||
|
|||
In addition to Lynne's advice which is 100% correct, I'm extending the query in case that you want the usergroupid to not exists even in the additional usergroups. You must add in the query:
Code:
AND NOT FIND_IN_SET($usergroupid, membergroupids) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|