Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -288,6 +288,7 @@ |
289 | 289 | } |
290 | 290 | |
291 | 291 | $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories |
| 292 | + $wgHooks['SkinGetPoweredBy'][] = 'smwfAddPoweredBySMW'; |
292 | 293 | $smwgMW_1_14 = true; // assume latest 1.14 API |
293 | 294 | |
294 | 295 | // Registration of the extension credits, see Special:Version. |
— | — | @@ -549,3 +550,22 @@ |
550 | 551 | |
551 | 552 | return true; // Always return true, in order not to stop MW's hook processing! |
552 | 553 | } |
| 554 | + |
| 555 | +/** |
| 556 | + * Adds the 'Powered by Semantic MediaWiki' button right next to the default |
| 557 | + * 'Powered by MediaWiki' button at the bottom of every page. This works |
| 558 | + * only with MediaWiki 1.17+. |
| 559 | + * It might make sense to make this configurable via a variable, if some |
| 560 | + * admins don't want it. |
| 561 | + * |
| 562 | + * @since 1.5.4 |
| 563 | + * |
| 564 | + * @return true |
| 565 | + */ |
| 566 | +function smwfAddPoweredBySMW( &$text, $skin ) { |
| 567 | + global $smwgScriptPath; |
| 568 | + $url = htmlspecialchars( "$smwgScriptPath/skins/images/smw_button.png" ); |
| 569 | + $text .= ' <a href="http://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki"><img src="'. $url . '" alt="Powered by Semantic MediaWiki" /></a>'; |
| 570 | + |
| 571 | + return true; // Always return true, in order not to stop MW's hook processing! |
| 572 | +} |