 |
 |
 |
 |
#284136 - 03/17/05 11:39 PM
Re: PDA friendly templates
[Re: ]
|
Journeyman
Registered: 01/14/03
Posts: 144
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#284142 - 06/25/05 10:14 AM
Re: PDA friendly templates
[Re: pichirichi]
|
Junior Member
Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
|
This is what I use on my dev site (added to my ubbt.inc.php file. Replace $tempstyle = "default"; with the code listed below) -I haven't worked on it much lately and I just got back from vacation. <br /> <br /> // --------------------------------------------- <br />// Mobile template hack start <br /> <br />$ua = @find_environmental("HTTP_USER_AGENT"); <br /> <br />if (stristr($ua, "Windows CE") or stristr($ua, "AvantGo") or stristr($ua, <br />"Mazingo") or stristr($ua, "Mobile") or stristr($ua, "T68") or stristr($ua, <br />"Syncalot") or stristr($ua, "Blazer") or stristr($ua, "NetFront") or stristr($ua, "Palm OS") or stristr($ua, "Elaine") ) { <br /> $DEVICE_TYPE="MOBILE"; <br />} <br /> <br />if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE") { <br /> $tempstyle = "mobile"; <br /> <br />} else { <br /> $tempstyle = "default"; <br /> } <br /> <br /> <br />// --------------------------------------------- <br />// Mobile template hack finish <br /> <br /> <br />You also need mobile templates <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#284143 - 06/25/05 10:33 AM
Re: PDA friendly templates
[Re: jacksonm99]
|
Junior Member
Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
|
You also have to look for <br /><br /> if ( (!$fstyle) || ($fstyle == "usedefault") ) {<br /> $fstyle = $theme['stylesheet'];<br /> } <br /><br />and after that add:<br /><br /> // ----------------------------------------<br />// Mobile CSS file hack start<br /><br />$ua = @find_environmental("HTTP_USER_AGENT");<br /><br />if (stristr($ua, "Windows CE") or stristr($ua, "AvantGo") or stristr($ua,<br />"Mazingo") or stristr($ua, "Mobile") or stristr($ua, "T68") or stristr($ua,<br />"Syncalot") or stristr($ua, "Blazer") or stristr($ua, "NetFront") or stristr($ua, "Palm OS") or stristr($ua, "Elaine") ) {<br /> $DEVICE_TYPE="MOBILE";<br />}<br /><br />if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE") {<br /> $fstyle = "mobile";<br /><br />} <br /><br />// ----------------------------------------<br />// Mobile CSS file hack finish <br /><br />And youy also have to have a mobile CSS file <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />I've moved all of the modifications that I made to my dev site to my main web site, www.dalantech.com , and I'll be finishing this mod soon.
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|