Not signed in (Sign In)
 
Aug 26th 2007 edited
 
I remember non php developer folks asking for theme files easier to modified. Some asked for something like Smarty.

I don't really like the idea of a template system for Vanilla, but what about taking off the 'echo's and going in and out of php?

So that for example people_foot.php:
<?php
// Note: This file is included from the library/People/People.Control.PeopleFoot.php class.

echo '</div>
<div class="Foot'.$this->CssClass.'">
<a href="http://lussumo.com">Lussumo Vanilla, Swell, and People</a> Copyright &copy; 2001-2006</div>';
?>
would look like:
<?php // Note: This file is included from the library/People/People.Control.PeopleFoot.php class. ?>

</div>
<div class="Foot<?php echo $this->CssClass; ?>">
<a href="http://lussumo.com">Lussumo Vanilla, Swell, and People</a> Copyright &copy; 2001-2006
</div>
 
Aug 27th 2007
 
How would that impact the speed?

Also, in some of those files there is so much back and forth in and out of the parser, it would still look confusing as all hell.

I also agree that adding smarty to Vanilla 1 at this point is not the best idea. I'm looking into a better way to handle this for V2.
 
Aug 29th 2007
 
I will do some test.
 
Aug 29th 2007 edited
 
For Vanilla 2, here is an article from Ed Eliot on using extract() for a template system. CodeIgniter. is using something like that. CodeIgniter also have a feature to make possible the use of '<?=' even if it's turn off in in your php settings.

I like also Zend Framework Template. In the controller, it look like $view->a = 'Some content';
$view->b = 'More content';
and in the template file<p> <?php echo $this->a; ?></p>
<p><?php echo $this->b;?><p>
. It's using magical handlers __get() and __set() to isolate its private variables from the template variables.
 
Sep 7th 2007 edited
 
I tried it on the setting global form without performance issue (on windows vista, php5.2.3).
I will create a theme and make more test (on different platforms).

Issue information

  • 6
  • Dinoboff

    Dinoboff

    Bug Tracker

  • On Hold
  • Low
  • Feature

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.