Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » MetaMod not Working with ie Browser...
MetaMod not Working with ie Browser detection
MetaMod not Working with ie Browser detection
I'm trying to show one module for IE and another for all others. I'm using the following recipe:
Code:
if ( $core_genius->check( "browser_type = ie" ) ) return 206;
else return 174;
However, it is showing 174 and not 206 on both browsers. MetaMod Pro is working when not using browser detection.
Re: MetaMod not Working with ie Browser detection
Hi iChuzCHRIST (so do I )
I've just tested with MetaMod for Joomla 1.5 and 1.7, most recent versions of both, and the code above works for me. I tested with Internet Explorer v8, but I know from previous testing that it works on other versions too.
Could it be that you have the system cache plugin turned on? In that case, the entire page gets cached, so if you hit it with one browser first, then the result would get cached and displayed no matter what browser you use on it the next time.
If you're not using the system cache plugin, then try putting this into the MetaMod and test with different browsers:
echo "Browser type is: " . $core_genius->info("browser_type") . "<br />";
if ($core_genius->check("browser_type = ie")) echo "It is IE!!!" . "<br />";
echo "User agent is: " . $_SERVER['HTTP_USER_AGENT'] . "<br />";
echo "MM_USER_AGENT: " . MM_USER_AGENT . "<br />";
So, what comes up when you test this with an IE browser? What user agent does it give?
Thanks,
Stephen
Re: MetaMod not Working with ie Browser detection
metamodguy wrote:
Could it be that you have the system cache plugin turned on? In that case, the entire page gets cached, so if you hit it with one browser first, then the result would get cached and displayed no matter what browser you use on it the next time.
That was it!!! I disabled the cache plugin, and it's all working like I want it to. I'm just hoping that none of my extensions need to have cache mode. I suppose that I will have to really test out my site to be sure.
I have a related question. How does a IE8 browser in compatibility mode register? Does it register as IE7?
Re: MetaMod not Working with ie Browser detection
About the IE8/IE7 question: I don't know without trying it out, though I suspect the compatibility mode does NOT change the browser version in the user agent string. You can try this out by using the code I suggested in my last post, then view the page with compat view on and off.
Cheers,
Stephen
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » MetaMod not Working with ie Browser...
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 8021
- Newest User:
- shrutihassan193
- Members Online:
- 0
- Guests Online:
- 198
- 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