scriptygoddess

14 Oct, 2002

PDA Page for MT

Posted by: promoguy In: How to's

A PDA Page is a stripped down, no graphics version of your MovableType blog (for
example, here is my pda version).
The purpose is to allow mobile web devices such as PDAs (PalmPilot, PocketPC,
Visor) and cell phones to view your Blog without having to download all of the
images, blogrolls, and link lists that may be on your front page. It also
enables programs such as "AvantGo,"
"Plucker" and "Mazingo"
to download small versions of your page for offline viewing.

By the way, images posted in your blog entries will still show up on the pda
page, but I bet we can get a ScriptyGoddess to come up with a way around that
(hint, hint).

For users of GreyMatter, I have a tutorial on how to create a PDA page in
GM located here on my site. I
hope to republish it here very soon.

This tutorial is based on code that
Christine
shared with me many months ago. I modified hers a little, and you
should feel free to modify this code as well.

1. Go to the Templates area of MT and click "Create new index
template." Give the page a name, I chose "PDA page." Then come up with a name
for the output file. I chose the very creative name "pda.php." You can also use
.htm, or .html if you wish. It just depends on your preference and server.

2. Be sure the checkbox "Rebuild this template automatically when
rebuilding index templates" is checked.

3. Leave "Link this template to a file:" empty

4. In the "Template Body" box, enter your template code. You can simply
copy and paste this into the box if you wish. But, be sure to look through the
code for comments on areas you may want to customize.

Sample Template:

<html>
<head>
<META NAME="HandheldFriendly" content="True">
<TITLE><$MTBlogName$> – Mobile News Page</TITLE>

<!– You can use your own CSS code in place of that below if you wish –>
<style type="text/css">
<!–

body {
color:#333;
background-color:white;
margin:20px;
padding:0px;
font:11px Verdana, Tahoma, Arial;
leftMargin=0
}
h1 {
font:bold 12px/12px Verdana, Tahoma, Arial;
margin:0px 0px 0px 0px;
padding:0px;
}
p {
font:11px Verdana, Tahoma, Arial;
color:#333333;
margin:0px 0px 0px 0px;
padding:0px;
}
.Content>p {margin:0px;}
.Content>p+p {text-indent:0px;}

.author {
font:9px Verdana, Tahoma, Arial;
}

a {
color:#000000;
font-family: Verdana, Tahoma, Arial;
text-decoration:none;
}

A:link {
color: Navy;
TEXT-DECORATION: none;
font-weight : bold;
}
A:visited {
color: #9400D3;
TEXT-DECORATION: none
}
A:active { TEXT-DECORATION: none }
A:hover {
FONT-WEIGHT: normal; FONT-STYLE: normal
BACKGROUND: #eee;
}

.tagline {
font:8px Verdana, Tahoma, Arial;
}
#Header {
margin:30px 0px 10px 0px;
padding:17px 0px 0px 20px;
height:50px;
border-style:solid;
border-color: #A9A9A9 #A9A9A9;
border-width:1px 0px;
line-height:11px;
background-color: #5F9EA0;
voice-family: "\"}\"";
voice-family:inherit;
height:14px; /* the correct height */
}
body>#Header {height:14px;}

.blogdate {
font-family: Verdana, Arial, sans-serif;
background: #5F9EA0;
font-size:12pt;
font-weight:bold;

}
#blogcomments{
font-family: Verdana, Arial, Helvetica, Georgia, Geneva;
font-size: 8pt;
color: Black;
text-align : left;
background : #D3D3D3;
font-weight : normal;
}
div.blogbody {
font-family: Verdana, Arial, Helvetica, Georgia, Geneva;
font-size: 8pt;
color: #000000;
background: #FFFFE0;
text-align : left;
font-weight : normal;
}
.blogsubject {
font-family: Verdana, Arial, Helvetica, Georgia, Geneva;
font-size: 12pt;
color: Green;
text-align : left;
font-weight : bold;
display : inline-block;
background : #FFFFE0;
}

/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.

Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
declaration. The incorrect IE5/Win value is above, while the correct value is

below. See http://glish.com/css/hacks.asp for details. */
voice-family: "\"}\"";
voice-family:inherit;
height:14px; /* the correct height */
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds
correct
length values to user agents that exhibit the parsing error exploited above yet
get
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS
include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#Header {height:14px;}

–>
</style>

</HEAD>

<BODY>

<DIV id=Header><$MTBlogName$></DIV>

<div align="left">
<!– Change the number below to reflect how many entries you want to display.
But don't put too many, or the PDA page will get too large, especially if you
get a lot of comments. –!>

<MTEntries lastn="15">

<div class="blogdate">
<MTDateHeader>
<$MTEntryDate format="%A, %B %e, %Y"$>
</MTDateHeader>
</div>
<DIV class="blogbody">
<font class="blogsubject"><i><$MTEntryTitle$></i> (<$MTEntryDate format="%I:%M
%p"$>)<br /></font>
<br>
<$MTEntryBody$>
<MTEntryIfExtended>
<p><$MTEntryMore$></p>
</MTEntryIfExtended>

<!– You may wish to remove the Comments section below. If you get a lot of
comments, it could make the PDA page very large. –>

<MTEntryIfAllowComments>
<p><b>Comments (if any):</b></p>
</div>
<div id = "blogcomments">
<br>
<MTComments>
<$MTCommentBody$>
<span class="author">-Posted by <$MTCommentAuthorLink$> <$MTCommentDate$></span><br
/><br />
</MTComments>
</MTEntryIfAllowComments>
</div>

</MTEntries>
</div>

<HR width="75%">

<p class ="tagline" align="center">
Created with Snazz by <a href="http://www.promoguy.net/">PromoGuy.net</a>, <a
href="http://www.scriptygoddess.com">ScriptyGoddess.com</a> and <a href="http://www.movabletype.org">MovableType</a></P>

</body>
</html>

5. Save the template.

6. Rebuild the template.

7. Go to your web site and view the results.

8. Tweak until satisifed.

9. Post a link to it on your main web site!

There, wasn't that easy?
 

30 Responses to "PDA Page for MT"

1 | photomatt

October 14th, 2002 at 12:42 pm

Avatar

I wouldn't include CSS at all. Only one browser on the PalmOS supports CSS, no cell phones I know of do. Pocked IE might but I'm not familar with it. Same thing with fonts. Colors on the other hand usually work, but again support isn't consistent.

On the PalmOS you should be fine with pictures, as the main two browsers, AvantGo and Blazer, both preprocess pictures so you only download what your device can support in terms of resolution, size, and colors.

The CSS-M spec looks promising, but right now most of the handheld browsers support a mess of proprietary tags, in fact the entire scene is a lot like desktop browsers circa 4-5 years ago.

Actually the good news is if you stick to semantically meaningful markup and keep your CSS in a separate file, most handheld browsers should handle it fine. For example DiveIntoMark.org looks great on my Sony Clié, because there are no tables and the content still makes sense even when completely unstyled.

2 | Christine

October 14th, 2002 at 10:58 pm

Avatar

The original file was done with CSS because I took my most basic design and stripped it down even more for the sake of AvantGo. I was a rookie to CSS (and for the most part, I still am – generally it scares me) and so it was a fast and easy solution when I had a need and an afternoon to work on it. However, you are right that there could be better solutions, and I would personally love some help on cleaning up the code.

3 | Jason

October 15th, 2002 at 8:37 am

Avatar

Rather than a separate template and page, I recommend using media-specific style sheets. Check out http://www.w3.org/TR/REC-CSS2/media.html and http://www.alistapart.com/stories/goingtoprint/

I haven't done anything specifically for handhelds yet, but what I've already done for print makes my web site show up pretty well in AvantGo

4 | photomatt

October 17th, 2002 at 5:20 am

Avatar

Media-specific stylesheets would be great, but the support is terrible. The 'small' browser makers don't seem concerned with supporting standards like this.

Christine, I would be happy to look at your code and pages in the handheld browsers I have and maybe make some suggestions. Though I'm not sure if all of them support cookies…

5 | Jen

October 22nd, 2002 at 1:46 pm

Avatar

I don't know if this will work on all browsers, and of coure if the pda browser doesn't support stylesheets, this won't help either, but to supress images, add this to the pda-specific style sheet:

img { display: none; }

it does NOT display the alt text.

Hope that helps someone!

6 | Jen

October 22nd, 2002 at 1:47 pm

Avatar

I don't know if this will work on all browsers, and of coure if the pda browser doesn't support stylesheets, this won't help either, but to supress images, add this to the pda-specific style sheet:

img { display: none; }

it does NOT display the alt text.

Hope that helps someone!

7 | Jason

February 12th, 2003 at 1:54 pm

Avatar

For a while now, I've been wanting to put together an AvantGo channel for my weblogs. I didn't want to use regular MT templates because the generated files take up too much space. I wanted something more dynamic. The answer is PHP scripts that access the MySQL database directly.

You can download the source here.

To use the scripts you have to unpack them into their own directory. (I use /log/avantgo) In db.inc you need to set the following variables:

// These are the DBMS credentials and the database name
$hostName = "mysqldb";
$databaseName = "database";
$username = "username";
$password = "********";

To display a preview of my AvantGo channel point your browser at

http://www.trommetter.org/log/avantgo/index.php?blog_id=4

Notice the "?blog_id=4" on the end of the URL. This is used if you run more than one blog off the same MT installation. If you don't provide that parameter, it defaults to 1.

Please take a look at the code and tell me what you think.

8 | Joe

May 25th, 2004 at 10:47 am

Avatar

There's a small bug in the above code:

The comment about changing the number of items is terminated incorrectly — losing the blog entry.

Change this:

if you get a lot of comments. –!>

to this:

if you get a lot of comments. –>

Note that I have removed the exclamation point.

9 | Emmanuel's Professional Blog

November 27th, 2002 at 12:34 am

Avatar

Page for Mobile Devices
Through an update notification from WebMon and related entry link, I found page for mobile devices. This is probably a

10 | Dale Pike

January 20th, 2003 at 3:39 pm

Avatar

How to's: PDA Page for MT
Source: scriptygoddess A PDA Page is a stripped down, no graphics version of your MovableType blog…The purpose is to allow

11 | Electric Venom

April 12th, 2003 at 6:56 am

Avatar

That Was Fun
Well, as mentioned, I've been tinkering around the Snakepit. It keeps me amused. Truth is, it was quite fun but a lot more work than I expected. I installed a rotating title bar, an idea that I picked up from Joni Electric, who always has the most cool…

12 | kcgeek

May 6th, 2003 at 9:27 am

Avatar

New Mobile Version
We're proud to announce a simple mobile index of kcgeek, suitable for viewing on your mobile phone, PDA, or monocular targeting reticule. Thanks to Jessy for the suggestion, and to Scriptygoddess for the template….

13 | shorebound

May 21st, 2003 at 7:02 pm

Avatar

PDA version
I have been able to build a PDA version of my site with the help of this tutorial. The images are still downloading, but I can't figure out how to leave them out. My PDA handles pictures nicely, however, I'm…

14 | CoffeeMom.com

May 24th, 2003 at 6:29 pm

Avatar

I am now mobile
Thanks to a comment posted here by Julie asking if I had a PDA version, I am now mobile. You can take me anywhere! I used the tutorial at Scriptygoddess (link found at Julie's) and easily set it up. Of

15 | anything but ordinary

May 26th, 2003 at 6:14 pm

Avatar

Sarcasm To Go!
Have you ever meant to do something with your blog, to make it easier or more accessible for someone, but you never got around to it? I've had "Make a PDA page" on my Blog To Do list forever. I…

16 | Zlinks

May 26th, 2003 at 11:05 pm

Avatar

PDA Version
Making a PDA Version…

17 | anything but ordinary

May 30th, 2003 at 3:59 pm

Avatar

Making A PDA Friendly Blog
If you're interested in making a PDA Friendly Blog, there are several options available to you. Basically all I did was take my main index and cut out everything extraneous (side bar, graphics, etc.). Then I made a smaller banner…

18 | Ks Weblog

June 22nd, 2003 at 9:48 pm

Avatar

MT PDA Page
How to make a PDA-Friendly Blog page. scriptygoddess…

19 | Just Some Poor Schmuck

June 23rd, 2003 at 5:33 am

Avatar

PDA Script For MT
A couple of days ago I had a post about PDA's. I was wondering if there was some script that might do it automatically. I now know there is. Thanks to Amy for the link to Scriptygoddess, who has a…

20 | Just Some Poor Schmuck

June 23rd, 2003 at 5:36 am

Avatar

PDA Script For MT
Yesterday I had a post about PDA's. I was wondering if there was some script that might do it automatically. I now know there is. Thanks to Amy for the link to Scriptygoddess, who has a post on PDA script…

21 | jewdez

June 24th, 2003 at 5:08 pm

Avatar

Jewdez goes PDA?
With the help of Geekgrrl, Neurotic Fishbowl, and Scripty Goddess you can now get Jewdez.com on your PDA. Graphics free…

22 | Fembat.Net [Journal]

July 15th, 2003 at 6:26 pm

Avatar

Its PDA Friendly darling
This week's method of avoiding work was to create a PDA friendly version of the index page. I cheated and…

23 | Dreaming Witch

July 19th, 2003 at 10:05 am

Avatar

pda friendly from promoguy
well, I did it. you know how I've been trying to set up the site, so that I can use my cell (smart) phone, to post to my blog, and to browse the web, since I'm going to be gone

24 | rap @ geek dot com

September 11th, 2003 at 8:20 pm

Avatar

Mobile Version Online…
Thanks to JASON, I have found this page and have implemented a Mobile-Friendly version of my site. I will, soon, change the color scheme, as it is the default CSS copied from the contributor's site, and I don't think it's…

25 | PromoGuy dot Net

September 26th, 2003 at 12:37 am

Avatar

Plucked
This is a rather Uber-Geeky post, so don't feel ya have to read it. I found a neat way to read RSS feeds on a Pocket PC *without* being connected to the Net. I was very jealous of SeaDoc and his ability to read RSS on the Pocket PC (via Pocket Feed). B…

26 | RandyRants.com

September 28th, 2003 at 12:08 am

Avatar

Pocket SharpMT – 2.0 Beta 1
Pocket SharpMT

27 | Silent Lucidity

January 28th, 2004 at 9:55 am

Avatar

Getting PDA-Friendly
Thanks to a tutorial I read tonight at ScriptyGoddess.com, I've now got a PDA-Friendly version of this blog. The link to it is in the sidebar and also right here: Enjoy!…

28 | cut on the bias

May 24th, 2004 at 6:15 pm

Avatar

Idiots. Scum. Low-rent opportunists.
My Internet connection has been dicey all day, I'd get on for 2-3 minutes and it would go away. I…

29 | cut on the bias

May 24th, 2004 at 6:33 pm

Avatar

Idiots. Scum. Low-rent opportunists.
My Internet connection has been dicey all day, I'd get on for 2-3 minutes and it would go away. I…

30 | triticale - the wheat / rye guy

December 23rd, 2004 at 10:33 pm

Avatar

Peedy, Eh?
Inspired by the twentysome hits a month I get which were referred from PDA pages, I've added a PDA page of my own. All it took was copying a script from the Scriptygoddess. It looks like it works okay when…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements