MyBB Community Forums

Full Version: Square them's avatar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I had a Square Theme in which i had seen that by default the mini user imsgae commes like this
[Image: 619479997d.JPG]


but actually in the Main one its coming like this
[Image: 7590e49814.JPG]

How i can fix the mini-user image to come same when the avatar is default?
Post your header template.
<div class="scrolltotop"><i class="fa fa-caret-up fa-2x"></i></div>

<div id="container">

<div id="header">
<div class="wrapper">
          <a class="logo" href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
          <div class="menu">
              <ul>
                  <li><a href="{$mybb->settings['bburl']}/index.php"><i class="fa fa-comments fa-2x"></i><br />{$lang->xstyled_index}</a></li>
                  <li><a href="{$mybb->settings['bburl']}/search.php"><i class="fa fa-search fa-2x"></i><br />{$lang->xstyled_search}</a></li>
                  <li><a href="{$mybb->settings['bburl']}/memberlist.php"><i class="fa fa-users fa-2x"></i><br />{$lang->xstyled_members}</a></li>
                  <li><a href="{$mybb->settings['bburl']}/calendar.php"><i class="fa fa-calendar-o fa-2x"></i><br />{$lang->xstyled_calendar}</a></li>
                <li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><i class="fa fa-question-circle fa-2x"></i><br />{$lang->xstyled_help}</a></li>
              </ul>
          </div>
</div>
</div>
 
<div id="panel">
  <div class="wrapper">
<div class="news">
<div class="announcements"><i class="fa fa-microphone fa-2x"></i></div>
<div class="automsj">
<ul>
                          <li class="quotes">Welcome to Post4VPS Forum.</li>
<li class="quotes">This Forum provides Free VPSes.</li>
                          <li class="quotes">A Brand new Post2Host Forum.</li>
</ul>
</div>
</div>
        <div class="usersection">
{$welcomeblock}
        </div>
</div>
</div>
     
<div id="content">
<div class="wrapper">
              <br />
              <navigation>
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
{$awaitingusers}
<br />

and here is header_welcomeblock_member

<div class="usermenu">
   {$admincplink}
  {$modcplink}
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']}" height="40" width="40"></a>
  {$lang->xstyled_welcomephrase} <span class="userunique"><a href="{$mybb->settings['bburl']}/member.php?action=profile">{$mybb->user['username']}</a></span>
</div>

<div id="dd" class="wrapper-dropdown-5" tabindex="1">
<i class="fa fa-angle-down fa-lg"></i>
<ul class="dropdown">
<table>
<tr>
<td class="tduser" style="width: 200px; text-align: left;">
                  <li><a href="{$mybb->settings['bburl']}/usercp.php"><i style="font-size: 14px;" class="fa fa-cog fa-fw"></i> {$lang->xstyled_usercp}</a></li>
<li><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup&modal=1', null, true); return false"><i style="font-size: 14px;" class="fa fa-users fa-fw"></i> {$lang->xstyled_friendlist}</a></li>
                  <li><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><i class="fa fa-camera fa-fw"></i> {$lang->xstyled_changeavatar}</a></li>
      <li><a href="{$mybb->settings['bburl']}/usercp.php?action=editsig"><i class="fa fa-picture-o fa-fw"></i> {$lang->xstyled_changesignature}</a></li>
                  <li><a href="{$mybb->settings['bburl']}/private.php"><i class="fa fa-envelope fa-fw"></i> {$lang->xstyled_pms}</a></li>
<li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}"><i class="fa fa-power-off fa-fw"></i> {$lang->xstyled_logout}</a></li>
</td>
</tr>
</table>
</ul>
</div>
Inspect the broken image link and find where it is pointing to. Then upload or change the image to that location.
Go to ACP > Templates & Styles > Styles > Square > and open Square.css

Search this class:

.panelavatar {
  	margin: 0 5px 0 0;
  	padding: 0;
}

Replace that class with this new three classes:

.panelavatar {
	width: 40px;
	height: 40px;
	background: url("images/square/default_avatar.png") no-repeat;
	background-size: 100% auto;
	border: 1px none;
  	padding: 0;
        margin: 0 5px 0 0;
}

.panelavatar img {
	height: 40px;
	width: 40px;
	margin: 0;
	padding: 0;
	border: 1px none;
}

.panelavatar img[src=""] {
	display: none;
	margin: 0;
	padding: 0;
	border: 1px none;
}

Tell me if this fix your problem.
Still the same, its not fixed yet Sad

and i also wants to do like adding banner in side (i have showed that how i want, here)
[Image: 2e41655105.jpg]
and i had added a legend system but looks like its not syntax correctly with this theme see and say can you able to fix it? or give me new stuff which i can replace to get the correct legend list
[Image: 56ef1c2f1b.jpg]
I had seen those adding legend from here http://mods.mybb.com/view/usergroup-legend
I registered into your forum and the avatar looks fine with the code I give to you...
What I do not understand in the header_welcomeblock_member template is the link:


<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']}" height="40" width="40"></a>

The link brings you to the script that is used to change your avatar (UserCP -> Change Avatar).I would say that the html to place the avatar should be sufficient:


<img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']}" height="40" width="40">

Perhaps enclosed in a div
(2015-08-29, 09:02 AM)Ad Bakker Wrote: [ -> ]What I do not understand in the header_welcomeblock_member template is the link:


<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']}" height="40" width="40"></a>

The link brings you to the script that is used to change your avatar (UserCP -> Change Avatar).I would say that the html to place the avatar should be sufficient:


<img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']}" height="40" width="40">

Perhaps enclosed in a div

The link is there because you can click the avatar and change it in a quick way (You can remove it, but a lot of people wants it in that way).

What he wants is the default avatar of mybb there, and for some weird reason, when you use that link, the forum doesn't put the default avatar image there.

That's why you need to "trick" the class of the img tag, and force the default avatar to be placed and resized in order to see the image, then, when the user finally put a custom avatar, this default avatar goes behind the current custom one you're using.
Now its showing me like this [Image: 3578a84929.png] but the broken logo not gone
But when i uses a vps and browse it then its same (may be it would take some time to customize)
Pages: 1 2