PDA

View Full Version : Not show fields on the Advanced Member Search Page if disabled for displaying



Marco van Herwaarden
Fri 17th Feb '06, 9:33am
Introduction:
You can control which items to show on the Member List (AdminCP->vBulletin Options->User Listing & Profile Viewing->Member List Field Options). However disabling display of the item, will still make if searchable on the Advanced Member Search page

To prevent an item to be searchable when not set to displayed, you can make the Template edits as described below. I will give a full example for Post Count.

Please note that editing the Templates, will not prevent users from performing a search on that criterium using URL options!

Post Count
To remove it from the search page, edit your 'memberlist_search' Template.

Find:

<fieldset class="fieldset">
<legend>$vbphrase[post_count]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$vbphrase[is_greater_than_or_equal_to]<br />
<input type="text" class="bginput" size="25" name="postslower" value="" />
</td>
<td>
$vbphrase[is_less_than]<br />
<input type="text" class="bginput" size="25" name="postsupper" value="" />
</td>
</tr>
</table>
</fieldset>

Add the 2 lines shown in red:

<if condition="$show[postscol]">
<fieldset class="fieldset">
<legend>$vbphrase[post_count]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$vbphrase[is_greater_than_or_equal_to]<br />
<input type="text" class="bginput" size="25" name="postslower" value="" />
</td>
<td>
$vbphrase[is_less_than]<br />
<input type="text" class="bginput" size="25" name="postsupper" value="" />
</td>
</tr>
</table>
</fieldset>
</if>


Doing the same for fields other then Post Count?
Follow the instructions for Post Count. You will need to locate a different block in your 'memberlist_search' Template, as instructed for each item below.

Just locate the indicated block in your template, and add teh 2 lines as shown for Post Count around it The Variable name will be different. The variablename to use will be indicated for each item.

Example:
For postcount:

<if condition="$show[postscol]">
For OTHERVAR:

<if condition="$show[OTHERVAR]">

Home page:
Search for the block:

<div class="fieldset">
$vbphrase[home_page]<br />
<input type="text" class="bginput" size="50" name="homepage" value="" />
</div>


Conditional Variable: homepagecol

Date Joined:
Search for the block:

<fieldset class="fieldset">
<legend>$vbphrase[join_date]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$vbphrase[is_after]<br />
<input type="text" class="bginput" size="25" name="joindateafter" value="" />
</td>
<td>
$vbphrase[is_before]<br />
<input type="text" class="bginput" size="25" name="joindatebefore" value="" />
</td>
</tr>
<tr>
<td colspan="2">$vbphrase[please_use_format]</td>
</tr>
</table>
</fieldset>

Conditional Variable: datejoinedcol

Instant Messaging (the search for any IM name):
Search for the block:

<fieldset class="fieldset">
<legend>$vbphrase[instant_messaging]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$vbphrase[icq_number]<br />
<img src="$stylevar[imgdir_misc]/im_icq.gif" alt="" />
<input type="text" class="bginput" size="25" name="icq" value="" />
</td>
<td>
$vbphrase[aim_screen_name]<br />
<img src="$stylevar[imgdir_misc]/im_aim.gif" alt="" />
<input type="text" class="bginput" size="25" name="aim" value="" />
</td>
</tr>
<tr>
<td>
$vbphrase[msn_messenger_handle]<br />
<img src="$stylevar[imgdir_misc]/im_msn.gif" alt="" />
<input type="text" class="bginput" size="25" name="msn" value="" />
</td>
<td>
$vbphrase[yahoo_messenger_handle]<br />
<img src="$stylevar[imgdir_misc]/im_yahoo.gif" alt="" />
<input type="text" class="bginput" size="25" name="yahoo" value="" />
</td>
</tr>
<tr>
<td>
$vbphrase[skype_name]<br />
<img src="$stylevar[imgdir_misc]/im_skype.gif" alt="" />
<input type="text" class="bginput" size="25" name="skype" value="" />
</td>
<td>&nbsp;</td>
</tr>
</table>
</fieldset>


Conditional Variable: imicons