Customizing SMF > Tips and Tricks

Tracking User Activity

<< < (8/66) > >>

Harelin:

--- Quote from: Mike Bobbitt on September 04, 2005, 10:29:48 PM ---What's your if statement look like? E.G.:

 if ($isstaff || ($board != "10" && $board != "19"))

What board IDs are you trying to hide?

--- End quote ---

 if ($isstaff || ($board != "8" && $board != "12"))   

Boards 8 and 12.

Mike Bobbitt:
Ok, that all looks good... How is $isstaff set, you mentioned you made some changes there...

Harelin:
Good point.  I just changed it back to default so we're on the same page while troubleshooting.  No difference, though.  Is the code working on your end?

I had it set to "$isstaff=$context['allow_admin'];" which allows both my admin and 'semi-admin' member groups to access it.  It's now back to "$isstaff=$user_info['is_admin'];"

Mike Bobbitt:
I haven't actually tried the code. :)

But if $board is now being set properly, it should work. Actually, given the way you've coded things you may want to get rid of the $isstaff check:

 if ($board != "8" && $board != "12")

Egg:
would this work on 1.1RC1 ??

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version