stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Smarty PHP template engine 2.6.5







Smarty PHP template engine 2.6.5

Smarty PHP template engine 2.6.5 09/13/2004 10:25 PM

The PHP compiling template engine.




This is a GrokNews Entry: (what is grok?)





Similar Items

Smarty PHP template engine 2.6.5

Grok Headline matches for Smarty PHP template engine 2.6.5

Smarty PHP template engine 2.6.0


Smarty PHP template engine 2.6.0 11/19/2003 08:05 PM
The PHP compiling template engine.

All About Smarty - The PHP Template
Engine


All About Smarty - The PHP Template
Engine
07/25/2002 01:32 AM
WebmasterBase Jul 25 2002 0:48AM ET

Smarty PHP template engine 2.6.3


Smarty PHP template engine 2.6.3 06/17/2004 12:15 AM
The PHP compiling template engine.

Smarty PHP template engine 2.2.0
released


Smarty PHP template engine 2.2.0
released
07/11/2002 03:28 PM
Smarty is a template engine for PHP. Many other template engines for PHP provide basic variable substitution and dynamic block functionality. Smarty takes a step further to be a "smart" template engine, adding features such as configuration files, template functions, and variable modifiers, and making all of this functionality as easy as possible to use for both programmers and template designers. Smarty also converts the templates into PHP scripts, eliminating the need to parse the templates on every invocation. This makes Smarty extremely scalable and managable for large application needs.

Introducing Smarty: A PHP Template
Engine


Introducing Smarty: A PHP Template
Engine
09/06/2002 03:35 AM
It is quite common for PHP developers to include other files in an effort to reuse code, however templates make that job easier and allow you to separate HMTL layout from code logic.

Introduction to Smarty - The PHP
Template Engine


Introduction to Smarty - The PHP
Template Engine
07/23/2002 09:41 PM
If you're a newcomer to template compilation, or Smarty, the PHP template engine, this article's a must-read! Chu Yeow explains all - from the ground-up.

Smarty PHP template engine 2.6.8
(Default branch)


Smarty PHP template engine 2.6.8
(Default branch)
03/23/2005 04:56 PM
Smarty is a template engine for PHP. Many other template engines for PHP provide basic variable substitution and dynamic block functionality. Smarty takes a step further to be a "smart" template engine, adding features such as configuration files, template functions, and variable modifiers, and making all of this functionality as easy as possible to use for both programmers and template designers. Smarty also converts the templates into PHP scripts, eliminating the need to parse the templates on every invocation. This makes Smarty extremely scalable and managable for large application needs.
Changes:
A vulnerability in the regex_replace modifier has been fixed that allowed PHP code to be executed from a template, even with template security enabled. If you are using template security features, it is highly recommended to upgrade, or at least replace the modifier plugin. A problem with the {strip}{/strip} tag (that was introduced in 2.6.7) has been fixed. Casting objects to arrays in the {foreach} "item" attribute has been addressed.

onlamp: Introducing Smarty: A PHP
Template Engine


onlamp: Introducing Smarty: A PHP
Template Engine
09/08/2002 11:50 AM
While that process is certainly valid and useful, most developers agree that the separation of business logic and layout logic makes the code a lot easier to understand and maintain. This is the reason behind templates, to separate business logic from layout.

Smarty is a somewhat new development in the PHP world, and it brings several new and unique features. One of these unique features is that Smarty 'compiles' the parsed templates into PHP scripts, and then reuses the compiled template when appropriate. Obviously, this brings a huge performance improvement over other template solutions, as the main PHP script doesn't need to parse and output the same template on every request.

"zeldman.nach"

[ GLSA 200503-35 ] Smarty: Template
vulnerability


[ GLSA 200503-35 ] Smarty: Template
vulnerability
03/30/2005 02:01 PM
Thierry Carrez (Mar 30 2005)

UPDATE: [ GLSA 200503-35 ] Smarty:
Template vulnerability


UPDATE: [ GLSA 200503-35 ] Smarty:
Template vulnerability
04/11/2005 11:17 AM
Posted by Thierry Carrez, Apr 10 2005

Thoughts on using DOM as a template
engine


Thoughts on using DOM as a template
engine
05/24/2004 06:54 PM
SitePoint, Australia - 2 hours ago ... Although latest versions of PHP's DOM extension provide solid HTML support, these days I've settled on the idea that an "event based" parser (SAX, XML Pull) is ...

EvaNet Template Engine


EvaNet Template Engine 06/20/2004 07:22 PM
CVS online

Dynamically Typed: Using DOM as Template
Engine?


Dynamically Typed: Using DOM as Template
Engine?
05/25/2004 08:15 AM
With PHP, there's always another new templating engine out there popping up each day, but Harry Fuecks might just have an alternative.

Xephyrus Java Simple Template Engine 3.1


Xephyrus Java Simple Template Engine 3.1 08/15/2004 05:59 AM
A token-replacement engine.

Alan Knowles' Blog: PHP as a Template
Engine?


Alan Knowles' Blog: PHP as a Template
Engine?
04/05/2005 09:18 AM
Over on his blog today, Alan Knowles asks one of the major issues in the PHP community - PHP as a template engine, or recipe for disaster?

Say it Ain't So, Smarty


Say it Ain't So, Smarty 06/07/2004 12:09 PM
Belmont Stakes turned out impressive results, despite the outcome.

Smarty has a Wiki


Smarty has a Wiki 07/15/2002 01:36 PM
This Wiki is provided to allow the Smarty community (in particular members of the smarty-general mailing list) somewhere to help contribute documentation to the Smarty project. This can include tips, howtos, addons, or answers to frequently asked questions. Useful content added to the Wiki can then be rolled in to the official Smarty documentation later on.

There has been some criticism that the Smarty documentation is more useful to experienced developers than to template designers and end users. This Wiki is here to help change that.

"tri" Smarty is a popular PHP template engine that allows you to separate your code and data. A Wiki is an amazing editing and HTML generation system.

"zeldman.54"

Smarty pants!


Smarty pants! 05/14/2004 01:26 PM
Where do you live, among a bastion of geeks, or sea of academia-phobes? US Census released the smartest cities, states, and counties with Seattle and Raleigh topping the cities. Also for those who are politically curious, of the top 15 states with Bachelor degrees 11 went to Gore, while 13 of the bottom 15 went to Bush.

Smarty-Light 2.2.1


Smarty-Light 2.2.1 08/04/2004 11:15 AM
A fast template engine for PHP.

Smarty Quotes


Smarty Quotes 03/11/2003 09:43 AM
Nelson Minar rages against the dying of design, in his summary of a discussion with Cory Doctorow around using smart quotes and other typographic niceties in weblogs.
I want to use fancy Unicode characters like U+201C and U+201D ("smart quotes") in my blog. Cory hates that idea because non-ASCII characters behave badly when you paste them into your email or text editor and that they don't work well in RSS.

The underlying problem is an impedence mismatch between new Unicode oriented tech like the Web and XML and old ASCII oriented tech like email and text editors. Browsers and RSS readers should mediate between the two but software often gets it wrong.
This discussion continues a conversation on the SmartyPants plug-in I hacked together for Blosxom.

While compromising design for the sake of compensation for badly integrated technologies and encodings is not on in my book, some allowance must be made for the simple copy-n-paste. To that end, I've added a plainlink (txt) to my template alongside the permalink. This link leads to an utterly plain text (non-smarty) version of the story at hand.

Smarty for Beginners


Smarty for Beginners 12/28/2003 11:50 PM
Join Hermawan as he shows you the basic of the Smarty templating system.

If you've got experience with PHP and
Smarty under ...


If you've got experience with PHP and
Smarty under ...
12/31/2003 07:23 PM


If you've got experience with PHP and Smarty under OS X, I' m having a problem with if()s in the compiled templates. Any suggestions?


Codewalkers: Getting Into Smarty


Codewalkers: Getting Into Smarty 12/29/2003 10:59 AM
Once most coders get into the more advances realm of PHP development, they quickly realize that they're going to need some kind of simple system to template the pages of their site. Enter the Smarty template system. And, to get you started with this popular templating engine, Codewalkers.com has a new tutorial to help.

Smarty-Light


Smarty-Light 07/14/2004 08:42 PM
One Year Anniversary, Version 2.1.1

Using Smarty: RSS For Every Page


Using Smarty: RSS For Every Page 10/29/2003 01:14 AM
Since all the entry data is stored in a PHP file anyway, and it is parsed out into one form already (XHTML) I figured “What the hell? Why not?” Add ”?rss” to any page on this site for the corresponding...

Smarty as a "Sub-Language"


Smarty as a "Sub-Language" 03/22/2005 04:31 PM

I've been spending some time working with Smarty lately. This is ostensibly a "templating language" for PHP. But I think it goes beyond that. I assert that Smarty has become a sub-language all by itself.

(Update: I thought of a much better name for this: "sand-boxed PHP." That's what Smarty is — a sandbox into which you can release as much or as little PHP functionality as you want.)

First of all, for the record, Smarty is astonishingly well-done. Joe tried to get me to use it for about a year, and I resisted because I've hated most templating languages I had worked with. (Lately, Joe is bugging me to try Rails, so I'm sure I'll do that about a year from now. I'm usually about a year behind Joe.)

I've spent just two weeks or so with Smarty, and I'll never, ever go back. It's one of those rare things that was written the way you would have written it if you had all the time in the world and were a lot smarter than you actually are.

What I love about Smarty is the extensibility. You can take any logic and wrap it up into a function or a modifier and expose it to Smarty, so it can be used in templates. Anything — if you can write it in PHP, you can reduce and simplify it down to a tag in Smarty.

This means that you could essentially write a new programming language in Smarty — a language that runs within PHP. Smarty already includes v ariables, flow control, several built-in modifier s and functions, and an i nclude system that's essentially a way to create user-defined functions.

Once you start wrapping up some advanced functionality into Smarty tags, you could create an entire language, teach your template developers how to use it, and they'd never know they were actually using PHP unless you told them. They'd essentially be "programming" in a sub-language that runs inside of PHP. (If they ever ask you what language you're teaching them, just string three letters together — "RTI" or "DBN" or something. They'll buy it.)

Let's consider ColdFusion, which is the language we would come the closest to if we pushed Smarty as far as it could go. This code in ColdFusion pulls a recordset, loops through it, and prints everything out.

<cfquery name="news" datasource="news">
  SELECT * FROM news
</cfquery>

<cfoutput query="news">
  #news.title#
  <br>
</cfoutput>

Now, here's the same thing in a Smarty template:

{query name="news"}
  SELECT * FROM news
{/query}

{foreach from=$news item=article}
  {$article.title}
  <br>
{/foreach}

All this took was a custom, 10-line blo ck function (written like this) that allows the template author to provide the SQL statement to be executed and returns a two-dimensional array. (Before you send the hate mail, yes I know this is wrong. I know this is a perversion of everything Smarty is supposed to do. I'm just trying to make a point here.)

So Smarty can be made to function very much like ColdFusion. It's not hard to take this further. Assign the $_GET and $_POST variables, and you can provide some dynamic functionality. This assignment:

$smarty->assign('_get', $_GET);

Will let you do this in the above template:

{query name="news"}
  SELECT * FROM news WHERE title LIKE '%{$_get.q}%'
{/query}

Now template authors can create a mini-app that searches a database table. It's not hard to see how you could make scripts to let them update tables as well.

But, you may say, Smarty has to be invoked from a PHP page, so the templates cannot be URL-addressable. True, but you can automate this. You can just route all incoming requests to the same PHP page, like this:

AliasMatch ^.*$ /template_loader.php

Then, in that file, do something like this:

$smarty->display($_SERVER['REQUEST_URI']);

This will load whatever template was called in the (fake) URL. So now template authors can start stringing templates together. Before you know it, they've gone and built a simple app. By themselves. Without you. In a language that you gave them. That runs inside of — and is essentially controlled by — PHP.

Your programming environment has now been split into a "main" language and a "sub" language, both of which you have control over. You can give your template authors as much or as little functionality as you want (you "wrote" the language, remember). They can solve as many problems as they can with what you've given them. For other problems, you can tackle them in "real" PHP and just provide the result, or you can encapsulate the algorithm and expose it to Smarty via a function or modifer.

Is this a good thing? I can't decide. But it sure is interesting, ain't it?


Mr. Smarty Pants


Mr. Smarty Pants 02/18/2004 12:04 PM
It's common for pregnant women to dream they've given birth to an animal. According to a report by the New York Post, Winston Churchill's parrot is still alive. Charlie, a 104-year-old blue and gold female macaw, lives in southeast England and likes to curse Hitler. In the first century, Pliny the Elder claimed that mustard would improve lazy housewives. All of these "facts" and more can be found in the Mr. Smarty Pants Archive.

SmartBee - the Smarty Framework


SmartBee - the Smarty Framework 06/16/2004 06:57 AM
first pre alpha version relased

Zend: Getting Smart with Smarty


Zend: Getting Smart with Smarty 03/19/2003 10:24 PM
If you've been working on a site, and the pages are starting to get a bit out of hand as far as templating, there's plenty of systems out there that can help you get things back under control. Thanks to Zend, you can get started with Smarty and tame that site.

DotGeek.org: PHP Templates? Get Smarty!


DotGeek.org: PHP Templates? Get Smarty! 02/17/2004 10:34 AM
From DotGeek.org this morning, there's a new tutorial for anyone out there looking to get into using PHP and the Smarty Templates for templating your site.

Templates and You: An Intro to Smarty


Templates and You: An Intro to Smarty 07/24/2002 07:58 AM

Somewhere Smarty Jones Is Crying


Somewhere Smarty Jones Is Crying 06/13/2004 01:30 PM
Man Beats Horse, wins 25,000 pounds. For the first time, two legs triumphed over four in the annual Man Versus Horse Marathon in Wales.

Smarty Purl Parameter Plugins 1.1


Smarty Purl Parameter Plugins 1.1 12/19/2003 02:34 PM
A plugin for Smarty to handle GET parameters efficiently.

All eyes on Smarty Jones at Belmont


All eyes on Smarty Jones at Belmont 06/04/2004 02:05 PM

Smarty Jones Chills Before the Preakness
(AP)


Smarty Jones Chills Before the Preakness
(AP)
05/15/2004 02:37 PM
AP - Six hours before the Preakness, Smarty Jones was chilling in Stall 40 of the stakes barn at Pimlico. Under the watchful eye of security guard Patricia Williams, the Kentucky Derby winner poked his head out of the stall to absorb the wind generated by the large portable fan positioned directly in front of him.

Smarty in Public: an OSCON2002
Presentation


Smarty in Public: an OSCON2002
Presentation
08/07/2002 08:25 AM

Templates for the Masses: An Intro to
Smarty


Templates for the Masses: An Intro to
Smarty
09/06/2002 09:09 AM

Smarty Jones Goes for Triple Crown (AP)


Smarty Jones Goes for Triple Crown (AP) 06/05/2004 02:43 AM
AP - Smarty Jones already has proven he can run successfully in the mud. Good thing because there was a 60 percent chance of showers by post time Saturday for the Belmont Stakes.

Smarty Jones Arrives at Belmont


Smarty Jones Arrives at Belmont 06/02/2004 07:49 PM
The undefeated Smarty Jones finally arrived at Belmont, just after the little red chestnut colt was made the 2-5 morning-line favorite to defeat eight rivals.
Grok Description matches for Smarty PHP template engine 2.6.5
GrokA matches for Smarty PHP template engine 2.6.5

Smarty PHP template engine 2.6.5

The following phrases have been identified by the grok system as matching this entry:

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

Lore 1.5.1
The Contiki
Operating System
1.2-devel0

drraw 2.0.2
Microsoft Targets
Solo Programmers
with New Visual
Studio Version

Mozilla Nears
Firefox Finale

U.S. Planes Bomb
Suspected Militant
Refuge in Iraq
(washingtonpost.com)

$3 Trillion
Price Tag Left Out
As Bush Details His
Agenda
(washingtonpost.com)

Putin Proposes
Political Overhaul
(washingtonpost.com)

Sosa Homers As Cubs
Club Pirates 7-2
(AP)

U.S. Wants Iran to
Go Before U.N.
Council (AP)

N. Korea Says Blast
a Planned Demolition
(AP)

Expert: GPS in
Peterson Case Had
Glitches (AP)

Ivan Lashes Cuba
With 160 Mph Winds
(AP)

Ivan Spurs
Evacuations Along
Gulf Coast (AP)

Sun, Microsoft to
detail
interoperability in
October

Fedora Project
Considering
'Stateless Linux'

ACM or IEEE?
@stake advisory:
Pingtel Xpressa
Denial of Service

MDKSA-2004:092 -
Updated samba
packages fix
multiple
vulnerabilities

Define Spyware Or
Just Enforce
Existing Laws?

DEMOmobile: Wireless
Gets (Almost) Useful

Mozilla Nears
Firefox Finale (Ziff
Davis)

Guest Blogging on
PaidContent.org

The Internet of
Video

Comments on TiVo /
NetFlix deal

Housing association
polices mobile net
use

Wimax chips to offer
long-distance
broadband

Intel unveils
roadmap to reduce
cost of business
transformation

Application server
cut down for small
firms

Briefly: Web
services security
outfits merge

Oracle improves
integration with
latest release of
E-Business Suite

Microsoft
Distributes RC of
Live Communications
Server 2005
September 13 - 8:24
PM ET Microsoft has
provided b

More power
Raising the bars
Magnetic gadget
turns flowers into
speakers

Social concern
Unbridled youth
PayPal talks tough
The safety business
Handset handoff
Canada to boost
Inuit health care

Many reoffend after
youth scheme

Clarke backs new
union academy

Apple issues revised
security update

A Calm, but
Confusing, First Day
of School

New Way to Turn Off
Bad Genes Is Set for
Testing on Human
Eyes

Raising the Pressure
in Iraq

Bush Record: New
Priorities in
Environment

Putin Issues Plan to
Tighten Grasp,
Citing Terrorism

Hoi An, The Killer
City

what is grok?