* Added a new array for extensions to use, $wgExtensionCredits, see
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 12 Jul 2005 23:42:11 +0000 (23:42 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 12 Jul 2005 23:42:11 +0000 (23:42 +0000)
  documentation in DefaultSettings.php

RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialVersion.php

index e123409..f1e1239 100644 (file)
@@ -563,9 +563,10 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * (bug 655) Provide empty search form when searching for nothing
 * (bug 2802) Display more than one character of the sort key
 * Nynorsk numeric format fix
+* Added a new array for extensions to use, $wgExtensionCredits, see
+  documentation in DefaultSettings.php
 * (bug 2825) Fix regression in newtalk notifications for anons w/ enotif off
 
-
 === Caveats ===
 
 Some output, particularly involving user-supplied inline HTML, may not
index 0beccfb..37be6f2 100644 (file)
@@ -1225,6 +1225,20 @@ $wgUseXMLparser = false ;
 /** Extensions */
 $wgSkinExtensionFunctions = array();
 $wgExtensionFunctions = array();
+/**
+ * An array of extension types, their authors, url and name, add to it from
+ * an extension like:
+ *
+ * <code>
+ * $wgExtensionCredits[$type][] = array(
+ *     'name' => 'Example extension',
+ *     'author' => 'Foo Barstein',
+ *     'url' => 'http://wwww.example.com/Example%20Extension/',
+ * );
+ * </code>
+ * Where $type is 'specialpage', 'parserhook', or 'other'.
+ */
+$wgExtensionCredits = array();
 
 /**
  * Allow user Javascript page?
index 3fa221f..4709092 100644 (file)
  * constructor
  */
 function wfSpecialVersion() {
-       global $wgOut, $wgVersion;
+       global $wgOut, $wgVersion, $wgExtensionCredits;
        
        $dbr =& wfGetDB( DB_SLAVE );
        
-       $wgOut->addWikiText( "
+       $out = "
 <div dir='ltr'>
 This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',  
 copyright (C) 2001-2005 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
@@ -38,6 +38,27 @@ or [http://www.gnu.org/copyleft/gpl.html read it online]
 * [http://www.mediawiki.org/ MediaWiki]: $wgVersion
 * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ")
 * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion() . "
-</div>" );
+</div>
+";
+       if ( count( $wgExtensionCredits ) > 0 ) {
+               $extensionTypes = array(
+                       'specialpage' => 'Special pages',
+                       'parserhook' => 'Parser hooks',
+                       'other' => 'Other'
+               );
+               
+               $out .= "== Extensions ==\n";
+               
+               foreach ( $extensionTypes as $type => $text ) {
+                       if ( count( @$wgExtensionCredits[$type] ) > 0 ) {
+                               $out .= "=== $text ===\n";
+                               foreach ( $wgExtensionCredits[$type] as $extension ) {
+                                       $out .= '* [' . $extension['url'] . ' ' . $extension['name'] . '] by ' . $extension['author'] . "\n";
+                               }
+                       }
+
+               }
+       }
+       $wgOut->addWikiText( $out );
 }
 ?>