Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php |
— | — | @@ -151,7 +151,9 @@ |
152 | 152 | $parser->setFunctionHook( 'info', 'SMWParserExtensions::doInfo' ); |
153 | 153 | $parser->setFunctionHook( 'concept', 'SMWParserExtensions::doConcept' ); |
154 | 154 | $parser->setFunctionHook( 'set', 'SMWParserExtensions::doConcept' ); |
155 | | - $parser->setFunctionHook( 'declare', 'SMWParserExtensions::doDeclare', SFH_OBJECT_ARGS ); |
| 155 | + if (defined('SFH_OBJECT_ARGS')) { // only available since MediaWiki 1.13 |
| 156 | + $parser->setFunctionHook( 'declare', 'SMWParserExtensions::doDeclare', SFH_OBJECT_ARGS ); |
| 157 | + } |
156 | 158 | return true; // always return true, in order not to stop MW's hook processing! |
157 | 159 | } |
158 | 160 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -245,8 +245,6 @@ |
246 | 246 | $wgHooks['TitleMoveComplete'][]='SMWParseData::onTitleMoveComplete'; // move annotations |
247 | 247 | $wgHooks['LinksUpdateConstructed'][] = 'SMWParseData::onLinksUpdateConstructed'; // update data after template change and at safe |
248 | 248 | $wgHooks['OutputPageParserOutput'][] = 'SMWFactbox::onOutputPageParserOutput'; // copy some data for later Factbox display |
249 | | - $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories |
250 | | -// $wgHooks['OutputPageBeforeHTML'][] = 'SMWFactbox::onOutputPageBeforeHTML';// draw Factbox right below page content |
251 | 249 | |
252 | 250 | $wgHooks['ParserAfterTidy'][] = 'smwfParserAfterTidy'; // add items to HTML header during parsing |
253 | 251 | $wgHooks['BeforePageDisplay'][]='smwfAddHTMLHeadersOutput'; // add items to HTML header during output |
— | — | @@ -267,6 +265,11 @@ |
268 | 266 | $wgHooks['MonoBookTemplateToolboxEnd'][] = 'smwfShowBrowseLink'; |
269 | 267 | } |
270 | 268 | } |
| 269 | + if (version_compare($wgVersion,'1.14','>')) { |
| 270 | + $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories |
| 271 | + } else { |
| 272 | + $wgHooks['OutputPageBeforeHTML'][] = 'SMWFactbox::onOutputPageBeforeHTML'; // draw Factbox right below page content |
| 273 | + } |
271 | 274 | |
272 | 275 | ///// credits (see "Special:Version") ///// |
273 | 276 | $wgExtensionCredits['parserhook'][]= array('name'=>'Semantic MediaWiki', 'version'=>SMW_VERSION, 'author'=>"Klaus Lassleben, [http://korrekt.org Markus Krötzsch], [http://simia.net Denny Vrandecic], S Page, and others. Maintained by [http://www.aifb.uni-karlsruhe.de/Forschungsgruppen/WBS/english AIFB Karlsruhe].", 'url'=>'http://semantic-mediawiki.org', 'description' => 'Making your wiki more accessible – for machines \'\'and\'\' humans. [http://semantic-mediawiki.org/wiki/Help:User_manual View online documentation.]'); |