Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
jimmo
Worker
Worker



Joined: Dec 08, 2005
Posts: 107

PostPosted: Wed Apr 14, 2010 3:38 am Reply with quote

Hi All!

I would like to change the content of blocks based on the country the respective IP translates to. For example, if the IP translates to Germany, the content of the block changes to a specific link in Germany (e.g. a specific German company or organization). One use would be automatically changing the language based on the country, but I would also like to apply to advertising.

I looked through the Sentinel code and found a spot where the ip2country data is queried and I have looked through the respective tables, so I think I have a handle of what to do. I was hoping to find an existing function where I could simply pass the IP address and it returns the country code. Does anyone know of something like this? Any assistance would be appreciated.

Regards,

jimmo
 
View user's profile Send private message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Fri Apr 16, 2010 4:43 am Reply with quote

Because there is no automatic browser check I would just set up different blocks for the other languages. This is the simple solution.
So if someone clicks the German language button he will see different blocks and there is also a fix for the block titles available.
 
View user's profile Send private message
jimmo







PostPosted: Sat Apr 17, 2010 2:20 am Reply with quote

That is obviously a good idea, but I have been trying to avoid activating the multi-language function. The only thing that is currently in the respective language is the PHPNuke stuff. All of my content is English and IMHO having part of the site in the selected language and part in English looks odd. I have been slowly modifying my code to work with multiple languages, but I am not there yet. Also, if the user does not choose a language, then don't see the different blocks. So, I was trying to come up with a way that was independent of whether they chose the language or not and thought about the IP address. This is obviously not 100% accurate, but IMHO more reliable than having them choose a language.

Danke und Gruß aus Coburg!
 
Susann







PostPosted: Sat Apr 17, 2010 3:55 am Reply with quote

Maybe use the Google search function for "Nuke automatic Browser check". There are a lot of results.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©