templates tags in site content

From: Date: Thu, 24 Apr 2003 09:56:29 +0000
Subject: templates tags in site content
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9368@lists.php.net to get a copy of this message
Hi all, I'm working on b2++, a version of the b2 weblog software with Smarty support. (it's at http://blogs.linux.ie/ if you'd like a look!) I started playing around with Smarty plugins last night and I created a simple "googleit" plugin. This function takes a string and prints a html link to a google search for that string. Simple. It works fine in the blog templates. I used it to search for blog entries, see http://blogs.linux.ie/xeer/ and look for the "Search" link at the end of every entry. I'm trying to think of a nice way of letting users post and use Smarty tags in their blog entries, and not just in the static site templates. For example: "The weather here is {get_weather_report location='cork,ireland'} but I'm still at work! oh well!" I think I have two alternatives: 1. Create a smarty resource that will feed off weblog posts. Each post will be a template itself and will have all the flexibility that offers - overkill? 2. Create plugins as post or output filters but then I'd have to have yet another syntax for tags that are affected by those filters. Taking the same example again: "The weather here is /*get_weather_report location='cork,ireland'*/ but I'm still at work! oh well!" Any ideas? Donncha.

« previous php.smarty.general (#9368) next »