php forum
php mysql forum
php mysql smarty
 
Page 2 of 2 < 1 2
Topic Options
#284136 - 03/17/05 11:39 PM Re: PDA friendly templates [Re: ]
dman_dup1 Offline
Journeyman

Registered: 01/14/03
Posts: 144

   Re: PDA friendly templates to Del.icio.us Add to del.icio.us
  Digg Re: PDA friendly templates Digg it

Top
#284137 - 03/18/05 02:00 PM Re: PDA friendly templates [Re: ]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
The first is just an info site from Microsoft, and the second is just a directory of PDA friendly sites. <br /><br />The stock Threads templates, and even the Facelift templates that I script, will display on Pocket IE. The only problem is all of the horizontal scrolling that you have to do to read everything. My goal is to develop a set of templates that display without a horizontal scroll bar...
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#284138 - 04/21/05 12:44 AM Re: PDA friendly templates [Re: jacksonm99]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Just a post to let everyone know that I haven't given up on this project, I've just been extremely busy. We had a hardware / software upgrade at the site where I work and all of the scripts that were left for monitoring the new system were hosed. I've been doing so much scripting at work that I haven't even been turning on my PC when I get home... <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> <br /> <br />Edit: After doing a little research I think that the best way to approach mobile templates is to re-write Threads to make it a little more linear and compact, and then add some script to detect mobile browsers and force the use of a mobile style sheet to control how the data is presented in a browser -sounds complicated but it's actually easier than designing two seperate sets of templates (one for mobile users and one for everone else). So I'm gonna look in to scripting a single set of templates and creating a mobile CSS file...


Edited by Dalantech (04/21/05 04:39 AM)
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#284139 - 04/22/05 12:11 AM Re: PDA friendly templates [Re: jacksonm99]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25432
Loc: Texas
in-teresting <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#284140 - 06/23/05 07:37 PM Re: PDA friendly templates [Re: jacksonm99]
jenesepas Offline
Lurker

Registered: 06/23/05
Posts: 1
[]Dalantech said:<br />I've added some script to the ubbt.inc.php file that detects mobile browsers and then sets the template style to "mobile" (I'll probably use the same detection script to force the use of a mobile css file as well).[/]<br />Does this work for PDAs too? Do you use UserAgent to detect?

Top
#284141 - 06/24/05 06:20 PM Re: PDA friendly templates [Re: pichirichi]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
actually by examinig the $_SERVER["HTTP_USER_AGENT"] value you can basically detect most types of browsers with a simple call..
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#284142 - 06/25/05 10:14 AM Re: PDA friendly templates [Re: pichirichi]
Dalantech Offline
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 />
Code:
 // --------------------------------------------- <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="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#284143 - 06/25/05 10:33 AM Re: PDA friendly templates [Re: jacksonm99]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
You also have to look for <br /><br />
Code:
 	if ( (!$fstyle) || ($fstyle == "usedefault") ) {<br />			$fstyle = $theme['stylesheet'];<br />		} 
<br /><br />and after that add:<br /><br />
Code:
 // ----------------------------------------<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.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
Page 2 of 2 < 1 2


Who's Online
0 Registered (), 46 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
pisa666, ghengis317, NitroX, Dogan, EliYah-
13345 Registered Users
Top Posters Last 30 Days
AllenAyres 11
blaaskaak 7
tackaberry 5
FREAK1 5
Chris Bale 4
Ian_W 4
Gizmo 4

 

 

 
fusionbb message board php hacks