![]() |
$ismod function - I want something similar?
I have 5 separate usergroups for banned users, now what I want to do is instead of having to write out long if statements, just say $isbanned...how can I do this? I looked in functions.php but didn't find much to help me.
|
create a function in functions.php
PHP Code:
|
Geez your too clever with that in_array function xenon ;)
- miSt |
And that will make $isbanned work globally right? It's just that I don't see any 'global' in there :p
|
it's a function, so it would always work globaly.
it's like ismoderator. so your $ in front is incorrect! also, please change your sig to fit with the rules! |
So if it's a function, I can't use it as a variable? I'd have to use isbanned() wouldn't I? Is there a way I could use it like you can use $ismod...I want to use $isbanned instead.
edited my sig, completely forgot about the rules :o. |
thx
i don't see why you want to use it as a variable, it has no sense normally... if use use a var or the function it's equal.. but you can do this: Code:
$isbanned=isbanned(); |
In an if statement, which of the following can I do then?
PHP Code:
|
Grr, it keeps parsing a smilie, the first one eshould be:
if ($isbanned=isbanned()__)__{ echo("Blah"); } Just remove the underscores. |
use this:
PHP Code:
|
ok, i'll give it a try :). Thanks for all the help!
|
All times are GMT. The time now is 12:27 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|