MyBB Community Forums
Profile conditional help! - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Profile conditional help! (/thread-150466.html)



Profile conditional help! - marcus123 - 2014-01-28

Guys I want to show a default avatar in the user profile when user doesn't have avatar????

<if ($memprofile['avatar']) then>TEST</if>



RE: Profile conditional help! - JimR - 2014-01-28

(2014-01-28, 05:18 PM)marcus123 Wrote: Guys I want to show a default avatar in the user profile when user doesn't have avatar????

<if ($memprofile['avatar']) then>TEST</if>

try something like
<if ($memprofile['avatar']) then>
code to display avatar
<else>
code to display std avatar
</if>
just slot the code into the correct template... I have not checked if $memprofile is a valid array so u may need to use the $mybb array


RE: Profile conditional help! - marcus123 - 2014-01-28

How embarrassing I am using this all the time! Thanks very much LOL

<if ($memprofile['avatar']) then><else>
code to display std avatar
</if>