The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I'm making a hack, and I'm wondering how to use iff as VB does. This is what is in newreply.php:
Code:
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
Code:
if (getenv("HTTP_X_FORWARDED_FOR")!="") {
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
}
Code:
$proxyip=iif(getenv("HTTP_X_FORWARDED_FOR")!="",getenv("HTTP_X_FORWARDED_FOR"));
Thanks :bunny: (I just love that bunny ^^) |
|
#2
|
||||
|
||||
|
If you've just got to use it, try just NULL.
|
|
#3
|
||||
|
||||
|
Oh, thanks. Whats it for anyway?
|
|
#4
|
||||
|
||||
|
iif() is used to shorten simple:
Code:
if (whatever) {
// whatever
} else {
// whatever
}
|
|
#5
|
||||
|
||||
|
hehe, simmilar to the mirc iif then. Thankies you two!
|
|
#6
|
|||
|
|||
|
ooh another irc person what servers do you go on Takara?
|
|
#7
|
||||
|
||||
|
it's also like the SQL version
|
|
#8
|
||||
|
||||
|
Only on SQL it's just IF.
|
|
#9
|
||||
|
||||
|
Quote:
I hang out in the Ragnarok Online chans, though Im just currently creating a new site/chan with a group of friends. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|