MyBB Community Forums

Full Version: Show Avatar on every page it is displied rounded.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, i want to show the User Avatars on each page rounded, currently it is round on some pages but on other's it is still a square.

Here a example of it showing correctly:
[Image: avatar-rounded-userpage.png]

[Image: avatar-rounded-threadindex.png]

[Image: avatar-rounded-threadpage.png]

Now a few examples on pages where it shows incorrectly, would be nice if i can modify 1 thing and it then shows correctly everywhere:
[Image: avatar-squared-memberlist.png]

[Image: avatar-squared-sideblock1.png]

[Image: avatar-squared-sideblock2.png]

Hopefully someone can help me there.

Regards,
Infinimonster
You just have to control the shape of the image via css

Open the template in which the img is situated and if it has a class name then it's good or if it hasn't any class name then give that a class name

Then in css

img.classname {
border-radius: 50%;
}
(2023-05-04, 01:11 PM)PARADOX987 Wrote: [ -> ]You just have to control the shape of the image via css

Open the template in which the img is situated and if it has a class name then it's good or if it hasn't any class name then give that a class name

Then in css

img.classname {
  border-radius: 50%;
}

That solved it for memberlist and online staff sideblock but somehow don't for the welcome sidebox.

Here the html from the welcome sidebox:
{$user_avatar}
<span class="smalltext">
	<em>{$lang->asb_welcome_member_welcome_lastvisit}:</em> 
	{$lastvisit}
	<br />
		{$lang->since_then}
	<br />
	<strong>&raquo;</strong> {$lang->asb_welcome_new_announcements}<br />
	<strong>&raquo;</strong> {$lang->asb_welcome_new_threads}<br />
	<strong>&raquo;</strong> {$lang->asb_welcome_new_posts}<br /><br />
	<a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a>
	<br />
	<a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->asb_welcome_view_todays}</a>
</span>

In first line is the squared avatar.

Here i manged to mkae it round for the staff online sideblock:
<img src="{$staff_avatar_filename}" alt="{$staff_avatar_alt}" title="{$staff_avatar_title}" width="{$staff_avatar_dimensions}" style="border-radius: 50%;"/>

But the way i made it round, don't seem to work for the welcome sideblock as then the square avatar appears at the left and at the right next to it is the content from the style attribute written in text.