The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I want to add some custom user profile fields to the advanced member search. I've had a look around and it looks like a fair amount of hacking required to do this, but I was hoping maybe someone either has already done it or has an idea how I should go about it?
|
#2
|
||||
|
||||
Not really.
You will need to edit two things: memberlist.php file and memberlistsearch template For the file, you should add something like this: Code:
if ($customfieldname!="") { $condition.=" AND userfield.field5 LIKE '%".addslashes($customfieldname)."%' "; } somewhere in this block: Code:
if ($icq!="") { $condition.=" AND icq LIKE '%".addslashes($icq)."%' "; } if ($aim!="") { $condition.=" AND aim LIKE '%".addslashes($aim)."%' "; } Then you will need to add an input box to the template, and make the name of it customfieldname, so it'll match the code you added earlier. Not really hard, but takes a bit time. |
#3
|
|||
|
|||
As easy as that! Works perfectly, FireFly.
Once again, thank you very much!! |
#4
|
|||
|
|||
Will this search any custom user profile fields that have been added in VB control panel?
Quote:
|
#5
|
||||
|
||||
Yes, but you must make the changes to the parts in red and add the fields to the searching template.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|