[pmwiki-users] RSS Thoughts

Dominique Faure dominique.faure at gmail.com
Wed Sep 26 03:20:48 CDT 2007


On 9/26/07, José Geraldo Gouvea <jggouvea at globo.com> wrote:
> Em Ter, 2007-09-25 às 21:00 -0400, Josh Miller escreveu:
> > 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...
>
> Your solution is EXACTLY what I am badly seeking!
> --
> José Geraldo Gouvea <jggouvea at globo.com>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>

The following code in the config.php should do the trick:
=====8<-----
array_splice($EditFunctions,
             array_search('PostRecentChanges', $EditFunctions), 0,
             'PostRssSummary');

function PostRssSummary($pagename, &$page, &$new) {
  global $IsPagePosted, $RecentChangesFmt;
  if (!$IsPagePosted) return;
  if ($new['csum'])
    $RecentChangesFmt['$SiteGroup.RssFeed'] =
$RecentChangesFmt['$SiteGroup.AllRecentChanges'];
}
=====8<-----

Hope this help,
-- 
Dominique



More information about the pmwiki-users mailing list