Converting Drupal 5.x Theme Foliage to 6.x
I really like Web 2.0 and particularly Drupal and WordPress. There’s so much functionality gained so quickly, fantastic upgradeability, reliability, and a great support community. Recently I converted my friend David’s Drupal 5.1 theme Foliage to Drupal 6.9. It’s really a painless (after you’ve done it) 3 step process that I’d like to share. Here’s how I did it.
References:
The original instructions from Drupal.org
Cutting to the important parts. Thanks Wesley Tanaka, this post was very helpful.
Files:
Unchanged files: block.tpl.php, box.tpl.php, node.tpl.php, and all the rest of the theme
Changed files: comment.tpl.php, page.tpl.php
Added files: foliage.info
Steps:
Step 1: Create foliage.info, add the following 4 lines “as is”. Note that you must use “6.x”. It won’t work if you put “6.9″.
; $Id: Foliage-850.info, 2009/01/28 goba Exp $name = Foliage 850px
description = Foliage 850px wide.
core = 6.x
engine = phptemplate
Step 2: Change comment.tpl.php
Change line 7 from: <div class=”content”><?php print $content; ?></div>
to:
<div class=”content”>
<?php print $content ?>
<?php if ($signature): ?>
<div class=”user-signature clear-block”>
<?php print $signature ?>
</div>
<?php endif; ?>
</div>
(Sorry the tabbing isn’t rendering well. The code is here.)
Step 3: Change page.tpl.php
Line 38: “$sidebar_left” to “$left”
Line 53: “$sidebar_right” to “$right”
Line 62: “$footer_message” to “$footer”
Line 2: “$language” to “$language->language”, do this twice
FTP the foliage theme file to your Drupal site’s theme folder, and select it. You’re done.
Also posted to the Drupal Foliage forum.
January 31st, 2009 at 13:35
Don, thanks for fixing my theme. It relieves me of the concern of my web site becoming outdated … and at the same time puts another technical item on my to-do list: upgrade Drupal!
People sometimes wonder why my blog is 6 months behind. It’s because I’m tinkering behind the curtain.