| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -563,9 +563,10 @@ |
| 564 | 564 | * (bug 655) Provide empty search form when searching for nothing |
| 565 | 565 | * (bug 2802) Display more than one character of the sort key |
| 566 | 566 | * Nynorsk numeric format fix |
| | 567 | +* Added a new array for extensions to use, $wgExtensionCredits, see |
| | 568 | + documentation in DefaultSettings.php |
| 567 | 569 | * (bug 2825) Fix regression in newtalk notifications for anons w/ enotif off |
| 568 | 570 | |
| 569 | | - |
| 570 | 571 | === Caveats === |
| 571 | 572 | |
| 572 | 573 | Some output, particularly involving user-supplied inline HTML, may not |
| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -1225,6 +1225,20 @@ |
| 1226 | 1226 | /** Extensions */ |
| 1227 | 1227 | $wgSkinExtensionFunctions = array(); |
| 1228 | 1228 | $wgExtensionFunctions = array(); |
| | 1229 | +/** |
| | 1230 | + * An array of extension types, their authors, url and name, add to it from |
| | 1231 | + * an extension like: |
| | 1232 | + * |
| | 1233 | + * <code> |
| | 1234 | + * $wgExtensionCredits[$type][] = array( |
| | 1235 | + * 'name' => 'Example extension', |
| | 1236 | + * 'author' => 'Foo Barstein', |
| | 1237 | + * 'url' => 'http://wwww.example.com/Example%20Extension/', |
| | 1238 | + * ); |
| | 1239 | + * </code> |
| | 1240 | + * Where $type is 'specialpage', 'parserhook', or 'other'. |
| | 1241 | + */ |
| | 1242 | +$wgExtensionCredits = array(); |
| 1229 | 1243 | |
| 1230 | 1244 | /** |
| 1231 | 1245 | * Allow user Javascript page? |
| Index: trunk/phase3/includes/SpecialVersion.php |
| — | — | @@ -10,11 +10,11 @@ |
| 11 | 11 | * constructor |
| 12 | 12 | */ |
| 13 | 13 | function wfSpecialVersion() { |
| 14 | | - global $wgOut, $wgVersion; |
| | 14 | + global $wgOut, $wgVersion, $wgExtensionCredits; |
| 15 | 15 | |
| 16 | 16 | $dbr =& wfGetDB( DB_SLAVE ); |
| 17 | 17 | |
| 18 | | - $wgOut->addWikiText( " |
| | 18 | + $out = " |
| 19 | 19 | <div dir='ltr'> |
| 20 | 20 | This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''', |
| 21 | 21 | copyright (C) 2001-2005 Magnus Manske, Brion Vibber, Lee Daniel Crocker, |
| — | — | @@ -38,6 +38,27 @@ |
| 39 | 39 | * [http://www.mediawiki.org/ MediaWiki]: $wgVersion |
| 40 | 40 | * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ") |
| 41 | 41 | * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion() . " |
| 42 | | -</div>" ); |
| | 42 | +</div> |
| | 43 | +"; |
| | 44 | + if ( count( $wgExtensionCredits ) > 0 ) { |
| | 45 | + $extensionTypes = array( |
| | 46 | + 'specialpage' => 'Special pages', |
| | 47 | + 'parserhook' => 'Parser hooks', |
| | 48 | + 'other' => 'Other' |
| | 49 | + ); |
| | 50 | + |
| | 51 | + $out .= "== Extensions ==\n"; |
| | 52 | + |
| | 53 | + foreach ( $extensionTypes as $type => $text ) { |
| | 54 | + if ( count( @$wgExtensionCredits[$type] ) > 0 ) { |
| | 55 | + $out .= "=== $text ===\n"; |
| | 56 | + foreach ( $wgExtensionCredits[$type] as $extension ) { |
| | 57 | + $out .= '* [' . $extension['url'] . ' ' . $extension['name'] . '] by ' . $extension['author'] . "\n"; |
| | 58 | + } |
| | 59 | + } |
| | 60 | + |
| | 61 | + } |
| | 62 | + } |
| | 63 | + $wgOut->addWikiText( $out ); |
| 43 | 64 | } |
| 44 | 65 | ?> |