Wordpress Smarty Plugin
I love smarty templates so much. We can write simple templates to complex templates very easy in smarty.
Simple Templates
-
{$username}
-
{if $username}
-
{$username}
-
{/if}
Complex Templates
-
{foreach from=$arr_pfacility item=pfacility_text key=pfacility_id}
-
{assign var="id_selected" value=false}
-
{foreach from=$smarty.post.fp_pfacility item=sel_item}
-
{if $sel_item==$pfacility_id}
-
{assign var="id_selected" value=true}
-
{/if}
-
{/foreach}
-
<td width="10">
-
{if $id_selected}
-
<input type="checkbox" name="fp_pfacility[]" value="{$pfacility_id}" checked>
-
{else}
-
<input type="checkbox" name="fp_pfacility[]" value="{$pfacility_id}">
-
{/if}
-
</td>
-
<td>{$pfacility_text.name}</td>
-
</tr>
-
{/foreach}
I am working on to load smarty as a plugin to wordpress. if someone interested in making the templates for their blog admin plugins they can do
Download a sample implementation here
2 Comments »
RSS feed for comments on this post. | TrackBack URI
well, this might not be intended to be understood by people, that dont know smarty (including myself)… but: would you mind explaining what the above post is telling?
isn’t that what wordpress offers already? just wondering…
something else: if you haven’t heard of “lightpress” already… now you know about it
as far as i know its frontend is also based upon smarty - but i could be wrong… take a look at its beta… might be interesting or challenging for you as a programmer. would be cool if more programmers join the dev-team there to make it more stable and comfortable so more people would switch to for everyday-use in their blogs (im just a designer, thus cant make it what it should be) regards.
Comment by erik — April 26, 2006 @ 9:53 pm
EriK
I know the lighpress. I was not taking about the general templates. Worpress is so powerful and you might not know how excellent cms it is. You can use the software not only for your blog. For so many other things.
You can do wonders with your post meta and templates. You can design each category etc etc. This is all known stuffs. I wanted to write a plugin which can be used by other plugins. Suppose when a user makes a comment you can write plugin to thank him. For the thanking letter you need a template. You can use my template manager to create a template and save it in some name. And use your plugin to apply values on the template and send the mail using wordpress mail function.
That is my next plan.. I need to have somemore time. Yeah I accept I am lazy too
Comment by Imthiaz — April 27, 2006 @ 12:02 am