[pmwiki-users] Web Feeds problem with $RecentChangesFmt customization

Daniel Roesler diafygi at yahoo.com
Thu Oct 4 11:16:59 CDT 2007


Howdy all,

I've written a bug report for a particular problem I'm facing ( http://pmwiki.org/wiki/PITS/00977 ) and was wondering if yall could spot my misstep in logic.

As described in email list ( http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/16217 ) and Cookbook.AllRecentChanges, I changed my $RecentChangesFmt variable to show all changes to all pages, not just the most recent change to each page. Code I used: 
-----------------------
$RecentChangesFmt = array(
  '$SiteGroup.AllRecentChanges' =>
    '* [[$Group.$Name]] . . . $CurrentTime  $[by] $AuthorLink: [=$ChangeSummary=]',
  '$Group.RecentChanges' =>    
    '* [[$Group/$Name]] . . . $CurrentTime  $[by] $AuthorLink: [=$ChangeSummary=]');
-----------------------
Also, I changed the web feeds/rss/atom variable $FeedFmt to a custom format as. Code I used: 
-----------------------
$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : $LastModifiedSummary';
$FeedFmt['rss']['item']['description'] = 'Changes made by: $LastModifiedBy';
-----------------------
The bug occurs when multiple changes are made to a single page. The Site.AllRecentChanges and Group.RecentChanges displays the updated changes just fine. However, the RSS feed for the site and group show only the most recent summary for all of the changes. 

For example: 
-Pete edits Main.InfoPage at 10:20am, with the summary 'foo' 
-Bill edits Main.InfoPage at 10:40am, with the summary 'woot' 
-Steve edits Main.InfoPage at 11:00am, with the summary 'blah' 

The RSS web feed will show the following: 
-----------------------
Main / InfoPage : blah #2
   11:00 AM
   Changes made by: Steve.

Main / InfoPage : blah #1
   11:00 AM
   Changes made by: Steve

Main / InfoPage : blah
   11:00 AM
   Changes made by: Steve
...
-----------------------

This is because the $LastModifiedSummary and $LastModifiedBy variables only look at the most recent summary and author, right? If I change these variables to the ones used in the custom $RecentChangesFmt array ($ChangeSummary and $AuthorLink), the output will be nothing for $ChangeSummary and a question mark ('?') for $AuthorLink. I assume the numbering is a feature of the feeds.php script for duplicate changes.

Why can't I use $ChangeSummary and $AuthorLink instead of LastModifiedSummary and $LastModifiedBy in the $FeedFmt array? I assume this is because $ChangeSummary and $AuthorLink are not global variables. Why does the time of the web feed only show the most recent time? How can a make the RSS feed display correctly like the AllRecentChanges page?

Thanks a lot,
Daniel
diafygi at yahoo.com


      ____________________________________________________________________________________
Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.
http://tv.yahoo.com/ 




More information about the pmwiki-users mailing list