Topic on Talk:ResourceLoader/Migration guide for extension developers

Jump to navigation Jump to search

Scripts from different extensions

1
Krinkle (talkcontribs)

I can not seem to figure out how I can add script files from another extension. My extension relies on a script file of another extension. This file itself handles some images/style files within the /extensions/OtherExtension/skins folder. I tried adding a module for this like so:

$wgResourceModules['ext.OtherExtension'] = array(
   'scripts' => 'libs/neededScript.js',
   'styles'  => 'skins/neededCSS.css',
   'localBasePath' => dirname( __FILE__ ),
   'remoteExtPath' => 'OtherExtension'
);

However, it works with $wgResourceLoaderDebug = true; AND I copied styles / images (e.g. the 'skins' folder) to my extension path. If I set wgResourceLoaderDebug = false; it fails completely, even if I copy the skins folder. What I actually want, is not to have to copy the files, but have the script file loaded and handle the files in the folder of the other Extension. What is the best way to achieve this? -StrongBaf 17:00, 29 October 2011

This post was posted by Krinkle, but signed as StrongBaf.

Reply to "Scripts from different extensions"