![]() |
<if> conditional
Is there a way I could write an <if> conditional that I could include multiple i.p. addys instead of say a certain usergroup.
|
I don't understand nothing from your request.
A code example will help us to understand what exacly you are trying to achieve. Post one and I will help you. :) |
I would assume bigdog829 is looking for something like this:
HTML Code:
<if condition="is_member_of($bbuserinfo, 5,6,7)"> Correct me if I am wrong |
Quote:
Thanks |
If it's what Redlinemotorsports said, this is very easy.
Use this function: PHP Code:
PHP Code:
Code:
<if condition="$show['allowedip']"> Hope that helps. BTW, this was not tested, it was done off my mind. |
Im not looking to allow certain ip's I actually want to redirect certain ones I figured a if conditional with a simple html redirect would do the trick.
|
Aha, so why you did not post this from the beginning then?
From your post: Exactly what Im loking for sorry if I didnt explain it well enough ! If you found a solution, you should post it here, so others can benefit from your experience. That what is all about at vb.org, sharing knowledge with other hackers. |
Quote:
|
TECK, it's offtopic but can u explain step by step your script? i'm learning php and i want to absorb knoledge :p |
Try:
Code:
<if condition="$bbuserinfo[ipaddress] == 'xxx.xxx.xxx.xxx'"> |
Hi JorgeX,
The function defines a boolean condition (true/false), based on the string you input. Then, you simply use that condition into your templates. You can use arbitrary IP values, as described in the above script comments. The script has a failsafe feature. If for some reason you use something like: $allowediplist = ''; check_allowed_ip($allowediplist); the script will not execute any code. I made this thinking that someone might add a vbulletin option and leave it emply by default. In this way the function will not burden the server with un-needed executed code. |
Quote:
|
You cannot do it with a simple conditional, you need to go the hacker way, that's why you are here at vb.org site. :)
Here, simple like Bonjour. Code:
/** |
All times are GMT. The time now is 03:10 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:
|