I have had a pretty good attempt at (a) search for members and (b) 3rd party module integration

the supplied patch creates 3 new contrib modules

members/contrib/membersbuddylist
members/contrib/membersprofile
members/contrib/membersusertags

there is also a members_api.txt in the members/contrib/ dir to explain how this works

I see members has taken a page (pardon the pun) out of 'views' module, theres a couple of small things that need to be done for my patch to work perfectly like views

items that can be searched currently show up under a fieldset called 'searchables' this should be the same Exposed Filters/Fields/Arguments as views, this way it allows users to specify stuff on the $args properly, i see that this is harded with showing just the role-id

otherwise works great! hope you enjoy

Comments

dgtlmoon’s picture

Some things that need cleaning up

- when you specify a new contrib module it is very picky about using the _'s to split details about the module up, for some silly reason i have coded it so your contrib module name cant contain any _'s

- some kind of advancement so a contribmodule can return an additional WHERE statement instead of having to LEFT JOIN further data on, so it could build on awareness of other modules ?

dgtlmoon’s picture

StatusFileSize
new10.71 KB

Ontop of that patch is this additional one which ;

- gives you a contrib/membersuser module , where you can sort/search by "Has posted content" and gives an extra column containing the UID

- Allows you to select Table or List type view in the page settings

dgtlmoon’s picture

StatusFileSize
new10.89 KB

Oops, left out the pagination on the list type

see attached patch

dgtlmoon’s picture

StatusFileSize
new12.84 KB

Some more bugfixes

- SQL error on new records
- dont display search fieldset if there are no current searchables
- cache members loading of settings

dgtlmoon’s picture

StatusFileSize
new16.59 KB

sorry again

- typo's in your caching are never handy
- reinstated Picture support

dgtlmoon’s picture

StatusFileSize
new28.83 KB

Most recent patch, this fixed a couple of minor bugs

- where profile type was a 'list'
- select'ing on join tables where it was not needed
- pagination on list view type

mr.andrey’s picture

if I put the word "if" in one of the fields, it starts giving me the actual php code in the autocomplete popup.

A.

mr.andrey’s picture

We have about 30 profile fields that I would like to make searchable. With fields searchable individually it's not really feasible to have more than 3 or 4 without making it bulky. Also, often times profile fields overlap - for example, some fields like "About Me", "My Greatest Passions" and "Favorite Activities" have information that is essentially the same, and hence should have the option to be searched together.

Site_User_List module attempts to do this with checkboxes, but with 30 profile fields it looks super clunky and the SQL queries take up to 15 seconds (lots of JOINs, crashed our server a couple of times). I looked at Zaadz (now Gaia), and they have a neat little user search box. It gives the dropdown box with an option to either search "Everything" or select individual fields. I think this is ideal.

Any ideas on this and on how to implement it?

Best,
Andrey.

mr.andrey’s picture

At which point do you apply the "members-integration.patch"?

It gives me errors if I try to do it to the fresh install, after the initial patch or after the last one before this.

patching file members/members.install
Hunk #1 succeeded at 101 (offset 17 lines).
patching file members/members.module
Reversed (or previously applied) patch detected! Assume -R? [n]

Best,
Andrey.

dgtlmoon’s picture

heya

hmm should patch against this version

// $Id: members.module,v 1.40.2.25 2007/11/22 10:36:28 ax Exp $

any luck?

dgtlmoon’s picture

StatusFileSize
new30.15 KB
new48.54 KB

Try this one, built across the current 5.x

members-5.x-1.x-dev.tar.gz

also attached is the tarball of the whole lot

let me know how you go

cheers

leigh

mr.andrey’s picture

The patch seems to work fine against the dev. Thanks.

I'm still going to use site_user_list, though - with cron and table regeneration I got the load problem fixed, and the search capability for my particular setup (30 profile fields) is more manageable.

Best,
Andrey.

urbanx’s picture

rather than run the patch, i tried installing the patched version in #11. installed with the following error:

Duplicate column name 'page_type' query: ALTER TABLE members_page ADD page_type varchar(20) in /home/test/www/test.domain.com/includes/database.mysql.inc on line 172.

(note that i installed it as an upgrade of my currently installed members modules of the same version by replacing the directory and running update).

after that, it works (at least to search username, which is all i've tried so far) with the following problems:

1. it no longer seems to restrict output based on role. this is true both of the original member page that i had before the upgrade as well as one i created after the upgrade.
2. the "Last Seen" column no longer formats nicely (4 sec, 1 min 10 sec, &c.). instead you see (1208483308, 1208482215).

i have yet to look at this in too much depth, but i'm assuming #2 is just a formatting thing.

i'll post any updated info i have here.

d.

dgtlmoon’s picture

i think you can safely ignore that SQL notice , however you might like to look into the rest of those issues