By czeky on
Hi, I'm editting user-picture.tpl.php and trying to find out how to add female.gif and male.gif to user without own photo (avatar)
Still missing something in the code..
if($account->picture)
{
print $picture; // this is working of course
}
else
{
$account = user_load(array('uid' => $account->uid));
$gender = check_plain($account->profile_gender);
print $gender; // prints okay Male or Female according what user fills in profile (using core profile.module)
if ($gender == "Male") // this condition is not working
{
print 'path to male.gif'; // this is just to know if its working right, not actual path to the picture
<?php
}
else
{
print 'path to female.gif';
}
}
many thanx for a help..
Comments
Why
Why the stray
<?php?oh, it shouldnt be there of
oh, it shouldnt be there of course, thanx, but still the same question
žžžž
just discovered.. if there is an english Male anf Female, it is working, but here, in czech republic we have "Muž" for male and "Žena" for female, when using these words with czech charcters "ž" its not working, any ideas?
Probably you have to Save
Probably you have to Save this file in your coding...
You must change coding
You must change coding. For example, in PSPad you must select UTF-8 in Format.
@czeky: Could you solve this
@czeky: Could you solve this problem? I would like to do the same on my website.
Great find.
Great find.