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.

 

Detecting Epiphany Browser

Detecting Epiphany Browser

Hi,

Is it possible to detect the Raspberry Pi Epiphany browser, and adjust the template based on the result?

I have tried:
if ( $core_genius->check( "browser = Epiphany" ) ) return true;

Which doesn't appear to work

The browser  does not appear listed in the JomGenius page, so i'm wondering if there is a way to do this?

Thanks

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

Re: Detecting Epiphany Browser

Hi Barry,

sorry this is not built in to JomGenius (it's a bit too niche for that). However you may be able to identify it from its user agent string.

Can you find out what the user agent string is for RP? Does it mention RP directly or is it more based around the linux version etc?

You can check this with MetaMod by entering:

echo $_SERVER['HTTP_USER_AGENT'];

then visit the page from the RP browser. Could you take a copy of the output and post it here?

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

Re: Detecting Epiphany Browser

Hi Stephen,

Here's the output:

Mozilla/5.0 (Macintosh; ARM Mac OS X) AppleWebKit/538.15 (KHTML, like Gecko) Safari/538.15 Version/6.0 Raspbian/8.0 (1:3.8.2.0-0rpi27rpi1g) Epiphany/3.8.2

Thanks,

Barry

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

Re: Detecting Epiphany Browser

Hi Barry,

it looks like Epiphany is mentioned directly in the user agent, so it's a simple job to detect this:

$ua = @$_SERVER['HTTP_USER_AGENT'];
if (strpos($ua, 'Epiphany/') !== false) return true;


Job done!
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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
121

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