2012-11-18, 03:30 AM
(I have the Template Conditionals plugin installed)
I have modified my header template such that it displays a user's avatar on the left side of the forum logo. (along with a couple other modifications, shown below)
header template:
What I want to do now is be able to display a different image (in place of the avatar) for two different groups of people:
1. Guests (call this by group ID?)
2. Registered Members (call this in similar fashion as seen below?)
I am already doing something similar in the postbit and postbit_classic templates, like this (credit to Leefish):
Any ideas how I can accomplish this? Basically I want guests (as a group) and registered users with no avatar (as a group - if possible) to see a default image (default.png) in that space next to the logo.
I have modified my header template such that it displays a user's avatar on the left side of the forum logo. (along with a couple other modifications, shown below)
header template:
<div id="container">
<a name="top" id="top"></a>
<div id="header">
<div class="logo">
<a href="{$mybb->settings['bburl']}/">
<img src="{$mybb->user['avatar']}" width="75px" height="75px" /><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
<span style="float:right">
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.alonelylife2.com%2F&send=false&layout=button_count&width=80&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px; allowTransparency="true"></iframe>
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://platform.twitter.com/widgets/tweet_button.html" style="width:90px; height:20px;"></iframe>
<a href="/chatroom.html" target="_blank"><img src="/images/chat.png" border="0px"/></a></span>
</div>
<div class="menu">
<ul>
<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.png" alt="" title="" />{$lang->toplinks_search}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.png" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.png" alt="" title="" />{$lang->toplinks_help}</a></li>
</ul>
</div>
<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<div id="content">
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
<navigation>
<br />
What I want to do now is be able to display a different image (in place of the avatar) for two different groups of people:
1. Guests (call this by group ID?)
2. Registered Members (call this in similar fashion as seen below?)
I am already doing something similar in the postbit and postbit_classic templates, like this (credit to Leefish):
<if $post['avatar'] then>
{$post['useravatar']}
<else><img src="{$mybb->settings['bburl']}/images/avatars/default.png" alt="avatar" height="125px" width="125px" />
</if>
Any ideas how I can accomplish this? Basically I want guests (as a group) and registered users with no avatar (as a group - if possible) to see a default image (default.png) in that space next to the logo.