Smarty and WP, again

Last week I revived my interest in integrating WordPress and Smarty again. I tested the latest release and I’m very impressed by the wealth of options and configurability! I want to use it myself!
To that end I need to get Smarty in there. I wrote a script that fetches a list of functions from the files in wp-includes and outputs a list of Smarty instructions to mirror the current WordPress Template Tags. That’ll make it easy to mirror the tags as they develop.

Kae Verens is doing sterling work finding out what’s working or not!

I think I’m at the stage where Smarty templates are working reasonably ok, but if caching is enabled it falls down because updates to the site need to inform Smarty. That’s relatively easy to do of course!
Next on the list is multi-blog support and that’ll be tricky. It’ll probably be some combination of the Permalink structures already in WP, and prepending the site ID to the URL somewhere. I’m looking at template-functions-links.php – Maybe in the get_settings( 'home' ) bit I can add the wpblog variable. *ponder*
Later… I want to get support for multi-blogs into my hack too before I release anything. Here’s a related post about that. I should have something for people to try next week!

Author: Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

6 thoughts on “Smarty and WP, again”

  1. I’ve found your 5/1/04 post with the download link, but I was wondering if this one is compatible with the WordPress 1.2. What is the current status of the integration ?


  2. Current state? Smarty works, the tarball is slightly out of date however as stuff like the_category changed. I also disabled caching completely as the backend editor needs to know about clearing the cache before it’ll work properly.
    I have it running on my machine at home and it seems to work fine. I want to get multi-blog stuff working in it first before I release anything though.
    I’m very excited about getting WordPress on and I want this out of the door ASAP!

Leave a Reply