PDA

View Full Version : Query to display member count globally


bzcomputers
04-12-2013, 11:52 PM
I'm looking for a query / hook combination to be able to display the registered member count places other than FORUMHOME.

Thanks.

Simon Lloyd
04-13-2013, 12:44 AM
Not tested but something on the lines of$query = $vbulletin->db->query_read("SELECT COUNT (userid) FROM ". TABLE_PREFIX."user WHERE userid <>0");
$result = mysql_query($query);
echo "There are ".mysql_num_rows($result)." Users(s).";and you could use global_complete as the hook

bzcomputers
04-13-2013, 06:10 AM
Tried to work with it, but just got database errors.

kh99
04-13-2013, 11:55 AM
You could do it that way. There's also another way, someone asked about it here: www.vbulletin.org/forum/showthread.php?t=286573

bzcomputers
04-13-2013, 07:11 PM
Thanks.