Welcome to Geeklog Tuesday, May 21 2013 @ 08:09 PM EDT
|
||||||||
![]() |
Forum Index > Extensions > PHP Blocks |
New Topic
|
Post Reply
|
User list block |
|||
| Anonymous: Anonymous |
|
|||
|
|
Ieup! I've done a function in lib_custom.php that allows a Geeklog webmaster to create a block that makes a list of all the users in the website. I use it for the "logged in" group, so they can view other user's profiles, even if they are not online. I think this feature is so useful, because in my weblog (http://bilboweb.dtdns.net/gente/kacikekola) there are so few users (9) and this way I can allow users know something about other users. The function is here: PHP Formatted Code /*** * * List Users() * * Php function to make user list and allow members to view not conected users' profiles. * **/ function phpblock_ListUsers() { global $_CONF; $list = ""; $quer = mysql_query ("SELECT uid,username,photo FROM gl_users ORDER BY uid"); while ($line = mysql_fetch_array($quer)){ $list = $list.'<a href="'.$_CONF["site_url"].'/users.php?mode=profile&uid='.$line["uid"].'">'.$line["username"]; if ($line["photo"] != ""){ $list = $list.' <img src="'.$_CONF["layout_url"].'/images/smallcamera.gif">'; } $list = $list.'</a><br>'; } return $list; } I think its code is "standard" for any Geeklog, as I've used system paths and so on. Finally, thank you all for making this wonderful piece of software, I'm enjoying it a lot |
|||
|
||||
| Content generated in: 0.27 seconds |
|
|
|