Difference between revisions of "User:King of Herdaz/Toolbar customization"

m
m
 
==== Strings ====
A string is a piece of text within the toolbar that is encased between two apostrophes {<code>'</code>). Strings are used in labels and actions. They should follow the following guidelines:, though some of them are not relevant to labels.
 
* Inserting <code>' + '</code> between two parts of a string can have effects on your [[Special:MyPage/common.js|common.js]] page (as will be discussed below), but will not appear on a page when the action is called, or be included in the label(s) on the actual toolbar. For example, both <code><nowiki>{{stub}}</nowiki></code> and <code><nowiki>{' + '{stub}}</nowiki></code> will produce the same result (<code><nowiki>{{stub}}</nowiki></code>) on the page when they are called.
* When writing out templates, whether for a label or an action, you must insert <code>' + '</code> between the first two curly brackets. For example, instead of writing <code><nowiki>{{Stormlight}}</nowiki></code> you should write <code><nowiki>{' + '{Stormlight}}</nowiki></code>. This prevents the template from applying categories to your [[Special:MyPage/common.js|common.js]] page and also prevents it from being listed on the relevant template's list of pages that use it.
Autopatrolled, Editors
8,718

edits