[pmwiki-users] RSS and <content> tags

Jon Haupt jhaupt at gmail.com
Tue Jun 20 16:20:06 CDT 2006

On 6/19/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Sun, Jun 18, 2006 at 04:29:15PM -0500, Jon Haupt wrote:
> > It seems like it ought to be easy to add the complete content of a
> > post to an rss feed by using something like
> >
> > $FeedFmt['rss']['item']['content'] = '{$Text}';
> >
> > Except that $Text isn't available.  This and, it's unclear what $Text
> > would look like.  The markup?  The HTML?  I really don't know.  Has
> > this discussion already happened?
> Partially.  I've been thinking about having an {$Excerpt} page
> variable which provides an excerpt of an page -- i.e., it gives
> the page description if one exists, or the first few paragraphs,
> or the words surrounding any search terms if entered.
> I've been thinking that {$Excerpt} should just return plain text
> w/o any markups.
> IIRC, it is possible to set $FeedFmt to call a function -- i.e.,
>     $FeedFmt['rss']['item']['content'] = 'MyContent';
> which then calls the MyContent() function to determine what
> should be generated for the <content> tag.  This function could
> then grab the page markup source, convert it to HTML, etc.
> Pm

Hmm, this MyContent idea sounds great.  Do you know of a snippet of
code in the scripts that I could use as a template for making this
work?  I tried to modify the PrintWikiPage function (pmwiki.php line
894) into something called BlogContent() and insert it as you
described above; it seemed fairly simple, but oddly this resulted not
in an XML feed, but a fully-converted HTML page appearing on my
screen; so obviously I must not understand the MarkupToHTML function
and what it does.  So anyway, I don't mind messing with this some
more, but can you offer a hint of what scripts I might be able to look
at that do something similar (i.e. convert markup to plain html and
return that but do nothing else)?  Or perhaps there really isn't
anything of the sort yet.


More information about the pmwiki-users mailing list