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.

 

Hide module for a country

Hide module for a country

Hey metamod, thanks for such a valuable module. But I am getting a bit problem, I dont want visitors of my country to see the ads, which are module. So how can I hide those modules from country say India.

nessan
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Hide module for a country

Hi Nessan,

You can use GeoIP to do this.

1 - install the (free) GeoIP Country database. See the Installation page: http://www.metamodpro.com/metamod/installation
2 - make sure you understand the general MetaMod setup: http://www.metamodpro.com/metamod/quick-start then follow the instructions in there (e.g. about disabling modules).
3 - in the MetaMod module editor, enter "IN" in the "Exclude these countries" box
4 - enter the id number of the module(s) to exclude, in the "Quick module ID include" box

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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: Hide module for a country

Thanks Stephen , I really love metamod , it solved a big big issue for me relating to localization of advertising.

I would ping you again, if you won't mind, is it possible to display a module in India, in place of above disabled one ?

nessan
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Hide module for a country

Sure. In that case, DON'T use the "Exclude these countries" or "Include these countries" or "Quick Module ID include" boxes. Delete the content of those boxes.

Instead, use the PHP box. Enter the following:

Code:

if ($fromCountryId == 'IN' ) return XXX;

else return YYY;

Replace XXX with the module id to use for India, and YYY with the module ID to use for all other countries.

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
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Total Posts Today:
1
User Info:
 
Total Users:
10075
Newest User:
rsker57
Members Online:
0
Guests Online:
212

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