[RC] Search Custom Profile Field

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

[RC] Search Custom Profile Field

Post 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.
Last edited by manic2 on Sun Jan 15, 2012 9:31 am, edited 11 times in total.
manic
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: [BETA]Search Custom Profile Field

Post 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
manic
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA]Search Custom Profile Field

Post by 4_seven »

just in time, thx :)
Current Mods | Mod Base | php(BB) programming | No help via PM
Ozo
Registered User
Posts: 330
Joined: Mon Dec 13, 2010 7:57 pm

Re: [BETA] Search Custom Profile Field

Post 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?
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: [BETA] Search Custom Profile Field

Post 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.
manic
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Search Custom Profile Field

Post 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.
Current Mods | Mod Base | php(BB) programming | No help via PM
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: [BETA] Search Custom Profile Field

Post 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.
manic
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: [BETA] Search Custom Profile Field

Post by BiggDawgg »

I have wanted something like this for quite some time ... I will give it a try
User avatar
Caeterra
Registered User
Posts: 33
Joined: Sat Feb 12, 2011 8:35 am

Re: [BETA] Search Custom Profile Field

Post by Caeterra »

how customize your search only a specific group?
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [BETA] Search Custom Profile Field

Post 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.
pca_paul
Registered User
Posts: 18
Joined: Mon Feb 28, 2011 12:24 pm

Re: [BETA] Search Custom Profile Field

Post 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
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [BETA] Search Custom Profile Field

Post 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
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: [BETA] Search Custom Profile Field

Post 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.
manic
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: [BETA] Search Custom Profile Field

Post 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?
manic
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [BETA] Search Custom Profile Field

Post 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.
Locked

Return to “[3.0.x] MODs in Development”