TubePress 1.8.7 will include a major overhaul of the templating system that could affect current users of TubePress, especially those with existing template modifications. Because of the disruption, I feel it’s important to post an entry here outlining the upcoming changes and why they were made.

Prior to now, TubePress has used HTML_Template_IT from the PEAR project for its templates. While this has been an adequate way to separate business logic from presentation, it has suffered from the following weaknesses:

  • Requires TubePress users to learn yet-another template syntax just to modify the look of their galleries
  • Clunky “parse” concept to handle looping over collections of elements
  • No strong tie between variable names in the templates to variable names in the underlying code
  • Overhead that’s inherent in any PEAR library (error handling, etc)
  • Too many template files to modify (not really the libraries fault)
  • Package is no longer maintained

In TubePress 1.8.7, I have completely ditched HTML_Template_IT and instead chosen to use an extremely lightweight template system that uses plain PHP/HTML. This new system overcomes all of the weaknesses listed above, and I think you’ll find it quite easy to use and blazingly fast.

One other change to note is the semantic structure of the HTML that TubePress produces for its galleries. TubePress will now produce clean, semantically correct HTML to describe the structure of the gallery. Specifically, galleries will now take advantage of the HTML dl/dt/dd elements. All styling of this gallery is done via ui/gallery/css/tubepress.css, and a few extra classes have been added to each gallery element to allow for easy customization.

If you haven’t really modified TubePress’s templates or CSS in the past, you won’t even notice a change in this release. But for those of you who have modified your installation, you’ll need to make a one-time effort to get your styling to work with this new system.

I’m not a fan of making such disruptive changes, but the time to pay down some technical debt is here. And for the long-term health of TubePress’s code base, this is absolutely necessary. I hope you’ll agree that these template changes will provide you with greater freedom and ease in modifying TubePress to suit your site.

TubePress 1.8.7 should be out in the next few days, after I get a chance to complete testing and update the documentation. Please provide any feedback in the forum, and thanks for using TubePress.