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

yelvington’s picture

Why the stray <?php ?

czeky’s picture

oh, it shouldnt be there of course, thanx, but still the same question

czeky’s picture

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?

zzemm’s picture

Probably you have to Save this file in your coding...

gynekolog’s picture

You must change coding. For example, in PSPad you must select UTF-8 in Format.

MasterD’s picture

@czeky: Could you solve this problem? I would like to do the same on my website.

fehin’s picture

Great find.