Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 12:10 pm EST

Geeklog Forums

login and themse


Tim Hosfelt

Anonymous
Is there any way to detect the browser setting and set the theme appropriately. We use blackberrys quite a bit and the pda theme is perfect for this, but when we're in the office we' would like to keep a theme with block. It would be nice if GL would detect the blackberry browser and use the pda theme. Any ideas on how to accomplish this?
 Quote

Srav

Anonymous
This should not be very difficult I guess.

You can get some free javascript browser detection scripts at the javascript sites or you may try some php code in the index php file in the core GL

like

$browser_type = getenv("HTTP_USER_AGENT");

if (preg_match("/what_you_want/i", "$browser_type")) {
echo "";
else {
echo "";}

You can give it a try and let us know the results Smile
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Srav: some php code in the index php file in the core GL

That's the wrong place. Something like that should go into lib-common.php, right before the code that sets the current users theme.

Some related discussion was over here just a few days ago.

bye, Dirk
 Quote

All times are EST. The time is now 12:10 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content