Manual:$wgLogos/da
| Server URLs and file paths: $wgLogos | |
|---|---|
| URL-stien til forskellige wiki-logoer |
|
| Introduced in version: | 1.35.0 (Gerrit change 562588; git #8cd2e133) |
| Removed in version: | Still in use |
| Allowed values: | (vifte af faktorer og relative stier eller webadresser) |
| Default value: | false(Note: The default value of this variable depends on other variables, such as the values set in Setup.php, after LocalSettings.php is executed.) |
| Other settings: Alphabetical | By function | |
This variable in LocalSettings.php specifies the location of one or more files to be used as the site logo. (dvs. billedet vist i øverste venstre hjørne af siden i de fleste MediaWiki-installationer).
En matrix med faktorer og deres tilhørende relative stier eller URL-stier til de forskellige versioner af wiki-logoet.
This replaces $wgLogo, which was used before MediaWiki 1.35.
Detaljer
Do not simply overwrite the default logo installed at MediaWiki (/resources/assets/wiki.png); this file will be overwritten when you upgrade the software. |
Afhængigt af dine serverindstillinger gemmes oplysningerne om, hvilket billede der skal bruges, i en cache i en server. Desuden kan billeder blive cachelagret inde i webbrowseren i lang tid, så du ikke umiddelbart ser det nye logo, hvis du ændrede den tilsvarende billedfil. I dette tilfælde kan det være nødvendigt især at tømme caches og genindlæse billedets URL i din webbrowser, så browseren downloader den aktuelle version fra serveren. |
Understøttede formater
- icon
- This is used for the site logo in the Vector 2022 skin, where it is shown at 50×50 pixels (or SVG equivalent), and in the Timeless, Refreshed, Citizen skins, where it is typically shown at larger sizes. Bemærk, at andre udseender typisk kræver et større ikon, hvis de understøtter dette, så det anbefales at bruge en SVG i stedet, da det skaleres korrekt på tværs af dem alle. Otherwise, the image should be square and 100×100 pixels if a raster image like PNG in order to support HiDPI. Nuværende support til denne nøgle er begrænset til $1, $2, men dette anbefales til alle nye udseender.
- 1x
- This is used by the legacy Vector and MonoBook skins, and some others.[clarification needed] The image should be 135px wide by up to around 155px tall. Dette skyldes, at versionerne 1.5x og 2x antager en nominel bredde på 135px, og op til 155px høje vil passe uden problemer i standardudseender.[clarification needed] A larger size logo can be used by modifying the site's CSS, but MediaWiki will not shrink a logo that is too large. Instead, only part of the image (specifically the upper left-hand corner) will be visible, and if this corner is white it may seem like the image is not being displayed at all. Dette understøtter ældre udseender og vil på længere sigt blive forældet. Vi anbefaler, at udseender understøtter det foretrukne 'ikon'.
- 1.5x
- This image should be 202px wide and match the aspect ratio of the 1x image (so up to 232px tall, for 155px nominal height). Nøglen vil blive udfaset i fremtiden, og dens brug anbefales ikke.
- 2x
- This image should be 270px wide and match the aspect ratio of the 1x image (so up to 310px tall, for 155px nominal height). Nøglen vil blive udfaset i fremtiden, og dens brug anbefales ikke.
- svg
- This is used for SVG logos instead of the separate
1x,1.5x,2xkeys, but should follow the same size guidelines (nominally) as those keys, fitting within 135px wide and 155px tall when sized to 135px wide. Nøglen vil blive udfaset i fremtiden, og dens brug anbefales ikke.
Der er også to valgfrie felter, hvor yderligere aktiver kan vises ved siden af logoet:
- wordmark
- This should be a landscape monochrome[1] image (wider than it is tall), with its maximum width and height set by the
widthandheightkeys. The width should not exceed 124px and the height should not exceed 32px. Typisk er dette den grafiske version af $wgSitename. Dette bruges Vector 2022 (1.36), Timeless, Minerva - tagline
- The requirements here are the same as for the wordmark. * Det samme gælder for tagline, som typisk svarer til den del, der ikke er sitenavn på MediaWiki:Tagline. The combined height of the tagline and wordmark should not exceed 50px.
Alle værdier (undtagen width og height) kan enten være en fuldt kvalificeret URL eller en relativ sti fra ll|Manual:Installing MediaWiki#Document root.
If it's a relative path, it has to start with a slash (i.e., a file in the document root is /file.png, not file.png).
Example images
Eksempel
$wgLogos = [
'1x' => "path/to/1x_version.png",
'1.5x' => "path/to/1.5x_version.png",
'2x' => "path/to/2x_version.png",
'svg' => "path/to/svg_version.svg",
'icon' => "path/to/icon.png", // version of logo without wordmark and tagline
'wordmark' => [
'src' => "path/to/wordmark_version.png",
'1x' => "path/to/wordmark_version.svg", // optional: support SVG in addition to PNG
'width' => 135,
'height' => 20,
],
'tagline' => [
'src' => "path/to/tagline_version.png",
'width' => 135,
'height' => 15,
],
];
Simple example
$wgLogos = [
'icon' => "$wgScriptPath/lol.png", // path to primary logo for Vector 2022
'1x' => "$wgScriptPath/myCustomLogo.png", // path to 1x version for other skins
'2x' => "$wgResourceBasePath/hiResLogo.png", // path to 2x version for other skins
];
Example paths
$wgLogos = [
'1x' => "/lol.png", // relative path to file in document root
'1.5x' => "https://mywiki.org/w/resources/assets/lol.png", // full URL to elsewhere
'2x' => "/lol.png", // relative paths always start with a slash
// 'svg' => "", // svg key has been deprecated
'icon' => "/lol.png", // 50×50 SVG or 100×100 PNG (limited support)
'wordmark' => [
'src' => "/wordmark_sitename.png", // image of sitename text (limited support)
'width' => 135,
'height' => 20,
],
'tagline' => [
'src' => "/tagline_subtitle.png", // image of tagline text without sitename (limited support)
'width' => 135,
'height' => 15,
],
];
Adding logos for language variants
The functionality to override logos for different language variants was introduced in version 1.36.0 (Gerrit change 627939, git #8cd2e133). See T261153.
When defining variants, any language key can be used, for example it is possible to provide a German variant of an English logo.
This was extended to apply to all logo keys in 1.39.0.
$wgLogos = [
'1x' => "path/to/1x_version.png", // path to 1x version
'1.5x' => "path/to/1.5x_version.png", // path to 1.5x version
'2x' => "path/to/2x_version.png", // path to 2x version
'svg' => "path/to/svg_version.svg", // path to svg version
'icon' => "path/to/icon.png", // A version of the logo without wordmark and tagline
'wordmark' => [
'src' => "path/to/wordmark_version.png", // path to wordmark version
'1x' => "path/to/wordmark_version.svg", // optional if you want to support browsers with SVG support with an SVG logo.
'width' => 135,
'height' => 20,
],
'tagline' => [
'src' => "path/to/tagline_version.png", // path to tagline version
'width' => 135,
'height' => 15,
],
'variants' => [
'variant-code' => [
'1x' => "path/to/language_variant_1x_version.png", // path to 1x version in language variant
'1.5x' => "path/to/language_variant_1.5x_version.png", // path to 1.5x version in language variant
'2x' => "path/to/language_variant_2x_version.png", // path to 2x version in language variant
'svg' => "path/to/language_variant_svg_version.svg", // path to svg version in language variant
'icon' => "path/to/language_variant_icon.png", // A version of the logo without wordmark and tagline in language variant
'wordmark' => [
'src' => "path/to/language_variant_wordmark_version.png", // path to wordmark version in language variant
'1x' => "path/to/language_variant_wordmark_version.svg", // optional if you want to support browsers with SVG support with an SVG logo in language variant.
'width' => 135,
'height' => 20,
],
],
],
];
Se også
- ↑ Minerva and Wikimedia brand guidelines expects the wordmark to be monochrome. Colors should be limited to the icon component.