Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 - 3 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Browser specific theme
by techdb on 2010/7/21 15:23:21

1. Create a theme for ie 6 and call it ie6theme
2. Download your common.php file from inside the folder include/
3. Open the file inside an editor
4. Around line 260 or so (before the text
/**
* Theme Selection
*/)
Cut and paste the following code:


// IE6 string from user_agent
$ie6 = "MSIE 6.0"; // detect browser
$browser = $_SERVER['HTTP_USER_AGENT']; // yank the version from the string
$browser = substr("$browser", 25, 8); // if IE6 set the $alert
if($browser == $ie6){ $_SESSION['xoopsUserTheme'] = 'ie6theme';}

5. Save your common.php file
6. upload it back to inside the folder include/
Re: Browser specific theme
by nmshah on 2010/7/19 16:52:18

thanks a lot mamba and techdb but my knowledge about php is really bad. Will still see if I can make it work

@techdb can you tell me what steps did you take to make this work
Re: Browser specific theme
by techdb on 2010/7/19 15:50:02

Ghia gave me this solution for an IE6 Redirect... works very well

https://xoops.org/modules/newbb/viewtopic.php?topic_id=69599&forum=17&post_id=317355#forumpost317355
Re: Browser specific theme
by Mamba on 2010/7/19 15:40:12

There are also some PHP classes to detect a browser, e.g. this one, so maybe you can put this all together and make it work.
Re: Browser specific theme
by Mamba on 2010/7/19 15:25:21

Defacer can switch theme based on the module, but I am not sure if it can based on the browser.

Maybe you can modify it so it changes theme based on the browser.

You might also look at this tip and maybe build on it.

Who's Online

199 user(s) are online (170 user(s) are browsing Support Forums)


Members: 0


Guests: 199


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits