Content Shown based on visitors geographic location

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
colleen
New Member
New Member
Posts: 9
Joined: Thu Jun 03, 2010 1:37 pm

Content Shown based on visitors geographic location

Post by colleen »

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
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Content Shown based on visitors geographic location

Post by kermit »

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:

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
colleen
New Member
New Member
Posts: 9
Joined: Thu Jun 03, 2010 1:37 pm

Re: Content Shown based on visitors geographic location

Post by colleen »

Thank You I will test this and see how it goes.
colleen
New Member
New Member
Posts: 9
Joined: Thu Jun 03, 2010 1:37 pm

Re: Content Shown based on visitors geographic location

Post by colleen »

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?
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Content Shown based on visitors geographic location

Post by kermit »

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"
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
colleen
New Member
New Member
Posts: 9
Joined: Thu Jun 03, 2010 1:37 pm

Re: Content Shown based on visitors geographic location

Post by colleen »

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
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Content Shown based on visitors geographic location

Post by kermit »

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.
colleen wrote: i get a message that there is an error in the code.
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 list
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
colleen
New Member
New Member
Posts: 9
Joined: Thu Jun 03, 2010 1:37 pm

Re: Content Shown based on visitors geographic location

Post by colleen »

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
Post Reply

Return to “Modules/Add-Ons”