Quick Search Modification

Does anyone know how to edit the quick search? For example how would I do the following:

 

Change

 

I am a Male/female  seeking a male/female

 

 

to



I am a Runner/Walker seeking a Runner/Walker

Quote · 13 Aug 2008

 
 
 function getBlockCode_QuickSearch() {
  global $site;
  //global $oTemplConfig;
  global $search_start_age;
  global $search_end_age;
 
     $gl_search_start_age    = (int)$search_start_age;
     $gl_search_end_age      = (int)$search_end_age;
 
     if ( (int)$_COOKIE['memberID'] > 0 )
     {
         $arr_sex = getProfileInfo( (int)$_COOKIE['memberID'] ); //db_arr("SELECT Sex FROM Profiles WHERE ID = ".(int)$_COOKIE['memberID']);
         $member_sex = $arr_sex['Sex'];
     }
     else
         $member_sex = 'male';
 
 
  $ret = '<div class="qsi_wrapper">';
   $ret .= '<form action="search.php" method="get">';
    $ret .= '<div class="qsi_line">';
     $ret .= '<div class="qsi_first">';
      $ret .= _t("_I am a");
     $ret .= '</div>';
     $ret .= '<div class="qsi_second">';
      $ret .= '<select name="LookingFor[]">';
       $ret .= SelectOptions("LookingFor", $member_sex);
      $ret .= '</select>';
     $ret .= '</div>';
    $ret .= '</div>';
 
    $ret .= '<div class="qsi_line">';
     $ret .= '<div class="qsi_first">';
      $ret .= _t("_seeking a");
     $ret .= '</div>';
     $ret .= '<div class="qsi_second">';
      $ret .= '<select name="Sex[]">';
       $ret .= SelectOptions("Sex", ($member_sex=='male' ? 'female':'male'), 'LKey2' );
      $ret .= '</select>';
     $ret .= '</div>';
    $ret .= '</div>';
 
    $ret .= '<div class="qsi_line">';
     $ret .= '<div class="qsi_first">';
      $ret .= _t("_aged");
     $ret .= '</div>';
     $ret .= '<div class="qsi_second">';
      $ret .= '<span style="position:absolute; top:0px; left:0px;">';
       $ret .= '<select name="DateOfBirth[0]">';
       for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ )
       {
        $sel = ($i == $gl_search_start_age) ? 'selected="selected"' : '';
        $ret .= '<option value="' . $i . '" ' . $sel . '>' . $i . '</option>';
       }
       $ret .= '</select>';
      $ret .= '</span>';
      $ret .= '<div style="position:absolute; top:2px; left:60px;">';
       $ret .= _t("_to");
      $ret .= '</div>';
      $ret .= '<span style="position:absolute; top:0px; left:80px;">';
       $ret .= '<select name="DateOfBirth[1]">';
       $i = 0;
       for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ )
       {
        $sel = ($i == $gl_search_end_age) ? 'selected="selected"' : '';
        $ret .= '<option value="' . $i . '" ' . $sel . '>' . $i . '</option>';
        $ret .= "\n";
       }
       $ret .= '</select>';
      $ret .= '</span>';
     $ret .= '</div>';
    $ret .= '</div>';
 
    /* $ret .= '<div class="qsi_line">';
     $ret .= '<div class="qsi_first">';
      $ret .= _t("_within");
     $ret .= '</div>';
     $ret .= '<div class="qsi_second">';
      $ret .= '<span style="position:absolute; top:0px; left:0px;">';
       $ret .= '<input type="text" name="distance" style="width:46px;" />';
      $ret .= '</span>';
      $ret .= '<span style="position:absolute; top:0px; left:80px;" >';
       $ret .= '<select name="metric" style="position:relative;float:left;width:50px;left:0px;">';
        $ret .= '<option selected="selected" value="miles">' . _t("_miles") . '</option>';
        $ret .= '<option value="km">' . _t("_km") . '</option>';
       $ret .= '</select>';
      $ret .= '</span>';
     $ret .= '</div>';
    $ret .= '</div>';
 
    $ret .= '<div class="qsi_line">';
     $ret .= '<div class="qsi_first">';
      $ret .= _t("_from ZIP");
     $ret .= '</div>';
     $ret .= '<div class="qsi_second">';
      $ret .= '<input type="text" name="zip" />';
     $ret .= '</div>';
    $ret .= '</div>'; */
 
    $ret .= '<div class="qsi_line" style="text-align:center; margin-top:3px;">';
     $ret .= '<input type="checkbox" name="photos_only" id="qsi_photos_only" style="width:15px; height:15px;" /> ';
     $ret .= '<label for="qsi_photos_only">' . _t("_With photos only") . '</label>';
    $ret .= '</div>';
 
    $ret .= '<div class="qsi_line" style="text-align:center; margin-top:3px;">';
     $ret .= '<input type="submit" value=' . _t( '_Search' ) . ' />';
    $ret .= '</div>';
   $ret .= '</form>';
  $ret .= '</div>';
 
  return $ret;
 }

Quote · 13 Aug 2008

Would I have to change the sex fields, or would I just be able to cut and paste my predefined fields into it?

Quote · 13 Aug 2008

edit amel and female language strings..no code edite needed admin/settings/languages settings/search for male change all to runner  the do female and change all to walker...test...edit profiles or save over one to see it work

I have video tutorials to help you mrpowless.com
Quote · 14 Aug 2008

If I did it that would would the sex field still exist.  I still want to be able to do a sex search in my advanced and simple searches. 

Quote · 14 Aug 2008

code toot is beyond the scope of the forum...this wil get you started...new file is "exp"

$arr_exp = getProfileInfo( (int)$_COOKIE['memberID'] ); //db_arr("SELECT exp FROM Profiles WHERE ID = ".(int)$_COOKIE['memberID']);
$member_exp = $arr_exp['exp'];
}
else
$member_exp = 'noob';


$ret = '<div class="qsi_wrapper">';
$ret .= '<form action="search.php" method="get">';
$ret .= '<div class="qsi_line">';
$ret .= '<div class="qsi_first">';
$ret .= _t("_I am a");
$ret .= '</div>';
$ret .= '<div class="qsi_second">';
$ret .= '<select name="LookingFor[]">';
$ret .= SelectOptions("exp");
$ret .= '</select>';
$ret .= '</div>';
$ret .= '</div>';

$ret .= '<div class="qsi_line">';
$ret .= '<div class="qsi_first">';
$ret .= _t("_seeking a");
$ret .= '</div>';
$ret .= '<div class="qsi_second">';
$ret .= '<select name="Sex[]">';
$ret .= SelectOptions("exp");

I have video tutorials to help you mrpowless.com
Quote · 14 Aug 2008

Sorry to interrupt, I am trying to do something similar.

Which file is the function getBlockCode_QuickSearch() located in?

Thank you.

Quote · 14 Aug 2008

templates/base/bxbaseindex.php

I have video tutorials to help you mrpowless.com
Quote · 15 Aug 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.