View previous topic :: View next topic |
Author |
Message |
deixu Smarty Rookie
Joined: 27 Jun 2003 Posts: 9 Location: Wolfsburg, Germany
|
Posted: Thu May 31, 2007 7:38 am Post subject: |
|
|
Thank you for contributing to the wiki, Dasher.
I had to do other things in the past months and forgot to check the wiki.
I'll enable editing for registered users only in the evening.
BTT:
A clean break will be fine and PHP5 only compatibility is a must. |
|
Back to top |
|
brettz9 Smarty Regular
Joined: 07 Jul 2006 Posts: 93
|
Posted: Fri Jul 06, 2007 6:45 pm Post subject: |
|
|
Hello all,
Glad to see the discussion is alive and well (or at least existing at some level).
I just added an idea for getting SmartyDoc/SmartyDocB functionality added (shuffling off template content into the head/body/external files (including site-wide ones)). It's so nice to be both messy and clean at the same time, and I think Smarty users can appreciate that well. It's not much of a stretch to add this facilitation of separation of styles/scripts/XSL/notes/etc. from the templates as the formatting/structure has already been separated from programming logic in Smarty.
Could I make a small request though even before 3.0 may come out?
How about just adding just a handful of lines of code to "_compile_custom_tag()" and "_compile_block_tag" to get the value of "$this->_current_file" to be sent within the compiled output?
This will allow our SmartyDocB plugin to avoid overriding these compiler functions (used to display the template origin of shuffled-away CSS, etc. content within the comments of the site-wide CSS, etc. file), and allow anyone else programming a Smarty extension class or the like to access the current template filename (I recall someone else suggesting at this site that that would be a good addition too).
You can see our basic implementation at http://smartydocb.svn.sourceforge.net/viewvc/smartydocb/Smarty_Compiler_wtplfileaccs.class.php?view=markup (just search for "Brett" as I added my name to facilitate finding the few lines of code I added/altered). As you can see I used 2 different approaches, but I think either could have been made to work for both.
However, instead of using new variable names, maybe adding it to the smarty variable would be ideal in case for some reason someone wanted to display the current template file name in their output without having to type it manually (and adding it to the smarty variable would also avoid adding another unencapsulated object variable).
In any case, it'd be very nice for our project, and I presume this wouldn't be too hard to decide upon.
thanks and best wishes,
Brett |
|
Back to top |
|
vain Smarty Rookie
Joined: 20 May 2006 Posts: 23 Location: Berlin / Germany
|
Posted: Mon Jul 16, 2007 4:51 pm Post subject: |
|
|
Hielke Hoeve wrote: | In my opinion the only way that Smarty3 can be more/better than the current Smarty is expanding onto different grounds. For example additional support for making a CMS, or language parsing modules (smarty/xml), but then Smarty wouldn't be a template engine anymore.
Currently it is a template engine and it's all good. But that doesn't mean it can't be improved or that a new path can be chosen. |
I share your opinion.
Maybe an extended Smarty wouldn't be a template engine anymore, but some kind of general "View" handling system for web-applications.
So it's not about refactoring of Smarty2.x under newer PHP-language conditions, but could be a redesign of the idea what Smarty gives to the user. The question on my mind is: Which role would/could Smarty3 play in object-oriented PHP Applications? How to make Smarty a natural fit for that? |
|
Back to top |
|
Shadzik Smarty Rookie
Joined: 01 Aug 2007 Posts: 5
|
Posted: Thu Aug 30, 2007 7:27 am Post subject: |
|
|
Yes, something diffrent ? Maybe smarty 3 will be php plugin/module writed in C and compiled as .so/.dll
and one question: is there anybody that is doing something or have a plan to do something with next major version of Smarty ? i know that there is that 'dummy' with wiki but there is some spam and i don't know if i can write there anything. |
|
Back to top |
|
Spuerhund Smarty Rookie
Joined: 20 Jan 2005 Posts: 16
|
Posted: Mon Sep 03, 2007 8:20 pm Post subject: |
|
|
As far as i can see it has not yet been requested here, so i will sugest it:
a great thing would be, if it was possible to save the content-type within a cached file. Something like: Code: | $smarty -> display($template, $cache_id, null, $content-type); |
And then Smarty should send this content-type as a header each time the file is read from the cache. Why is this good?
For example, if your usual templates are text/html or application/html+xml and you have another template for your ATOM feed, you need to send this "application/atom+xml" header every time before you display the cached file. For this some application logic has to run to determine if this header or another one is needed.
Why not store the correct header in the cache file itself and let Smarty read it out and send the header? So no other PHP code has to run to send correct headers. |
|
Back to top |
|
deixu Smarty Rookie
Joined: 27 Jun 2003 Posts: 9 Location: Wolfsburg, Germany
|
Posted: Fri Sep 28, 2007 7:25 am Post subject: |
|
|
I'll look for some other software for the "dummy"-wiki. The spam is removed from the wiki.
Woltlab has implemented an OO Template Engine with Smarty-Syntax into their Framework (WCF). It's not released separated from the WBB3 yet, but will be released under LGPL. |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
|
Back to top |
|
Nyna Smarty Rookie
Joined: 13 Aug 2006 Posts: 8 Location: Somerset, UK
|
Posted: Sat Feb 23, 2008 4:19 pm Post subject: |
|
|
With regards to the direction of Smarty, my own opinion is keep it small, keep it simple.
Whilst I may the advantage over a lot of people in-as-much as I run hosting with the latest PHP/MySQL etc installed wherever possible, I see no real benefits in rewriting Smarty with complete OO basis in mind. Give me native code any day of the week.
As for extending its current functionality, why? Being able to pass references to objects is handy, but outside of that I just write my own plugins where necessary.
Make it lean boys _________________ Love to all
Nyna - xxx |
|
Back to top |
|
SGBoise Smarty Rookie
Joined: 28 Mar 2008 Posts: 27 Location: GamePacks.org
|
Posted: Fri Apr 04, 2008 10:46 pm Post subject: |
|
|
I would love to manage a builtin multi language support. _________________ GamePacks.org - Products for the Arcade/Media Community
Video Script - The ultimate media site script
AutoVideoScript.com - Run your own youtube sharing site |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Fri Aug 08, 2008 3:42 am Post subject: |
|
|
make built in math do everything the math function can do.
at least allow it to use parenthesis
Last edited by douglassdavis on Tue Aug 12, 2008 10:10 pm; edited 1 time in total |
|
Back to top |
|
gtraxx Smarty Regular
Joined: 08 Jan 2008 Posts: 56
|
Posted: Mon Aug 11, 2008 11:25 pm Post subject: |
|
|
Good evening, is scheduled when the next exit?
The version 3 is it close? |
|
Back to top |
|
x!sign.dll Smarty n00b
Joined: 31 Aug 2008 Posts: 3 Location: https://www.xsigndll.com
|
Posted: Sun Aug 31, 2008 4:51 pm Post subject: |
|
|
So whats's up with version 3 ? The Thread has been started 3 years ago - is there any progress? Is it close? Would be nice to have some information
regards,
xsign |
|
Back to top |
|
x!sign.dll Smarty n00b
Joined: 31 Aug 2008 Posts: 3 Location: https://www.xsigndll.com
|
Posted: Mon Sep 01, 2008 4:07 pm Post subject: |
|
|
alright i get your point. maybe php6 has some performance increases that are worth to port thx for the reply |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
Posted: Tue Sep 02, 2008 6:06 am Post subject: |
|
|
mohrt wrote: | At this point, 3.0 would mostly be a code adjustment to take better advantage of PHP 5, but the feature list wouldn't be too much different than Smarty 2.x.
|
Maybe "Dwoo" could be Smarty 3
http://dwoo.org/
Quote: | Dwoo is a PHP5 Template Engine that was started in early 2008. The idea came from the fact that Smarty, a well known template engine, is getting older and older. It carries the weight of it's age, having old features that are inconsistent compared to newer ones, being written for PHP4 its Object Oriented aspect doesn't take advantage of PHP5's more advanced features in the area, etc. Hence Dwoo was born, hoping to provide a more up to date and stronger engine. So far it has proven to be faster than Smarty and it provides a compatibility layer to allow developers that have been using Smarty for years to switch their application over to Dwoo progressively |
|
|
Back to top |
|
marcello.duarte Smarty n00b
Joined: 02 Sep 2008 Posts: 1
|
Posted: Tue Sep 02, 2008 10:18 am Post subject: Is this happening? |
|
|
Is there any roadmap/milestones for this project yet? |
|
Back to top |
|
|