Difference between revisions of "User:Jean-francois.royer/sandbox"

From wiki
Jump to navigation Jump to search
(User's personal sandbox)
 
 
(4 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
</multilang>
 
</multilang>
 
</div><br>
 
</div><br>
 +
 +
 +
==Using a userbox==
 +
<p>To make a userbox you need to create a new page in the template namespace. You will be using one of three templates that already exist: {{tl|userbox}} (which has no borders), {{tl|userbox2}}, or {{tl|userbox3}} (both of these have borders). Documentation on how to use these templates can be found on their respective pages. Don't forget to add new userboxes to the gallery by going to [[GCpedia:Userboxes/Gallery]].</p>
 +
 +
===Examples===
 +
 +
If you want to make a userbox called "UBXexample" you would put the URL in the box below into your address bar, to create that page:
 +
<pre>http://www.gcpedia.gc.ca/wiki/Template:UBXexample</pre>
 +
 +
To create a userbox that is white on the left, blue on the right, with a picture of a gnome, and the text "This is a UBXexample", include the following generic code on a page:
 +
<pre>{{userbox2|gray|lightblue|[[Image:gnome.png|40px]]|This is a UBXexample.}}</pre>
 +
 +
When you save the page, the result will be a template that looks like this: {{userbox2|gray|lightblue|[[Image:gnome.png|40px]]|This is a UBXexample.}}
 +
 +
Other examples:
 +
<pre>{{userbox|red|white|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}</pre>
 +
Looks like: {{userbox|red|white|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}
 +
<pre>{{userbox2|red|white|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}</pre>
 +
Looks like: {{userbox2|red|white|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}
 +
<pre>{{userbox3|red|white|gold|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}</pre>
 +
Looks like: {{userbox3|red|white|gold|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}
 +
 +
Testing:
 +
 +
{{DND UBX}}
 +
{| cellpadding="0" cellspacing="0" style="width: 240px; background: #0B2637; border: 1px solid #0B2637;"
 +
| style="width: 45px; height: 45px; background: #0B2637;  font-size: 14pt; text-align:center" |'''[[File:Caf-emblem.png|40px]]'''
 +
| style="background: #6E7E8E; font-size: 8pt; text-align: center; padding: 4pt; line-height: 1.25em; color:black" | This person works for National Defence.
 +
|}
 +
 +
{{DND UBX-FR}}
 +
{| cellpadding="0" cellspacing="0" style="width: 240px; background: #0B2637; border: 1px solid #0B2637;"
 +
| style="width: 45px; height: 45px; background: #0B2637;  font-size: 14pt; text-align:center" |'''[[File:Caf-emblem.png|40px]]'''
 +
| style="background: #6E7E8E; font-size: 8pt; text-align: center; padding: 4pt; line-height: 1.25em; color:black" | Cette personne travaille pour la Défense nationale.
 +
|}
 +
 +
 +
  
 
==''You should see nothing below this line.''==<!-- *** Insert NOTHING BELOW this line *** -->
 
==''You should see nothing below this line.''==<!-- *** Insert NOTHING BELOW this line *** -->

Latest revision as of 11:29, 4 April 2018

A place where to store things.

Language of content

Source: GCTools Help Centre

The <multilang> tag is used for selective text display depending on user language settings. The language of the content is dependent on the user's language preferences. Small parts of texts like in templates (where you are forced to use exactly the same template name) can efficiently and easily be made multilingual using the <multilang> tag.

<multilang> 
@en| 
English Text Section 
@fr| 
French Text Section 
</multilang>

Using the <multilang> tag

Use the language setting of your page to toggle the language selection.

If you see this, your language settings are set in English.



Using a userbox

To make a userbox you need to create a new page in the template namespace. You will be using one of three templates that already exist: {{userbox}} (which has no borders), {{userbox2}}, or {{userbox3}} (both of these have borders). Documentation on how to use these templates can be found on their respective pages. Don't forget to add new userboxes to the gallery by going to GCpedia:Userboxes/Gallery.

Examples

If you want to make a userbox called "UBXexample" you would put the URL in the box below into your address bar, to create that page:

http://www.gcpedia.gc.ca/wiki/Template:UBXexample

To create a userbox that is white on the left, blue on the right, with a picture of a gnome, and the text "This is a UBXexample", include the following generic code on a page:

{{userbox2|gray|lightblue|[[Image:gnome.png|40px]]|This is a UBXexample.}}

When you save the page, the result will be a template that looks like this:

Gnome.png This is a UBXexample.


Other examples:

{{userbox|red|white|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}

Looks like:

Gnome.png A userbox is a small rectangular box that looks like this.
{{userbox2|red|white|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}

Looks like:

Gnome.png A userbox is a small rectangular box that looks like this.
{{userbox3|red|white|gold|[[image:gnome.png|40px]]|A userbox is a small rectangular box that looks like this.}}

Looks like:

Gnome.png A userbox is a small rectangular box that looks like this.


Testing:

Caf-emblem.png This person works for National Defence.
Caf-emblem.png This person works for National Defence.
Caf-emblem.png Cette personne travaille pour la Défense nationale.
Caf-emblem.png Cette personne travaille pour la Défense nationale.



You should see nothing below this line.