By Sky Host on Saturday, 16 May 2015
Posted in General Issues
Replies 1
Likes 0
Views 0.9K
Votes 0
I am trying to show Zodiac sign next to birthday on user profile.
Well, the following code shows the birthday of the user

<?php echo $this->render( 'fields' , 'user' , 'profile' , 'profileHeaderA' , array('BIRTHDAY' , $user ) ); ?>


I am going to use the following code to calculate zodiac sign:

if     ( ( $month == 3 && $day > 20 ) || ( $month == 4 && $day < 20 ) ) { $zodiac = "Aries"; } 
elseif ( ( $month == 4 && $day > 19 ) || ( $month == 5 && $day < 21 ) ) { $zodiac = "Taurus"; }
elseif ( ( $month == 5 && $day > 20 ) || ( $month == 6 && $day < 21 ) ) { $zodiac = "Gemini"; }
elseif ( ( $month == 6 && $day > 20 ) || ( $month == 7 && $day < 23 ) ) { $zodiac = "Cancer"; }
elseif ( ( $month == 7 && $day > 22 ) || ( $month == 8 && $day < 23 ) ) { $zodiac = "Leo"; }
elseif ( ( $month == 8 && $day > 22 ) || ( $month == 9 && $day < 23 ) ) { $zodiac = "Virgo"; }
elseif ( ( $month == 9 && $day > 22 ) || ( $month == 10 && $day < 23 ) ) { $zodiac = "Libra"; }
elseif ( ( $month == 10 && $day > 22 ) || ( $month == 11 && $day < 22 ) ) { $zodiac = "Scorpio"; }
elseif ( ( $month == 11 && $day > 21 ) || ( $month == 12 && $day < 22 ) ) { $zodiac = "Sagittarius"; }
elseif ( ( $month == 12 && $day > 21 ) || ( $month == 1 && $day < 20 ) ) { $zodiac = "Capricorn"; }
elseif ( ( $month == 1 && $day > 19 ) || ( $month == 2 && $day < 19 ) ) { $zodiac = "Aquarius"; }
elseif ( ( $month == 2 && $day > 18 ) || ( $month == 3 && $day < 21 ) ) { $zodiac = "Pisces"; }


How do I extract month and day from
array( 'BIRTHDAY'' , $user )
Hi Sky,

I am really sorry for the delay of this reply as it is a weekend for us here.

You can take a look of this 2 file is display the birthday value in user profile header.

JoomlaFolder\media\com_easysocial\apps\fields\user\birthday\widgets\profile\view.html.php
JoomlaFolder\media\com_easysocial\apps\fields\user\birthday\themes\default\widgets\display.php
·
Saturday, 16 May 2015 13:48
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post