Permalink
Browse files

make RSS contents (media/pages) configurable

  • Loading branch information...
1 parent 1d901ab commit a7c93226bd0fa1293e1dc99e679390dc2f8d803c @splitbrain splitbrain committed Mar 2, 2012
Showing with 11 additions and 5 deletions.
  1. +6 −2 conf/dokuwiki.php
  2. +2 −2 feed.php
  3. +1 −0 lib/plugins/config/lang/en/lang.php
  4. +2 −1 lib/plugins/config/settings/config.metadata.php
View
@@ -127,14 +127,18 @@
// '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
View
@@ -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]]))
@@ -154,6 +154,7 @@
$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';
@@ -192,9 +192,10 @@
$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'));

0 comments on commit a7c9322

Please sign in to comment.