<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to feature-requests</title><link>https://sourceforge.net/p/php-templates/feature-requests/</link><description>Recent changes to feature-requests</description><atom:link href="https://sourceforge.net/p/php-templates/feature-requests/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 05 Jun 2003 15:43:16 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/php-templates/feature-requests/feed.rss" rel="self" type="application/rss+xml"/><item><title>Native OO Interface.</title><link>https://sourceforge.net/p/php-templates/feature-requests/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Another thing I'd like to see is a native oo interface&lt;br /&gt;
for this extension. I've attached an php code example&lt;br /&gt;
of how such an interface would look (The extensions in&lt;br /&gt;
there can be disregarded).&lt;/p&gt;
&lt;p&gt;eg:&lt;br /&gt;
&amp;amp;lt;?php&lt;/p&gt;
&lt;p&gt;$t = new tmpl();&lt;br /&gt;
$t-&amp;amp;gt;open('test.tpl');&lt;br /&gt;
$t-&amp;amp;gt;set_global('random', mt_rand());&lt;br /&gt;
for ($i = 0; $i &amp;amp;lt; 4; $i++) {&lt;br /&gt;
$t-&amp;amp;gt;iterate('/row');&lt;br /&gt;
$t-&amp;amp;gt;set('/row', array('one' =&amp;amp;gt; '1', 'two' =&amp;amp;gt; '2'));&lt;br /&gt;
}&lt;br /&gt;
echo $t-&amp;amp;gt;parse();&lt;/p&gt;
&lt;p&gt;?&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;Regards, Sjon&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sjon</dc:creator><pubDate>Thu, 05 Jun 2003 15:43:16 -0000</pubDate><guid>https://sourceforge.net9fcd42ea1412143d57e53a0939df1285219a423b</guid></item><item><title>Ability to register callback functions.</title><link>https://sourceforge.net/p/php-templates/feature-requests/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I've made my own templating function library in php (who &lt;br /&gt;
hasn't), and added besides the standard replacement &lt;br /&gt;
stuff also a way to incorporate so called tags inside &lt;br /&gt;
templates, wich can be assigned a handler.&lt;br /&gt;
Example:&lt;br /&gt;
// the tag wich can be put inside a template&lt;br /&gt;
&amp;amp;lt;tag:random min=&amp;amp;quot;100&amp;amp;quot; max=&amp;amp;quot;999&amp;amp;quot; /&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;// registering a handler with a tag&lt;br /&gt;
stpl_register_tag&lt;br /&gt;
(STPL_FETCH_EVENT, 'random', 'stpl_tag_random');&lt;/p&gt;
&lt;p&gt;// example function&lt;br /&gt;
function stpl_tag_random ($params) {&lt;br /&gt;
$min = (isset($params['min']) ? $params['min'] : 0);&lt;br /&gt;
$max = (isset($params['max']) ? $params['max'] : &lt;br /&gt;
mt_getrandmax());&lt;br /&gt;
return mt_rand($min, $max);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;the STPL_FETCH_EVENT is one of three events that &lt;br /&gt;
occur. In order:&lt;br /&gt;
STPL_LOAD_EVENT: when the template get's read &lt;br /&gt;
from disk&lt;br /&gt;
STPL_PARSE_EVENT: when the template get's parsed &lt;br /&gt;
(variable substitution)&lt;br /&gt;
STPL_FETCH_EVENT: when the parsed content get's &lt;br /&gt;
fetched for display/storage&lt;/p&gt;
&lt;p&gt;Now, I know the event stuff may not really make sense &lt;br /&gt;
with this extension (maybe the first two do), but I would &lt;br /&gt;
love to see something like this incorporated into this &lt;br /&gt;
extension.&lt;br /&gt;
I'm no C programmer, so I can't be of much use in that &lt;br /&gt;
field, but I would love to help. I think one additional &lt;br /&gt;
function and two ini entries (tag_start and tag_end) &lt;br /&gt;
would be all that's needed. Maybe even add a few &lt;br /&gt;
predefined tag handlers (like above random, date, &lt;br /&gt;
include), etc.&lt;/p&gt;
&lt;p&gt;If you've got any questions, let me know.&lt;/p&gt;
&lt;p&gt;Regards, Sjon.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sjon</dc:creator><pubDate>Tue, 20 May 2003 08:32:13 -0000</pubDate><guid>https://sourceforge.net790ede2f3b35490d878a129ab6d45cd434269c87</guid></item><item><title>replacing multiple tokens</title><link>https://sourceforge.net/p/php-templates/feature-requests/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Could it be possible to replace all of the occurences&lt;br /&gt;
of a same token in a context with only one assign?&lt;br /&gt;
ex:&lt;br /&gt;
&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;tmpl:blah&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;amp;lt;a href=&amp;amp;quot;index.php?do=erase&amp;amp;amp;id={ID}&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;a href=&amp;amp;quot;index.php?do=modify&amp;amp;amp;id={ID}&amp;amp;quot;&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;amp;lt;/tmpl:blah&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/pre&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Clement</dc:creator><pubDate>Mon, 11 Mar 2002 13:18:12 -0000</pubDate><guid>https://sourceforge.netb0002a5ca21646d8b5e23fb1eea17bd04cd1ad08</guid></item></channel></rss>