forum.coppermine-gallery.net
No Support => Feature requests => Topic started by: John on October 18, 2003, 06:17:32 pm
-
This is something I just thought would be nice for coppermine & board users,
Consider the following:
Our users have posted a total of 45 articles
We have 23 registered users
The newest registered user is Xsf41
This appears in phpbb "who is online". Wouldnt it be nice if we could make it show albums and pics here too?
Our users have posted a total of 45 articles
Our users have 39 pics in 6 galleries
We have 23 registered users
The newest registered user is Xsf41
My question is: Is this idea completely unavailable with cpg at present?
Sorry for the non cpg feature req. but i couldnt think where else to put this?
John
-
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$album_count = $nbEnr[0];
mysql_free_result($result);
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$picture_count = $nbEnr[0];
mysql_free_result($result);
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$comment_count = $nbEnr[0];
mysql_free_result($result);
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$cat_count = $nbEnr[0] - $HIDE_USER_CAT;
mysql_free_result($result);
$result = db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$hit_count = (int)$nbEnr[0];
mysql_free_result($result);
This is the rather ugly peice of code that gets the stats....