Extension talk:Theme

Latest comment: 4 years ago by Flounder ceo in topic Works. Thank you!

This extension seems to be outdated as the website in the example has some porblems.--89.189.79.36 14:15, 15 August 2011 (UTC)Reply

Include JavaScript resources as well

edit

A pretty useful extension. I use it to add JavaScript resources as well with the following simple patch:

90c90
< 	$out->addModuleStyles( $moduleName );
---
> 	$out->addModules( $moduleName );

I'm not aware of any drawbacks this might have, hence I'd suggest to incoporate this into the official version. - RV1971 (talk) 13:35, 5 February 2013 (UTC)Reply

Needs Per-Skin Default Theme

edit

$wgDefaultTheme['skinname'] = theme would be useful. As it stands it is not usable when multiple themable skins are installed. That and it doesn't work (e.g. "dark" out of the box for monobook changes the text color only)... --69.164.128.66 08:36, 22 February 2015 (UTC)Reply

Example for using the 'usetheme=x' parameter in LocalSettings.php

edit

"usetheme=X parameter is accepted in LocalSettings.php to change the theme on a per-pageload basis."

I am not familiar with this syntax in LocalSettings.php; its not a complete statement that would work in a LocalSettings.php file. Could someone post an example for specifying a particular theme of a skin on a per pageload basis.

What does per pageload basis mean? I assume this means that you can specify themes on a per page basis similar to what the skin per page extension does (except the specification for the theme to use is in local settings).

As far as I understand the instructions, this extension has enabled me to use themes with skins, except the bit about specifying one theme of an applied skin to one page, and, another theme of the applied skin to another page. It is an effective way to make different parts of a site or functions of a site stand out from one another, e.g. sets of forms that do slightly different things, belong to different groups, etc. I don't need users to be able to select themes on a per page basis and don't mind hardcoding themes in LocalSettings.php for a few important pages.

Internal error on 1.30

edit

Trying to access Special:Preferences after upgrading to 1.30 I get page titled Internal error and the following content:

2018-04-28 22:49:32 ed39ea6311ed wikidb: [566cee2fb2686f5b8c7c7aaf] /Special:Preferences   MWException from line 148 of /var/www/includes/Preferences.php: Global default '' is invalid for field theme
#0 /var/www/includes/Preferences.php(100): Preferences::loadPreferenceValues(User, RequestContext, array)
#1 /var/www/includes/Preferences.php(1356): Preferences::getPreferences(User, RequestContext)
#2 /var/www/includes/specials/SpecialPreferences.php(127): Preferences::getFormObject(User, RequestContext)
#3 /var/www/includes/specials/SpecialPreferences.php(84): SpecialPreferences->getFormObject(User, RequestContext)
#4 /var/www/includes/specialpage/SpecialPage.php(522): SpecialPreferences->execute(NULL)
#5 /var/www/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#6 /var/www/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#7 /var/www/includes/MediaWiki.php(851): MediaWiki->performRequest()
#8 /var/www/includes/MediaWiki.php(523): MediaWiki->main()
#9 /var/www/index.php(43): MediaWiki->run()
#10 {main}

Saw this mentioned here but no updates: https://phabricator.wikimedia.org/T181898

Works. Thank you!

edit

I got this going on my site. Had to customize a bit to get it looking right but now the dark vector option can be turned on and off within preferences. Flounder ceo (talk) 17:58, 24 September 2020 (UTC)Reply

I customized my dark.css file. The code is posted here in case anyone finds it useful. Flounder ceo (talk) 00:23, 16 October 2020 (UTC)Reply
Return to "Theme" page.