2011-01-27, 12:56 AM
Hi there
I want to added the following to my footer template:
<script type="text/javascript" src="jscripts/inline_moderation.js"></script>
But, only if he user is the admin (or a moderator)
I dont see the point of everyone having to download this script, when only one type of user needs it.
Is there a way to customise the footer template to say
"[if user is moderator] the do this [/If]"
One thought I had was to add to the $lang array(in global.lang.php), so that I use: {$lang->ScriptInlinemod} and this is empty if not mod, and the above string if mod. I was just wondering if you already have a more 'correct' way of doing this sort of thing
On seconds thoughts, lang isnt the best place to do this (since I need to get to some included functionality that will allow me to check if the user is a mod)
Any thoughts?
functions_forumlist is where I've added to the lightbulb previoulsy, so I might look there:
http://community.mybb.com/thread-85158.html
I want to added the following to my footer template:
<script type="text/javascript" src="jscripts/inline_moderation.js"></script>
But, only if he user is the admin (or a moderator)
I dont see the point of everyone having to download this script, when only one type of user needs it.
Is there a way to customise the footer template to say
"[if user is moderator] the do this [/If]"
One thought I had was to add to the $lang array(in global.lang.php), so that I use: {$lang->ScriptInlinemod} and this is empty if not mod, and the above string if mod. I was just wondering if you already have a more 'correct' way of doing this sort of thing
On seconds thoughts, lang isnt the best place to do this (since I need to get to some included functionality that will allow me to check if the user is a mod)
Any thoughts?
functions_forumlist is where I've added to the lightbulb previoulsy, so I might look there:
http://community.mybb.com/thread-85158.html