Post by Thomasss on Sept 26, 2015 14:17:24 GMT -5
I was experimenting with {if} statements a while back and since I don't own any PB forums I figured I might as well release my account status mod. I had one that had so much more content and options for the actual user but I don't know where I put the code for that so here is my simpler version:
The account status only shows to members marked as staff, and "you are viewing a staff members profile" shows up for everyone, and there is also a "This user is banned until:" message for when viewing a profile of a banned user.
Put this in the "User Profile" template. (Not summary, activity, etc. Make sure you are on the user profile tab.) I usually put this on the first line of the coding, I suggest doing the same.
The account status only shows to members marked as staff, and "you are viewing a staff members profile" shows up for everyone, and there is also a "This user is banned until:" message for when viewing a profile of a banned user.
{if $[current_user.is_staff]}
<div class="content-box" style="font-size: 16px; padding: 20px;">
<b><center>Account Status <sup>BETA</sup></center></b><br><br>
<b>Account Banned Status:</b>
{if $[user.is_banned]}<font color="red"><b>Banned </b></font><b>until</b> $[user.account_banned_until]{else}<font color="green"><b>OK</b></font>{/if}
<br>
<b>Account Disabled Status:</b>
{if $[user.account_disabled]}<font color="red"><b>Disabled </b></font><b>until</b> $[user.account_disabled_until]{else}<font color="green"><b>OK</b></font>{/if}
<br>
<b>IP:</b> $[user.ip]
<br>
{if $[user.email]}
<b>Email:</b>
$[user.email]
{/if}
<br>
<b>Warning Percentage: </b>$[user.warning.level]%
<br>
<b>Date Registered:</b>
$[user.registered_on]<br>
{/if}
<br>
<br></div><br>
{if $[user.is_staff]}<div class="content-box" style="font-size: 16px; padding: 20px; text-align: center;">
<b> <a href="http://coffeehouse.boards.net/members?dir=asc&sort=name&view=staff">$[theme.image.mod]</a>
Your viewing a member of the Forum Staff. </b></div>{/if}
<br>
{if $[user.is_banned]}<div class="content-box" style="font-size: 16px; padding: 20px; text-align: center;">
<b><font color="red">This user is currently banned until: </font>$[user.account_banned_until].</b></div>{/if}<br>
Put this in the "User Profile" template. (Not summary, activity, etc. Make sure you are on the user profile tab.) I usually put this on the first line of the coding, I suggest doing the same.