PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
jimmo
Worker
Worker


Joined: Dec 08, 2005
Posts: 107

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

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: 3143
Location: Germany:Moderator German NukeSentinel Support

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

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 Visit poster's website
jimmo
Worker
Worker


Joined: Dec 08, 2005
Posts: 107

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

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!
View user's profile Send private message
Susann
Moderator


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

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

Maybe use the Google search function for "Nuke automatic Browser check". There are a lot of results.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum