Recent Topics

1 Nov 22, 2005 13:05    

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?

2 Nov 22, 2005 13:56

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;

¥

3 Nov 22, 2005 18:00

¥åßßå wrote:

2/ This is untested so it might not work but, in your render() add :-

global $Item;

$pic = $Item->ID;
¥

thanks for your quick reply, I'll report here after I test.


Form is loading...