Extension:News Channel

Purpose and usage
If you want to make a custom RSS 2.0 and/or Atom 1.0 news channel on your wiki, you simply install this extension, create some category (e. g. ) and register it as news category. Then, if you want to publish a news item on your channel, you create an article on your wiki, include it into that news category and save it. The article will be instantly published on the channel: it's title will be the headline and it's text will be the description of news item. Wikimarkup is automatically converted into HTML (or it can be just removed, if you wish so) on news pages during publication to make it readable in feed format.

Installation

 * 1) Download the extension code.
 * 2) Unzip and save the code files in your wiki's   directory in a subdirectory.
 * 3) Changes your wiki's LocalSettings.php to include the line:

Configuration
All configuration settings are set in variables in the beginning of NewsChannel_body.php file. Here are the sample settings and their description.

Channel title: var $channelTitle = 'MyWikiSite.com News'; Channel description, preferably just one sentence: var $channelDescription = 'The most hot IT news on MyWikiSite.com.'; Link to your site: var $channelSiteLink = 'http://www.mywikisite.com' ; Channel language: var $channelLanguage = 'en-US'; Channel copyright: var $channelCopyright = 'Copyright © MyWikiSite.com. All rights reserved.'; Channel logo. In RSS 2.0 specification only JPG, GIF or PNG formats are allowed; recommended default size is 88x31. In Atom 1.0 format an image should have 1:1 aspect ratio. The image should be suitable for presentation at a small size. var $channelLogoImage = 'http://www.mywikisite.com/rssicon.png' ; Time in minutes before channel cache invalidation occurs: var $channelUpdateInterval = '10'; Default number of recent (most fresh) news to list on the channel: var $channelNewsItems = '10'; Name or alias of channel's editor-in-chief: var $channelEditorName = 'John Doe'; E-mail of channel's editor-in-chief: var $channelEditorAddress = 'newseditor@mywikisite.com'; Name or alias of channel webmaster: var $channelWebMasterName = 'Jane Doe'; E-mail of channel webmaster: var $channelWebMasterAddress = 'webmaster@mywikisite.com'; Title of category, containing news articles: var $newsWikiCategory = 'News'; Title of category, that must be excluded from export: var $newsWikiExcludeCategory = 'Disputed'; Optional prefix to remove from news article titles (to clean channel headlines): var $newsWikiArticlePrefix = 'News/'; Names (wiki accounts) of users, allowed to publish news on the channel; pass empty array to allow everyone. var $authorizedEditors = array( "User1", "User2", "User3" ); Wikimarkup convert/delete option. If set to true, script converts wikimarkup in news to HTML markup; if set to false, basic wikimarkup is just removed (some old feed readers don't support HTML markup in news items): var $convertWikiMarkup = true;

Configuration by global variables
As of version 1.5, extension can be also configured by corresponding global variables: $wgNewsChannelTitle, $wgNewsChannelDescription, $wgNewsChannelSiteLink, $wgNewsChannelLanguage, $wgNewsChannelCopyright, $wgNewsChannelLogoImage, $wgNewsChannelUpdateInterval, $wgNewsChannelDefaultItems, $wgNewsChannelEditorName, $wgNewsChannelEditorAddress, $wgNewsChannelWebMasterName, $wgNewsChannelWebMasterAddress, $wgNewsChannelCategory, $wgNewsChannelExcludeCategory, $wgNewsChannelRemoveArticlePrefix, $wgNewsChannelAuthorizedEditors, $wgNewsChannelConvertWikiMarkup.

Global variables are used exactly as corresponding local variables described above, but can be set in LocalSettings.php file. In configuration order, global variables have higher priority, than local variables.

Version history

 * 1.52 — Minor internal improvements.
 * 1.51 — Code documentation reformatted.
 * 1.5 — MySQL 4.0 support added; configuration by global variables allowed; French translation added; several minor improvements.
 * 1.41 — atom:link changed.
 * 1.4 — An option added to combine multiple news categories and to exclude unwanted categories.
 * 1.33 — News item's timestamp is now set to time, when corresponding article was added to news category (in previous versions it was the time of article creation or last edit).
 * 1.31 — RSS/Atom HTTP content headers added.
 * 1.3 — An option to convert wikimarkup to HTML added; German interface translation added.
 * 1.21 — A minor bug fixed.
 * 1.2 — Atom 1.0 format added; authorization for news publication added; compliance to W3C best practice guide improved.

Contacts
If you would like to report a bug, request a feature, or could help with localization (extension messages translation), please, send me a letter to [mailto:codedriller@gmail.com codedriller@gmail.com]. By the way, if you need advanced bot functionality for your wiki, take a look at free DotNetWikiBot Framework, that I maintain.