Re: Plugin implementation help

will guaraldi <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
I don't think the "category" for a given entry is available in the
postformat callback.

I think if it were me, I'd do this in cb_story since then you're only
transforming the text for entries you know are going to be rendered.  So
that limits how much processing gets done.  Additionally, all the entry's
properties are available at that point as well.

/will


On Mon, 17 May 2004, Igor Khavkine wrote:
>
> Here's what I want to do: given an entry in $datadir/category/entry.txt
> and an image.png in the same directory, I want to replace all instances
> of <img src="image.png"/> with something like <img
> src="$someurl/category/image.png"/>. I think this should go into a
> postformat filter, since it makes sense to apply this substitution after
> all the other filters have run.
>
> I've got the code that does the replacement, but I can't seem to find a
> convenient way of knowing what "category" is from within the
> cb_postformat callback.
>
> Is there a better place where this should be? Where is the "category"
> available? Is there a simpler way to do what I want?
>
> Thanks in advance.
>
> Igor


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.