|
#11
|
||||
|
||||
|
to argue...
I saw the template class. you mean by this way we can have more complex tags? for example <IMAGE_NOTES place="comments"> and <IMAGE_NOTES place="mainpage"> and things like that? but I didn't see that in the template class. nothing more that the way PP was doing it was there.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#12
|
|||
|
|||
|
Quote:
Quote:
|
|
#13
|
||||
|
||||
|
Tell me more about how could we use it. in this way I assume we can have addon's with dynamic tags. for example for random addon I made before the number of random addon can be determined inside the tag and not neccessarily inside the db. something like
<RANDOM_THUMB value='3'> to show 3 thumbs in place. are there fixed/standard parameter arguments that tags could have?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#14
|
|||
|
|||
|
Quote:
Code:
$tpl->setCallback("<RANDOM_THUMB>", "doRandomThumb");
Code:
function doRandomThumb($args) {
$number = $args['number'];
// do some stuff, and put the code to replace in $result
return $result;
}
|
|
#15
|
||||
|
||||
|
I know this is the solution but I wanted to know that if Smarty do grab the arguments from the tags or not.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#16
|
|||
|
|||
|
Quote:
Smarty doesn't use normal html tags. Instead it uses {} so a smarty tag would look like {$random_image}.Anyway, I've updated my template class to include tags with one option. I've done this as an example to show what is possible with a template engine, and to show it's easy to be backwards compatible. |
|
#17
|
||||
|
||||
|
I remember somthing differenet from smarty that accepts tags like pixelpost. Rob some time ago mentioned that.....
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#18
|
||||
|
||||
|
I believe something does need to be done sooner rather than later in regards to the tag system. Either introduce smarty or adopt created function tags like Wordpress.
Already I find myself limited in creating new templates because I want to include php coding in my template for conditional use but because the templates are imported as a string before being echo'ed out then the php isn't parsed. |
|
#19
|
|||
|
|||
|
Quote:
I think the biggest problem is that display logic is tied up in the code, rather than being available in the template. However, there is something to be said for the ease of use the current solution has. The template designers don't need to know anything about programming to design templates. Overall I think we could have the best of both worlds. This article http://www.massassi.com/php/articles/template_engines/ talks about reason to use PHP as your templating language, instead of Smarty for example. It should be easy for people to swap from <IMAGE_TITLE> to <?=$image_title?>, and that way non-programmers can stick to using simple tags while template programmers who know enough about PHP to use an if statement can do more complex templates. But what would I know, I'm not a pixelpost developer
|
|
#20
|
||||
|
||||
|
I agree with just about every point you made :)
|
| Post Reply |
| Thread Tools | |
|
|