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.


Geoip dependant contact page - PHP help

Geoip dependant contact page - PHP help

I have a two office locations and I'm trying to get my website contact page to show the office location the closest to where they are viewing my website.
Thus, I thought I could find some PHP coding which I could customize but I have not had any luck yet. I'm not a tech guy.

Basically, I've created two users (each with location details relatant to each office). I'm trying to find a way for the "coordonnée" menu item to pick the contact (contactid 1 or 3) depending on location of IP of visitor.

I've purchased MetaModPro thinking that I could do it on my own but I'm very bad with PHP. I don't think I really needed to purchase MetaModPro since I don't think I need to control a module. What I need to control is which Contact Id is shown depending on the IP of the visitor.

Can anyone direct me to a prior posting?

Beginner Modder
1 Posts
Administrator has disabled public posting

Re: Geoip dependant contact page - PHP help

Hi Steve,

you're right, it's probably not a job for modules (MetaMod) and more likely a job for Chameleon. However let me list some possibilities.

1 - Is it possible for you to display contacts in a module rather than as a component (direct menu link)? Joomla doesn't come with one of these by default, but there could be something in the Joomla Extensions Directory that does it. If you find something suitable, you could point the Contact menu item to a blank article, then assign a MetaMod to that page. The MetaMod could then pick between the 2 contact modules.

2 - You may be able to do a similar thing using iframe modules. So set up 2 hidden menu items for the 2 contacts, and assign those 2 menu items to a "clean" template with no visible menus etc. Create one module to point to each of the 2 menu items. Use MetaMod to switch between the 2 of them.

3 - Use Chameleon to display a different menu item depending on GeoIP. So you set up 2 side-by-side menu items, one pointing to each contact. Then use Chameleon to hide one of them if the visitor is from certain locations, or hide the other if they are from anywhere else.

If 1 & 2 don't work for you, let me know and I'll swap the MetaMod Pro for Chameleon for you so you can try 3.


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:


Forum Legend:

 New Sticky