4 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5 * Copyright (C) 2002-2009 The Nucleus Group
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * (see nucleus/documentation/index.html#license for more info)
15 * Nucleus RSS syndication channel skin
16 * @license http://nucleuscms.org/license.txt GNU General Public License
17 * @copyright Copyright (C) 2002-2009 The Nucleus Group
18 * @version $Id: xml-rss2.php 1624 2012-01-09 11:36:20Z sakamocchi $
21 header('Pragma: no-cache');
24 // removed $CONF['Self'] to let it be set in globalfunctions.php.
25 // Having value here makes all links (normal or fancy urlmodes) look like xml-rss2.php?itemid=#
26 //$CONF['Self'] = 'xml-rss2.php';
28 include('./config.php');
30 if (!$CONF['DisableSite']) {
32 // get feed into $feed
34 selectSkin('feeds/rss20');
36 $feed = ob_get_contents();
39 // create ETAG (hash of feed)
40 // (HTTP_IF_NONE_MATCH has quotes around it)
41 $eTag = '"' . md5($feed) . '"';
42 header('Etag: ' . $eTag);
44 // compare Etag to what we got
45 if ($eTag == serverVar('HTTP_IF_NONE_MATCH') ) {
46 header('HTTP/1.0 304 Not Modified');
47 header('Content-Length: 0');
54 // output empty RSS file...
55 // (because site is disabled)
57 echo '<' . '?xml version="1.0" encoding="' . i18n::get_current_charset() . '"?' . '>';
62 <title><?php echo i18n::hsc($CONF['SiteName']); ?></title>
63 <link><?php echo i18n::hsc($CONF['IndexURL']); ?></link>
64 <description></description>
65 <docs>http://backend.userland.com/rss</docs>