Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Showing login module only in own...
Showing login module only in own country - not working
Showing login module only in own country - not working
Joomla: 2.5.20
MetaMod: v1.6.0
Unable to show the login module only for my country:
I want to show the fronend login module (position: superlogin; shown on all pages) only to users in one country: 'SG'.
What I have done:
Set metamod to postion 'superlogin' (same as the login module)
In Adv. Module Manager, did not assign the published login module to any menu; and postion is 'superlogin'.
Downloaded from MaxMind the free version of GeoIP and added it to domainroot/geoip.
To test, I did this in Metamod:
GeoIP > 'Only these countries' set to US (without quotes; I'm not in the US, so login mod should not show for me).
PHP, added this: if ( $fromCountryId == "US" ) return "268"; (where 268 is login module id; it is in double quotes)
Rest of the settings are default for metamod.
When I refreshed the site, the login module still shows for me in SG.
If it had worked, I would have replaced "US" on those two settings above to SG.
What am I doing wrong?
Re: Showing login module only in own country - not working
Hi gurdip,
sorry for the delayed reply on this.
There are 3 things I would check:
1 - ensure that in the MetaMod parameters you select "Enable GeoIP/GeoCity: GeoLiteCity (free)"
2 - if you want to do a simple country select, you don't need to enter any PHP. Just enter US into the "only these countries" box, and put the target module id into the "Quick module id or position include" box. Wipe out all the contents of the PHP box.
3 - If it's not (1) or (2), I wonder if it's a strange interaction with Advanced Module Manager? Instead of having the MetaMod and the "target" module both set to the "superlogin" module position, try altering the target module to be in a fake module position "superadmin-metamod". This will ensure that it does not show up unless/until the MetaMod displays it.
I expect that one of those will fix it!
It's also theoretically possible that your IP address is actually resolving as a US IP address. We can check that too as a last resort.
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Showing login module only in own...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5941
- Posts this week:
- 1
- User Info:
- Total Users:
- 7618
- Newest User:
- goure1dhowen
- Members Online:
- 0
- Guests Online:
- 154
- 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