2012-04-21, 12:48 AM
Pages: 1 2
2012-04-21, 01:24 AM
Adding a border?
2012-04-21, 07:39 AM
Unfortunately you've to edit ./member.php file since the <img src=""> tag has been used in the core file, rather to have a separate template.
Open ./member.php file and find;
Then you've to define its CSS in global.css like this;
You can't do simply by editing the template because if a user hasn't an avatar then the avatar area will have a vacant space with the CSS styling.
Open ./member.php file and find;
$avatar = "<img src=\"{$memprofile['avatar']}\" alt=\"\" $avatar_width_height />";
and Change it into;$avatar = "<img src=\"{$memprofile['avatar']}\" alt=\"\" $avatar_width_height class=\"member_avatar\"/>";
Then you've to define its CSS in global.css like this;
.member_avatar{
border: 3px double #000;
/* DEFINE YOUR CSS HERE */
}
You can't do simply by editing the template because if a user hasn't an avatar then the avatar area will have a vacant space with the CSS styling.
2012-04-21, 08:32 AM
@Op
I came across this when I wanted to style the avatar on profiles, too. The best way is to create a new image, basically. Something like:
Replace the {$avatar} with that and style the class.
I came across this when I wanted to style the avatar on profiles, too. The best way is to create a new image, basically. Something like:
<img src="{$memprofile['avatar']}" class="profileAvatar" alt="" />
Replace the {$avatar} with that and style the class.
2012-04-21, 08:38 AM
But if a user hasn't uploaded his avatar then the area will show a broken image Jordan.
2012-04-21, 08:43 AM
Ah, good point. The code I used was on iOSNut, and there is a default image on there. There's a jQuery code I have laying around somewhere that displays a URL in place of any empty avatar URL. I'll try and dig it up for the OP.
2012-04-21, 11:04 PM
If the img src would be good, you could try to use the Template Conditionals plugin, better than editing core file for sure. Anyways the $memprofile['avatar'] is not working for me.
Code would be like this:
Code would be like this:
<td class="{$alt_bg}" align="center"><if $user['avatar'] then>
<img src="{$memprofile['avatar']}" class="profileAvatar"/>
</if></td>
2012-04-23, 01:39 PM
Great advice guys, thank you.
2012-04-23, 01:50 PM
(2012-04-21, 11:04 PM)Destroy666 Wrote: [ -> ]If the img src would be good, you could try to use the Template Conditionals plugin, better than editing core file for sure. Anyways the $memprofile['avatar'] is not working for me.
Code would be like this:
<td class="{$alt_bg}" align="center"><if $user['avatar'] then> <img src="{$memprofile['avatar']}" class="profileAvatar"/> </if></td>
Actually, it should be this:
<if $memprofile['avatar'] then>
<img src="{$memprofile['avatar']}" class="profileAvatar" />
</if>
2012-04-23, 02:01 PM
thanks
awesome

Pages: 1 2