The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
$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.
|
#2
|
||||
|
||||
create a function in functions.php
PHP Code:
|
#3
|
||||
|
||||
Geez your too clever with that in_array function xenon
- miSt |
#4
|
|||
|
|||
And that will make $isbanned work globally right? It's just that I don't see any 'global' in there
|
#5
|
||||
|
||||
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! |
#6
|
|||
|
|||
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 . |
#7
|
||||
|
||||
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(); |
#8
|
|||
|
|||
In an if statement, which of the following can I do then?
PHP Code:
|
#9
|
|||
|
|||
Grr, it keeps parsing a smilie, the first one eshould be:
if ($isbanned=isbanned()__)__{ echo("Blah"); } Just remove the underscores. |
#10
|
||||
|
||||
use this:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|