Welcome to Geeklog Thursday, December 02 2021 @ 08:05 am EST

Geeklog Forums

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 Smile

 Quote

All times are EST. The time is now 08:05 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content