[pmwiki-users] RSS Thoughts

Josh Miller josh at virtualmillers.net
Tue Sep 25 20:00:05 CDT 2007


Hello!

I'm trying to come up with an RSS Implementation that will be a little
cleaner for the non-techie people that visit my website that are looking
for a regular "website updates" feed.

I am looking for a feed that will not contain simple website updates
without a new RSS item every time I make a spelling correction, etc.

Here is what I am thinking I would like:

When you edit the page, if you leave the summary blank, then there is no
post to the RSS Feed page (call it Site.RssFeed).  If you want to post
an RSS feed (say you post a press release), you fill your description in
the summary field.  Then when you click Save, it takes the text from the
Summary field and posts it as a Feed Item on the Site.RssFeed page.

I think you could do it sort of like this...

~~[config.php]~~

if(summary field is not ""){
$RecentChangesFmt = array(
  '$SiteGroup.AllRecentChanges' =>
    '* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]',
  '$Group.RecentChanges' =>
    '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]');
  'Site.RssFeed' =>
    '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]');
}
else{
$RecentChangesFmt = array(
  '$SiteGroup.AllRecentChanges' =>
    '* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]',
  '$Group.RecentChanges' =>
    '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink:
[=$ChangeSummary=]');
}

Then in the Feeds.php file, I need to set the feed description to the
summary...

So the things I need help with are:
1- how do I check to see if the summary box is blank?
2- how do I post the text from the summary box to the RssDescription?

Anyone have any ideas on these 2 questions or other ideas for
implementing RSS Feeds?
Also- I tried to use the Enhanced Web Feeds cookbook but it threw errors
because it was posting the RSS stuff twice.

I'm running PmWiki v 2.2.0 beta 28 because I am using UserAuth and I
have a conflict yet to work out with UserAuth and newer betas.

Thanks!!

-Josh Miller
Gouverneur













More information about the pmwiki-users mailing list