I have just finished relaunching Oasismag.com on a drupal 4.4.0 stable release, and my PHPTemplate theme.. The site is 100% table layout free, and completely configurable thanks to the template engine (or lack there of).

An example would be mobile.oasismag.com which is my own site content, displayed using the new mobile template. The mobile template utilizes pull methodology to only retrieve the user login/navigation block, and ignore the rest of the blocks. It essentially akes the text as accessible as possible, for easy reading on handheld devices (plus the file is smaller).

The new version of phptemplate is in progress , and should be released with in the next few weeks. It offers the ability to override template settings from within code (most importanly the config file). The mobile.oasismag.com was set up with 4 lines in oasismag.conf.php

if ($_SERVER['HTTP_HOST'] == 'mobile.oasismag.com') {
   $base_url = 'http://mobile.oasismag.com';
   $GLOBALS["phptemplate_settings"]["template"] = 'mobile';

}

Updated on Oct 15 2004: fixed 2 bugs in above code (Moshe)

Comments

Dublin Drupaller’s picture

Got a screen full of error messages when I tried to look at your site today..

Just thought Id mention it and can you email me at jay@m3m.eu.com when you have it up and running. Sounds interesting.

Cheers

J

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

adrian’s picture

online, well spotted.. the database wasn't running

  Sanity is a sandbox in the playground of my mind.
     I'm going to go play on the swings now.
grohk’s picture

This is now changed for Drupal 4.5.0 and the new phptemplate.

if ($_SERVER['HTTP_HOST'] == 'mobile.code0range.net') {
   // $base_url = 'http://mobile.code0range.net';
  $GLOBALS['custom_theme'] = 'mobile';
}

---
Code Orange: Drink Your Juice

deskpops’s picture

Hi,

This is very cool, but I can't seem to make it work. Do I add this to the conf.php file in the "includes" directory? Where do I add it? It gives me errors when I try.

Thanks,
Jeff
---
Bloggator
http://www.bloggator.com