Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

RSSFeedLinks


Proposed PHP code for a skin.php file:

## Place <meta> links to RSS and Atom feeds in the HTML Header.
##
## To enable the feeds, use the following in your local/config.php file:
##
##   if ($action == 'rss' || $action == 'atom') {
##     @include_once("$FarmD/scripts/feeds.php"); }
##
SDV($EnableSitewideFeed, FALSE);  # Link to Site/AllRecentChanges,
                                  # otherwise link to a group-specific feed
SDV($EnableRssLink, TRUE);
SDV($EnableAtomLink, TRUE);
global $HTMLHeaderFmt;
if (@$EnableSitewideFeed == TRUE) {
  $FeedSourcePath = '$SiteGroup/AllRecentChanges';
  $FeedTitleGroup = '';
} else {
  $FeedSourcePath = '$Group/RecentChanges';
  $FeedTitleGroup = ' : $Group -';
}
if ($EnableRssLink) {
  $HTMLHeaderFmt[rsslink] =
    "<link rel='alternate' title='\$WikiTitle$FeedTitleGroup RSS Feed'
      href='\$ScriptUrl/$FeedSourcePath?action=rss'
      type='application/rss+xml' />\n  ";
}
if ($EnableAtomLink) {
  $HTMLHeaderFmt[atomlink] =
    "<link rel='alternate' title='\$WikiTitle$FeedTitleGroup Atom Feed'
      href='\$ScriptUrl/$FeedSourcePath?action=atom'
      type='application/atom+xml' />\n  ";
}

An example set of links generated by this code:

  <link rel='alternate' title='Your Site : Main - RSS Feed'
      href='http://example.com/wiki/Main/RecentChanges?action=rss'
      type='application/rss+xml' />
  <link rel='alternate' title='Your Site : Main - Atom Feed'
      href='http://example.com/wiki/Main/RecentChanges?action=atom'
      type='application/atom+xml' />

The links result in, for example this Firefox Live Bookmark behavior:


Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.05 00.05 MarkupToHTML begin
 3: 00.08 00.07 MarkupToHTML end
 4: 00.09 00.08 MarkupToHTML begin
 5: 00.11 00.11 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 6: 00.12 00.11 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 7: 00.14 00.13 MarkupToHTML end
 8: 00.14 00.13 MarkupToHTML begin
 9: 00.15 00.14 MarkupToHTML end
10: 00.15 00.14 now