Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2002
Posts: 4
Lurker
Lurker
Offline
Joined: May 2002
Posts: 4
Has anyone developed either a skin/template or a special set of pages that provide for easy navigation from a Palm/Smartphone/PocketPC browser? I have a Treo 600, and would really like to be able to browse for new posts on our message board (www.pdga.com/msgboard/ubbthreads.php).

Sincerely,
Theo Pozzy
PDGA Commissioner and Pdga.com Webmaster

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3


Would be an interesting project - probably a variation on the print page:
https://www.ubbdev.com/forum/printthread.php/Cat/0/Board/templates/main/121018/type/thread

And a combo with the info found here: http://www.alistapart.com/articles/pocket/


- Allen wavey
- What Drives You?
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I have a CSS style on my site with no graphics for mobile users, but I've never done a template layout for small screens. The only problem is detecting the browser that is being used, and then calling a different style sheet in the showflat and showthreaded sripts based on the results (the last part is easy: I do it now for my article templates). It would be better if it can be automatic, so that first time mobile users automaticly get a site formatted for a small screen...

Once I finish the Facelift mod I'm working on I'll look inot doing this one -it's got a lot of "geek factor"

Joined: Oct 2002
Posts: 24
Newbie
Newbie
Offline
Joined: Oct 2002
Posts: 24
I think this would be cool too.

Detecting the browser wouldn't be that tricky... you could just embed a little code in ubbt_header.tmpl:

if ($HTTP_USER_AGENT == "mobilebrowser"){
echo "<link rel="stylesheet" href="mobilestyle.css">";
} else {
echo "<link rel="stylesheet" href="$stylesheet">";
}

If you wanted to use entirely different templates and not just stylesheets, it's a little tricker but not much (I did this on an old version of UBB). If I can help let me know.

-Y

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Share I'll help if possible


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Oct 2002
Posts: 24
Newbie
Newbie
Offline
Joined: Oct 2002
Posts: 24
In ubbt.inc.php, find the line:

// --------------------
// set the style sheet
$stylesheet = "{$config['styledir']}/$fstyle.css";

Under this you can add:

if ($fstyle == "pdacss"){
$tempstyle = "pdatemplate";
}

Now if someone selects the style pdacss.css, UBB will pull all the templates from /templates/pdatemplate instead of /templates/default. With a little more code, it could auto-select the PDA style if it detects that the user is on a non-standard browser. However I'm not sure how reliable that would be on all devices.

In this manner it's possible to create a totally stripped down layout and still have the control which templates give you (unlike a solution involving the print thread mechanism).

As far as creating the actual stylesheet and templates... I have my hands a bit full with upgrades on my own site at the moment but I might take that on at some time in the future if someone doesn't get to it first .

-Y

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Excellent idea!!!

I too will look into this one when I get the time...


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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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
WebGuy 2
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)