admin (no pm's please)
|
New user_level_flag macroWhen editing templates, you can now use code like:
| Code: |
<script language="JavaScript" type="text/javascript">
if ({USER_LEVEL_FLAG} != -1)
{
document.write("<a href=\"javascript:void(0)\" onclick=\"window.open('addcomment.php?userid={postrow.POSTER_ID}&component=COMMENT', '_addcomment', 'resizable=yes,width=500,height=360')\">Add Comment</a>");
}
</script>
|
{USER_LEVEL_FLAG} has the values:
-1 - Guest
0 User
1 Admin
2 Mod
Note in the example above that hides the Add Comment line from anyone who is not logged in, you will need to "escape" the " character with \" when it is used in document.write.
|