Page 1 of 6

[RC] Search Custom Profile Field

Posted: Sun Feb 06, 2011 11:45 pm
by manic2
Modification Name: Search Custom Profile Field
Author: manic2

Modification Description: Ability to use phpBB3.0 user search interface to search custom profile fields.
Modification Version:
0.0.1
  • Initial release
0.0.2
  • Make searches case insensitive
  • Minor update to modx to pass validation
1.0.0
  • Return searched paramater to template
1.0.0a
  • Tested on phpBB3.0.9.
  • Correct pagination when initial search results > 50.
  • Used language file for label.
Image
Image

Screenshots: Image

Demo URL: n/a
Demo Username: n/a
Demo Password: n/a

Modification Download:
11 March 2011 v0.0.2 search_custom_profile_fields_0.0.2.zip - 33.58 KB

20 July 2011 v1.0.0 search_custom_profile_fields_1.0.0.zip - 32.51 KB

21 July 2011 v1.0.0a search_custom_profile_fields_1.0.0a.zip - 32.72 KB

Requested at https://www.phpbb.com/community/viewtopi ... #p12888926

Mod assumes a custom profile field called family_name exists. Mod easily adapted for other custom profile fields.

Re: [BETA]Search Custom Profile Field

Posted: Sun Feb 06, 2011 11:45 pm
by manic2
See this topic if you want to add a Custom Profile Field to your memberlist:-
http://www.phpbb.com/community/viewtopi ... 1&t=655245

Re: [BETA]Search Custom Profile Field

Posted: Sun Feb 06, 2011 11:53 pm
by 4_seven
just in time, thx :)

Re: [BETA] Search Custom Profile Field

Posted: Sun Feb 06, 2011 11:58 pm
by Ozo
This only adds a custom profile field, how does it search for it? I see nothing about search.php in the install

and what if we want to add something else, follow family_name example install again?

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 07, 2011 12:02 am
by manic2
Ozo wrote:This only adds a custom profile field, how does it search for it? I see nothing about search.php in the install
The edits to memberlist.php do all the searching. It's for when you use the 'Find a member' link.
Ozo wrote:and what if we want to add something else, follow family_name example install again?
Yep.

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 07, 2011 12:10 am
by 4_seven
I think an array of all cpf is better. so u have a pulldown of all cpf's and one textfield. so u can choose, what field u search for. also it will be better, u have an independant slim search function for cpf_table with its own search result page template (copy of genuine search_results), so less edits and updates will be more simple.

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 07, 2011 12:54 am
by manic2
4_seven wrote:I think an array of all cpf is better. so u have a pulldown of all cpf's and one textfield. so u can choose, what field u search for.
I did consider this however my way (adapting the mod to add more than one cpf search box) allows you to search on two custom profile fields at once, e.g. first_name & family_name.

Re: [BETA] Search Custom Profile Field

Posted: Tue Feb 08, 2011 8:48 am
by BiggDawgg
I have wanted something like this for quite some time ... I will give it a try

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 28, 2011 4:49 am
by Caeterra
how customize your search only a specific group?

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 28, 2011 12:38 pm
by Stoker 4.0
Thanks, works fine.
There might be a tiny bug when using a * wildcard to display all members who is using the CPF.
It also display members who once had the CPF filled out but now is blank.

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 28, 2011 1:10 pm
by pca_paul
on my search it is just showing all results not the specific im searching for on region why is this?

http://www.professionalcarers.co.uk/go/ ... Search+CPF

Re: [BETA] Search Custom Profile Field

Posted: Mon Feb 28, 2011 4:03 pm
by Stoker 4.0
pca_paul wrote:on my search it is just showing all results not the specific im searching for on region why is this?

http://www.professionalcarers.co.uk/go/ ... Search+CPF
You are asking in the wrong topic. You need to ask in the topic by 4_seven

Re: [BETA] Search Custom Profile Field

Posted: Tue Mar 01, 2011 10:01 am
by manic2
Caeterra wrote:how customize your search only a specific group?
That is standard on a phpBB Board. Use the Group dropdown in the search.

Re: [BETA] Search Custom Profile Field

Posted: Tue Mar 01, 2011 10:12 am
by manic2
Stoker 4.0 wrote:Thanks, works fine.
There might be a tiny bug when using a * wildcard to display all members who is using the CPF.
It also display members who once had the CPF filled out but now is blank.
Difficult to understand why you are getting that result as the CPF values are only stored once in the database, e.g. at phpbb_profile_fields_data.pf_family_name

I have tested it with my 'Family name' example & searching sm* returns Smith, Smyth, Smeet, Small etc. etc. however someone who did have Smith who has now changed it to S is not shown when searching sm*

Is it a specific field type you are trying Stoker?

Re: [BETA] Search Custom Profile Field

Posted: Tue Mar 01, 2011 11:13 am
by Stoker 4.0
Its a field only admins and mods can fill out.
So as admin I fill it out for the users.

Try delete the family name in your profile and do a search using only the wildcard: *
Then your user with the deleted field appears in the search.