Extension talk:Theme

From MediaWiki.org
Jump to navigation Jump to search

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

Include JavaScript resources as well[edit]

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

< 	$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)

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)... -- 08:36, 22 February 2015 (UTC)

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