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

Daniel Roesler diafygi at gmail.com
Sat Jan 2 11:33:01 CST 2010

That's a good point in using $ItemISOTime or $LastModifiedTime instead
of a new variable.

A unique id is basically required for the RSS feeds to work in most
aggregators. Different times are not going to be recognized as new in

The RSS 2.0 specifications recommends a guid
(http://cyber.law.harvard.edu/rss/rss.html#comments), as does Google
Reader (http://www.google.com/support/reader/bin/answer.py?hl=en&answer=69998).
The <link> element can be unique for each entry, or a <guid> element
can have the unique id while the <link> element has the basic link to
the page.

I say we have the <link> element contain {$PageUrl} (like it does now)
and add a separate <guid> element that adds on a unique identifier by
default. I'm ok with the uid being ISO instead of Unix, but we really
need unique links for RSS feeds.

Daniel Roesler
diafygi at gmail.com

On Sat, Jan 2, 2010 at 10:58 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> 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';
> or
>    $FeedFmt['rss']['item']['guid'] = '{$PageUrl}?guid=$LastModifiedTime';
> Pm

More information about the pmwiki-devel mailing list