Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Template engine for Vanilla
What do you guys think of a template engine for vanilla. There are generic engines like smarty and specific ones like phptemplate of drupal.
Since all the functions are already written it wouldn't be hard to wrap around a template engine.
It will make things real easy for new users. Personally i love phptemplate engine of drupal. its simple and very fast.
0
This discussion has been closed.
Comments
I'll upload it tomorrow and I'll start working on the other files
It's based on MiniTemplator
Several thoughts:
If this is done, I would want it to be a optional theme.
The theme directory:
As you can see, all HTML is stripped from the php file:
The HTML template is easy to understand and nice and clean:
Even the HTML output once it's parsed looks nice and structured:
Ofcourse, the templating system is easier to change, but it will slow your vanilla a bit down as it uses replace-technology which ofcourse is slower than a normal echo
As a developer and designer (i.e. equally comfortable with PHP and HTML) I still prefer templating to echos. The reason is that the code is far more maintainable and readable, especially when dealing with more complicated theming and /or integrating with existing sites. If the PHP and HTML are nicely separated into their files, your text editor/IE can properly syntax highlight both, you don't have to worry about whether you forgot the single quote at the end of the HTML string, etc.
All in all, it's a number of little things that add up to making the theming process a much more (or less) enjoyable experience.
<?php print $commentform; ?>
and boom it spits out a comment form
I don't think we realy need a template engine, it's fine, like it is with vanilla!
But I have a very different problem, which maybee can be solved by using an template engine: I've tried to move some parts of a vanilla page around, but got to difficults, because some things are'n defined in all desing-files of vanilla. You can't move the tabs out of the header in an easy way. I had to write a extension for setting some conf-vars for changing the order of some vanilla parts, to remove and add css files and so on...
Perhabs that can be done in a more easy way? Perhabs with a template engine?
Bye
Tiggr
<div id="header"> <vanilla:navtabs sort="alpha"/> </div>
What's about it, jazzman, anything around, I can test/use in my forum?
I realy would love to replace my old form (http://www.larp-welt.de/cgi-bin/sporum/index.cgi) with a vanilla based one. Having a template based theming engine would be very nice for it!
Bye
Tiggr
PS: Of course, I would also change the old and ugly style to a new one! ;-)