XF 2.1 menssage counter

skirlapa

Member
Hello,

I want to show one image for every X messages, but it doesn't work for me, it shows the image without considering the IF

Code:
 <xen:if is="{$user.message_count} <= 75  && ({$user.user_group_id} != 24 && ({$user.user_group_id} != 26)" >
  <span class="rango"><img src="./styles/default/xenforo/trofeos/POLICiAALUMNO.gif" alt="{xen:phrase moderator}" title="Policía Alumno" ></span>
<xen:elseif is="(({$user.message_count} >= 76) && ({$user.message_count} < 200) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/POLICiA EN PRaCTICAS.gif" alt="{xen:phrase moderator}" title="Policía Practicas" ></span>
 <xen:elseif is="(({$user.message_count} >= 201) && ({$user.message_count} < 500) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/POLICiA.gif" alt="{xen:phrase moderator}" title="Policía" ></span>
 <xen:elseif is="(({$user.message_count} >= 501) && ({$user.message_count} < 800) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/OFICIAL DE POLICiA.gif" alt="{xen:phrase moderator}" title="Oficial de Policía" ></span>
 <xen:elseif is="(({$user.message_count} >= 801) && ({$user.message_count} < 1200) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/SUBINSPECTOR.gif" alt="{xen:phrase moderator}" title="Subinspector" ></span>
 <xen:elseif is="(({$user.message_count} >= 1201) && ({$user.message_count} < 1300) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/INSPECTOR ALUMNO DE PRIMER AnO.gif" alt="{xen:phrase moderator}" title="Inspector Alumno 1º Año" ></span>
 <xen:elseif is="(({$user.message_count} >= 1301) && ({$user.message_count} < 1400) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/INSPECTOR ALUMNO DE SEGUNDO AnO.gif" alt="{xen:phrase moderator}" title="Inspector Alumno 2º Año" ></span>
  <xen:elseif is="(({$user.message_count} >= 1401) && ({$user.message_count} < 1500) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/INSPECTOR ALUMNO EN PRaCTICAS.gif" alt="{xen:phrase moderator}" title="Inspector en Prácticas" ></span>
 <xen:elseif is="(({$user.message_count} >= 1501) && ({$user.message_count} < 2000) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/INSPECTOR.gif" alt="{xen:phrase moderator}" title="Inspector" ></span>
 <xen:elseif is="(({$user.message_count} >= 2001) && ({$user.message_count} < 3000) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/INSPECTOR JEFE.gif" alt="{xen:phrase moderator}" title="Inspector Jefe" ></span>
 <xen:elseif is="(({$user.message_count} >= 3001) && ({$user.message_count} < 5000) && ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
 <span class="rango"><img src="./styles/default/xenforo/trofeos/COMISARIO.gif" alt="{xen:phrase moderator}" title="Comisario" ></span>
<xen:elseif is="(({$user.message_count} >= 5001) && ({$user.message_count} < 1000005000)&& ({$user.user_group_id} != 10) && ({$user.user_group_id} != 5) && ({$user.user_group_id} != 22) && (!{$user.is_admin}) && ({$user.user_group_id} != 24) && ({$user.user_group_id} != 26)" />
  <span class="rango"><img src="./styles/default/xenforo/trofeos/COMISARIOPRINCIPAL.gif" alt="{xen:phrase moderator}" title="Comisario Principal" ></span>
</xen:if>
 
Back
Top Bottom