Hi, my problem is that I cannot load some javascript file @ my special page extension. I tried this with addcript and some other methods, but the only thing that happened was that javascript was canceled, causing non-js mediawiki software.
In the folder of my extension is the new.js file, which I want to get only on my special page.
Here is some code (most of this example is special pages).
MyExentions.php
<?php if (!defined('MEDIAWIKI')) { echo <<<EOT To install my extension, put the following line in LocalSettings.php: require_once( "$IP/extensions/MyExtension/MyExtension.php" ); EOT; exit( 1 ); } $wgExtensionCredits['specialpage'][] = array( 'path' => __FILE__, 'name' => '-', 'author' => 'Thomas Döring', 'descriptionmsg' => '-', 'version' => '0.0.1', ); $dir = dirname(__FILE__) . '/'; $wgAutoloadClasses['SpecialMyExtension'] = $dir . 'SpecialMyExtension.php'; $wgExtensionMessagesFiles['MyExtension'] = $dir . 'MyExtension.i18n.php'; $wgExtensionMessagesFiles['MyExtensionAlias'] = $dir . 'MyExtension.alias.php'; $wgSpecialPages['MyExtension'] = 'SpecialMyExtension';
SpecialMyExtension.php
<?php class SpecialMyExtension extends SpecialPage { function __construct() { parent::__construct( 'MyExtension' ); } function execute( $par ) { $request = $this->getRequest(); $output = $this->getOutput(); $this->setHeaders();
I hope you help me.
source share