i haven`t done anything with categories and the user module, but what i mean is, you can offer a (keyword)-searchform as a selectfield for
any custom- or standard_member_fields data.
{exp:user:search form_name="form1" return="{path=tplg/tpl}" group_id="5" form_id="fid"
skip_field="fieldname1|fieldname2|fieldname3"}
<label for="keywords"></label>
<select id="keywords" name="keywords">
<option value="" selected="selected">choose:</option>
<option value="New York" >New York</option>
</select>
<p><input type="submit" value="submit" /></p>
{/exp:user:search}
... finds the value in every field that isn`t named fieldname1, -2 or fieldname3.
{exp:user:search form_name="form1" return="{path=tplg/tpl}" group_id="5" form_id="fid"
skip_field="fieldname1|fieldname2|fieldname4"}
<label for="keywords"></label>
<select id="keywords" name="keywords">
<option value="" selected="selected">choose:</option>
<option value="New York" >New York</option>
</select>
<p><input type="submit" value="submit" /></p>
{/exp:user:search}
... finds the value in every field that isn`t named fieldname1, -2 or fieldname4.
so New York (as value in fieldname3) won`t get found in the first example, but
true in the 2nd example.
the problem is, you can`t combine these 2 forms and the select-form values have to be hardcoded.
for what you want, when i`m right, you have to use the user:users tag. in this tag you can get the custom_member_field values like so ..
{select_fieldname} <option value="{value}">{value}</option> {/select_fieldname}
... and, if you use this in an embed-template as resultpage, with php-parsing on input, grab the
$_POST array and build a function to generate a custom user:users param like this:
<?php if(isset($_POST['formfieldname']) and $_POST['formfieldname'] != "") {
$custom_field_params .= " custom_member_field_fieldname=\"".$_POST['formfieldname']."\""; } ?>
{exp:user:users group_id="5" limit="18" paginate="bottom" orderby="join_date" sort="desc" filter_method="any"
<?php echo $custom_field_params; ?>}
... where $custom_field_params is something like: custom_member_field="searchsex|Frau"
custom_member_field_fieldname="18" ....
to recieve this additional parameters you have to edit system/modules/user/mod.user.php like described on top of the thread. for this
example here, we have to add some lines like this:
/** ----------------------------------------
/** Filter by custom field fieldname
/** ----------------------------------------*/
/**/
if ( $custom_member_field = $TMPL->fetch_param('custom_member_field_fieldname') )
{
$custom_field = $custom_member_field;
if ( isset( $custom_field ) )
{
$plus = 0;
$plus = $custom_field;
$plus = $plus+20;
$sql .= " AND md.m_field_id_27 BETWEEN '".$custom_field."' AND '".$plus."'";
}
}
this seems to be working solution. code above is not really tested, just a quick snippet.