Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


MetaMod Pro and IP detection linking to a menulink

MetaMod Pro and IP detection linking to a menulink


I've used Metamod Pro eariler in Joomla 1.5. NOw I would need to do the following and was wondering if it can be accomplihed with MetaMod Pro:

1) Checking user IP address when user is clicking "Contact us" in the mainmenu
2) LInking user to the correct page in the Othermenu with different articles + RSForm Pro forms (inside articles) one page for one area/contry

Note the country-pages are not in the same menu as the Contact us link is.

I have the articles one for each country/area and then inside the article I have the RSForm Pro contact-form for that country/area. I need to get the user linked automatically to the correct page (link in the othermanu) accorging to their IP-address.

Count this kind of action be done with MetaMod Pro? How?


Beginner Modder
4 Posts
Administrator has disabled public posting

Re: MetaMod Pro and IP detection linking to a menulink

Hi Anne,

yes, you can do this fairly easily with MetaMod (incl. Pro).

I would make a "dummy" Contact Us menu item that points to something that's not going to actually show, e.g. a blank article or a placeholder Contact item.

Then assign a MetaMod to only this page.

In the MetaMod, enable GeoIP/GeoLiteCity and make sure you have the right database installed. MetaMod will tell you if it can detect the database is installed correctly.

In the MetaMod, you have some PHP that detect certain countries and/or cities/states, and does a redirect to those pages. So you need to make a list of all of those URLs in advance.

The PHP could look like this for country detection:

$app = JFactory::getApplication();
if ($fromCountryId == 'NZ') $app->redirect("mysite.com/contact-us-nz");
if ($fromCountryId == 'AU') $app->redirect("mysite.com/contact-us-au");
// for everyone else:

and for city detection:

$app = JFactory::getApplication();
if ($geoip->country_code == 'US' and $geoip->city = 'Los Angeles') $app->redirect("mysite.com/contact-us-la");
if ($geoip->country_code == 'US' and $geoip->city = 'Seattle') $app->redirect("mysite.com/contact-us-seattle");
// for everyone else:

Hope that helps,

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3330 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Total Posts Today:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky