GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   smarty / nats help needed (https://gfy.com/showthread.php?t=791343)

HunkyLuke 12-11-2007 01:21 PM

smarty / nats help needed
 
I am trying to geotarget a couple of pages in our nats system.

I have already had the mod_geoip apache module and db installed on my server. I am now trying to create a smarty plugin and use it within a nats template page to do the actual geotargeting - but I am stumped and need help.

Here is what I have done so far:
I created and uploaded a file called function.country.php into my nats/Smarty-2.6.14/libs/plugins directory with the following code:
PHP Code:

<%
$country apache_note("GEOIP_COUNTRY_CODE");
%> 

I modified my page template file and added the following code to test:
PHP Code:

{if $country == "US"}
    <
You are in the US
{elseif $country == "PA"}
    <
You are in Panama
{else}
    
You are not in the US or Panama
{/if} 

But when visiting the page, all visitors get "you are not in the US or Panama" even though I am testing from those two locations.

What am I doing wrong?

thanks
Luke


All times are GMT -7. The time now is 03:40 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123