Previous Thread
Next Thread
Print Thread
Rate Thread
#284116 03/12/2005 4:16 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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
Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
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!

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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.

Joined: Oct 2005
Posts: 81
Power User
Power User
Offline
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
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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.

Joined: Feb 2002
Posts: 2,286
Veteran
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....)
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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

Joined: Feb 2002
Posts: 2,286
Veteran
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....)
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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
Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
I just logged in with my Ipaq and it is looking great. Nice, Nice, Nice.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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...

#284128 03/14/2005 1:04 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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

Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
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.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Very cool !

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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.

Joined: Oct 2000
Posts: 2,667
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,667
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?
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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...

Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141

#284136 03/18/2005 12:39 AM
Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141

#284137 03/18/2005 3:00 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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...

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
in-teresting


- Allen wavey
- What Drives You?
Joined: Jun 2005
Posts: 1
Lurker
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?

Joined: Oct 2003
Posts: 2,305
Old Hand
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..

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
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.


Link Copied to Clipboard
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
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)