This fairly useless code snippet, when placed in a PHP active static page, should produce a members listing. It needs your loving care, as it will display all the currently registered users on a single page. I couldn't figure out how to get it to display in chunks, but as we at Darja.net have less that a hundread users, it was easier to write this than a full blown plugin. Please let me know by posting here if you can imporve it.
--Maximus Co-Admin Darja.net
$color = "#C0C0C0"; // this set the background color of the switched row.
//get and prep array of user info
$membersprep = DB_query( "SELECT * FROM gl_users WHERE uid > 2 ORDER BY username" );
//$members = DB_fetchArray($membersprep);
//figure out haw many users we really have here
$limit = DB_count('gl_users') - 2;
$count = 1;
// tell folks how popular we really are
$putout .= "There are currently " . $limit . " members of the site!\n";
//Load up the first of the display
$putout .= "<table>";
//create our header row
$putout .= "<TR bgcolor=\"#FFFFFF\">\n";
$putout .= "<TD><B><H3>Name</H3></B></TD>\n";
$putout .= "<TD><B><H3>Home Page</H3></B></TD>\n";
$putout .= "<TD><B><H3>Join Date</H3></B></TD>\n";
$putout .= "</TR>\n";
//start spewing out information and switching the bkgrnd color
$switch = false;
while($count <= $limit){
$membersout = DB_fetcharray($membersprep);
switch ( $switch ) {
case true:
$switch = false; // alternating color
$putout .= "<TR bgcolor=\"" . $color . "\">\n";
break;
default:
$switch = true; // default, no back color
$putout .= "<TR bgcolor\"FFFFFF\">\n";
} // switch
$putout .= "<TD><a href=\"http://www.darja.net/users.php?mode=profile&uid=";
$putout .= $membersout['uid'] . "\">" . $membersout['username'] . "</a></TD>\n";
if ($membersout['homepage'] != '' and $membersout['username'] != 'NULL') {
$putout .= "<TD><a href=\"" . $membersout['homepage'] . "\">" . $membersout['homepage'] . "</a></TD>\n";
}else{
$putout .= "<TD>No Homepage.</TD>";
}
$putout .= "<TD>" . $membersout['regdate'] . "</TD>\n";
$putout .= "</TR>\n";
$count++;
} // while
//close out the table
$putout .= "</TABLE>";
return $putout;