Hi, I was trying to develop a MediaWiki skin based on Bootstrap3. I am facing several type of issues at the time of doing this. MediaWiki is forcing me to use the default vector styles and for may of the pages it is "very hard" to use own CSS classes, for example Special:Allpages[1]. I am lucky that my skin/bootstrap default is similar with the MediaWiki UI and i enabled it in everywhere. But even this could not cover the page " Special:Allpages ".
I found it very complex to develop a new skin for MediaWiki and it forces everyway to use the default vector skin. About a year ago i headed a project on "Separating skins from core MediaWiki", could anyone please let me know the progress and current status of that project.
[1] - http://en.banglapedia.org/index.php?title=Special:AllPages
-- *Nasir Khan Saikat* www.nasirkhn.com
Hi the skins are now separate from mediawiki vector no longer default except from when doing web install. you have to install vector manually except from a release.
On Thursday, 23 April 2015, 17:41, Nasir Khan nasir8891@gmail.com wrote:
Hi, I was trying to develop a MediaWiki skin based on Bootstrap3. I am facing several type of issues at the time of doing this. MediaWiki is forcing me to use the default vector styles and for may of the pages it is "very hard" to use own CSS classes, for example Special:Allpages[1]. I am lucky that my skin/bootstrap default is similar with the MediaWiki UI and i enabled it in everywhere. But even this could not cover the page " Special:Allpages ".
I found it very complex to develop a new skin for MediaWiki and it forces everyway to use the default vector skin. About a year ago i headed a project on "Separating skins from core MediaWiki", could anyone please let me know the progress and current status of that project.
[1] - http://en.banglapedia.org/index.php?title=Special:AllPages
-- *Nasir Khan Saikat* www.nasirkhn.com _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Also please update to mediawiki 1.24.2 or wait till mediawiki 1.25 is released since that could be reason you get vector shown since it is default in 1.23 but not in 1.24. you can select skin to use by default in web install now but web install skin uses vector by default. also you have to use vendor.
On Thursday, 23 April 2015, 18:00, Thomas Mulhall thomasmulhall410@yahoo.com wrote:
Hi the skins are now separate from mediawiki vector no longer default except from when doing web install. you have to install vector manually except from a release.
On Thursday, 23 April 2015, 17:41, Nasir Khan nasir8891@gmail.com wrote:
Hi, I was trying to develop a MediaWiki skin based on Bootstrap3. I am facing several type of issues at the time of doing this. MediaWiki is forcing me to use the default vector styles and for may of the pages it is "very hard" to use own CSS classes, for example Special:Allpages[1]. I am lucky that my skin/bootstrap default is similar with the MediaWiki UI and i enabled it in everywhere. But even this could not cover the page " Special:Allpages ".
I found it very complex to develop a new skin for MediaWiki and it forces everyway to use the default vector skin. About a year ago i headed a project on "Separating skins from core MediaWiki", could anyone please let me know the progress and current status of that project.
[1] - http://en.banglapedia.org/index.php?title=Special:AllPages
-- *Nasir Khan Saikat* www.nasirkhn.com _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Thu, Apr 23, 2015 at 7:40 PM, Nasir Khan nasir8891@gmail.com wrote:
MediaWiki is forcing me to use the default vector styles
No, it isn't. Where did you get this impression from? When building a skin, you're free to do the entire CSS by yourself; of course, often you'll find it easier to use some of the core styles in addition to your own styles. Do note that "core styles" doesn't mean "Vector styles". MediaWiki core provides certain skinning-related general-purpose ResourceLoader modules, namely mediawiki.skinning.elements, mediawiki.skinning.content, mediawiki.skinning.interface and mediawiki.skinning.content.externallinks, the former three usually being somewhat mutually exclusive. Usually you'll want to make your skin load the mediawiki.skinning.content.externallinks module and one of the other three aforementioned modules.
I found it very complex to develop a new skin for MediaWiki
Yes, it's not a task for the faint of heart. A lot of the on-wiki documentation at MediaWiki.org is outdated, lacking or likely both. You might be interested in taking a look at some of the skins I've contributed to [1]; I'd say that Dusk [2] or [3] Truglass are pretty good examples in terms of structure.
You'll need: * 2 PHP files (setup file + main skin file, i.e. if your skin would be called "EpicAwesomeness", these files would be EpicAwesomeness.php and EpicAwesomeness.skin.php) * a folder (usually called "resources") for assets like images, CSS and JS
In the setup file, you define skin credits, make your skin a valid skin that MediaWiki recognizes and add its classes into the autoloader, as well as define the skin's custom ResourceLoader module, if and when you want to have some custom CSS.
In the main skin file, you define two classes (though some skins seem to have split this into two files, one file per class; if you ask me, having these two classes in the same file is just fine because the other class is usually about 12-20 lines long); a class extending SkinTemplate ("class SkinEpicAwesomeness extends SkinTemplate"), which basically takes care of loading the appropriate ResourceLoader modules that your skin will need, and the class which contains most of the skin's HTML, and extends the BaseTemplate class ("class EpicAwesomenessTemplate extends BaseTemplate").
About a year ago i headed a project on "Separating skins from core MediaWiki", could anyone please let me know the progress and current status of that project.
That project was completed successfully and nowadays skins that were once bundled with MediaWiki core, such as Cologne Blue, Modern, MonoBook and Vector, are located in separate code repositories. The on-wiki project page at [4] might be useful, too.
Please let the mailing list know if you have any further questions. Writing a new skin isn't easy, especially if you aren't a senior MediaWiki developer, so we'll want to streamline the process, improve the documentation and generally speaking encourage new people to write new skins! After all, MediaWiki.org currently lists less than 50 [5] skins, whereas WordPress, phpBB and other similar systems have hundreds of available skins.
[1] https://www.mediawiki.org/wiki/User:Jack_Phoenix/extensions [2] https://www.mediawiki.org/wiki/Skin:Dusk [3] https://www.mediawiki.org/wiki/Skin:Truglass [4] https://www.mediawiki.org/wiki/Separating_skins_from_core_MediaWiki [5] https://www.mediawiki.org/wiki/Category:All_skins
Thanks and regards, -- Jack Phoenix MediaWiki developer
Dear Phoenix,
thanks for your details explanation and mentioning the useful links.
I am working on a theme named MediaWikiBootstrap [1] for a while now. At the time of designing the theme i faced some issues on different pages, like Special:Allpages[2] which i mentioned in the first email, i want to use different CSS classes for the inpur field and the wrapping div, i could not find any guideline to do that. There are other pages too.
I am sorry that i used the word "Vecor Style" but i wanted to mention the "core style". In few pages and page sections i am getting formatted content and i do not have idea how to change that content. For example the search page[3]. I do not want to use the Mediawiki UI button style on that page, how can i do that?
Is there any way to use the same form style in all the pages, like Search, Allpages, Contact page, Login, Registration and so on? There is way to enable vFrom but if i want to develop my own style then what are the steps?
I have a plan to build other few skins for mediawiki but the documentation are not helping me to do that fast.
[1]- https://github.com/nasirkhan/mediawiki-bootstrap [2] - http://en.banglapedia.org/index.php?title=Special:AllPages [3] - http://en.banglapedia.org/index.php?search=bangladesh&fulltext=Search
-- *Nasir Khan Saikat* www.nasirkhn.com
On Fri, Apr 24, 2015 at 2:44 AM, Jack Phoenix jack@countervandalism.net wrote:
On Thu, Apr 23, 2015 at 7:40 PM, Nasir Khan nasir8891@gmail.com wrote:
MediaWiki is forcing me to use the default vector styles
No, it isn't. Where did you get this impression from? When building a skin, you're free to do the entire CSS by yourself; of course, often you'll find it easier to use some of the core styles in addition to your own styles. Do note that "core styles" doesn't mean "Vector styles". MediaWiki core provides certain skinning-related general-purpose ResourceLoader modules, namely mediawiki.skinning.elements, mediawiki.skinning.content, mediawiki.skinning.interface and mediawiki.skinning.content.externallinks, the former three usually being somewhat mutually exclusive. Usually you'll want to make your skin load the mediawiki.skinning.content.externallinks module and one of the other three aforementioned modules.
I found it very complex to develop a new skin for MediaWiki
Yes, it's not a task for the faint of heart. A lot of the on-wiki documentation at MediaWiki.org is outdated, lacking or likely both. You might be interested in taking a look at some of the skins I've contributed to [1]; I'd say that Dusk [2] or [3] Truglass are pretty good examples in terms of structure.
You'll need:
- 2 PHP files (setup file + main skin file, i.e. if your skin would be
called "EpicAwesomeness", these files would be EpicAwesomeness.php and EpicAwesomeness.skin.php)
- a folder (usually called "resources") for assets like images, CSS and JS
In the setup file, you define skin credits, make your skin a valid skin that MediaWiki recognizes and add its classes into the autoloader, as well as define the skin's custom ResourceLoader module, if and when you want to have some custom CSS.
In the main skin file, you define two classes (though some skins seem to have split this into two files, one file per class; if you ask me, having these two classes in the same file is just fine because the other class is usually about 12-20 lines long); a class extending SkinTemplate ("class SkinEpicAwesomeness extends SkinTemplate"), which basically takes care of loading the appropriate ResourceLoader modules that your skin will need, and the class which contains most of the skin's HTML, and extends the BaseTemplate class ("class EpicAwesomenessTemplate extends BaseTemplate").
About a year ago i headed a project on "Separating skins from core MediaWiki", could anyone please
let
me know the progress and current status of that project.
That project was completed successfully and nowadays skins that were once bundled with MediaWiki core, such as Cologne Blue, Modern, MonoBook and Vector, are located in separate code repositories. The on-wiki project page at [4] might be useful, too.
Please let the mailing list know if you have any further questions. Writing a new skin isn't easy, especially if you aren't a senior MediaWiki developer, so we'll want to streamline the process, improve the documentation and generally speaking encourage new people to write new skins! After all, MediaWiki.org currently lists less than 50 [5] skins, whereas WordPress, phpBB and other similar systems have hundreds of available skins.
[1] https://www.mediawiki.org/wiki/User:Jack_Phoenix/extensions [2] https://www.mediawiki.org/wiki/Skin:Dusk [3] https://www.mediawiki.org/wiki/Skin:Truglass [4] https://www.mediawiki.org/wiki/Separating_skins_from_core_MediaWiki [5] https://www.mediawiki.org/wiki/Category:All_skins
Thanks and regards,
Jack Phoenix MediaWiki developer _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Fri, 24 Apr 2015 16:44:52 +0200, Nasir Khan nasir8891@gmail.com wrote:
I am sorry that i used the word "Vecor Style" but i wanted to mention the "core style". In few pages and page sections i am getting formatted content and i do not have idea how to change that content. For example the search page[3]. I do not want to use the Mediawiki UI button style on that page, how can i do that?
If you're using reasonably recent MediaWiki version (since https://phabricator.wikimedia.org/T72351), you can override some built-in styles using $wgResourceModuleSkinStyles. https://www.mediawiki.org/wiki/Manual:$wgResourceModuleSkinStyles
For example, to get rid of everything related to MediaWiki UI (replace 'yourskinname' with the name of your skin):
$wgResourceModuleSkinStyles['yourskinname'] = array( 'mediawiki.ui' => array(), 'mediawiki.ui.checkbox' => array(), 'mediawiki.ui.radio' => array(), 'mediawiki.ui.anchor' => array(), 'mediawiki.ui.button' => array(), 'mediawiki.ui.input' => array(), 'mediawiki.ui.icon' => array(), 'mediawiki.ui.text' => array(), );
(It is a bit silly that there are this many modules to override, but oh well.)
Is there any way to use the same form style in all the pages, like Search, Allpages, Contact page, Login, Registration and so on? There is way to enable vFrom but if i want to develop my own style then what are the steps?
Current situation is pretty bad, because we have both "MediaWiki UI" (which is just a bunch of CSS) and the "MediaWiki theme" for "OOjs UI" (which is also a PHP and JS library; https://www.mediawiki.org/wiki/OOjs_UI). We're phasing out the former in favor of the latter; they implement similar but slightly different designs.
You could override OOjs UI styling with $wgResourceModuleSkinStyles too if you really wanted to, but it wouldn't be maintainable (it's in active development). OOjs UI supports creating multiple themes (and one more exists, called "Apex"), but right now there isn't a good way to switch between them in MediaWiki. :( I suggest subscribing to https://phabricator.wikimedia.org/T78367 and staying tuned.
I have a plan to build other few skins for mediawiki but the documentation are not helping me to do that fast.
There is also https://www.mediawiki.org/wiki/Manual:Skinning , I don't think it was mentioned in this thread before.
On Thu, Apr 23, 2015 at 1:44 PM, Jack Phoenix jack@countervandalism.net wrote:
A lot of the on-wiki documentation at MediaWiki.org is outdated, lacking or likely both.
...
You'll need: *good explanation follows*
That's pretty much what https://www.mediawiki.org/wiki/Manual:Skinning says. I made a few improvements. If you see anything outdated or lacking there, Be Bold. Would it help if we developed a BoilerPlate skin like the BoilerPlate extension?
On Fri, Apr 24, 2015 at 11:00 AM, Bartosz Dziewoński matma.rex@gmail.com wrote:
For example, to get rid of everything related to MediaWiki UI (replace
'yourskinname' with the name of your skin):
$wgResourceModuleSkinStyles['yourskinname'] = array( 'mediawiki.ui' => array(), 'mediawiki.ui.checkbox' => array(), 'mediawiki.ui.radio' => array(), 'mediawiki.ui.anchor' => array(), 'mediawiki.ui.button' => array(), 'mediawiki.ui.input' => array(), 'mediawiki.ui.icon' => array(), 'mediawiki.ui.text' => array(), );
I added this to https://www.mediawiki.org/wiki/Manual:$wgResourceModuleSkinStyles and mention this global in Manual:Skinning.
wikitech-l@lists.wikimedia.org