Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

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?

Steve131
Beginner Modder
ranks
useravatar
Offline
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.

Cheers,
Stephen

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

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Total Posts Today:
2
User Info:
 
Total Users:
4371
Newest User:
kajha63871
Members Online:
0
Guests Online:
251

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked