2014-02-11, 04:46 PM
"We currently have X members registered."
With
"We currently have X members (usergroup) and X recruits (usergroup)..."
Yesterday i found something i think it can help me.
So i think the code must be something like this?
With
"We currently have X members (usergroup) and X recruits (usergroup)..."
Yesterday i found something i think it can help me.
In index.php, find:
eval("\$boardstats = \"".$templates->get("index_boardstats")."\";");
Before that line, add:
$num_male = $db->fetch_field($db->simple_select("userfields", "COUNT(ufid) as count", "fid3='Male'"), "count");
$num_female = $db->fetch_field($db->simple_select("userfields", "COUNT(ufid) as count", "fid3='Female'"), "count");
// Other people
$stats_cache = $cache->read("stats");
$num_other = $stats_cache['numusers'] - $num_male - $num_female;
/* In the index_boardstats template, use the following variables:
{$num_male}
{$num_female}
{$num_other}
*/
So i think the code must be something like this?
Quote:$num_guildmember = $db->fetch_field($db->simple_select("usergroup", "COUNT(gid) as count", "...?...'"), "count");