show age in profiles

Hi Guys,

Is there a way to replace date of birth in profiles with just age?

If it's not possible to do this.  Is there a way to change the date of birth display from yyyy-mm-dd to dd-mm-yyyy?

Quote · 19 Jun 2009

There is a mod to do that, use the search forum and look at age in profile or look to this:
http://www.expertzzz.com/Downloadz/view/3968

Kids first
Quote · 20 Jun 2009

Goldman,

I just had an idea that may work. You could create a customised field with just "age range" using Predefined values. You could use ranges: 18-19, 20-29, 30-39 etc. Have this show for members and visitors but for admin and moderators, let the actual birth date show. You can use this for PR (send a birthday announcement or feature members who have a birthday for any given day) make it required/mandatory. In the "message or description box" state it's only visible to admin/moderators. Make sure to go across the board: Join, Edit Profile, View Profile and Search Profiles. Your bringing this to my attention helps tremendously. I have been concerned about it all along but was dealing with other issues.

Note: You may wish to check out this mod: http://www.boonex.com/unity/extensions/entry/Cron_Birthday_EMail_2008_05_29

When I figure out how to install it, I'm going to use it for PR purposes on the site.

Cheers!

PS OR, just simply let them type their age in a text/field box. And type their birthday(month/day) in another field/texbox. You can make either mandatory or not.

Quote · 20 Jun 2009

Hi Jhazzi,

I've solved the issue.  I took your advice and just added an age Item field. Laughing

Quote · 21 Jun 2009

it's eassy

 

/base/scripts/BxBaseProfileView.php

In function showBlockPFBlock,
       
 Step: 1
 Find:
  
  foreach( $aItems as $aItem ) {
   $sValue1 = $this -> oPF -> getViewableValue( $aItem, $this -> _aProfile[ $aItem['Name'] ] );
   if( !$sValue1 ) //if empty, do not draw
    continue;

 below add this code :
 
   
   if($aItem['Name'] == "DateOfBirth")
   {
 
    $sRet .= '<tr>';
    $sRet .=         '<td class="profile_info_label">' . _t( "Age" ) . ':</td>';
   
    $ageValue1 = age($sValue1);
    if( $this -> bCouple ) {
     if( in_array( $aItem['Name'], $this -> aCoupleMutualItems ) ) {
      $sRet .= '<td class="profile_info_value" colspan="2">' . $ageValue1 . '</td>';
     } else {
      $sValue2 = $this -> oPF -> getViewableValue( $aItem, $this -> _aCouple[ $aItem['Name'] ] );

      $ageValue2 = age($sValue2);
      
      $sRet .= '<td class="profile_info_value1">' . $ageValue1 . '</td>';
      $sRet .= '<td class="profile_info_value2">' . $ageValue2 . '</td>';
     }
    } else {
     $sRet .=     '<td class="profile_info_value" >' . $ageValue1 . '</td>';
    }

   }else{


Step: 2

Find:

  $sRet .= '</tr>';
 
 Just above, Add :
 
  }

Quote · 21 Jun 2009

Hi Prolaznik,

I'll give it a go.  Thanks again.  If you know how to disable bra size is member is a male, please let me know.

Quote · 21 Jun 2009

Is there a way to make birthday WITHOUT the year?  i.e. 06/30  (for age-sensitive members)

Quote · 21 Jun 2009

Is there a way to make birthday WITHOUT the year?  i.e. 06/30  (for age-sensitive members)

Just move that "item" to inactive in Builders > Fields Builder. Create a new item that asks for birthday. In description, give an example: Month/day - June 15th.  In other words, you're removing the software's default (calendar and all) and creating your own specifications.

Quote · 21 Jun 2009

it's eassy

/base/scripts/BxBaseProfileView.php

In function showBlockPFBlock,

Step: 1
Find:

foreach( $aItems as $aItem ) {
$sValue1 = $this -> oPF -> getViewableValue( $aItem, $this -> _aProfile[ $aItem['Name'] ] );
if( !$sValue1 ) //if empty, do not draw
continue;

below add this code :


if($aItem['Name'] == "DateOfBirth")
{

$sRet .= '<tr>';
$sRet .=         '<td class="profile_info_label">' . _t( "Age" ) . ':</td>';

$ageValue1 = age($sValue1);
if( $this -> bCouple ) {
if( in_array( $aItem['Name'], $this -> aCoupleMutualItems ) ) {
$sRet .= '<td class="profile_info_value" colspan="2">' . $ageValue1 . '</td>';
} else {
$sValue2 = $this -> oPF -> getViewableValue( $aItem, $this -> _aCouple[ $aItem['Name'] ] );

$ageValue2 = age($sValue2);

$sRet .= '<td class="profile_info_value1">' . $ageValue1 . '</td>';
$sRet .= '<td class="profile_info_value2">' . $ageValue2 . '</td>';
}
} else {
$sRet .=     '<td class="profile_info_value" >' . $ageValue1 . '</td>';
}

}else{


Step: 2

Find:

$sRet .= '</tr>';

Just above, Add :

}

Hi all,

This actually does work! Laughing

Quote · 21 Jun 2009

Hey Goldman,

I took your word and did this but what's supposed to happen? It appears, nothing. (Which beats site crashing or blank page.) I do not see any changes on my existing profiles. The yyyy/mm/dd remained the same. Thanks for your help!

Quote · 21 Jun 2009

lol yes i know it works
just make sure you are following those two steps :))

Quote · 21 Jun 2009

it's eassy

/base/scripts/BxBaseProfileView.php

In function showBlockPFBlock,

Nicely done, thanks for that!

Quote · 22 Jun 2009
 
 
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.