• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Make userbar only visible on one person?

Dadparvar

Well-known member
#6
I understand how to check for conditions, but how can I apply a userbar like [Admin] group image with this?
To be honest, I didnt get what you exactly want. Can you provide mockup? Screenshot of what you are lookinf for? (midnight here! And I need some rest. Not sure if its why i cant get you)
 

Dadparvar

Well-known member
#11
aha. That is not called "admin group image". Its called "User Banner".

Open this template: message_user_info
Find this:
Code:
<!-- slot: message_user_info_text -->
Below it add this:
Code:
<xen:if is="{$user.user_id} == {$visitor.user_id}">
    <em class="userBanner bannerRed wrapped" itemprop="title">
        <span class="before"></span>
        <strong>Any Text</strong>
        <span class="after"></span>
    </em>
</xen:if>
you can change "Any Text" to anything you want.

This will add this:
b.jpg

and only me (profile owner) can see it in my own postbit. (anyone only can see it on their own postbit.)
 
#12
aha. That is not called "admin group image". Its called "User Banner".

Open this template: message_user_info
Find this:
Code:
<!-- slot: message_user_info_text -->
Below it add this:
Code:
<xen:if is="{$user.user_id} == {$visitor.user_id}">
    <em class="userBanner bannerRed wrapped" itemprop="title">
        <span class="before"></span>
        <strong>Any Text</strong>
        <span class="after"></span>
    </em>
</xen:if>
you can change "Any Text" to anything you want.

This will add this:
View attachment 150576

and only me (profile owner) can see it in my own postbit. (anyone only can see it on their own postbit.)
THANK YOU! does this also work for other templates too?