SimplePortal

Support => English Support => Topic started by: FrizzleFried on December 24, 2012, 10:29:44 AM

Title: Rounded Avatars
Post by: FrizzleFried on December 24, 2012, 10:29:44 AM
Hello...

I recently installed this mod from the SMF site: http://custom.simplemachines.org/mods/index.php?mod=3575

It rounds the corners of the avatars in messages,  on profiles,  and in the memberlist.  It does not round the avatars in any of my SimplePortal blocks.  Can anyone point me in the direction as to how to round the avatars in the different blocks I have running?

Thanks!

EDIT: My apologies... I do believe I posted this in the wrong forum.   :(
Title: Re: Rounded Avatars
Post by: TinMan on December 24, 2012, 11:20:34 AM
I looks like you can do this by finding the blocks in PortalBlocks.php that you want the avatars to be rounded on and add "avatar" to the class.

For example with Board News.
Find:
Code: [Select]
<a href="', $scripturl, '?action=profile;u=', $news['poster']['id'], '"><img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" class="sp_float_right" /></a>
Replace With:
Code: [Select]
<a href="', $scripturl, '?action=profile;u=', $news['poster']['id'], '"><img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" class="sp_float_right avatar" /></a>
Title: Re: Rounded Avatars
Post by: FrizzleFried on December 24, 2012, 10:36:10 PM
I seem to need help finding the line to edit for the TOP POSTER block....
Title: Re: Rounded Avatars
Post by: TinMan on December 25, 2012, 01:29:15 PM
There are two instances of this in PortalBlocks.php.  The first instance is for Top Poster and the second is for Top Member Stats.
Find:
Code: [Select]
<a href="' . $scripturl . '?action=profile;u=' . $member['id'] . '"><img src="' . $member['avatar']['href'] . '" alt="' . $member['name'] . '" width="40" /></a>' : '', '
Replace with:
Code: [Select]
<a href="' . $scripturl . '?action=profile;u=' . $member['id'] . '"><img class="avatar" src="' . $member['avatar']['href'] . '" alt="' . $member['name'] . '" width="40" /></a>' : '', '
Title: Re: Rounded Avatars
Post by: FrizzleFried on December 25, 2012, 03:35:01 PM
Unfortunately avatars show up at 100% (not 40) using the code above...  but they ARE rounded.

:)

Title: Re: Rounded Avatars
Post by: TinMan on December 26, 2012, 11:12:37 AM
Thats odd, I tested the Top Poster block with Firefox and Chrome with no problems on the default theme.
Title: Re: Rounded Avatars
Post by: demlak on January 05, 2013, 09:56:42 AM
also there is the team-list block..
Code: [Select]
<a href="' . $scripturl . '?action=profile;u=' . $staff['id'] . '"><img src="' . $staff['avatar']['href'] . '" alt="' . $staff['name'] . '" width="40" /></a>' : '', '
Code: [Select]
<a href="' . $scripturl . '?action=profile;u=' . $staff['id'] . '"><img class="avatar" src="' . $staff['avatar']['href'] . '" alt="' . $staff['name'] . '" width="40" /></a>' : '', '


i made a mod of these three changes.. so just install this after the round corners mod of colins.. and everything should be fine
Title: Re: Rounded Avatars
Post by: FrizzleFried on January 05, 2013, 01:31:23 PM
Unfortunately the package did the very same thing that happened when I manually made changes...

It made all my avatars go from 40% to 100%.

Might be that I have those blocks in blocks...?

Title: Re: Rounded Avatars
Post by: demlak on January 05, 2013, 03:09:12 PM
im sorry.. i donĀ“t know about your problem.. but i can say to you, that this mod does exactly the same as the manual edit...
Title: Re: Rounded Avatars
Post by: AngelinaBelle on June 11, 2013, 12:15:46 PM
Can you show a link to the forum?.  We can see the HTML and CSS that way.
Title: Re: Rounded Avatars
Post by: ccbtimewiz on June 11, 2013, 02:25:45 PM
What theme are you using?
Title: Re: Rounded Avatars
Post by: AngelinaBelle on June 18, 2013, 07:11:11 AM
FrizzleFried -- if you are still interested in this issue, please hit the "Topic Not Solved" button and continue.

Thanks
SimplePortal 2.3.8 © 2008-2024, SimplePortal