[For 1.8] Default guest avatar + Hover Effect
I use something like that:

Header_welcomeblock_member template -> add this:
<a href="{$mybb->settings['bburl']}/usercp.php"><img class="header_avatar" src="{$mybb->user['avatar']}" /></a>

at the end of header_welcomeblock_member template add this:
$(document).ready(function() {
//create a default avatar for those without one.
if($('.header_avatar img', this).attr('src') == ''){
$('.header_avatar img').attr('src', "images/default_avatar.png");

and into global.css add this:
.header_avatar {
    padding: 1px;
    height: 32px !important;
    width: 32px !important;
    border-radius: 100%;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    -o-border-radius: 100%;
    -ms-border-radius: 100%;
    border: 1px solid #ccc;
    float: left;
    background-color: #fff;
    margin-top: -6px;

.header_avatar:hover {
	border: 1px solid #0072BC;

Save and hard refresh your web browser cache (Ctrl+F5) Smile
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system

Messages In This Thread
Default guest avatar + Hover Effect - by Anka06 - 2018-11-09, 03:32 PM
RE: Default guest avatar + Hover Effect - by Eldenroot - 2019-01-02, 04:33 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)