make RSS contents (media/pages) configurable

This commit is contained in:
Andreas Gohr 2012-03-02 08:08:29 +01:00
parent 1d901ab2e0
commit a7c93226bd
4 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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]]))

View File

@ -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';

View File

@ -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'));