Hi,
I want to remove the item from the User Preferences page that lets Users change the skin they see my site with. What is the best way to do this?
*Why* I want to remove the skin choice from User Preferences because I have some customizations in Monobook that are important to my site and I don't want to go though customizing more than one skin.
One example of my site CSS customizations is some green bordered cards on a page. The cards' green borders and layouts are CSS classes customized in skins/monobook/main.css and, so that they will print properly, also in skins/common/commonPrint.css
The green bordered cards are on this page: http://wikigogy.org/Discussion_card
Ideas?
Thanks,
Roger :-) Wikigogy.org -- running MediaWiki 1.6.7
Roger Chrisman a écrit :
Hi,
I want to remove the item from the User Preferences page that lets Users change the skin they see my site with. What is the best way to do this?
see http://mail.wikipedia.org/pipermail/mediawiki-l/2006-June/012499.html
or go into yourwikifolder/skins and put the skins you want to disable in the *skins/disabled* folder (but I think -not sure- you must keep the standard.php file in the skins folder and disable it using the above link)
Alexis Moinet wrote:
Roger Chrisman a écrit :
Hi,
I want to remove the item from the User Preferences page that lets Users change the skin they see my site with. What is the best way to do this?
see http://mail.wikipedia.org/pipermail/mediawiki-l/2006-June/012499.html
or go into yourwikifolder/skins and put the skins you want to disable in the *skins/disabled* folder (but I think -not sure- you must keep the standard.php file in the skins folder and disable it using the above link)
I decided to do it by putting this into LocalSettings.php:
# To remove various skins from the User Preferences choices $wgSkipSkins = array("chick", "cologneblue", "myskin", "nostalgia", "simple", "standard");
(that is one $wgSkipSkins line above, but broken for email)
See http://meta.wikimedia.org/wiki/Skins#Remove_Skins
Ideally I would like to completely remove or hide the Skin page link/tab from User Preferences, too. Any Ideas how best to do that? Maybe with CSS?
Thanks,
Roger http://Wikigogy.org -- MediaWiki 1.6.7
Ideally I would like to completely remove or hide the Skin page link/tab from User Preferences, too. Any Ideas how best to do that? Maybe with CSS?
go in *includes\SpecialPreferences.php* and comment the lines
# Skin # $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" ); $mptitle = Title::newMainPage(); $previewtext = wfMsg('skinpreview'); # Only show members of $wgValidSkinNames rather than # $skinNames (skins is all skin names from Language.php) foreach ($wgValidSkinNames as $skinkey => $skinname ) { if ( in_array( $skinkey, $wgSkipSkins ) ) { continue; } $checked = $skinkey == $this->mSkin ? ' checked="checked"' : ''; $sn = isset( $skinNames[$skinkey] ) ? $skinNames[$skinkey] : $skinname;
$mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey")); $previewlink = "<a target='_blank' href="$mplink">$previewtext</a>"; if( $skinkey == $wgDefaultSkin ) $sn .= ' (' . wfMsg( 'default' ) . ')'; $wgOut->addHTML( "<input type='radio' name='wpSkin' id="wpSkin$skinkey" value="$skinkey"$checked /> <label for="wpSkin$skinkey">{$sn}</label> $previewlink<br/>\n" ); } $wgOut->addHTML( "</fieldset>\n\n" );
Alexis Moinet wrote:
Ideally I would like to completely remove or hide the Skin page link/tab from User Preferences, too. Any Ideas how best to do that? Maybe with CSS?
go in *includes\SpecialPreferences.php* and comment the lines
# Skin # $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') .
"</legend>\n" ); $mptitle = Title::newMainPage(); $previewtext = wfMsg('skinpreview'); # Only show members of $wgValidSkinNames rather than # $skinNames (skins is all skin names from Language.php) foreach ($wgValidSkinNames as $skinkey => $skinname ) { if ( in_array( $skinkey, $wgSkipSkins ) ) { continue; } $checked = $skinkey == $this->mSkin ? ' checked="checked"' : ''; $sn = isset( $skinNames[$skinkey] ) ? $skinNames[$skinkey] : $skinname;
$mplink =
htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey")); $previewlink = "<a target='_blank' href="$mplink">$previewtext</a>"; if( $skinkey == $wgDefaultSkin ) $sn .= ' (' . wfMsg( 'default' ) . ')'; $wgOut->addHTML( "<input type='radio' name='wpSkin' id="wpSkin$skinkey" value="$skinkey"$checked /> <label for="wpSkin$skinkey">{$sn}</label> $previewlink<br/>\n" ); } $wgOut->addHTML( "</fieldset>\n\n" );
Nice. Working beautifully. Thanks you. And I have added this tip to http://meta.wikimedia.org/wiki/Skins
Wait, that was probably not the best wiki to leave my note on. I'm confused. I should have put my help note on mediawiki.org and *not* on meta.wikimedia.org, right?
Roger :-) http://Wikigogy.org/User:Roger -- MediaWiki 1.6.7
Wait, that was probably not the best wiki to leave my note on. I'm confused. I should have put my help note on mediawiki.org and *not* on meta.wikimedia.org, right?
Hm.. I think I should have put that note on mediawiki.org instead. So now I have, here: http://www.mediawiki.org/wiki/Skins
Roger :-) http://Wikigogy.org -- MediaWiki 1.6.7
mediawiki-l@lists.wikimedia.org