[pmwiki-users] Inhibit some pages from rss feeds?

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 22 20:00:59 CST 2007


On Mon, Jan 22, 2007 at 06:47:52PM -0500, Russ Fink wrote:
> Is there a way to inhibit certain pages from showing up on RSS feeds?  I'm 
> trying to prevent things like Site.SideBar showing up, Group.SideBar, etc. 
> only want the relevant content.  I'm setting this wiki up as a CMS and don't 
> want to advertize its wikiness (thus inviting attacks).

Well, any options that are available to pagelists are also
supposed to be available for RSS feeds(*).  In other words, an
RSS feed is just a special form of pagelist.

So, you should be able to do the following:

    $FeedTrailOpt['list'] = 'normal';

This does the equivalent of supplying "list=normal" to the
internal pagelist that is generated when creating the feed.
By default, list=normal excludes pages such as AllRecentChanges,
RecentChange, GroupHeader, GroupFooter, GroupAttributes, etc.

To get list=normal to also exclude pages from the Site.* and
PmWiki.* groups, one would add

    $SearchPatterns['normal']['site'] = '!^(Site|PmWiki)\\.!';

Or, to create a custom list=feed option to identify things
that should be excluded by a feed, one can do something like

    $FeedTrailOpt['list'] = 'feedlist';
    $SearchPatterns['feedlist'] = array(
      '!\.(All)?Recent(Changes|Uploads)$!',
      '!\.Group(Print)?(Header|Footer|Attributes)$!',
      '!^(Site|PmWiki)\\.!',
      # ...etc...
      );

For more information about $SearchPatterns, see
http://www.pmwiki.org/wiki/Cookbook/SearchPatterns.

Above you'll note that I said that one "should" be able
to do this -- in writing this response I noticed a bug
in scripts/feeds.php that causes the $FeedTrailOpt settings
to be ignored.  This is now fixed in 2.2.0-beta25 (just released),
so try that.

Pm




More information about the pmwiki-users mailing list