Page 1 of 1

Copyright notice in RSS feed

Posted: Fri Jul 15, 2005 7:24 pm
by Trench
Does anyone know how to add a copyright notice to the RSS feed to prevent content theft?

Re: Copyright notice in RSS feed

Posted: Sat Jul 16, 2005 11:40 am
by garvinhicking
I haven'T looked, is there any specified "copyright" element for RSS?

You could edit the rss.php file, where the headers of a RSS file are easily patchable. Or you could patch the syndication plugin to include a new string, there are some examples of other fields.

Regards,
Garvin

Posted: Sat Jul 23, 2005 8:41 pm
by Trench
I want to edit the rss.php file to include a copyright notice after each entry but I'm not sure where to put it on the rss.php file.

Posted: Sun Jul 24, 2005 3:45 pm
by garvinhicking
You can hack this by opening include/functions_entries.inc.php.

Search for the function "serendipity_printEntries_rss". Search this code:

Code: Select all

            // Embed a link to extended entry, if existing
            if ($fullFeed) {
                $entry['body'] .= ' ' . $entry['extended'];
            } elseif ($entry['exflag']) {
                $ext = '<br /><a href="' . $guid . '#extended">' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . '</a>';
            } else {
                $ext = '';
            }
After those lines, add this:

Code: Select all

$ext .= '<br />(Article copyright (C) by XXX)';
Regards,
Garvin

Posted: Sun Jul 24, 2005 7:16 pm
by Trench
Works perfectly. You're a genius. :D