2015-01-11, 12:50 AM
2015-01-11, 01:27 PM
Hi,
download and install plugin "Template Conditionals".
Go to ACP >> Templates & Styles >> Templates >> revolution Templates >> Header Templates and open "header_welcomeblock_member" to edit.
Search for:
Replace whole line with:
Save changes and try it...
download and install plugin "Template Conditionals".
Go to ACP >> Templates & Styles >> Templates >> revolution Templates >> Header Templates and open "header_welcomeblock_member" to edit.
Search for:
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: middle; margin-top:10px; border: 2px solid #000;" src="{$mybb->user['avatar']}" height="55" width="55"></a>
Replace whole line with:
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: middle; margin-top:10px; border: 2px solid #000;" src="<if $mybb->user['avatar'] then>{$mybb->user['avatar']}<else>{$theme['imgdir']}/default_avatar.png</if>" height="55" width="55"></a>
Save changes and try it...
2015-01-11, 04:19 PM
(2015-01-11, 01:27 PM)SvePu Wrote: [ -> ]Hi,
download and install plugin "Template Conditionals".
Go to ACP >> Templates & Styles >> Templates >> revolution Templates >> Header Templates and open "header_welcomeblock_member" to edit.
Search for:
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: middle; margin-top:10px; border: 2px solid #000;" src="{$mybb->user['avatar']}" height="55" width="55"></a>
Replace whole line with:
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: middle; margin-top:10px; border: 2px solid #000;" src="<if $mybb->user['avatar'] then>{$mybb->user['avatar']}<else>{$theme['imgdir']}/default_avatar.png</if>" height="55" width="55"></a>
Save changes and try it...
That didn't work. I even replaced the "else" url with a direct url to image to be sure after it didn't work with the code above.
2015-01-11, 05:08 PM
It works for sure! - I've tested the code before posting.
[attachment=33483]
If you want use the default myBB avatar from Settings use this replacement:
[attachment=33484]
[attachment=33483]
If you want use the default myBB avatar from Settings use this replacement:
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: middle; margin-top:10px; border: 2px solid #000;" src="<if $mybb->user['avatar'] then>{$mybb->user['avatar']}<else>{$mybb->settings['useravatar']}</if>" height="55" width="55"></a>
[attachment=33484]
2015-01-11, 06:28 PM
2015-01-12, 05:46 AM
Have you added the Template Conditionals plugin? You need that for the if else to work
2015-01-12, 03:37 PM
(2015-01-12, 05:46 AM)Leefish Wrote: [ -> ]Have you added the Template Conditionals plugin? You need that for the if else to work
No I am not familiar with that plugin. I assume I can find it in the 1.8 extends plugins page?
2015-01-12, 03:40 PM
You were referred to it in an earlier post in this thread. It is by ZingaBurga and you wont find it on the plugins page - he doesnt upload here.
However, he is a respected developer and very competent. Link http://mybbhacks.zingaburga.com/showthread.php?tid=464
However, he is a respected developer and very competent. Link http://mybbhacks.zingaburga.com/showthread.php?tid=464
2015-01-14, 12:25 AM
(2015-01-12, 03:40 PM)Leefish Wrote: [ -> ]You were referred to it in an earlier post in this thread. It is by ZingaBurga and you wont find it on the plugins page - he doesnt upload here.
However, he is a respected developer and very competent. Link http://mybbhacks.zingaburga.com/showthread.php?tid=464
Well duh, how did I miss that? Working like a charm!