The Joomla! Extensions Directory ™

MetaMod Module

Control your modules! (WORKS ON JOOMLA 3.2!)

…by date, time, recurring time, GeoIP (country of viewer), browser type and language, user name, group, page within other component (e.g. Virtuemart, K2), on-page text, article keywords, by article, section/category, domain, referrer…

…and much, much more!

MetaMod is a "Meta Module" - a module that includes other modules, according to a set of rules.

By installing the free GeoLite Country or City database from MaxMind, you can switch modules based on country names/cities/states etc.

Suggested uses:
★ VirtueMart: hide or show different modules at checkout, cart, product pages, categories etc.
★ Timed modules: recurring daily/weekly times and dates (great for radio/TV/broadcasting sites)
★ Languages: show different menus/modules based on the front-end language the user has selected (e.g. with JoomFish), or according to their browser language
★ Users: show a module for users registered for more (or less) than a certain time period, or target modules to certain users or groups
★ Switch between 2 modules for logged-in users and guests
★ Section/Category-specific modules: target modules according to the section/category of the displayed article
★ Domain & referrer: display different modules depending on which domain is being used for the page, or which site the user linked from
★ Browser detection: switch modules depending on the user's browser & browser version (e.g. show a different module for people viewing the site with Internet Explorer IE)
★ Control modules based on text found in the main component of the page
★ Control modules such as RSForm (show a different form based on where in the world someone is connecting from, etc)
★ Target modules onto specific pages in JReviews, CommunityBuilder, SOBI and almost any other component
★ Dynamically control the parameters of other modules on the page as well as whether the modules appear or not
★ and so much more!

Many more uses can be found in the documentation on the site, and in the forums. See you there!

★ v3.x is compatible with Joomla 1.7/2.5/3.0/3.1
★ v2.x is only compatible with Joomla 1.5.
★ Please download and install the right module for your Joomla version.


v3.16 (24 Mar 2014)
* HikaShop support
* J3.2
* various VM fixes

v3.13b (10 Jul 2013)
* added K2 support
* confirmed J3.1 support
* fixed minor issue in VM handling

v3.13 (27 Nov 2012)
* fixed crasher in GeoLiteCIty support
* added support for VM 2.0.14; JomGenius now detects new pagetypes notify/recommend/manufacturer product listing.

v3.12 (19 Nov 2012)
* Now J 3.0 compatible!

v3.11 (03 Sep 2012)
* Added compatibility with JoomFish for J2.5

v3.10 (23 Jul 2012)
* Added Categorizr support to JomGenius, for detecting mobile, desktop, tablet and tv devices.

* Multiple improvements to JomGenius support for VM 2.x

v3.8 (14 Feb 2012)
* Added J2.5 support

Report Extension



Reviews: 2
I am using this module on Joomla 1.5 to have header images show across whole sections or categories - which is something you can't do in Joomla out of the box. (Yes, you can assign a module to menu entries but what happens if the client adds another menu entry and has no idea how to edit a module? No header image.)

This module does it for me, and beyond that it is very flexible for many more different uses, compared to the meager purpose I use it for.

Extremely well thought out, well documented. A real pearl.
Reviews: 4
I needed a way to prevent users from a specific country from seeing a module on the main page of my client's site due to that country's low bandwidth. After searching the forums I was directed to MetaMod and it's been the perfect solution.

Installation was quick and easy and the configuration was a breeze. I initially misread the configuration directions so when the module didn't work as advertised, I emailed the developer, Stephen. He was prompt to respond and quickly helped me realize that I had configured the module incorrectly. After that, voila!

Now my module shows and works for everybody except for the users in that country. This is great and it makes me look like a genius for my client!

Thanks again Stephen!!
Reviews: 25
This is an interesting module, with good functionality but not for the faint-hearted. It requires some code changes to a core Joomla script. Easy enough to do but perhaps not for a naive user that wants an application to just work...

Once configured there is some simple scripting to do to implement the rules. You will however need to be able to understand very basic or simple PHP scripts but that is all.

It is powerful too being able to display any module in many different conditions.

Not perfect however, it still takes up module space even if the target module is not being shown. On my template it left a white space 'hole' in the middle of the page in the area that I was trying to make invisible according to my rules. Not for me in this case but I can think of many instances when this module would be very useful.

Owner's reply

Hi Beededea, thanks for the review. There are just a few points I'd like to pick up on:
1 - yes, there's a patch you can make to a core Joomla script to make a list of modules and their IDs show up when you are editing the module, but it's not compulsory. And, it's only for the Joomla 1.0.x version of MetaMod -- the Joomla 1.5 version doesn't need it.
2 - yes, the ability to do some simple scripting is a bonus. There are some simple operations you can do without any scripting at all (GeoIP country selection and time/date limits on module display). There's also an increasing number of PHP recipes on the home page that need only minimal customisation in order to use them. When I get an enquiry from someone about how to do a particular task I usually add a new recipe to the list.
3 - module space when the target module isn't showing... sigh... this certainly can be a pain. Sometimes this happens, sometimes it doesn't, depending on the template. Thankfully there are a number of ways to tackle this, but it often depends on the template and CSS that you are using. One quick thing to try if this is happening to you is to add a "module suffix" to the MetaMod instance you are working on. Often, a random suffix added here fools the CSS into not allocating extra space for the missing module. This can also sometimes help if the included module isn't getting its CSS styling right - work with the module suffix for MetaMod, the module suffix for the included module, and the "style for included modules" in MetaMod to find a combination that works.
Sometimes though, if your template makes design decisions about whether to make space for a module position depending on whether there are any active modules in that position, MetaMod fools it into making space, when it really shouldn't (cos MetaMod will later decide not to put anything in there). In that case you need to do some work on the template. As a last resort, of course, you can always get MetaMod to put in an alternative module if it decides not to include anything else -- e.g. a nice graphic, google adwords, a link (advert) to some other page on your site, etc. Be creative! Often we forget that not everything on the site needs to be utilitarian...
beededea, if you e-mail me I'll see if it's possible to get around your spacing issues.
-- Stephen

Reviews: 1
I thought this other guy had me beat with his $2000 a year site and then MetaMod comes along and gives me the exact same functionality as his site!


Now if a person isn't a member, they see my mini-pitch to sign up. And if they are, they just get a simple Welcome "Name"

Fantastic module and really gives a membership site that personal though while communicating to two or more different sets of users.

Thank you!
Reviews: 5
After spending 3 weeks playing with the CSS which had caused me problems with IE and FF, I found MetaMod,

Not being an expert with PHP I emailed the developer and within 8 minutes I got a reply and the code too. Now that's what I call support

Excellent module and support
Reviews: 2
I run a sports site and was banging my head against the wall looking for a way to display team-specific content on the team pages and this extension answered that wish.

After a little PHP trial and error it runs like I want it to.

Great work!
Reviews: 40
With the extremely poor implementation of ACL's in Joomla!, even in 1.5.x, this module is a MUST. Does everything the developer says and more. So many other extensions focus on showing/hiding content, but I usually had a need in the past to show/hide modules. Now I can - without any code changes or hacks (which is what I resorted to in the past). You NEED this extension.

Great job by the developer!!!!!
Reviews: 9
I needed to give a small group of site users access to certain pages, and didn't want to go through the whole process of creating groups. With this extension, I simply created a menu linking to those pages and published it inside MetaMod, then made the MetaMod module accessible to the specific list of usernames. Simple!
Reviews: 2
Meta Mod is extremely powerful, and can be very flexible depending on it's use.
I came to use it because I wanted to simply show different modules to regged, or non regged users.
(something Joomla should have built in...IMO)
This accomplishes that...easy,
When I installed and fully began to see this modules full parameters, I was like whoa dude...I can implement this on other sites for a multitude of reasons. Awesome!

Drawbacks: not many! I had some trouble setting up the PHP "recipies" to fit the enviroment I was working in, but through some trial and error I worked it out.
I also had some small spacing issues where the specified modules displayed, but that was in my template .css and that was an easy fix.
If you a true "Joomla head" and build alot of sites this is THE trick to have up your sleeve, it's very flexible, powerful and FREE!
Reviews: 2
All I wanted to do was be able to switch off a module based on whether a user was logged in or not.

Installed no problem.
set-up no problem.
Configuration no problem.

Would highly recommend this extension.
Reviews: 1
I was trying to find a way to display different information/ads to my website visitors based on their country of origin. I was going to try and somehow use another module which is used to display IP Address and country flag for a website visitor but luckily I found this Metamod module first.

I initially tried it out in my test area and encountered a problem when I used it more than once on the same webpage. But within a few hours of sending Stephen an email he sent me a fix, which solved the problem. We also exchanged a few more emails and he explained how I could simplify what I was planning to do, so rather than call another module containing my Ad code I could actually put this code in the MetaMod module and not specify the id for a module to be call by MetaMod.

So now I can embed calls to MetaMod modules in my web page content using a mambot for this purpose, and have ads displayed relevant to my visitors country.

Another feature of the module I have not tried out but will be useful, is the ability to specify an end publishing date, so if need be I can stop ads being displayed for example when the ad offer expires etc.

An excellent module, exactly what I needed and more with fast an useful support from Stephen.
Reviews: 2
This is a great app - one of Joomla's best I think. I run a couple of websites locally for Australia - but get a lot of traffic from the US - frustrated me that I couldn't sell my products to these guys...

Enter MetaMod and Amazon Associates - and kerrrr--Ching - made my 1st US sale today.

Easy enough to set up - although a forum where people could discuss solutions/approaches would be great.
Reviews: 2
This provided a simple but very powerful solution to a personalization problem on a website I'm working on. Not only does this little module allow individual users to customize which modules they want to see on a page (and in what order), the developer is quick to answer questions and willing to offer custom solutions. When I asked him about resizing MetaMod depending on the module being pulled in, he responded extremely fast and offered to take a look at our site to help with pinpointing how to change the CSS. You can't get much more helpful than that!
Reviews: 1
This module has already gotten me out of three binds that would normally have taken hard-code edits.

On two of the occasions, Stephen gracefully offered his service in helping fix the problem. His support is honestly the best I've received online!

Kudos to the great module.
Reviews: 3
I used this module to fix a problem with a module not appearing every time a particular component appeared (Mosets Tree and its file explorer-like navigator module). It just took a simple conditional. I can envisage using this tool again and again as a solution to when Joomla's menu-link based module configuration just doesn't quite cut it. Functionality like this should definitely be considered for part of the future Joomla core.
Reviews: 1
This tiny module can do anything!

I had a module which showed up great on Firefox and Safari but could not get it to work in IE, so I wondered whether Metamod would come to the rescue and serve a substitute for this module for IE users. I had no idea how to do this though! :)

Stephen was more than happy to help, providing me the exact code to do what I wanted Metamod to do and voila, it worked like a charm.

Here's the code I used:

$UA = isset($_SERVER['HTTP_USER_AGENT']) ?
$IE = strstr($UA, 'MSIE') ? true : false;
$IEV = $IE ? preg_split('/msie/i', $UA) : false;
$IEV = $IEV ? floatval($IEV[1]) : false;

if ($IEV >= 7) return 92; //module for IE7
if ($IEV >= 6) return 92; //module for IE6
if ($IE) return 92; //module for any IE version
return 80; //default module

I really have to commend Stephen for his extraordinary help. I appreciate his support every step of the way.

I have yet to find something that Metamod cannot do!
Reviews: 2
...and I was looking for a way to show modules according to user language-selection.

MetaMod is so versatile, it does SO many things, and it can show modules according to language-selection too!

I don't use JoomFish, because on Joomla1.5.2 it messes up with Community Builder.

Actually I don't need to use any of the language plugins, they are too much trouble for nothing if you ask me!

I only needed to put 5 lines of simple code in only 4 of my files, to have a language-selector on front-end, and articles showing in user's language of choice!

Components use language files!
Modules too!
BUT not Joomla's menus (!!how's that?)

So how was I to show language-specific menus on my site??

MetaMod came to save the day!!
And Stephen was MOSTLY helpful!
the solution to my problems became ridiculously easy by using MetaMod!

in my case I only had to add a code in MetaMod's PHP textbox like this:

$language = $mainframe->getCfg('language');

if ($language=="en-GB") return 11;
if ($language=="el-GR") return 22; //example numbers

Now my site is totally multi-lingual, without going nuts with all the menus, and buttons, and options, and editing, and,and,and of applications like JoomFish, M17N, and the likes!


Thank you again Stephen for this fantastic module!
Owner's reply

Thanks 'grvulture' for your review. Just a note to anyone else who wants to use this example:
(1) you still need to install JoomFish in order to get the language selector menus etc.
(2) but, you don't need to set up any of the other JoomFish translation features apart from enabling the languages that you want people to be able to select, and assigning the language selector module to a page.
(3) Before the "$language = ..." line above, you need to type the following line in the MetaMod config:
global $mainframe;
(4) and that's it, the easiest way to set up completely different menus depending on the selected language.

Reviews: 3
I was looking for something that would allow a start date and end date for publishing a module.

The organization that I belong to have two different meetings every month and some events during the warmer months. The template that I am using has three module positions at the bottom of the front page that was an ideal spot for this information.

MetaMod allows me to set up these dates for a whole year and then automatically publishes them at the appropriate time with the correct meeting/event dates throughout the year in the selected module positions. This has been a lifesaver for me, keeping track of when to change the module dates manually would have been quite a chore as each of the three monthly dates are at different times of the month.

The author was very helpful!! I emailed him for help with the code to do what I wanted (I can't be accused of being a programmer!). He responded almost immediately with the required code. Works great, after I did some tweaking of the dates in the code.

Steve, sorry for the "wait" to post here. I needed to see if it worked........... and it does! Thanks a lot for taking the time to help me out.
Reviews: 2
Some modules offer a fraction of what this powerful tool does and they are commercial modules! This module fulfils a number of my wishes and gives me some extra on top that I had yet to imagine. It enables me to make my site more users friendly; it gives me one of the most powerful marketing tools that make me and my international partners very happy. Meta it is indeed, my enthusiasm for this module is of titanic proportions.
Reviews: 1
Great concept and it just simply works. I had some issues with the Geo feature since I'm building a global Intranet site so all the IP addresses are internal. Stephen (the developer) responded very quickly with some solutions to my issue that will allow me to configure my own IP address mapping.
Page 8 of 9