Skin talk:Vector

About this board

Huwmanbeing (talkcontribs)

What is the best way to make a working copy of the current version of Vector that can then be adjusted?

I wanted to try something similar to DarkVector (a skin based on Vector with just some cosmetic adjustments), but when I duplicate the current 1.37 Vector and change out the skin name in the code and file names, it produces internal errors like this:

Class 'AltVector\SkinVersionLookup' not found.
Backtrace: from /var/www/my.wiki/public_html/mediawiki-1.37.2/skins/AltVector/includes/ServiceWiring.php(55)
...

Thanks for any thoughts/suggestions on how best to approach this!

Tacsipacsi (talkcontribs)

The namespace name needs to be changed at three places:

  • In the namespace statements at the top of files. For example, change namespace Vector\ResourceLoader; to namespace AltVector\ResourceLoader;.
  • In skin.json’s AutoloadNamespaces key: "AutoloadNamespaces": {"Vector\\": "includes/"} should be "AutoloadNamespaces": {"AltVector\\": "includes/"}.
  • Wherever it’s used: in skin.json, in use statements, maybe even in comments to avoid confusion.

By the way, you technically need to change anything only if you plan to install both original Vector and your modified version (i.e. if you load both from LocalSettings.php—if the original one just sits in the skins directory but not referenced in any way, there’s no conflict), although it may be useful to do so in order to avoid confusion even if you want to use only the modified one.

Huwmanbeing (talkcontribs)

Thanks for the reply! I do plan to keep the original Vector available alongside the modified version, so I'll check the namespace statements and see if that corrects it. Huwmanbeing (talk) 16:56, 14 May 2022 (UTC)

Reply to "Duplicating Vector"

How to edit Vector's mobile CSS?

1
Summary by Amnion

There was conflicting css in the mobile css file, which I deleted. Editing the Mediawiki:mobile.css page worked.

Amnion (talkcontribs)

I use vector with mobile front end. All I want to do is change the link colors when the site is viewed on mobile. I have edited Vector.css and Mobile.css and even Common.css. None of these work. Where is the css located for the mobile version?

Nekky-chan (talkcontribs)

How do I enable the sticky header in the new vector skin? I am on MW 1.37.1.

Reply to "Sticky header"

No switch to new vector skin for logged in users

3
83.69.192.2 (talkcontribs)

Hi, I have made following settings for the skin:

wfLoadSkin( 'Vector' );
$wgDefaultSkin = 'vector';
$wgVectorDefaultSkinVersion = '2';
$wgVectorDefaultSkinVersionForExistingAccounts = '2';
$wgVectorDefaultSkinVersionForNewAccounts = '2';

So the website is switched to the new version of vector skin, but as soon as I login to any account the website displays old version of vector.

Please help me to have new vector skin for all guests, users as default one.

Fokebox (talkcontribs)

I still cannot exclude old version of vector skin for logged in users. Please help.

Sokote zaman (talkcontribs)

$wgDefaultSkin = "vector";

wfLoadSkin( 'Vector' );

$wgVectorResponsive = true;

$wgVectorDefaultSkinVersion = '2';

$wgVectorDefaultSkinVersionForExistingAccounts = '2';

$wgVectorDefaultSkinVersionForNewAccounts = '2';

$wgVectorIsSearchInHeader = true;

$wgVectorLanguageInHeader = true;

$wgVectorUseWvuiSearch = true;

$wgVectorUseIconWatch = true;

$wgVectorUseSimpleSearch  = true;

Reply to "No switch to new vector skin for logged in users"

The logo is not visible

4
Summary by Jdlrobson

Manual:$wgLogos has updated information on how to configure logos for skins.

Jelican9 (talkcontribs)

Hi, when I select the modern vector theme, only the name appears instead of the logo. How can I solve this?

Anerisys (talkcontribs)

Do you mean on MediaWiki.org or your own installation? Does the issue occur on other devices as well? Perhaps the browser cache needs clearing.

Jelican9 (talkcontribs)

Yes, I asked for I installed it on my own localhost.

Jdlrobson (talkcontribs)

How to set new vector as default for all users?

7
Activede (talkcontribs)

I have set vector as default via $wgVectorDefaultSkinVersion = '2'; – however that doesn't apply for registered users. The "classic vector" box is still ticked. Any ideas?

Activede (talkcontribs)

I just found out. Just add:

$wgVectorDefaultSkinVersionForExistingAccounts = '2'; $wgVectorDefaultSkinVersionForNewAccounts = '2';

Fokebox (talkcontribs)

I have added such setting, but they haven't applied to users who logged in their accounts. Any ideas to resolve the problem?

Beginneruser (talkcontribs)

Hi Fokebox

Use this $wgVectorDefaultSkinVersion = '2';

Other options for Vector skin see in this

Fokebox (talkcontribs)

I have made such setting and I have Vector 2022 as a default, but as soon as I login any account I see old vector version.

Beginneruser (talkcontribs)
Fokebox (talkcontribs)

I have MW 1.37 included with new vector skin

Reply to "How to set new vector as default for all users?"

vector.css apparently affects Vector 2022.

2
Anerisys (talkcontribs)

I got switched automatically to Vector-2022 on MediaWiki.org, but my vector.css affects the appearance of Vector 2022. Is this intentional?

Tacsipacsi (talkcontribs)

Yes, it’s intentional (but only temporary), see phab:T301212 about the planned removal of this feature.

Reply to "vector.css apparently affects Vector 2022."
GhostInTheMachine (talkcontribs)

What is the official / correct way for a user script to test for a page being viewed by a user that is configured to use the new evil Vector rather than the real Vector? They both show up as

mw.config.get('skin') = "vector"

~~~~

Tacsipacsi (talkcontribs)

I don’t know how official or future proof this is, but

$('body').is('.skin-vector-legacy')

is the original Vector. (It works 100% correctly at the moment.)

GhostInTheMachine (talkcontribs)

Real Vector returns -- mw.config.get('skin') = 'vector'
and has body tag classes -- "skin-vector" and "skin-vector-legacy"

Evil Vector now returns -- mw.config.get('skin') = 'vector-2022'
and has body tag classes -- "skin-vector" and "skin-vector-2022"
(not sure when that started)

Tacsipacsi (talkcontribs)
Reply to "New Vector?"

Folder to rest.api

3
Summary by Tacsipacsi
176.134.90.110 (talkcontribs)

Bonjour,

Nous utilisons la dernière version de Vector pour mediawiki 1.38.0-wmf.13 de mediawiki et tout fonctionne, sauf la barre de recherche principale.

En effet, nous installation est directement dans le répertoire principale, mais il semble que vector appel :

mysite/w/rest.php

Au lieu de

mysite/rest.php

Savez-vous comment résoudre ce problème pour faire fonctionner la barre de recherche (celle de mobilefrontend fonctionne elle normalement)?

Cordialement.

Tacsipacsi (talkcontribs)

Unfortunately it’s not possible in new Vector yet, see phab:T288686. You can temporarily switch back to the old Vector by setting $wgVectorDefaultSkinVersion = '1'; in your LocalSettings.php, or try setting a symlink named w in your wiki root directory (ln -s w, if you have shell access and the server runs some sort of Linux). I couldn’t get the latter work, though, probably it would require some .htaccess magic that I don’t have.

176.134.90.110 (talkcontribs)

Hello,

Thank you for your lead, I just modified directly the :

wvui-search.commonjs2.js and wvui-commonjs2.js

And it works :)

Kims

Reply to "Folder to rest.api"

Logo by namespace in "new" Vector

2
Loizbec (talkcontribs)

Hi,

I recently started using the new Vector. It used to be possible to handle one logo per namespace, using the vector skin, by modifying ''mediawiki:Vector.css'' and using lines like :

.ns-750 #p-logo a, .ns-751 #p-logo a{background-image: url('images/thumb/Projets.svg/120px-logo.svg.png') !important;}

But this does not seem possible anymore, especially since the css does not define the logos anymore. Any idea on how to do that (choose the logo depending on the namespace) with the new Vector skin ?

Thanks in advance

Jdforrester (WMF) (talkcontribs)

You would need to write a hook handler that changes the value of $wgLogos based on the namespace, I think. Probably something pretty early post-render, like ContentAlterParserOutput.

Reply to "Logo by namespace in "new" Vector"