The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
yes it does.
I've tried it without show guest but still the same. PHP Code:
|
#12
|
|||
|
|||
OK, what happens if you try this:
Code:
<vb:if condition="!in_array('XX', array('AL', 'AZ'), true)"> <vb:if condition="$show['guest']"><div class="padtop"> stuff to go in here </div></vb:if></vb:if> or this: Code:
<vb:if condition="!in_array('AL', array('AL', 'AZ'), true)"> <vb:if condition="$show['guest']"><div class="padtop"> stuff to go in here </div></vb:if></vb:if> |
#13
|
|||
|
|||
They both parse, the second one does it's job ok
|
#14
|
|||
|
|||
OK - if you still have the preRegister() call in there, what does this do:
Code:
<vb:if condition="!in_array($mygig, array('AL', 'AZ'), true)"> <vb:if condition="$show['guest']"><div class="padtop"> stuff to go in here </div></vb:if></vb:if> (I guess it will depend on if your country is one of AL or AZ - if it isn't, you could hard-code it in index.php). |
#15
|
|||
|
|||
parse OK but doesn't work, I changed AZ to GB so I can see if it works.
|
#16
|
|||
|
|||
Well, OK, I don't know. Seems like maybe it's not seeing the variables for some reason.
If you only want to use that ip check in the forumdisplay template, maybe try moving your code to a plugin using hook forumdisplay_complete. |
#17
|
|||
|
|||
You mean this code
PHP Code:
|
#18
|
|||
|
|||
Maybe this (assuming you don't use the country code elsewhere in the template): In a plugin using hook forumdisplay_complete:
PHP Code:
then in the template: Code:
<vb:if condition="$show[in_country]"><div class="padtop"> stuff to go in here </div></vb:if> |
#19
|
|||
|
|||
No still nothing
|
#20
|
|||
|
|||
Ah, OK...maybe I was wrong - maybe the code you're getting back from geoip_country_code_by_addr() isn't what you expect? What happens if you set $mygig to a country code? Also, you could put
Code:
{vb:raw GLOBALS.mygig} in the template somewhere (not inside the if). |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|