Customizing SMF > SMF Coding Discussion

Help I'm Stuck!!

(1/1)

The Wizard:
Hello:

I'm trying to develop a mod that will allow the user to hide their age form other users on the board. I have solved the problem in the profile section and now I want to carry this over to the Calendar. Except I'm having a mental block and and just stuck.

I know I will have to add or change this section of code, but I'm just not seeing how. Anybody got a idea?



--- Quote ---   $bday = array();
   while ($row = $smcFunc['db_fetch_assoc']($result))
   {
      if ($year_low != $year_high)
         $age_year = substr($row['birthdate'], 5) < substr($high_date, 5) ? $year_high : $year_low;
      else
         $age_year = $year_low;

      $bday[$age_year . substr($row['birthdate'], 4)][] = array(
         'id' => $row['id_member'],
         'name' => $row['real_name'],
         'age' => $row['birth_year'] > 4 && $row['birth_year'] <= $age_year ? $age_year - $row['birth_year'] : null,
         'is_last' => false
      );
   }
--- End quote ---

Kays:
Hi, if the user doesn't enter the birth year. Then the age won't be displayed. No mod or playing with code required. :)

Navigation

[0] Message Index

Go to full version