Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
Want to display a module for all browsers except chrome
Want to display a module for all browsers except chrome
I have an animated logo (metamod ID 117 - reg mod ID 113) and a static logo(metamod ID 118 - reg mod ID 38) The animation does not work in IE so I would want the Static Logo to display only IE and the animated logo for all others. I have been playing around with the commands but I am having trouble getting it going. Any help would be much appreciated!
Re: Want to display a module for all browsers except chrome
I hope i can help with my few experience with metamod.
You have to check if the user is using the IE and so call the right image
// you already checked if is IE or not
if($isIE == true){
return "118";
} else {
return "113";
}
Please, correct me if i am wrong...
Re: Want to display a module for all browsers except chrome
Hi Bri_idea and Raul,
Raul has just taken a little bit of PHP code from an example, out of context (sadly won't work). There's a more robust way to do this:
if ($core_genius->check("browsertype = ie")) {
return 118;
} else {
return 113;
}
See this page for more about JomGenius:
http://www.metamodpro.com/jomgenius/parameters
Cheers,
Stephen
Re: Want to display a module for all browsers except chrome
This worked better than before however I am left with a blank white Iframe from the animated module in IE
here is the site http://norcaind.com/joomla/
Re: Want to display a module for all browsers except chrome
Hi Bri-Idea,
Is the iframe part of a module? Or part of the template? It kind of looks like it's part of a module, but according to the PHP code above it should not be being included when viewed in IE, if it's part of module 113.
Cheers,
Stephen
Re: Want to display a module for all browsers except chrome
ok, found the issues on your site:
1 - you had module 113 entered into the "quick module id or position include" box. This made it show up on ALL pages that the MetaMod was assigned to, irrespective of the code in the PHP box
2 - in the PHP you were swapping between module 118 and 113, instead of module 38 (the static image) and 113. Module 118 was another MetaMod, not set up correctly... so I have deleted that one for you so you don't get confused
All working now,
Stephen
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7658
- Newest User:
- carre82601
- Members Online:
- 0
- Guests Online:
- 188
- 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