Welcome to Wargaming.net Wiki!
Variants
/
Style Guide

Style Guide

Revision as of 04:44, 6 March 2014 by
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Global Wiki: Style Guide

General Information

For simplification and automation of filling by a content of articles of Wiki a row of auxiliary tools - widgets is implemented. Widgets are an analog of the user MediaWiki templates. Working with them is similar but the are some differences:

  • widgets work for all localizations
  • widgets can't be edited by users

Widgets are implemented on the basis of MediaWiki parcer functions. Detailed documentation on all widgets is reflected in the Global Wiki Widgets document. Widgets can be inserted into each other, combined with user templates and with HTML tags. Results of operation with widgets are cached by the server. The whole page is stored in cache. The cache is updated during resaving the page. Pictures are automatically imported by application from the client. Images are common for all languages. For an insertion of gallery images it is necessary to use the <gallery> tag built in in the editor. To control a place where the contents of article shall be inserted, you can use the magic word __TOC __.

Basic Pages

Index Page

Index Page. Please note - the page uses Transclusion for operation. Articles, which you want to insert inside the index page must be prepared with tags:


<noinclude>material invisible there </noinclude>
<includeonly>material invisible here </includeonly>
<onlyinclude>material outside this section invisible there </onlyinclude>

Pages for video-guides and good articles must be prepared beforehand. Examples of pages for insertion: Article «What is New?» Page «Need Help».

Project page

Project Page (World_of_Warplanes, World_of_Tanks). This page also uses Transclusion. The prepared icons:

Technique upgrade
  • menu_icon_gun.png Guns
  • menu_icon_turret.png Turrets
  • menu_icon_engine.png Engine
  • menu_icon_track.png Tracs
  • menu_icon_radio.png Radio
Technique complete set
  • menu_icon_crew.png Crew
  • menu_icon_ammo.png Ammo
  • menu_icon_equipment.png Equipment
  • menu_icon_kit.png Kits
  • menu_icon_view.png View
Reference book
  • menu_icon_mode.png Game mode
  • menu_icon_map.png Maps
  • menu_icon_awards.png Awards
  • menu_icon_gold.png Economics
  • menu_icon_terms.png Game Terms
  • menu_icon_compare.png Comparison
  • menu_icon_world_war.png Global map
Game mechanics
  • menu_icon_balance.png Match-Making
  • menu_icon_booleetproof.png Shooting and и armor
  • menu_icon_viewandmask.png Camo and View range
  • menu_icon_other.png Other aspects
eSport
  • menu_icon_manual.png Manual
  • menu_icon_tournaments.png Tournaments
  • menu_icon_wgl.png Wargaming.net League
Manuals
  • menu_icon_guides.png Game guides
  • menu_icon_tactics.png Tactics
  • menu_icon_rota.png Compatlesny bat
  • menu_icon_video.png Video guides
Other info about game
  • menu_icon_notes.png Notes from players
  • menu_icon_modif.png Mods
  • menu_icon_links.png links

Tank/Plane Page

Tank/Plane Page. Please pay attention how widgets follow each other. (See document: Characteristics)

List of Vehicles page

List of Vehicles page. For tanks and planes. (See document: VehiclesTypes)

Crew ranks page

Crew ranks page (See document: Ranks)

Maps page

Maps page (See document: Maps)



Notes

Marked list

To make color list, it is necessary to insert after the first element + (for green color) and - for red.

Example:


*- Element of the marked list (1 level)
** Element of the marked list (2 level)
*** Element of the marked list (3 level)
* Element of the marked list (1 level)

*+ Element of the marked list (1 level)
** Element of the marked list (2 level)
*** Element of the marked list (3 level)
* Element of the marked list (1 level)

Tree of Modules

To add iframe of tree of modules for the whole page, you need to add to MediaWiki page:Common.js the following page:


function showModulesTree() {
$('.js-modules-tree').each(function(){
var $this = $(this), contentWidth, contentHeight, iframe, contentPadding;
$this.html('<div class="b-modulestree"><iframe frameborder="0" style="border-width: 0; width: 1000px; min-width: 100%; height: 695px;" src="https://armor.kiev.ua/wot/tanks/modulestree.php?vehicle=' + $.trim($(this).text()) + '"></iframe></div>');
iframe = $this.find('iframe');
contentWidth = iframe.width();
contentHeight = iframe.height();
contentPadding = parseInt(iframe.parent().css('padding-bottom'));
$this.height(contentHeight + contentPadding);

$this.data('jsp','').jScrollPane({showArrows:false, contentWidth: contentWidth, contentHeight: contentHeight});
$(window).resize(function(){
$this.data('jsp').reinitialise();
});
});
}
addOnloadHook(showModulesTree);

And in the text of article you must add the following (tank code can be differnt):


<div class="js-horizontal-pane l-modulestree js-modules-tree">
T-34
</div>


Content space names

For division of articles about vehicles according to games/projects the following name spaces for content are created:

  • Tank
  • Plane
  • Ship
  • Card

MediaWiki space names

Editing of the global side-bar menu can be done according to the link: / MediaWiki:Sidebar. Recommended contents for official article:

  • sidebar_projects
    •  :World_of_Tanks|World of Tanks@Tank
    •  :World_of_Warplanes|World of Warplanes@Plane
    •  :World_of_Warships|World of Warships@Ship
    •  :WoT_Generals|WoT Generals@Card
  • navigation
    • currentevents-url|currentevents
    • randompage-url|randompage
    • recentchanges-url|recentchanges
    • helppage|help

"Wrap" element

Please remember that for the right element "wrap" all the parts of elements aligned right must be wrapped into text wrap. Example:


{{#gw_switcher:|align=right|background=[[File:Lassvil_minimap.jpg|150x150px]]
|Original#
|Button1#
[[File:Lassvil_minimap_tags.jpg|150x150px|link=|guns ваып]]
|Button2#
[[File:Device_stereoscope.png|150x150px|link=|guns ваdfgп]]
}}
<div class="b-wiki-panel">
Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test
</div>   


Video Guides

Additional info about gw_article_scroll: All the info about widgets can be found here

  • Widget takes page names as принимает ("takes") parameters, so you have to create the pages beforehand.

Example


{{#ev:youtube|CcLt8BEJbRs}}
[[Categories: Video guides]]

1st line - the video itself. Video must be added only this way. 2nd line - adds article to the category. Please note, that widget adds not the video itself but a text from article, that is why there is text on the page with video. But if we do not want text to appear, we can use tag noinclude:


<noinclude>=== Test ===
Very huge and boring text
</noinclude>
{{#ev:youtube|CcLt8BEJbRs}}
[[Category: Videos]]

In such case in the widget there will be text which is not in tags noinclude.

  • Usage of the widget needs special html structure:

<div class="b-info clearfix">
<div class="b-info_item">
<div class="l-info_inner">
<h2>Widget name</h2>{{#gw_article_scroll:Article name,another name}}[[Special:Categories/Video guides|class=b-info_more|to the section »]]
</div>
</div>
</div>

CSS-classes for links and images

Links and images must have classes. Example, if you want to add padding for the awards icons, images need to take class reward_img.
<nowiki>[[file:MedalAbrams1.png|class=reward_img]]</nowki>
.

Privileges of sysop

Admins (sysop) have the rights for editing information (articles) which are in MediaWiki space names, including:

  • Editing the list
  • Reasons for deleting article
  • Reasons for deleting file
  • Reason for protecting the article
  • Reason for blocking the user
  • Reason for remove audit articles
  • Edit quick past panel (Edittools)
  • Edit global side bar (Sidebar)
  • Edit localization phrases of interface.

Please think twice before using it as the results of the actions are seen to everyone.

Creating articles about vehicles using templates

When you are trying to create article in vehicles space names (Tank, Plane) if the name of created article corresponds to one of vehicles codes, appears the message with a prposal to create article on the specified template. Templates shall be created beforehand (names: TankPage, PlanePage, etc. )

Category: