Skin talk:Monaco
Untitled
editWikiApiary has many examples of wikis that use this skin. Leucosticte (talk) 05:36, 1 May 2014 (UTC)
working on 1.24?
editI have been using Monaco on my 1.19 install for a few years and am now looking to upgrade to 1.24 - I had no luck getting the skin to work on my test site. Is this skin working on the latest version of mediawiki ? --Stampstudy (talk) 23:15, 22 December 2014 (UTC)
Arcane21 version
editIt's better and has a lot of fixes to work properly, not just thrown onto MW. Lieutenant Aleksandr Reznov 04:47, 15 January 2015 (UTC)
- Thank you, for some reason I did not see the version for Arcane. I have this now installed on my wiki and have the wiki updated to 1.24. The only issue I can see so far is the menu not working correctly under Internet Explorer. The second level links are not working on my site under countries - http://www.stampsoftheworld.co.uk/ --Stampstudy (talk) 14:23, 26 January 2015 (UTC)
- The formatting of your monaco-sidebar system message doesn't look correct, as it's trying to use external links. The format should be
articletitle|text
- I believe you can specify any anchor tags after the article title and they should work, though I've never tried it personally (likeFoo#A|A
). See here for a functional example. --QuasarEE (talk) 05:02, 2 February 2015 (UTC)
- The formatting of your monaco-sidebar system message doesn't look correct, as it's trying to use external links. The format should be
monaco
edit- Hi, how can i install this skin in my wiki?--Msnhinet8 (talk) 05:24, 31 October 2017 (UTC)
Maintained open fork
editI mentioned this on IRC but I am maintaining an updated version of this skin's code base on github, for use on DoomWiki.org, and while the skin is in wide use, most users of it haven't open-sourced their work so far. When we updated to 1.22, this issue was bad enough (emailed multiple wikis' bureaucrats to ask for their code, only to receive no replies) to prompt me to learn php, jQuery, and the MediaWiki API just to take over maintenance of the code base for our personal use. I believe my fork could be generally useful to people who want to use the Monaco skin, and so I'd like to revamp this page to be less centered on the now very dated dantman fork, which doesn't work out of the tar.gz with anything > MediaWiki 1.18 and includes my own fork. Besides fixing various bugs and regression issues, I have also started development on a new sidebar widget system replacing the original Wikia php system with a frontend-driven, Extension:Gadgets-compatible JavaScript solution. I didn't want to add the info here without sufficient discussion and have it look like some type of conflict of interest, so this is my proposal. --QuasarEE (talk) 12:24, 15 August 2014 (UTC)
Update: Wanted to note that my current code base is compatible with MediaWiki up to v1.29 currently, and is probably trivially patchable for v1.30 (haven't tried yet as my site runs on LTS releases). --QuasarEE (talk) 05:26, 21 August 2018 (UTC)
SkinMonaco (hope, MediaWiki 1.34.0 Support)
edit- i already will monaco update.--Msnhinet8 (talk) 01:32, 17 March 2020 (UTC)
Hook for insert a Donate Button
edit <!-- haleyjd 20140420: FIXME: DoomWiki.org-specific; make generic! -->
<!--
<tr>
<td colspan="2" style="text-align:center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="D5MLUSDXA8HMQ">
<input type="image" src="' . $this->get('stylepath') . '/Monaco/style/images/contribute-button.png" name="submit" alt="PayPal - The safer, easier way to pay online!" style="border: 0; width:139px; margin:0;">
<img alt="" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" style="border: 0;">
</form>
</td>
</tr>
-->
</tbody>';
}
// END: create static box
$html .= '</table>
</div>
<!-- /SEARCH/NAVIGATION -->' .
$this->printExtraSidebar();
Hooks::run( 'MonacoSidebarEnd', [ $this ] );
Doom Wiki still runs with MediaWiki version 1.27 using a fork maintained by James Haley. The request from haleyjd in the comments section above to make this generic is from 2014-04-20.
This was ten years ago and it's time to replace this proprietary solution for the Doom Wiki with a hook that allows the insertion of a donate button through an extension. For example MonacoStaticboxEnd
:
</tbody>';
}
// END: create static box
$html .= '</table>';
Hooks::run( 'MonacoStaticboxEnd', [ $this, &$html ] );
$html .= '</div>
<!-- /SEARCH/NAVIGATION -->' .
$this->printExtraSidebar();
Hooks::run( 'MonacoSidebarEnd', [ $this, &$html ] );
Handling of themes
editI spend two day to figure out, how the theme thing works.
I tried the skins Bouquet, Dusk, and Gamepress with extension Theme and they work fine.
Monaco does not. I can get the theme layout adding i.e. &usetheme=sky
to the url, but thats all. :-(
And it is possible to set a default theme as $wgMonacoTheme = "sky";
. But it is not possible to select the themes in the preferences.
Who is familiar with this topic and can contribute something? WikiForMen (talk) 20:49, 2 May 2024 (UTC)
- I spent one day and night more and got it run! ;-)
- The first issue is, that the skins Bouquet, Dusk, and Gamepress are using something like
"ThemeModules": { "monaco": [ "/*comma separated list of theme names*/" ] },
- in the
style.php
with the "manifest_version" 1.ThemeModules
seems not to work with "manifest_version" 2, so I went back to Schema 1. - The second issue is, that skin Monaco does not work with Theme. I haven't really figured out the why. However, I did find out that the skin has (almost) everything to run the themes without the extension. I had to add two things:
- UserOptionsLookup and
- the hook GetPreferences
- As I noticed, this
ThemeModules
in thestyle.php
, which the other skins with theme support use, is only required by the Theme extension. In this case the[ "/*comma separated list of theme names*/" ]
can be hardcoded and everything is fine. :-) - Feel free on testing: Version 2.8.0 WikiForMen (talk) 05:10, 3 May 2024 (UTC)
- Finally I substituted this portion of code in class SkinMonaco
use MediaWiki\MediaWikiServices; use MediaWiki\Revision\SlotRecord; [...] $theme = $this->config->get( 'MonacoTheme' ); if ( $this->config->get( 'MonacoAllowUseTheme' ) ) { $theme = $this->getRequest()->getText( 'usetheme', $theme ); if ( preg_match( '/[^a-z]/', $theme ) ) { $theme = $this->config->get( 'MonacoTheme' ); } } if ( preg_match( '/[^a-z]/', $theme ) ) { $theme = 'sapphire'; } // Theme is another conditional feature, we can't really resource load this if ( isset( $theme ) && is_string( $theme ) && $theme != 'sapphire' ) { $out->addStyle( "Monaco/style/{$theme}/css/main.css", 'screen' ); }
- with this one:
use MediaWiki\MediaWikiServices; use MediaWiki\Revision\SlotRecord; use MediaWiki\User\UserOptionsLookup; [...] $request = $this->getRequest(); $theme_key = SkinMonaco::getThemeKey(); $user = RequestContext::getMain()->getUser(); // Check the following things in this order: // 1) value of $wgDefaultTheme (set in site configuration) // 2) user's personal preference/override // 3) per-page usetheme URL parameter $theme_fallback = SkinMonaco::getSkinMonacoDefaultTheme(); $theme = $this->config->get( 'MonacoTheme', $theme_fallback ); if ( $this->config->get( 'MonacoAllowUseTheme' ) ) { $theme = $this->mUserOptionsLookup->getOption( $user, $theme_key, $theme ); $theme = $request->getText( 'usetheme', $theme ); } $themes = SkinMonaco::getSkinMonacoThemeList(); if ( !in_array( $theme, $themes ) ) { $theme = $theme_fallback; } // Theme is another conditional feature, we can't really resource load this if ( $theme !== $theme_fallback ) { $out->addStyle( "Monaco/style/{$theme}/css/main.css", 'screen' ); }
- That should take care of most of the work. But wait a moment! There is another problem with
style.php
, which has issues with Extension:Theme in "manifest_version" 2. - And then there's the matter of using the global variable
$wgMonacoAllowUsetheme
to enable and disable theme selection in the configuration. The "Theme" extension cannot handle this at all! And anyway! Why bother with an additional extension at all? - All that is needed is the additional provision of the hook function for "GetPreferences"! Plus the two static convenience functions:
public static function getSkinMonacoDefaultTheme() { return "sapphire"; } public static function getSkinMonacoThemeList() { return [ "beach", "brick", "carbon", "forest", "gaming", "jade", "moonlight", "obsession", "ruby", "sapphire", "sky", "slate", "smoke", "spring" ]; } public static function getThemeKey() { return 'theme_monaco'; }
- This means that the Monaco skin works without any theme extension. ;-) WikiForMen (talk) 18:43, 4 May 2024 (UTC)