Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Smarty 3.0: initial discussion
Goto page Previous  1, 2, 3 ... 9, 10, 11, 12  Next
 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
deixu
Smarty Rookie


Joined: 27 Jun 2003
Posts: 9
Location: Wolfsburg, Germany

PostPosted: Thu May 31, 2007 7:38 am    Post subject: Reply with quote

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
View user's profile Send private message
brettz9
Smarty Regular


Joined: 07 Jul 2006
Posts: 93

PostPosted: Fri Jul 06, 2007 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
vain
Smarty Rookie


Joined: 20 May 2006
Posts: 23
Location: Berlin / Germany

PostPosted: Mon Jul 16, 2007 4:51 pm    Post subject: Reply with quote

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?
_________________
http://clansuite.com - just an eSport CMS. Based on PHP 5, Doctrine 2, Smarty 3, Ajax. - Easy, comfortable, fast, flexible.
Back to top
View user's profile Send private message Visit poster's website
Shadzik
Smarty Rookie


Joined: 01 Aug 2007
Posts: 5

PostPosted: Thu Aug 30, 2007 7:27 am    Post subject: Reply with quote

Yes, something diffrent ? Maybe smarty 3 will be php plugin/module writed in C and compiled as .so/.dll
Twisted Evil

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
View user's profile Send private message
Spuerhund
Smarty Rookie


Joined: 20 Jan 2005
Posts: 16

PostPosted: Mon Sep 03, 2007 8:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
deixu
Smarty Rookie


Joined: 27 Jun 2003
Posts: 9
Location: Wolfsburg, Germany

PostPosted: Fri Sep 28, 2007 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 537

PostPosted: Mon Jan 21, 2008 3:38 am    Post subject: for loop Reply with quote

please don't make it too bloated.

I like the fact that it starts simple and you can build whatever you want.

I don't want another CMS/Framework/Whatever.


But, I think a for loop as mentioned here:

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=12594&start=0&postdays=0&postorder=asc&highlight=

would be great.
Back to top
View user's profile Send private message
Nyna
Smarty Rookie


Joined: 13 Aug 2006
Posts: 8
Location: Somerset, UK

PostPosted: Sat Feb 23, 2008 4:19 pm    Post subject: Reply with quote

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 Very Happy
_________________
Love to all
Nyna - xxx
Back to top
View user's profile Send private message Visit poster's website
SGBoise
Smarty Rookie


Joined: 28 Mar 2008
Posts: 27
Location: GamePacks.org

PostPosted: Fri Apr 04, 2008 10:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 537

PostPosted: Fri Aug 08, 2008 3:42 am    Post subject: Reply with quote

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
View user's profile Send private message
gtraxx
Smarty Regular


Joined: 08 Jan 2008
Posts: 54

PostPosted: Mon Aug 11, 2008 11:25 pm    Post subject: Reply with quote

Good evening, is scheduled when the next exit?
The version 3 is it close?
Back to top
View user's profile Send private message
x!sign.dll
Smarty n00b


Joined: 31 Aug 2008
Posts: 3

PostPosted: Sun Aug 31, 2008 4:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
x!sign.dll
Smarty n00b


Joined: 31 Aug 2008
Posts: 3

PostPosted: Mon Sep 01, 2008 4:07 pm    Post subject: Reply with quote

alright i get your point. maybe php6 has some performance increases that are worth to port Smile thx for the reply
Back to top
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 259

PostPosted: Tue Sep 02, 2008 6:06 am    Post subject: Reply with quote

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 Wink

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
View user's profile Send private message
marcello.duarte
Smarty n00b


Joined: 02 Sep 2008
Posts: 1

PostPosted: Tue Sep 02, 2008 10:18 am    Post subject: Is this happening? Reply with quote

Is there any roadmap/milestones for this project yet?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Goto page Previous  1, 2, 3 ... 9, 10, 11, 12  Next
Page 10 of 12

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP