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

Post ranks

Discussion in 'XenForo Questions and Support' started by Blakefire, Nov 10, 2012.

  1. Blakefire

    Blakefire Active Member

    Is there a way so every time a user reaches a certain amount of post that I defined in the ACP they gain an rank? So lets say a user reaches 10 post and their rank is now "newbie", I also want them to be able to gain a small icon under their name to show their rank here is a example.

    On this site, I gain a flag for every so many post, like at 650 post I got that blue one added. Is it possible to do this on XF? Sorry for explaining it poorly.
  2. Sylar

    Sylar Well-Known Member

    I know what you mean. I once tried to make an add-on for this, but since abandoned it. I'm sure you can do it with certain conditionals for titles and whatnot in the ACP, or you could even go for a medal system. Otherwise there's no other way short of you coding your own system for it.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Basically this:


    But if you want the ranks to accumulate then you can alter the code slightly:

    	<xen:if hascontent="true">
    		<div class="extraUserInfo">
    			<xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
    				<dl class="pairsInline">
    						<xen:if is="{$user.message_count} > 5">
    						<xen:if is="{$user.message_count} > 10">
    						<xen:if is="{$user.message_count} > 50">
    						<xen:if is="{$user.message_count} > 100">
    				<xen:if is="@messageShowRegisterDate">
    					<dl class="pairsInline">
    						<dt>{xen:phrase member_since}:</dt>
    						<dd>{xen:date $user.register_date}</dd>
    				<xen:if is="@messageShowMessageCount">
    					<dl class="pairsInline">
    						<dt>{xen:phrase message_count}:</dt>
    						<dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed">{xen:number $user.message_count}</a></dd>
    That way if a user has 200 posts it will show all ranks, 1234. You can insert HTML image code there to display rank images.

Share This Page