Remove Sex and Age in Extended People Search

I have removed sex and age in chat, as well as in the dashboard, but I also want to remove them from the extended people search.  I have a business site and revealing a member's age and sex without permission is inappropriate.  Thanks.

Someday, Someway.
Quote · 1 May 2010

How did you do the Dash board .....??

Quote · 1 May 2010

Here is the answer:

First ---

How did you do the Dash board .....??

This post was very helpful in removing age/sex in dashboard as well as chat:

http://www.boonex.com/unity/forums/topic/Coding-modes-for-the-Dolphin-Newbie.htm

For dashboard follow the directions for "How to remove sex symbols next to profile photo."  There are TWO mods for member.php.  DO BOTH.  To remove the age you ALSO have to comment out the line before $sProfileIcon.  Here's how the Values section looks on my member.php:

// Values
  $sUsername = $this->aMemberInfo['NickName'];
  $sUserLink = getProfileLink($this->aMemberInfo['ID']);
  $sOwnerThumb = get_member_thumbnail($this->aMemberInfo['ID'], 'none', true);
  $iYears = age($this->aMemberInfo['DateOfBirth']);
  //$sYearsOld = _t('_y/o', $iYears);
  //$sProfileIc alt= ($this->aMemberInfo['Sex'] == 'male') ? $sMaleIcon : $sFemaleIcon;

After working on these I figured out by deduction the answer to my own question.  It is somewhat more complicated so I'll post it here.

HOW TO REMOVE SEX AND AGE IN EXTENDED PEOPLE SEARCH:

You need to edit templates/base/scripts/BxBaseSearchProfile.php.

For the main profile, in lines 94-99 comment out those below the profile comment:

  $sProfileThumb = get_member_thumbnail( $aProfileInfo['ID'], 'none', ! $bExtMode, 'visitor', $aOnline );

  // profile Nick/Age/Sex etc.
  // $sAgeStr = ($aProfileInfo['DateOfBirth'] != "0000-00-00" ? (_t("_y/o", age( $aProfileInfo['DateOfBirth'] )) .' ') : "");
  // $sAge alt= ($aProfileInfo['DateOfBirth'] != "0000-00-00" ? ( age( $aProfileInfo['DateOfBirth'] )) : "");
  // $y_o_sex = $sAgeStr ;

If you are allowing couples globally, you also have to do it for Profile 2, lines 160-167

  $sProfile2ASc1 = $sProfile2ASc2 = $sProfile2Nick = $sProfile2AgeSex = $sProfile2CityC alt= $sProfile2Desc = $sProfile2Match = '';
  if ($aCoupleInfo) {
   // profile Nick/Age/Sex etc.
   $sNickName2 = '<a href="' . getProfileLink( $aCoupleInfo['ID'] ) . '">' . $aCoupleInfo['NickName'] . '</a>';

   // $sAgeStr2 = ($aCoupleInfo['DateOfBirth'] != "0000-00-00" ? (_t("_y/o", age( $aCoupleInfo['DateOfBirth'] )) .' ') : "");
   // $sAge alt= ($aCoupleInfo['DateOfBirth'] != "0000-00-00" ? ( age( $aCoupleInfo['DateOfBirth'] )) : "");
   // $y_o_sex2 = $sAgeStr2;// . _t("_".$aCoupleInfo['Sex']);

In 188-189, comment out 189:

   $sProfile2Nick = $sNickName2;
   // $sProfile2AgeSex = $y_o_sex2;

In 210-211, comment out 211, $sSexicon:

 $sProfileNickname = ($sHeadline) ? "<a href='$Link'>" . $sNickName . '</a> :' : "<a href='$Link'>" . $sNickName . '</a>';
  // $sSexIc alt= $GLOBALS['oFunctions']->genSexIcon($aProfileInfo['Sex']);

 

BUT HERE'S THE CATCH, IF YOU ONLY DO THIS IT WILL LOOK FINE IN FIREFOX BUT NOT IN CHROME OR IE7.  In those there will be an image placeholder.  To remove that you have to edit templates/base/search_profiles_ext.html.  Remove:

   <img src="__sex_image__" alt="__sex_image__" />

BAM!!

 

Someday, Someway.
Quote · 6 May 2010
 
 
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.