<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Smarty and the Zend Framework</title>
	<atom:link href="http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/</link>
	<description>Go dik-dik, go!</description>
	<lastBuildDate>Mon, 26 Jul 2010 04:31:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: latha</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-102224</link>
		<dc:creator>latha</dc:creator>
		<pubDate>Tue, 04 May 2010 08:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-102224</guid>
		<description>Hi ,
      i&#039;m new to zend and smarty.i&#039;m using Mac-OS. i tried my projects in zend framework. But i don know how to integrate smarty templates with zend. please send me the structure of integration or Simple application sources for MAC-OS. It will be helpful for me.....</description>
		<content:encoded><![CDATA[<p>Hi ,<br />
      i&#8217;m new to zend and smarty.i&#8217;m using Mac-OS. i tried my projects in zend framework. But i don know how to integrate smarty templates with zend. please send me the structure of integration or Simple application sources for MAC-OS. It will be helpful for me&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naneau</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-43754</link>
		<dc:creator>Naneau</dc:creator>
		<pubDate>Sat, 07 Feb 2009 12:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-43754</guid>
		<description>Yes, dwoo is most certainly worth mentioning. It&#039;s a PHP5 replacement for smarty that has near full compatibility. It will run in STRICT, so your server admin will be happy.</description>
		<content:encoded><![CDATA[<p>Yes, dwoo is most certainly worth mentioning. It&#8217;s a PHP5 replacement for smarty that has near full compatibility. It will run in STRICT, so your server admin will be happy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: umpirsky</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-43715</link>
		<dc:creator>umpirsky</dc:creator>
		<pubDate>Sat, 07 Feb 2009 09:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-43715</guid>
		<description>http://dwoo.org/</description>
		<content:encoded><![CDATA[<p><a href="http://dwoo.org/" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/dwoo.org/?referer=');">http://dwoo.org/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Outsourcing India</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-34828</link>
		<dc:creator>Outsourcing India</dc:creator>
		<pubDate>Mon, 01 Dec 2008 06:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-34828</guid>
		<description>Is is possibale to Add the smarty on Zend frame work, Because we are creating new php application on zend framework, we want to use the another application which is created by smarty. OR is there any sample project for Smarty and Zend Framework

Mark
http://www.outsourceitindia.com</description>
		<content:encoded><![CDATA[<p>Is is possibale to Add the smarty on Zend frame work, Because we are creating new php application on zend framework, we want to use the another application which is created by smarty. OR is there any sample project for Smarty and Zend Framework</p>
<p>Mark<br />
<a href="http://www.outsourceitindia.com" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/www.outsourceitindia.com?referer=');">http://www.outsourceitindia.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xooby</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-34746</link>
		<dc:creator>Xooby</dc:creator>
		<pubDate>Thu, 27 Nov 2008 06:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-34746</guid>
		<description>There is a small amendment to the above _run() code to deal with ZF-5062 issue.

replace
$paths = $this-&gt;getScriptPaths();
$arg = func_get_arg(0);
foreach ($paths as $path) {
if ($file = substr($arg, strlen($path))) {
$this-&gt;_smarty-&gt;template_dir = $path;
break;
}
}

with

$paths = $this-&gt;getScriptPaths();
$arg = func_get_arg(0);
foreach ($paths as $path) {
	//next line added by matthew phinney @ Zend to stop problems with
       	// render() - issue ZF-5062
       	if (0 === strpos($arg,$path)) {
        	if ($file = substr($arg, strlen($path))) {
        		$this-&gt;_smarty-&gt;template_dir = $path;
        		break;
        	}
        }
}


This fixes that issue and means that smarty will observe Zend_View rendering rules.</description>
		<content:encoded><![CDATA[<p>There is a small amendment to the above _run() code to deal with ZF-5062 issue.</p>
<p>replace<br />
$paths = $this-&gt;getScriptPaths();<br />
$arg = func_get_arg(0);<br />
foreach ($paths as $path) {<br />
if ($file = substr($arg, strlen($path))) {<br />
$this-&gt;_smarty-&gt;template_dir = $path;<br />
break;<br />
}<br />
}</p>
<p>with</p>
<p>$paths = $this-&gt;getScriptPaths();<br />
$arg = func_get_arg(0);<br />
foreach ($paths as $path) {<br />
	//next line added by matthew phinney @ Zend to stop problems with<br />
       	// render() &#8211; issue ZF-5062<br />
       	if (0 === strpos($arg,$path)) {<br />
        	if ($file = substr($arg, strlen($path))) {<br />
        		$this-&gt;_smarty-&gt;template_dir = $path;<br />
        		break;<br />
        	}<br />
        }<br />
}</p>
<p>This fixes that issue and means that smarty will observe Zend_View rendering rules.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xooby</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-34726</link>
		<dc:creator>Xooby</dc:creator>
		<pubDate>Wed, 26 Nov 2008 20:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-34726</guid>
		<description>I made a small change to the _run function

    protected function _run()
    {
        $this-&gt;strictVars(true);

        //assign variables to the template engine
        $vars = get_object_vars($this);
        foreach ($vars as $key =&gt; $value) {
            if (&#039;_&#039; != substr($key, 0, 1)) {
                $this-&gt;_smarty-&gt;assign($key, $value);
            }
        }

        //why &#039;this&#039;?
        //to emulate standard zend view functionality
        //doesn&#039;t mess up smarty in any way
        $this-&gt;_smarty-&gt;assign_by_ref(&#039;this&#039;, $this);

        //smarty needs a template_dir, and can only use templates,
        //found in that directory, so we have to strip it from the filename
        //This checks the default application/smarty/template directory
        // as well as the module views/scripts directory to find the template
        $paths = $this-&gt;getScriptPaths();
        $arg = func_get_arg(0);
        foreach ($paths as $path) {
        	if ($file = substr($arg, strlen($path))) {
        		$this-&gt;_smarty-&gt;template_dir = $path;
        		break;
        	}
        }

        //process the template (and filter the output)
        echo $this-&gt;_smarty-&gt;fetch($file);
    }



I found I needed to do this for a specific application that didn&#039;t use teh controller view/script directories but instead used the standard smarty template directory.  My change allows smarty to work with either.  Hope its useful to someone.  Thanks for the original code.</description>
		<content:encoded><![CDATA[<p>I made a small change to the _run function</p>
<p>    protected function _run()<br />
    {<br />
        $this-&gt;strictVars(true);</p>
<p>        //assign variables to the template engine<br />
        $vars = get_object_vars($this);<br />
        foreach ($vars as $key =&gt; $value) {<br />
            if (&#8216;_&#8217; != substr($key, 0, 1)) {<br />
                $this-&gt;_smarty-&gt;assign($key, $value);<br />
            }<br />
        }</p>
<p>        //why &#8216;this&#8217;?<br />
        //to emulate standard zend view functionality<br />
        //doesn&#8217;t mess up smarty in any way<br />
        $this-&gt;_smarty-&gt;assign_by_ref(&#8216;this&#8217;, $this);</p>
<p>        //smarty needs a template_dir, and can only use templates,<br />
        //found in that directory, so we have to strip it from the filename<br />
        //This checks the default application/smarty/template directory<br />
        // as well as the module views/scripts directory to find the template<br />
        $paths = $this-&gt;getScriptPaths();<br />
        $arg = func_get_arg(0);<br />
        foreach ($paths as $path) {<br />
        	if ($file = substr($arg, strlen($path))) {<br />
        		$this-&gt;_smarty-&gt;template_dir = $path;<br />
        		break;<br />
        	}<br />
        }</p>
<p>        //process the template (and filter the output)<br />
        echo $this-&gt;_smarty-&gt;fetch($file);<br />
    }</p>
<p>I found I needed to do this for a specific application that didn&#8217;t use teh controller view/script directories but instead used the standard smarty template directory.  My change allows smarty to work with either.  Hope its useful to someone.  Thanks for the original code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Snowcore</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-29184</link>
		<dc:creator>Snowcore</dc:creator>
		<pubDate>Tue, 02 Sep 2008 09:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-29184</guid>
		<description>Sorry, mistake:

[cc lang=&quot;text&quot;]
   &lt;?php echo $this-&gt;var_name ?&gt; instead of &#039;&lt;{$var_name}&gt;&#039;
[/cc]</description>
		<content:encoded><![CDATA[<p>Sorry, mistake:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:100%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp;&lt;?php echo $this-&gt;var_name ?&gt; instead of '&lt;{$var_name}&gt;'</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Snowcore</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-29183</link>
		<dc:creator>Snowcore</dc:creator>
		<pubDate>Tue, 02 Sep 2008 09:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-29183</guid>
		<description>Do you like to write &#039;var_name ?&gt;&#039; instead of &#039;&#039; ?
And what about powerful smarty functions ?</description>
		<content:encoded><![CDATA[<p>Do you like to write &#8216;var_name ?&gt;&#8217; instead of &#8221; ?<br />
And what about powerful smarty functions ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Shah</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-23469</link>
		<dc:creator>Amit Shah</dc:creator>
		<pubDate>Mon, 30 Jun 2008 07:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-23469</guid>
		<description>Could any one tells me why smarty implementation needed on zend? What are the benefits of smarty over zend template?

Thanks</description>
		<content:encoded><![CDATA[<p>Could any one tells me why smarty implementation needed on zend? What are the benefits of smarty over zend template?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; Zend Web Design Framework SharpProgrammer.Com</title>
		<link>http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/comment-page-1/#comment-3709</link>
		<dc:creator>&#187; Zend Web Design Framework SharpProgrammer.Com</dc:creator>
		<pubDate>Wed, 10 Oct 2007 16:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://naneau.nl/2007/05/10/smarty-and-the-zend-framework/#comment-3709</guid>
		<description>[...] Naneau Smarty and the Zend Framework - No overhead for all colocated parts Naneau Smarty and the Zend Framework [...]</description>
		<content:encoded><![CDATA[<p>[...] Naneau Smarty and the Zend Framework &#8211; No overhead for all colocated parts Naneau Smarty and the Zend Framework [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
