I am looking for a module that i can use to show different content based on the geographic location of the visitor ... Is there such a module? If someone could point me in the right direction i would appreciate it.
Thanks
Content Shown based on visitors geographic location
Re: Content Shown based on visitors geographic location
there's a plugin in the forge that works with hostip.info. you can get the country using that, then go from there in your templates and pages.
http://dev.cmsmadesimple.org/project/code/54
usage would go something like this:
one note: the plugin requires a writable 'cache' folder: (cmsmsroot)/plugins/cache
http://dev.cmsmadesimple.org/project/code/54
usage would go something like this:
Code: Select all
{geohostip}
<p>That was one heck of a Cup this year{if $geohostip.Country eq 'CA'}, eh?{else}!{/if}</p>
one note: the plugin requires a writable 'cache' folder: (cmsmsroot)/plugins/cache
Last edited by kermit on Tue Jun 15, 2010 7:29 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Re: Content Shown based on visitors geographic location
Thank You I will test this and see how it goes.
Re: Content Shown based on visitors geographic location
I have been fighting with this plug in for the last week. I have been trying to add the UDT for geohostip. Every time i try and add it i get a message that there is an error in the code. I see it hasn't been updated in a long time is this still a valid plug in?
Re: Content Shown based on visitors geographic location
that's because it's NOT a udt.
it's a file, called "function.geohostip.php" that goes in the "plugins" directory of your cmsms install (it will appear in the 'tags' menu). and then for this one, you also need to create a php-writeable directory inside plugins called "cache"
it's a file, called "function.geohostip.php" that goes in the "plugins" directory of your cmsms install (it will appear in the 'tags' menu). and then for this one, you also need to create a php-writeable directory inside plugins called "cache"
Last edited by kermit on Mon Jun 21, 2010 7:16 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Re: Content Shown based on visitors geographic location
I was following the instructions posted for installing a plug in ... I did do what what said as well and it still wasn't working ... I will continue playing with it.
C
C
Re: Content Shown based on visitors geographic location
colleen wrote: I was following the instructions posted for installing a plug in ... I did do what what said as well and it still wasn't working ... I will continue playing with it.
the above tells me you're trying copy and paste the contents of the file into a UDT via the admin area. don't do that. upload the file called "function.geohostip.php" to the 'plugins' directory instead. then create a directory called 'cache' inside that plugins directory and make sure that php can write to it (same permissions as 'tmp', 'cache', etc. when you initially installed cmsms. once you do those things, go into the 'tags' page in the admin area (not ' user defined tags') and you should see it show up in that listcolleen wrote: i get a message that there is an error in the code.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Re: Content Shown based on visitors geographic location
I did try both but since the documentation I found said to do the UDT that was all i said I did.
Thank you for your help
Thank you for your help