1. Our web server is getting tweaked this week and as a result some links are behaving strange. We're working on getting everything back to normal ASAP.
    Dismiss Notice
Dismiss Notice
Alien Soup is a free community for fans of science-fiction, horror, & fantasy! Everybody is welcome here.

XenForo Rank Images on PostCount

Discussion in 'Resources & Tutorials' started by Sheldon, Dec 1, 2012.

Tags:
  1. Sheldon

    Sheldon Dreamsmasher

    Joined:
    Nov 3, 2012
    Location:
    Alderson, WV
    First things first, this mod only works with the add-on Usertitles based on message count released by Arty. A huge thanks to him for releasing his modification.

    1. Install above listed add-on.

    2. Create Trophy Titles

    Inside the "Minimum Points", you will lists your post count needed. On my first attempt, I kept it simple, and just had the numbers match the points, as you see in the image.

    View attachment 450

    You will reference the "Title" during the template edits.

    3. Template Edits

    On to the edits.... (Template Modification System is great here, if you don't have it, check it out)

    Go to template message_user_info

    Find:

    Code:
    <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
    Remove

    Find:

    Code:
    <xen:if is="@messageShowMessageCount">
    Add below:

    Code:
    <!-- Start User Ranks -->
    
    <xen:if is="{xen:helper userTitle, $user} == 'TROPHY USER TITLE'">
    
    <span class="userrank"><img src="PATH TO YOUR IMAGE"></span>
    
    </xen:if>
    
    <!-- End User Ranks -->
    To add more, simply copy from <xen:if is all the way to /xen:if> and past above <!-- End User Ranks-->

    Here is a preview of it:

    View attachment 451 View attachment 452 View attachment 453 View attachment 454

    Notes:

    Found the code on a search from here: http://xenforo.com/community/thread...t-usergroup-images-styling.32099/#post-370468

    Thanks to Jake Bunce and LoneWolf for figuring out the main part I needed.

    To align my images where I did, in extra css, I have this:

    Code:
    .userrank > img {
    
    	float: right;
    
    	height: 26px;
    
    	margin-left: -1px !important;
    
    	width: 26px;
    
    }
    I am sure not every site will be the same. Positive actually. I'll help with what I can, but I cannot assure you I can accomplish all you are looking for with this.
     

    Attached Files:

Share This Page