![]() Not mentioned in the release notes, may have been changes to the associated skin instead of the actual MW package: Lots of CSS rules in monobook had a body:not(.skin-responsive) prefix added to them.Can't see anything significant in the release notes.9.3 5 second response time when pressing submit.There is no such thing as a stupid question. Please feel free to ask a question on the talk page. If you run into problems, then please file a bug report in the mediawiki core skin architecture project in Phabricator, and we'll try and find an elegant solution. If something is not easy, we'd like to make it easier, so your feedback is important. If you wish to build a skin for 1.35, using template data provided in 1.36, you will need to extend the SkinMustache PHP class.Ī polyfill for the Example skin is provided. In 1.35 support for building skins was not as straightforward as in 1.36. I am writing an extension that needs to style itself differently depending on the skin Įxtensions can make use of skin styles to ship skin-specific styles using the skinStyles key. Modifications of the HEAD are better served via extensions and configuration inside LocalSettings.php. Skin developers should not concern themselves with modifying anything in the HEAD of a document. I want to change elements in the head of the HTML page When doing this, remember to check the skin being operated on, to avoid side effects in other skins. The composition of menus can be changed by using hooks.įor example in Vector, the SkinTemplateNavigation hook is used to relocate the watch star icon. To do this you will need to read Manual:$wgResourceModuleSkinStyles. If you omit certain pieces of data you may break support with extensions.įor certain extensions you may want to tweak the styles of the default UI elements, notably Extension:Echo. The starter templates in Getting_started will render all possible UI elements. Skins for extension developers is provided for extension developers to ensure they get the best compatibility. ![]() To use a partial Partial.mustache in MediaWiki, simply add them to the folder you are working in and reference them using Integrating with other extensions Įxtensions should integrate with you, not the other way round! Try to forget about extensions when writing your skin. Mustache partials can be used to reuse templates. We found using Mustache to be very helpful in the development of the Skin:Minerva and Skin:Vector skins as it allows you to separate data from presentation. In 1.35 we added support for Mustache in skins. Somebody should also be able to help you setup translation. You'll be able to handle bug reports in Phabricator or GitHub issues and receive patches from other volunteers in the MediaWiki community. Setting up a wiki page has many other benefits. Once the code is publicly available, you should create a skin page (make sure you change the title!) to let people know you are open for collaboration! Making a skin will be more fun with other people and much easier too! Once you have got something usable, please consider publishing it to GitHub or Gerrit. WfLoadSkin ( 'SkinName' ) Let people know! The Example skin provides the bare bones implementation of a skin.Ĭlone the repository in your skins folder making sure the folder is called "Example" and add the following to your LocalSettings.php: ![]() To begin making your first skin, we recommend two options. If you need to modify the HEAD this is considered outside the scope of the skin, please use Hooks, extensions or configuration to do that see the FAQ for best practices on how to do that. It is restricted from editing anything inside the HEAD.Ĭode will be automatically generated for the skin, so that the skin can focus on presentation. Skin development will be a lot easier with a familiarity with Mustache templates.Īt minimum, you should be familiar with the following Mustache basics described in the example below:Ī skin is responsible for the rendering of user-visible content - the HTML inside the BODY tag. Please see Manual:How to make a MediaWiki skin/Migrating SkinTemplate based skins to SkinMustache instead. If you having an existing skin using the PHP BaseTemplate, this guide is not for you. This tutorial assumes that you have installed a working version of MediaWiki, and are running the current development release, if not, it is recommended you do that first. While not essential, it will help if you are familiar with LESS CSS. ![]() If you are familiar with the front end technologies of CSS, JavaScript and JSON you can make a MediaWiki skin! There is no need to know PHP, but it may help if you want to do anything advanced. Making a skin is a great way to get familiar with the inner workings of MediaWiki and to kick off your contributions to the Wikimedia movement! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |