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.

 

Seem that cannot identify browser version

Seem that cannot identify browser version

Hi there,

I use this code but it seems that it always shows module 201 and not 232. I need when i open website throught Internet Explorer the module 232 to show and to the rest browsers to open 201 module.

Code:

$vm = JomGenius("virtuemart"); 

$menu =& JSite::getMenu();


if ($vm->check("pagetype != productdetails") && $vm->check("pagetype != cart") && $vm->check( "pagetype != user.editshipto" ) && $vm->check("pagetype != cart") && (! $vm->check("pagetype starts with checkout, cart")) ) {
    if ($core_genius->check( "browser_type != ie" ) ) return 201;
    else return 232;
    }

The if conditions work just fine, just it seems that it cannot identify browser version

pm4698
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Seem that cannot identify browser version

You're not the only person to be reporting a problem with this, however so far I have not been able to reproduce it.

Can you please tell me what this code produces, when you are testing with IE:

echo "browser is: " . $core_genius->check( "browser_type");

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

Re: Seem that cannot identify browser version

I get a message: browser is:

And it doesn't show up the Browser. I tested this on Chrome and Internet Explorer and i get the same result

pm4698
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Seem that cannot identify browser version

what version of Joomla and of MetaMod?
And can you give the full browser string:

echo $_SERVER['HTTP_USER_AGENT'];

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

Re: Seem that cannot identify browser version

Yes ofcourse. I have joomla 2.5.22 with metamod pro version 3.17
The message from the echo is from Chrome:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36

and from Internet Explorer:
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

pm4698
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Seem that cannot identify browser version

Any news??

pm4698
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Seem that cannot identify browser version

ok, that 1st one returns "chrome40", but the second one returns nothing.

Where did you get the following user agent from?

Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

Is it from a genuine copy of IE (if so, which version?) or from a simulator, or some other source?

In any case, it's obvious that my user agent sniffing has not kept up with the many different (recent) user agent strings used by IE, so it's time for an update. I'm using the following URLs for reference:

http://user-agents.me/browser/mozilla50 … like-gecko
http://blogs.msdn.com/b/ieinternals/arc … ebkit.aspx

Stand by for an update to MetaMod Pro in the next 24 hours that will detect this style of user agent and some other variations.

Thanks for your patience and for the user agent info - that was important and useful info.

Best regards,
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
3319 Posts
User info in posts
Administrator has disabled public posting

Re: Seem that cannot identify browser version

Thank you for the new version. Please when you have the new version, make a post here or somewhere in order for me to get notified and i will let you know about the results from the new version

pm4698
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Seem that cannot identify browser version

Hi - the new version is up now. You can download it following the instructions in the yellow box on http://www.metamodpro.com/metamod/download - please let me know how you get on, particularly with regard to IE11 which should be the major improvement.

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

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11577
Newest User:
owens65784
Members Online:
0
Guests Online:
200

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