Mediawiki Extension News

⇠ Back to Blog:Hacks

I have installed Duesentrieb's Mediawiki Extension:News to keep an up-to-date record of what is new on our website.

It looks something like that (you'll find the original version, naturally, in our news):

WhatsnewMarch2012.png

I have put all edits as minor by default and only those we declare as "major edits" will appear in this list, so that people may have an idea of what's changed since their last visit (if anything and if there are such people). It'll take a little while before minor edits—like the one byte change in Mad Rush—will disappear from the list.

For this Blog entry, for instance, I will untick the 'minor edit status' and put something like "New blog post on integrating the "News" extension to announce worthy novelties on our site" in the Summary entry, and people visiting the News page will see this blog post announced.

There's also the possibility to include a rss feed, but it seems to be broken.

Later Addition

(added on 21:12, 2 February 2014 (UTC))

In MediaWiki 1.18 & forward, it was disabled to mark a new page as minor. See this bug report.

This can be counteracted by patching three spots in includes/EditPage.php, namely (this is for 1.22.1 version):

Replace:

  1. 		if ( $wgUser->getOption( 'minordefault' ) && !$this->isNew ) {
  2. 			$this->minoredit = true;
  3. 		}

by

  1. 		if ( $wgUser->getOption( 'minordefault' )) {
  2. 			$this->minoredit = true;
  3. 		}

Then replace

  1. 		  	( ( $this->minoredit && !$this->isNew ) ? EDIT_MINOR : 0 ) |

by

  1. 			( ( $this->minoredit ) ? EDIT_MINOR : 0 ) |

and finally, comment out lines 3460 & 3475 as shown here:

  1. 		// don't show the minor edit checkbox if it's a new page or section
  2. 		//		if ( !$this->isNew ) {
  3. 			$checkboxes['minor'] = '';
  4. 			$minorLabel = wfMessage( 'minoredit' )->parse();
  5. 			if ( $wgUser->isAllowed( 'minoredit' ) ) {
  6. 				$attribs = array(
  7. 					'tabindex' => ++$tabindex,
  8. 					'accesskey' => wfMessage( 'accesskey-minoredit' )->text(),
  9. 					'id' => 'wpMinoredit',
  10. 				);
  11. 				$checkboxes['minor'] =
  12. 					Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
  13. 					"&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" .
  14. 					Xml::expandAttributes( array( 'title' => Linker::titleAttrib( 'minoredit', 'withaccess' ) ) ) .
  15. 					">{$minorLabel}</label>";
  16. 			}
  17. 			//		}