Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 



       myfreeforum.org Forum Index -> What's new? Announcements!
admin (no pm's please)

New user_level_flag macro

When 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}&amp;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.
Roy

Sweat, i'm yet to add the Karma and this mod to my own template but as soon as i find the time i will do it all.

       myfreeforum.org Forum Index -> What's new? Announcements!
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum