Add stylesheet and script in mediawiki extension

It simple method to add new style sheet and scripts files in mediawiki extension.

open your main file and create parser Hook.


parser:- A parser reads the page definition and creates the HTML-code for the actual page, and must know from the beginning that there may be a poll-tag which it should process.

Now Add this simple code in file



Step2:-Now open your class file and register your parser.

static function onParserInit(Parser $parser){
return true;

Now register your modules.


now run your extension. And see work is done.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s