Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod Feature Requests
- » MetaMod Pro and IP detection linking...
MetaMod Pro and IP detection linking to a menulink
MetaMod Pro and IP detection linking to a menulink
HI
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?
Greetings,
Anne
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:
$app->redirect("mysite.com/contact-us-generic");
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:
$app->redirect("mysite.com/contact-us-generic");
Hope that helps,
Stephen
- Index
- » MetaMod
- » MetaMod Feature Requests
- » MetaMod Pro and IP detection linking...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 148
- 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