Extension:News Channel
From MediaWiki.org
|
News Channel Release status: stable |
|
|---|---|
| Implementation | Notify, Special page, Data extraction |
| Description | Extension allows to set up a custom RSS 2.0/Atom 1.0 news channel on your wiki in a minute. If you include a page into some specified category (e. g. [[Category:News]]), this page instantly appears on the site's channel. Channel is implemented as a special page Special:NewsChannel and is automatically linked from every page of the wiki. |
| Author(s) | Iaroslav Vassiliev (CodeMonk Talk) |
| Version | 1.2 (2008-05-01) |
| MediaWiki | 1.8 or higher |
| License | GPL |
| Download | 1.2 1.0 |
[edit] 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. [[Category:News]]) and register it as news category. Then, if you want to publish a news item on your RSS 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. Basic wiki markup is automatically removed from news pages during publication to make them readable in feed format.
[edit] Installation
- Download the extension code.
- Unzip and save the code files in your wiki's
extensionsdirectory in a subdirectoryNewsChannel. - Changes your wiki's LocalSettings.php to include the line:
require_once("$IP/extensions/NewsChannel/NewsChannel.php");
[edit] 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 $channelUpdateSeconds = '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';
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; leave empty array to allow everyone.
var $authorizedEditors = array("User1", "User2", "User3");
[edit] Version history
- 1.2 — Atom 1.0 format added; authorization for news publication added; compliance to W3C best practice guide improved.
[edit] 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 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.

