diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-03-02 08:08:29 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-03-02 08:08:29 +0100 |
commit | a7c93226bd0fa1293e1dc99e679390dc2f8d803c (patch) | |
tree | e4e3de90f99d23817ccaa466f92c7e759c7c9a46 | |
parent | 1d901ab2e0bb93fd121685d355782e3672c0d96d (diff) | |
download | dokuwiki-a7c93226bd0fa1293e1dc99e679390dc2f8d803c.tar.gz dokuwiki-a7c93226bd0fa1293e1dc99e679390dc2f8d803c.zip |
make RSS contents (media/pages) configurable
-rw-r--r-- | conf/dokuwiki.php | 8 | ||||
-rw-r--r-- | feed.php | 4 | ||||
-rw-r--r-- | lib/plugins/config/lang/en/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/config/settings/config.metadata.php | 3 |
4 files changed, 11 insertions, 5 deletions
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 7a7e4bf1a..8da818638 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -127,14 +127,18 @@ $conf['rss_linkto'] = 'diff'; //what page RSS entries link to: // 'page' - the revised page itself // 'rev' - page showing all revisions // 'current' - most recent revision of page -$conf['rss_content'] = 'abstract'; // what to put in the items by default? +$conf['rss_content'] = 'abstract'; //what to put in the items by default? // 'abstract' - plain text, first paragraph or so // 'diff' - plain text unified diff wrapped in <pre> tags // 'htmldiff' - diff as HTML table // 'html' - the full page rendered in XHTML +$conf['rss_media'] = 'both'; //what should be listed? + // 'both' - page and media changes + // 'pages' - page changes only + // 'media' - media changes only $conf['rss_update'] = 5*60; //Update the RSS feed every n seconds (defaults to 5 minutes) -$conf['recent_days'] = 7; //How many days of recent changes to keep. (days) $conf['rss_show_summary'] = 1; //Add revision summary to title? 0|1 +$conf['recent_days'] = 7; //How many days of recent changes to keep. (days) $conf['broken_iua'] = 0; //Platform with broken ignore_user_abort (IIS+CGI) 0|1 $conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) $conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation @@ -117,8 +117,8 @@ function rss_parseOptions(){ 'show_minor' => array('minor', false), // String, only used in search mode 'search_query' => array('q', null), - // One of: pages, media, both - 'content_type' => array('view', 'both') + // One of: pages, media, both + 'content_type' => array('view', $conf['rss_media']) ) as $name => $val) { $opt[$name] = (isset($_REQUEST[$val[0]]) && !empty($_REQUEST[$val[0]])) diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index 74ec56345..8718b00ed 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -154,6 +154,7 @@ $lang['rss_content'] = 'What to display in the XML feed items?'; $lang['rss_update'] = 'XML feed update interval (sec)'; $lang['recent_days'] = 'How many recent changes to keep (days)'; $lang['rss_show_summary'] = 'XML feed show summary in title'; +$lang['rss_media'] = 'What kind of changes should be listed in the XML feed?'; /* Target options */ $lang['target____wiki'] = 'Target window for internal links'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index af815e8dc..83f47130c 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -192,9 +192,10 @@ $meta['sitemap'] = array('numeric'); $meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1')); $meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); $meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html')); +$meta['rss_media'] = array('multichoice','_choices' => array('both','pages','media')); $meta['rss_update'] = array('numeric'); -$meta['recent_days'] = array('numeric'); $meta['rss_show_summary'] = array('onoff'); +$meta['recent_days'] = array('numeric'); $meta['broken_iua'] = array('onoff'); $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); |