Closed (won't fix)
Project:
Site User List
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
31 Jul 2007 at 16:19 UTC
Updated:
23 Mar 2022 at 15:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedchanged the title so that it is easier to understand
Comment #2
ajayg commentedAny update on this? I love this module but wondering why such a basic feature is missing. I have same problem as yours.
Comment #3
pukku commentedRight now, I haven't had any time to work on Site User List because I've had other priorities at work. Hopefully in March I will be able to spend some more time on this.
However, I'm don't know if I will support a pager or not. The reason I wrote this module in the first place was because I wanted a user list _without_ a pager -- all of the other modules at that time required a pager. So the reason that a pager is missing is because that's the whole purpose of the module.
When I rewrite it next, I will see if I can fit a pager in, but I don't know.
Comment #4
kiran_lakhotia commentedHi,
I have added a little code to make the pagination an optional feature. To include this add the following code to site_user_list.module:
In the function site_user_list_admin_settings_form:
This will allow you to control how many users to display in the list. If you set the limit to "0" all users will be displayed.
Add the following line to site_user_list_admin_settings_form_submit:
In the function site_user_list_form:
Comment #5
kiran_lakhotia commentedWhile doing the above I also added a little code to make the name "link-able" (same effect as if the user was to click the
viewlink), although this requires you don't change thetemplatecolumn in the site_user_list_fields table from the default.change line 977 in site_user_list.module from
to
Comment #6
kiran_lakhotia commentedFor our site we wanted a different behaviour for the search options on the site_user_list page. We wanted the "Search Options" to be expanded by default, and also have a single text box to do a "quick search". So what I've done is this.
- made the "Search Options" collapse/expand by default an optional feature in the admin settings
- created a single line text box for all searches. If a user does not select any of the profile chechboxes (the "Advanced" options will be then be collapsed), entering a search term has the effect as if a user had selected all the search options. If a user expands the "Advanced" options, only the selected fields are searched. (see attached snapshot for an example)
To implement this requires a few changes here and there, if anyone is interested I'll post the code.
Kiran
Comment #7
kingandyKiran's code works perfectly - though I'd make one tiny performance tweak (put the include_once inside the if(variable_get('site_user_list_p_limit', 0)){} clause so it doesn't necessarily get included when it isn't required). Other than that, it's smashing :D
Comment #8
kiran_lakhotia commentedhere is the patch (including kingandy's improvement) which adds pagination to the site_user_list module
edit:
(see post below from 17th April 2008)
Comment #9
kiran_lakhotia commentedhere is the patch which also makes the names of users clickable as described in my comment on the 12th march (see above)
edit:
(see post below from 17th April 2008)
Comment #10
kiran_lakhotia commentedhere is a patch to only contain one search field and have the option (via the site administration) to always show the search options expanded. If a user searches without ticking any boxes in the "Advanced Contact Info" section, the search behaves as if all boxes had been checked.
edit:
(see post below from 17th April 2008)
Comment #11
Anonymous (not verified) commentedI have installed and tested the patches and they all work great, with one exception. When no fields (such as "user name") are selected in the search box, search does not work and returns the following error message:
Comment #12
husztisanyi commentedIf I set the user's roles at Settings/Fields/Available Columns to 'displayed by default', this setting very slow down the listing.
Could you solve this?
Comment #13
mr.andrey commentedThe pagination patch is awesome, thanks!
Love & Light,
Andrey.
Comment #14
kiran_lakhotia commentedHi TfR75,
you're right there was a missing if statement. In the function "profile_site_user_list_restrict" it didn't check the return value of "db_fetch_array" call when constructing the "or" clauses of the SQL statement, indicating which columns to search.
Kiran
Comment #15
kiran_lakhotia commenteddear all,
it seems my patching skills were more than crap. I don't know if the previously submitted patches work, some are derf. incomplete. I have attached the three standalone patches, which I tested and they should work.
pagination.patch adds pagination to the site user list module
search.patch changes the search functionality as described previously
username.patch makes the username a clickable link to a users' profile
Kiran
Comment #16
Anonymous (not verified) commentedThese patches work fine on our site. Great work, Kiran!
Comment #17
marvil07 commentedPagination patch on comment 15 works
Comment #18
wiredescape commentedChanged title to reflect issue focus
#12 @husztisany should create a new issue rather than changing title.
Comment #19
ItsQ commented#4 How do I instal this in my code?
I can't realy find where to place it, can someone give me the "site_user_list.module" file where it already is inplented or can someone give me some kind of link to a tutorial.
I think i'm just stupit or somthing but i realy don't understand how do use that code, or how to use a patch file.
Comment #20
pukku commented