Categories
iOS development iPhone Web Design Web development

WPtouch is an awesome way to get your blog on the iPhone

Since I’ve been studying how to optimize web pages for the iPhone, I decided to quit procrastinating and finally install WPTouch, a WordPress plug-in that generates a very iPhone-friendly version of your WordPress Site.IMG_0108

WPTouch provides some very elegant UI attributes, including a search panel that slides in, Google Adwords for Mobile support, and the whole presentation is very configurable. Also, you have a switch that will let you go to and from the standard browser layout, so you aren’t stuck with the theme. WP Touch is considered a theme, but is installed as a WordPress plug-in, since it has to inject some code into your pages in order to do the theme-swapping.

Mike-icon-snapshot
Obey the foot. See how happy it will make him?

So, you may be asking, “how do you get one of those neat-o icons that you can put on your iPhone home screen to jump directly to the web site?”
This blog post has a great tutorial of how to set up your icon app if you are using the plug-in. Normally in a static web site, you just create a 57×57 pixel PNG file and name it icon.png, and link to it in your HTML header:


Oddly enough, the apple-touch-icon link is not part of standard wordpress themes in general. I guess that’s not so weird considering the themes are designed for desktop rather than mobile, but it is annoying that the iPhone plug-in can do this but the standard view of the site can’t be saved with your custom icon to the iPhone home page.

I’m looking forward to seeing how this mobile page looks on other devices, apparently the user agent sniffing done by the plug-in can also supply the page for Blackberry, Android, and others.

Categories
iOS development iPhone Mobile News Web Design Web development

iPhone Web Apps versus Native Apps

Elisabeth Ronson from O’Reilly just started a new webinar class today through creativetechs.com, called “Learn to Build iPhone Web Apps.

It’s not too late to sign up, it’s a 2 hour webinar every Tuesday at 11am PST. Viewing the webinar is free, and the course videos can be purchased at a nice price if you are enrolled now. Find more info here. The first class was today, but that was more an overview, so you could easily jump in on the next session.

One thing that Elisabeth touched on that I think needs more amplification is the question “When should I consider a Web App, and when must I build my App natively?” It turns out that for many types of informational apps, a Web App makes a whole lot of sense, and few people realize just how powerful the iPhone browser is.   So many people who want iPhone apps for their businesses or services could actually get by very nicely with a well-written Web App, it’s just that there isn’t much awareness of that option, and there aren’t a lot of designers who are savvy about Safari’s Webkit/HTML5 features.

You *can* build a web app that:

  • Has a tab bar interface to separate sections of the app.
  • Can play video.
  • Can use the accelerometer.
  • Can accept simple gestures, like a swipe.
  • Can animate UI display and interaction (acceleration, crossfades, etc.)

You *must* build a native app if your app:

  • Needs to be able to run standalone without a data connection.
  • Uses the iPhone camera for stills or video.
  • Is intended to be sold on the App Store, and/or has additional content you want to offer through the App Store.
  • Requires more sophisticated animation than WebKit provides, or uses OpenGL.
  • Has complex gesture interactions.

If your app can be done as a web app instead of a native app, you get some immediate benefits:

  • You don’t need an Apple developer’s account to develop your app.
  • You don’t have to go through the app store approval process to publish your app.
  • You don’t have to go through the app store approval process to update your app.
  • Apple is not going to stop offering your app.
  • You have a very wide range of CSS/HTML tools to choose from to do your development, and a large base of people who know CSS.
  • You can push changes to your content, pages, etc. in real time.
  • May also run on other WebKit mobile devices.  Note that Palm, Android, certain Nokia phones, and certain Blackberries all have Webkit browsers.

More on this subject as the class goes on.

Categories
Web Design Web development

Theming WordPress plug-in content

I have to say that I really like the delicious plugin (del.icio.us for WordPress, by Ricardo Gonzalez), but it didn’t quite look right in the Constructor theme that I am using. The heading didn’t match the rest of the theme headings, and there was text following the link names specifying when the link was posted, but it was indistinguishable, i.e. same style.

(Delicious.com, or del.icio.us,  is a social bookmark site, you can save bookmarks to the cloud and share them with your friends.  You tag the links, they’re searchable, your list of links is browsable, and the ability to access that cloud on your blog is a great little feature.)

Turns out when you look at the source code generated by the widget, it does have custom classes for these elements:

Delicious_title_link   -- the actual title used in the sidebar
Delicious-item    	--  the specific link list item
Delicious-link     -- the link itself
Delicious-timestamp  -- the time for the item (e.g. “36 mins ago”)

Fortunately, Constructor lets you add your own CSS rules to the theme in a separate CSS file that won’t be overwritten when you update the theme files. This is a great place for adding the rules you need.

So, I added the following to the css file, just to differentiate that time stamp with smaller italic text in a contrasting color, and to make the title link look like the other sidebar headings:

.delicious-timestamp {
font-size: smaller;
font-style: italic;
color: #2F608A
}

.delicious_title_link {
color: #2F608A;
}

Voila, now things match, and if I should build my own custom theme from scratch later, I can just lift these rules to accommodate that widget, or any other widgets with their own CSS classes.

Categories
Web Design

WordPress Theme Generator

I found an interactive page for generating wordpress themes at http://www.yvoschaap.com/wpthemegen/. It’s a very nice bit of Javascripting that lets you use your own logo image, control body size, sidebar location and size, choose a 2 sidebar or 1 sidebar layout, control the menu layout, and control all the colors. The result is a very lightweight wordpress theme with a minimum of images, though you certainly could further modify the CSS to add your own background graphics, etc..

Compared to my own interactive CSS manipulation scripts, this is an impressive bit of programming. The script not only generates the css styles, but also zips up a WordPress-complaint theme package that you can just drop into your wp-content folder. The theme is also Widget-aware and supports tags.

You can interactively pick the column layout, fonts, background images, and all the element colors.
You can interactively pick the column layout, fonts, background images, and all the element colors.