Welcome to Geeklog, Anonymous Monday, October 14 2024 @ 05:32 pm EDT

Geeklog Forums

Simple user list


Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

This is something that has been requested before and since I needed it myself recently, I hacked the code from admin/user.php a bit to make a (simple) user list. Of course, it does not display email addresses and I also made it so that only logged-in users can view the list.

You can view the source or download it from geeklog.info. Have fun.

bye, Dirk

 Quote

Status: offline

greatgerm

Forum User
Newbie
Registered: 09/05/02
Posts: 7
Since I'm still a little new to php and a lotta new to GL I guess the best thing to do is ask. How would I need to hack this to get the users seperated into the groups they belong to? Or even better be able to choose the group you want to look at.
 Quote

Anonymous

Anonymous
May I ask, how do you apply it? Sam
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
This is very useful. Thanks Dirk! A question. What is the best way to link this url? Create a link under "Sections" or is it possible to add it to "Admins Only" Block? Are you aware of that even after you signed out, you still can access to this page? Plus, it automatically sign you in. That's sort of dangerous because if someone after me click on it and mass around with administration like changing my user password. I hope this will become a standard feature in version 2. Sam
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
For the one site where I use it, I just hard-coded a link to it in the menu bar in header.thtml. There's no need to add it to the Admin menu since the Admin already has a user list ... Not sure what you mean by "it automatically sign you in". Nobody can take over the admin account without your password (or the cookie on your browser). bye, Dirk
 Quote

Anonymous

Anonymous
I have added it under "Admins Only" block. One reason is that I only want the admin users (usually the group leaders) to see it. They are not given the User Admin permission so they don't get the regular "Users" link in their menu. Another reason is I like your conveniant "Send Email" link, that I don't have on the default "Users" listing and editing page. It is useful when I want to send an email just to an idividual. I have fixed the problem of automatic sign in problem. After all it is a very useful feature to have. Thanks, Sam
 Quote

Status: offline

rayban

Forum User
Newbie
Registered: 10/20/03
Posts: 1
mellow
A note of thanks to Dirk for this. Good on you.

Thank you,

Ray
 Quote

Status: offline

johnjr

Forum User
Chatty
Registered: 02/08/04
Posts: 68
Dirk, where do you put the file 'userlist.php'? Or did you put this code into the lib-custom.php file?

John
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by johnjr: Dirk, where do you put the file 'userlist.php'?

Just drop it into your public_html directory. You'll have to add a link to it manually somewhere, e.g. in the menu or from a block.

bye, Dirk
 Quote

Status: offline

johnjr

Forum User
Chatty
Registered: 02/08/04
Posts: 68
Works nicely! Thanks Dirk.

I am interested in trying to limit the User List that is displayed, to only those users that are assigned to a particular Group, instead of showing all Logged In Users. Any suggestions on how to do that, easily? Ideally, the User List would only show the Users who are part of the same Group (or Groups) of the User who is 'viewing' that List.

John
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by johnjr: I am interested in trying to limit the User List that is displayed, to only those users that are assigned to a particular Group

That stuff is a bit tricky ... As the Admin, you have such a list in the list of groups (second column from the right). You'll have to lift the code for that from admin/group.php, function listusers()

bye, Dirk
 Quote

Status: offline

johnjr

Forum User
Chatty
Registered: 02/08/04
Posts: 68
How about having the SQL lookup in the User List code, only look up records where the user belongs to the specific desired group? Which field in the sql table is this information kept? Obviously, if I wanted the code to 'find' users who belong to a different group, I would have to hard-code another 'version' of the User List 'program'.

John
 Quote

Status: offline

thedude

Forum User
Regular Poster
Registered: 12/28/02
Posts: 90
cheerful
This solved my current needs.

Many thanks Dirk. As usual, Great Jobs...

The Dude
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Just as a note: You also have a memberlist feature with the forum plugin. Under the forum features in your user block and it has sortable headings - click a heading again to reverse the order.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

"I

Anonymous
Hi, it works great, but is there a way to have it sort by the date of when a user joined? I get so lost looking in between the admin list and that list.
 Quote

Status: offline

Katsuhito

Forum User
Newbie
Registered: 03/02/07
Posts: 5
Dirk, Your userlist.php is a great hack. But I’d like to include the user’s lastlogin date. How can I do this? I'm a novice at php, and getting better Big Grin but I know almost nothing about SQL.
 Quote

Status: offline

orepa

Forum User
Chatty
Registered: 11/07/07
Posts: 35
Dirk,

How/where do I add the homepage and location to the "simple list" script so it will also display the information added to those fields? If somone else knows how to add those two fields, please advise.

Thanks,
 Quote

All times are EDT. The time is now 05:32 pm.

  • 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