I wrote a small 'more information' add-on for 'User ages in CP' and posting it here with approval of the_sisko.
The idea is:
Registered member information
There are 382 members with complete birthday information, out of 2,664 registered members. 2,282 members have decided to not provide their birthday details.
before
PHP Code:
// ###################### get birthdays #######################
add this:
PHP Code:
// ###################### get total registered members #######################
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbersmembers=$numbersmembers['users'];
then before:
PHP Code:
// start output on site || edit this text in echo ""; if you like to
add this:
PHP Code:
// calculate $nobirthday
$nobirthday = $numbersmembers - $usercount;
$nobirthday = number_format($nobirthday);
$numbersmembers = number_format($numbersmembers);
then after:
PHP Code:
doformheader("showage","show");
add this:
PHP Code:
maketableheader("Registered member information","",0,3);
echo "<tr class='".getrowbg()."' valign='top'><td>There are $usercount members with complete birthday information, out of $numbersmembers registered members. $nobirthday members have decided to not provide their birthday details</td>\n</tr>\n";
restarttable();
then change:
PHP Code:
maketableheader("How old are your users ($usercount with complete birthday)","",0,3);
in:
PHP Code:
maketableheader("How old are your users","",0,3);
todo:
in the user version of 'user ages' put the same information, and provide users with no birthday information set with a link to their profile to do so.
Have fun and a big thank you goes out to the_sisko for making this wonderfull hack!
- djr