XTemplate to PHPTemplate conversion
Firstly rename the xtemplate.xtmpl file to original.xtmpl so that the theme is no longer a xtemplate theme.
- Creating page.tpl.php
- copy original.xtmpl to page.tpl.php
- Remove the node, comment, box, and block sections. In the place of these sections add the following code
<?php echo $content ?> - Change all the "{" characters to "<?php print $"
- Change all the "}" characters to "; ?>"
- Change the "$footer" to "$closure"
- Change "$message" to "$messages"
- As the primary and secondary links in phptemplate are arrays you will need to change them from "echo $primary_links;" to "echo theme('links', $primary_links);". Also the same needs to be done for secondary links.
- In the blocks section we need to change the $block to either $sidebar_left or $sidebar_right depending on which side of the content it is on.
- Creating node.tpl.php
- Copy the node section from the original.xtmpl to a new file node.tpl.php
- As before change all the "{" and "}" characters to "<?php print $" and "; ?>" respectively.
- change $link to $node_url.
- Change "$taxonomy" to "$terms"
- Change "print $sticky;" to "if ($sticky) { print " sticky"; }"
- Change "print $picture;" to "if ($picture) { print $picture; }"
- As both the page.tpl.php and node.tpl.php have the displaying of the title twice. To get around this you need to only display the header when $main = 1. You will need to add the following around the $title line. "<?php if ($main) { ?>...<?php } ?>"
- Creating comment.tpl.php
- Copy the comment section from the original.xtmpl to a new file comment.tpl.php
- As before change all the "{" and "}" characters to "<?php print $" and "; ?>" respectively.
- Change "print $picture;" to "if ($picture) { print $picture; }"
Also just to be clean, you may want to change the displaying of the new so it will only show when the $new != ''
- Create block.tpl.php
- Copy the block section from the original.xtmpl to a new file block.tpl.php
- As before change all the "{" and "}" characters to "<?php print $block->" and "; ?>" respectively.
- Then change the $block->title to $block->subject.
- Create box.tpl.php
- Copy the box section from the original.xtmpl to a new file box.tpl.php
- As before change all the "{" and "}" characters to "<?php print $" and "; ?>" respectively.

Teaser/main headers
To ensure that teaser headers are only displayed on the front page, and not twice on individual node pages, use:
<?php if ($page == 0): ?><h2><a href="/<?php print $node_url ?>"><?php print $title ?></a></h2>
<?php endif; ?>
in node.tpl.php
---
paul byrne
web monkey - http://www.leafish.co.uk/
Correction
Replace
<?php echo $comment ?>with<?php echo $content ?>at 'Creating page.tpl.php'Unclear instruction
I think this is what needs to be put in for the new to show only when comment is new:
<?php if ($comment->new) : ?><span class="new"> *<?php print $new ?></span><?php endif; ?>I had to go looking for it, so maybe this will save someone the trouble.
Wow. This is a fantastic handbook page.
Thanks so much for writing this - (and everyone's comments were very helpful as well!).
Update: After a little more time to go through my own templates and address a couple naggling things I realized a couple more tips that might help someone who wants to convert their template:
I'll preface by saying that one could just read the next paragraph I've written below and try and start from there, but it is probably a better idea to start with the steps outlined at the top of the page because it will familiarize you with the basics of what's going on - then afterwards do what is mentioned below in order to clean things a bit.
Unless you've made special modifications to your xtemplate you can probably get away with just copying over comment.tpl.php, box.tpl.php, block.tpl.php, and node.tpl.php from a recent phptemplate version of Blue Marine. And then go through page.tpl.php and see what matches what and copy and paste appropriately from each other.
=====
Drupal hosting