I would like to write a photo album toolbar plugin which will insert code like this
<!--photo thumbnail-->
<!--photo original-->
I also want render the tag to real html code below in renderer plugin
<img src="/photo/thumbnail_207.jpg />
[teaserbreak]<!--noteaser-->
<img src="/photo/original_207.jpg />
Befor doing this, I have two question needed help:
First:
Where 207 is the post id, but I have no idea how to get it in a function Render(). In other word, I don't know which post is being rendering, then I can't find correct photo.
Second:
B2evo render the code
and <!--noteaser--> before renderer plugin system, so when I produce tag
or others with plugin, there has no effect to the post, it only a html comment.
Any idea to solve these question?
1/ Change your tool to output this instead :-
<!--photo thumbnail-->
<!--more--><!--noteaser-->
<!--photo original-->
2/ This is untested so it might not work but, in your render() add :-
global $Item;
$pic = $Item->ID;
¥