Quote:
Originally Posted by Kiint
I did have one problem and that was when I created the array I used 'Rank_id' instead of 'rank_id' ...took me quite a while to trace that 
|
I thought the column name was 'Rank_id'. Oh well, I'm glad you were able to get it working because I didn't actually try any of that code.
Quote:
One extra question, On the old hard coded version, whenever I had members which were ranked as "inactive" (rank_id 9) I used to have this condition above the block of code so that only admins could see it:
Code:
<vb:if condition="is_member_of($vbulletin->userinfo,5,6,11,12)">
<h1 class="blockhead stat_home">Inactive - Only admins can see this</h1>
and this would hide that rank from being displayed.
Is there a way that I can add this into the <vb:each> so that when it detects an admin it is displayed and not displayed when a registered/non-registered members views the page?
Thanks again for your help, this has helped so much.
|
I guess it would be something like:
Code:
<vb:each from="roster" value="members">
<vb:if condition="$members[0].Rank_id != 9 OR is_member_of($vbulletin->userinfo,5,6,11,12)">
<vb:if condition="$members[0].Rank_id == 9>
<h1 class="blockhead stat_home">Inactive - Only admins can see this</h1>
<vb:else />
{vb:var members.0.Rank_desc}<br />
</vb:if>
<vb:each from="members" value="member">
{vb:var member.name}<br />
</vb:each>
<br />
</vb:if>
</vb:each>