Previous Thread
Next Thread
Print Thread
Rate Thread
PDA friendly templates #284116 03/12/2005 4:16 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
Update: I am working on a set of mobile templates for UBB Threads 6.5.1 and I'll package it up as a mod and post it in this forum when I'm finished.

Features:
  • No need for the user to select the templates. 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). I'm in the process of scripting templates that are mobile friendly.
  • All of the mobile templates will be in a mobile subdirectory to keep them separate from the Threads default template directory (something that I'll also do for future Facelift mods).
If you have any sugestions please post them in this thread.

Sponsored Links
Re: PDA friendly templates [Re: jacksonm99] #284117 03/12/2005 7:30 AM
Joined: Jun 2001
Posts: 356
monkeyra Offline
Junior Member
Offline
Junior Member
Joined: Jun 2001
Posts: 356
No suggestions at the moment, but thanks for sorting this out!
I'm after this for my site, just haven't done it due to lack of time and knowledge.
thankyou!

Re: PDA friendly templates [Re: Luka_dup1] #284118 03/12/2005 11:42 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
You can monitor my progress at my dev site. You won't be able to see the PDA friendly layout unless you go to the site with a PDA.

I'll make a similar set of templates for the new version of Info Pop's forum package.

Re: PDA friendly templates [Re: Luka_dup1] #284119 03/12/2005 5:15 PM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
I script templates from the outside in, and after finishing my own custom index page I made mobile friendly templates for the main forum page and the postlist. I'll start work on showflat and showthreaded tomorrow.

Re: PDA friendly templates [Re: jacksonm99] #284120 03/12/2005 9:40 PM
Joined: Oct 2005
Posts: 81
Harold Offline
Power User
Offline
Power User
Joined: Oct 2005
Posts: 81
I'm looking forward to seeing this one when you get it done.

Will this work with the older text only browsers or just the newer color ones in todays PDA's and cell phones?

Sponsored Links
Re: PDA friendly templates [Re: DVORAK] #284121 03/13/2005 2:52 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
The mobile css will only work with the latest PDA browsers. The browser detection script should be able to detect smart phones, but I'm not concerned with how Threads displays on them. IMHO surfing the web on a cell phone's tiny screen is pretty pointless. The 3.5" screen that I have on my iPaq is just big enough to make web browsing practical.

Re: PDA friendly templates [Re: jacksonm99] #284122 03/13/2005 6:39 AM
Joined: Feb 2002
Posts: 2,286
Ian_W Offline
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
Sounds great - I must admit in the past, I created a user, with no sidebar, no header etc., so that the time to load the page was reduced.

Will log in with my pda to have a look


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: PDA friendly templates [Re: Gorlum] #284123 03/13/2005 3:27 PM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
Please do! I could use some feedback.

I've finished part of the showflat page, but that's as far as I got this weekend. My boy has the flue, so I haven't had much time to script

Re: PDA friendly templates [Re: jacksonm99] #284124 03/13/2005 7:17 PM
Joined: Feb 2002
Posts: 2,286
Ian_W Offline
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
I keep loosing the wireless link on my PDA - will get it back up and give it a try


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: PDA friendly templates [Re: jacksonm99] #284125 03/13/2005 9:05 PM
Joined: Mar 2000
Posts: 21,084
AllenAyres Offline
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,084
Sweeet! I've considered doing this for a long time but always backed back down after looking at the specs


- Allen wavey
- What Drives You?
Sponsored Links
Re: PDA friendly templates [Re: jacksonm99] #284126 03/13/2005 10:42 PM
Joined: Jan 2003
Posts: 141
dman_dup1 Offline
Journeyman
Offline
Journeyman
Joined: Jan 2003
Posts: 141
I just logged in with my Ipaq and it is looking great. Nice, Nice, Nice.

Re: PDA friendly templates [Re: SurfMinister] #284127 03/14/2005 1:03 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
[]AllenAyres said:
Sweeet! I've considered doing this for a long time but always backed back down after looking at the specs [/]

PDAs are not simple to script for -some of the data currently being displayed in Threads won't make the final cut. There just isn't enough room...

Re: PDA friendly templates [Re: ] #284128 03/14/2005 1:04 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
[]dman said:
I just logged in with my Ipaq and it is looking great. Nice, Nice, Nice. [/]

Thanks for the props!

I should be able to finish it out sometime this week -my boy has the flue, so I didn't get much time to script over the weekend

Re: PDA friendly templates [Re: jacksonm99] #284129 03/14/2005 5:09 AM
Joined: Jun 2001
Posts: 356
monkeyra Offline
Junior Member
Offline
Junior Member
Joined: Jun 2001
Posts: 356
testing it on my pda now, an o2 XDA2.
It loads quick, bloody quick. thats good!
fits the screen perfectly.
impressive!
i'm liking it.

Re: PDA friendly templates [Re: Luka_dup1] #284130 03/14/2005 7:27 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
[]monkeyra said:
testing it on my pda now, an o2 XDA2.
It loads quick, bloody quick. thats good!
fits the screen perfectly.
impressive!
i'm liking it. [/]

Thanks for the props

Re: PDA friendly templates [Re: jacksonm99] #284131 03/15/2005 2:53 AM
Joined: Nov 2001
Posts: 10,370
JoshPet Offline
I type Like navaho
Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,370
Very cool !

Re: PDA friendly templates [Re: Daine] #284132 03/15/2005 2:06 PM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
Thanks Josh!

Update: I finished the showflat template. It took me a little while because I wanted to use some Graemlins and Instant UBB Code on the quick reply box, so I had to write a custom function (plus another template) to generate 6 Graemlins (the first 6 in the data base) and 6 Instant UBB Code hyperlinks. I'll use the same function to generate the Graemlins and Instant UBB Code for the post, reply, and edit pages.

I had to limit the number of Graemlins and Instant UBB Code due to the size restrictions of surfing on a small display.

Re: PDA friendly templates [Re: jacksonm99] #284133 03/16/2005 10:34 AM
Joined: Oct 2000
Posts: 2,668
Charles Offline
Veteran
Offline
Veteran
Joined: Oct 2000
Posts: 2,668
isn't there a website that allow you to browse a website as if you were on a handheld? I seem to recall that but can't remember the name (maybe something done by microsoft or something)

Last edited by Charles; 03/16/2005 10:35 AM.

Do you believe in love at first sight,
or should I walk by again?
Re: PDA friendly templates [Re: egor] #284134 03/17/2005 4:50 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
I've never heard of it, and I don't see how it would be possible unless it displayed the site in a 240x320 window...

Re: PDA friendly templates [Re: jacksonm99] #284135 03/18/2005 12:35 AM
Joined: Jan 2003
Posts: 141
dman_dup1 Offline
Journeyman
Offline
Journeyman
Joined: Jan 2003
Posts: 141

Re: PDA friendly templates [Re: ] #284136 03/18/2005 12:39 AM
Joined: Jan 2003
Posts: 141
dman_dup1 Offline
Journeyman
Offline
Journeyman
Joined: Jan 2003
Posts: 141

Re: PDA friendly templates [Re: ] #284137 03/18/2005 3:00 PM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
The first is just an info site from Microsoft, and the second is just a directory of PDA friendly sites.

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...

Re: PDA friendly templates [Re: jacksonm99] #284138 04/21/2005 12:44 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
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...

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...

Last edited by Dalantech; 04/21/2005 4:39 AM.
Re: PDA friendly templates [Re: jacksonm99] #284139 04/22/2005 12:11 AM
Joined: Mar 2000
Posts: 21,084
AllenAyres Offline
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,084
in-teresting


- Allen wavey
- What Drives You?
Re: PDA friendly templates [Re: jacksonm99] #284140 06/23/2005 7:37 PM
Joined: Jun 2005
Posts: 1
jenesepas Offline
Lurker
Offline
Lurker
Joined: Jun 2005
Posts: 1
[]Dalantech said:
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).[/]
Does this work for PDAs too? Do you use UserAgent to detect?

Re: PDA friendly templates [Re: pichirichi] #284141 06/24/2005 6:20 PM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
actually by examinig the $_SERVER["HTTP_USER_AGENT"] value you can basically detect most types of browsers with a simple call..

Re: PDA friendly templates [Re: pichirichi] #284142 06/25/2005 10:14 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
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.

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 /> 


You also need mobile templates

Re: PDA friendly templates [Re: jacksonm99] #284143 06/25/2005 10:33 AM
Joined: Feb 2001
Posts: 2,268
Dalantech Offline OP
Junior Member
OP Offline
Junior Member
Joined: Feb 2001
Posts: 2,268
You also have to look for

Code
 	if ( (!$fstyle) || ($fstyle == "usedefault") ) {<br />			$fstyle = $theme['stylesheet'];<br />		} 


and after that add:

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 


And youy also have to have a mobile CSS file

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.


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
drkknght
drkknght
rob's pad -- where it takes skin, to win!
Posts: 1,271
Joined: November 2000
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,499
Posts293,666
Members13,824
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 21,084
JoshPet 10,370
LK 7,395
Lord Dexter 6,709
Gizmo 5,786
Greg Hard 4,625
Top Posters(30 Days)
isaac 26
driv 16
Gizmo 5
Morgan 2
Today's Statistics
Currently Online 928
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 16
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.3
(Snapshot build 20190709.dev)
PHP: 5.4.45 Page Time: 0.054s Queries: 15 (0.011s) Memory: 3.4399 MB (Peak: 3.7730 MB) Data Comp: Zlib Server Time: 2019-07-16 10:56:57 UTC
Valid HTML 5 and Valid CSS