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

A question

Discussion in 'XenForo Questions and Support' started by RockThatClock, Feb 26, 2013.

  1. RockThatClock

    RockThatClock Member

    Hello.

    How can i do this at my forum? I want it, because it looks nice.


    how.png
     
  2. Shelley

    Shelley Well-Known Member

    Okay this is probably not the way to do this but it seems to work for me.

    If you add the following in the message_user_info template

    Code:
    <xen:if hascontent="true">
            <xen:contentcheck>
                <xen:if is="{xen:helper ismemberof, $user, 3}">
                    <dl class="pairsInline">
                            <dt>{xen:phrase group_bb}:</dt>
                            <dd>Admin</dd>
                        </dl>
                </xen:if>
            </xen:contentcheck>
     
    </xen:if>
    
    Add the above anywhere below

    Code:
    <xen:if hascontent="true">
            <div class="extraUserInfo">
                <xen:contentcheck>
    
    You'll notice that the ID3 refers to my own admin group, you would simply just insert your group id you wish to apply it. Also you'll notice i had to create a new phrase group_bb you'll have to create the same (below for reference) and then style it accordingly.

    Again probably not the best way of doing this but i'm sure someone will pop in and post a better way.

    phrase_group.png

    (below) what i got when i added some style via EXTRA.css

    groupadmin.png
     
    Jake Bunce likes this.
  3. RockThatClock

    RockThatClock Member

    Nope, it doesn't work, any idea?
     
  4. Shelley

    Shelley Well-Known Member

    Could be a number of things. Wrong usergroup ID inserted? did you apply the edit in the correct template on the style you want to view this on? It works for me on my default style so can't understand why it isn't working for you. Perhaps Jake can jump in or one of the others.
     
  5. RockThatClock

    RockThatClock Member

    Hmm.. I see you posted a new image, and thats the view of a thread, the picture i posted was on a user profile..
     
  6. Shelley

    Shelley Well-Known Member

    Sorry about that. Go into member_view template

    find

    Code:
    <xen:hook name="member_view_info_block">


    Add Below:

    the code above I posted.
     
    Jake Bunce likes this.
  7. RockThatClock

    RockThatClock Member

    It works, thanks. But the text is black. How can i change the color?
     
  8. Shelley

    Shelley Well-Known Member

    Go back into your member_view template and wrap a span around "admin" like so

    Code:
    <span class="admin">Admin</span>
    
    Then go into the extra css template and add the following (bare in mind you set the colour and styling to your preference.

    Code:
    .profilePage .admin {color: red; font-weight: bold;}
    
     
  9. RockThatClock

    RockThatClock Member

    Hmm.. I got a problem after i did this. I'll show you whats the problem with a picture. problem.png
    As you see, the problem is my name at the left side. It is'nt in the middle, if you know what i mean, as it is at the right side..


    I want to fix that.

    Edit: The picture is from 2 different boards, the left (where my problem is at) is my board, and the right side (where i'm moderator) is at a another board..
    (sorry for my bad English..)
     
  10. RockThatClock

    RockThatClock Member

  11. Shelley

    Shelley Well-Known Member

    You might want to provide a link to your style and area where this issue is occurring.
     
  12. Shelley

    Shelley Well-Known Member

    Adding the following in extra.css should center it.

    Code:
    .messageUserBlock a.username {text-align: center;}
     
  13. RockThatClock

    RockThatClock Member

  14. RockThatClock

    RockThatClock Member

    Well, i dont know what u mean by extra.css, might it be EXTRA.css or something another? o.o
     
  15. Shelley

    Shelley Well-Known Member

    Try adding the following in the EXTRA.CSS template

    Code:
    .messageUserBlock h3.userText {
        margin-bottom: 5px;
        margin-top: 15px;
    }
    For some reason it isn't aligning center because of the useronline markers.
     
  16. RockThatClock

    RockThatClock Member

    Is it because of that!? Well. Imma gonna try it, and if it is that.... well @rage.. :p
     
  17. RockThatClock

    RockThatClock Member

    No it wasn't, but the code you gave me worked perfect. Thank you !! :)
     

Share This Page