[pmwiki-devel] Add guid tag to each item of RSS feeds

Patrick R. Michaud pmichaud at pobox.com
Sat Jan 2 10:58:21 CST 2010

On Sat, Jan 02, 2010 at 10:32:58AM -0600, Daniel Roesler wrote:
> RSS feeds for PmWiki need to have a unique link for each item, so feed
> readers can identify new edits. I've created a patch (just changed two
> lines) in /scripts/feeds.php that fixes the problem. It adds a
> ?guid=1234567890 to the end of the PageUrl link (unix time stamp of
> last edit). Can we please include it for the next version of PmWiki?
> Thanks.

I'm not sure that adding the timestamp to the link should be the
default.  It's certainly easily done as a local customization.
I'm not inflexible on this point, though -- I'd bend to the will
of the majority here.  I just know there are likely sites that 
*don't* want every edit to result in a new unique identifier 
for a page, and since it's a 1-line local customization in
config.php, it's not terribly onerous to keep it that way.

It might deserve a line in docs/sample-config.php, however.

Also, there's no need to create a separate page variable for the
timestamp -- unix timestamps are already available as 
$LastModifiedTime.  Personally, I'd much prefer to see an 
ISO-formatted dated as the timestamp rather than a unix 
timestamp.  Thus the local modification for this is simply:

    $FeedFmt['rss']['item']['guid'] = '{$PageUrl}?guid=$ItemISOTime';


    $FeedFmt['rss']['item']['guid'] = '{$PageUrl}?guid=$LastModifiedTime';


More information about the pmwiki-devel mailing list