MyBB Community Forums

Full Version: How do i
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do i make it so only admin can see a script.

Like this one
http://www.dynamicdrive.com/dynamicindex...icmenu.htm

Thank you.
if($mybb->user['usergroup'] != 4)
{
    error_no_permission();
} 
Should work. I found this on a post by MattRogowski.
I've try'd that but it doesn't seem to work
It will if you're putting it in the right place.
where would be the right place

if i pm you the code could you have a look.
Where are you putting it currently??
After <script>
Well it's PHP so it has to be in a .php file....
How do i put a script in a php file and will it still work as a script.
End the script then do

<?php
if($mybb->user['usergroup'] != 4)
{
    error_no_permission();
} 
?>

Make sure the file extension is .php!
Pages: 1 2