User:Mattshu/sandbox: Difference between revisions
(→Page Templates: Added a few inline templates) |
m (Some tidying up) |
||
Line 42: | Line 42: | ||
== Page Templates == | == Page Templates == | ||
* [[User:Mattshu/sandbox# | * [[User:Mattshu/sandbox#Inline_Templates|Inline templates]] | ||
* [[User:Mattshu/sandbox#Maintenance_Templates|Maintenance templates]] | * [[User:Mattshu/sandbox#Maintenance_Templates|Maintenance templates]] | ||
* [[User:Mattshu/sandbox#Entity-specific_Templates|Entity-specific templates]] | * [[User:Mattshu/sandbox#Entity-specific_Templates|Entity-specific templates]] | ||
Line 118: | Line 118: | ||
Bold text is very simple. Put in three (3) single apostrophes before the section of text you wish to bold, and three (3) after. | Bold text is very simple. Put in three (3) single apostrophes before the section of text you wish to bold, and three (3) after. | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki>'''Bold text'''</nowiki> | ||
|<nowiki>Remember to '''always''' brush your teeth.</nowiki> | |<nowiki>Remember to '''always''' brush your teeth.</nowiki> | ||
|Remember to '''always''' brush your teeth. | |Remember to '''always''' brush your teeth. | ||
Line 126: | Line 126: | ||
Italics are just as easy as bold text. Put in two (2) single apostrophes before the section of text you wish to italicize, and two (2) after. | Italics are just as easy as bold text. Put in two (2) single apostrophes before the section of text you wish to italicize, and two (2) after. | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki>''Italic text''</nowiki> | ||
|<nowiki>The ''Queen Mary'' sailed last night.</nowiki> | |<nowiki>The ''Queen Mary'' sailed last night.</nowiki> | ||
|The ''Queen Mary'' sailed last night. | |The ''Queen Mary'' sailed last night. | ||
Line 134: | Line 134: | ||
If you want to link to another page that is in this particular wiki, you simply need the title of the page. To link to the Main Page, you simply use "Main Page". Easy! | If you want to link to another page that is in this particular wiki, you simply need the title of the page. To link to the Main Page, you simply use "Main Page". Easy! | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki>[[Link title]]</nowiki> | ||
|<nowiki>Click here to go to the main page: [[Main Page]]</nowiki> | |<nowiki>Click here to go to the main page: [[Main Page]]</nowiki> | ||
|Click here to go to the main page: [[Main Page]] | |Click here to go to the main page: [[Main Page]] | ||
Line 141: | Line 141: | ||
You can also change the text of the link, without affecting what it links to. This is useful if you have to adjust for grammar. | You can also change the text of the link, without affecting what it links to. This is useful if you have to adjust for grammar. | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki>[[Link title|Text for link]]</nowiki> | ||
|<nowiki>[[Main Page|Click here]] to go to the main page.</nowiki> | |<nowiki>[[Main Page|Click here]] to go to the main page.</nowiki> | ||
|[[Main Page|Click here]] to go to the main page. | |[[Main Page|Click here]] to go to the main page. | ||
Line 149: | Line 149: | ||
External links are used to link to web pages that are not in this wiki. Any blue link with the http://developer.valvesoftware.com/w/skins/vector/images/external-link-ltr-icon.png icon means it's external. | External links are used to link to web pages that are not in this wiki. Any blue link with the http://developer.valvesoftware.com/w/skins/vector/images/external-link-ltr-icon.png icon means it's external. | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki>[http://www.example.com link title]</nowiki> | ||
|<nowiki>[http://www.valvesoftware.com/jobs/ Click here]</nowiki> to learn more about applying to Valve. | |<nowiki>[http://www.valvesoftware.com/jobs/ Click here]</nowiki> to learn more about applying to Valve. | ||
|[http://www.valvesoftware.com/jobs/ Click here] to learn more about applying to Valve. | |[http://www.valvesoftware.com/jobs/ Click here] to learn more about applying to Valve. | ||
Line 185: | Line 185: | ||
{{warning|Please read the [[Valve_Developer_Community:Image_use_policy|image use policy]] before uploading images.}} | {{warning|Please read the [[Valve_Developer_Community:Image_use_policy|image use policy]] before uploading images.}} | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki>[[Image:Filename.png]]</nowiki> | ||
|<nowiki>[[Image:Steam_available.png]]</nowiki> | |<nowiki>[[Image:Steam_available.png]]</nowiki> | ||
|[[Image:Steam_available.png]] | |[[Image:Steam_available.png]] | ||
Line 203: | Line 203: | ||
This button may rarely be pressed, as the only time this may be used are for making descriptions for maintenance edits or writing pages like this one here. It will ignore all wiki formatting between the nests and only returns plain and simple text. | This button may rarely be pressed, as the only time this may be used are for making descriptions for maintenance edits or writing pages like this one here. It will ignore all wiki formatting between the nests and only returns plain and simple text. | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki><nowiki>Insert non-formatted text here</nowiki></nowiki> | ||
|<nowiki><nowiki>This is '''bold''' text.</nowiki></nowiki> | |<nowiki><nowiki>This is '''bold''' text.</nowiki></nowiki> | ||
|<nowiki>This is '''bold''' text.</nowiki> | |<nowiki>This is '''bold''' text.</nowiki> | ||
Line 212: | Line 212: | ||
{{tip|The syntax includes two hyphens (--), but you really only need four tildes (<nowiki>~~~~</nowiki>) to insert a signature.}} | {{tip|The syntax includes two hyphens (--), but you really only need four tildes (<nowiki>~~~~</nowiki>) to insert a signature.}} | ||
:{{syntax2 | :{{syntax2 | ||
| | |<nowiki>--~~~~</nowiki> | ||
|<nowiki>This discussion page may need archived soon. --~~~~</nowiki> | |<nowiki>This discussion page may need archived soon. --~~~~</nowiki> | ||
|This discussion page may need archived soon. --[[User:FakeUser23|FakeUser23]] 21:38, 17 October 2011 (PDT) | |This discussion page may need archived soon. --[[User:FakeUser23|FakeUser23]] 21:38, 17 October 2011 (PDT) | ||
Line 230: | Line 230: | ||
{{syntax2 | {{syntax2 | ||
| | | | ||
<nowiki>* Item 1</nowiki><br /> | |||
<nowiki>* Item 2</nowiki><br /> | |||
<i>* etc...</i> | |||
| | | | ||
<nowiki>* Red</nowiki><br /> | <nowiki>* Red</nowiki><br /> | ||
Line 247: | Line 247: | ||
{{syntax2 | {{syntax2 | ||
| | | | ||
<nowiki># Item 1</nowiki><br /> | |||
<nowiki># Item 2</nowiki><br /> | |||
<i># etc...</i> | |||
| | | | ||
<nowiki># This is the first step.</nowiki><br /> | <nowiki># This is the first step.</nowiki><br /> | ||
Line 268: | Line 268: | ||
|- | |- | ||
! <code>http://developer.valvesoftware.com/w/images/2/2e/Io11.png Output</code> | ! <code>http://developer.valvesoftware.com/w/images/2/2e/Io11.png Output</code> | ||
| | |bgcolor="262626"| | ||
:This line will be indented once. | :This line will be indented once. | ||
::This line will be indented twice. | ::This line will be indented twice. | ||
Line 396: | Line 396: | ||
{{note|This new syntax replaces the <code><nowiki><source></nowiki></code> tag, because XML uses that tag in some scripts. You can use it in place of the lengthy <code><nowiki><syntaxhighlight></nowiki></code> tag, though. The choice is yours.}} | {{note|This new syntax replaces the <code><nowiki><source></nowiki></code> tag, because XML uses that tag in some scripts. You can use it in place of the lengthy <code><nowiki><syntaxhighlight></nowiki></code> tag, though. The choice is yours.}} | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki><syntaxhighlight lang="cpp">C++ source code</syntaxhighlight></nowiki> | ||
|<nowiki><syntaxhighlight lang="cpp"></nowiki><i>(Insert [[FireBullets()]] method here)</i><nowiki></syntaxhighlight></nowiki> | |<nowiki><syntaxhighlight lang="cpp"></nowiki><i>(Insert [[FireBullets()]] method here)</i><nowiki></syntaxhighlight></nowiki> | ||
|<syntaxhighlight lang="cpp"> | |<syntaxhighlight lang="cpp"> | ||
Line 432: | Line 432: | ||
To make a portion of text standout from the rest, you can place them in preformatted boxes by simply placing a single space at the beginning of a line. | To make a portion of text standout from the rest, you can place them in preformatted boxes by simply placing a single space at the beginning of a line. | ||
{{syntax2 | {{syntax2 | ||
| | |<nowiki> Insert text after the space.</nowiki> | ||
|<nowiki> There is a space at the beginning of this line.</nowiki> | |<nowiki> There is a space at the beginning of this line.</nowiki> | ||
|<pre>There is a space at the beginning of this line.</pre> | |<pre>There is a space at the beginning of this line.</pre> |
Revision as of 10:56, 31 October 2011

Page Creation
You can start editing a non-existant page in several ways:
- The easiest way is to type the exact name you want into the "Search" bar then hit "Go". If the page doesn't exist, you will be able to create it.

- For example, let's say you've typed "Foobar" in the search bar, then hit the "Go" button. Since the page doesn't exist, you are given this message:
- There were no results matching the query.
- Create the page "Foobar" on this wiki!
- In this scenario, you are able to click the Foobar link and begin editing your new page.

- You can can modify the URL in your address bar to go where you'd like (in this case using the address http://developer.valvesoftware.com/wiki/Foobar).
- Some pages in the wiki contain many red links. If you are familiar with the subject matter of the non-existent page, feel free to create the new page by following the red link. Your contributions are greatly appreciated, and the more blue links, the better.
During the course of an edit, clicking Show preview (to the right of the Save page button) will help you determine if your edit looks good. This displays the final result of the edited page, but does not save it. This will avoid spamming the Recent changes page with saved edits, to the frustration of other editors.
When you are done editing, proofread it to make sure that the edit is final, and then click Save page to finally create the new page.
To test your editing skills, you can either use the public sandbox page, or create your own sandbox page on your User page by going to your user page and entering "/sandbox" in your address bar at the end of the URL, but be sure you're on your user page before creating it.
Creating a How-to Page
Creating a Mod Page
Please review the Mod page guidelines before creating a page for a Source/GoldSrc mod.
Creating an Entity Page
Creating Categories
Categories enable pages to be added to automatic listings. These help structure many pages by grouping them together around similar subjects. There may also be a section listing the subcategories of that category.
Category pages are usually created for the description of their existence. For example, Category:Blender is a category for all pages related to the free and open source 3D modeling package, Blender.
To add a page to a category, simply place at the bottom of the page. All pages that have the same category name will be listed automatically in the category.
For a list of all current categories, visit Special:Categories.
Creating User Pages
Your user page is your own personal editing venture. You are free to edit it with anything you desire. It is frowned upon by the Valve Developer Community to make direct edits to user pages that do not belong to you, unless the page contains media or external links relating to pornographic material, illegal warez/torrent sites, etc. If that is the case, you will risk your IP for permanent ban from the VDC.
To edit your user space, you must first have an account on the VDC. Registering is free and easy to do.
Once you're logged in, click on your username at the very top-right of this page, or just copy this link and paste it into your address bar: http://developer.valvesoftware.com/wiki/User:YOUR USERNAME HERE
Creating Discussion Pages
Discussion (or talk) pages are for user discussions concerning the information contained in it's respective main page. It can also be used for requesting help.
To create a discussion page (if it is non-existent for a page), just click the "Discussion" tab above, next to the "Page" tab.

Discussion pages have a special flow. When you are commenting on posts in a discussion page, indents are used to reply to comments. See below for more information on this technique.
It is common courtesy to sign your comments with your username and the time/date of post. This is a simple process that only requires four characters. Four tildes (~~~~) will automatically be replaced with your public user information along with the time and date of the post. Signatures are explained further here.
Editing Guidelines
Editing Toolbar
http://developer.valvesoftware.com/w/images/1/1e/Mediawiki_editbuttons.png
Each button, when pressed, will paste a small example of the usage of a pace of special formatting. If you have text selected, pressing a button will format the text instead of pasting in sample code. For example, to make some text bold, simply select some text in the edit window and press the bold button (the first button on the editing bar).
Bold text http://developer.valvesoftware.com/w/skins/common/images/button_bold.png
Bold text is very simple. Put in three (3) single apostrophes before the section of text you wish to bold, and three (3) after.
Italicized text http://developer.valvesoftware.com/w/skins/common/images/button_italic.png
Italics are just as easy as bold text. Put in two (2) single apostrophes before the section of text you wish to italicize, and two (2) after.
Internal links http://developer.valvesoftware.com/w/skins/common/images/button_link.png
If you want to link to another page that is in this particular wiki, you simply need the title of the page. To link to the Main Page, you simply use "Main Page". Easy!

You can also change the text of the link, without affecting what it links to. This is useful if you have to adjust for grammar.
External links http://developer.valvesoftware.com/w/skins/common/images/button_extlink.png
External links are used to link to web pages that are not in this wiki. Any blue link with the http://developer.valvesoftware.com/w/skins/vector/images/external-link-ltr-icon.png icon means it's external.
Adding a headline http://developer.valvesoftware.com/w/skins/common/images/button_headline.png
A headline is often used as an eye-catching title or brief summary of a wiki page. You can change headline sizes by varying the number of equals signs (=) to change the size of the headline. This makes it very easy to categorize a page, creating a clean, efficient way to find information. Additionally, with multiple headlines, the wiki engine will eventually add a Table of Contents box to the beginning of the page, allowing a viewer to instantly hop to the subject they want on the page.
http://developer.valvesoftware.com/w/images/f/fd/Iosyntax.png Syntax
= Extra-Large Headline =
== Large Headline ==
=== Medium Headline ===
==== Small Headline ====
Extra-large
- Example of an XL headline (use sparingly)
Large
- Example of a L headline
Medium
- Example of a M headline
Small
- Example of a S headline
Embedded pictures http://developer.valvesoftware.com/w/skins/common/images/button_image.png
Embedded pictures are pictures that have been uploaded to the wiki and are now directly hosted by it. To upload a picture, visit Special:Upload.

The [[Image:Filename.png]]
syntax has a few options that you can use. These can be placed as an option anywhere in the line:
Option Example Description thumb [[Image:Filename.png|thumb]]
Produces a framed thumbnail version of the image. ###px (size) [[Image:Filename.png|300px|thumb|This is an example image]]
Changes the pixel size of the images. left (right, center) [[Image:Filename.png|thumb|150px|right]]
Controls the alignment of the image on the page
Ignore Wiki formatting http://developer.valvesoftware.com/w/skins/common/images/button_nowiki.png
This button may rarely be pressed, as the only time this may be used are for making descriptions for maintenance edits or writing pages like this one here. It will ignore all wiki formatting between the nests and only returns plain and simple text.
Signature http://developer.valvesoftware.com/w/skins/common/images/button_sig.png
Inserts your user name, which links back to your user page, and a time stamp, which marks the exact time you submitted your edit. This is mainly used to "sign" your posts when inserting comments on Talk (discussion) pages. It is common courtesy to sign your comments on Talk pages. You can change what appears in your signature by going to Special:Preferences.

Horizontal lines http://developer.valvesoftware.com/w/skins/common/images/button_hr.png
Horizontal lines are usually only used at the end of a large section of a single page. Use them sparingly, as too many make a page look ugly. Proper use of headlines can render these unnecessary.
Formatting Pages
Bullet points
This function can create unordered lists. Bullet points are useful for listing multiple items that fall into a similar category.
Numbered lists
You can create ordered lists using this syntax. Numbered lists automatically number items according to their placement in the page.
Indenting
Indenting is more commonly used when responding to discussion posts. A colon character (:) is placed at the beginning of the line. The more placed, the further the indent. This indents a line of text about the same length as if you pressed the Tab ⇆ key.
http://developer.valvesoftware.com/w/images/6/6c/Io14.png Input
:This line will be indented once.
::This line will be indented twice.
:::This line will be indented thrice.
http://developer.valvesoftware.com/w/images/2/2e/Io11.png Output
- This line will be indented once.
- This line will be indented twice.
- This line will be indented thrice.
- This line will be indented twice.
- This line will be indented once.
This format is commonly used in discussion pages. When a user makes a post, it is common to indent your response. See the fake discussion below for an example of how to properly flow talk pages with indents. The colons only appear as an example.
Anybody else believe unicorns exist? --jd650
- :Yes. Actually, I've bred a couple of them. --MarcusTwain
- ::Really? Do you have photos? --jd650
- ::I, too, am interested in these photos. --Halifax
- :::I, err.. don't have a camera.. --MarcusTwain
- :No, I don't believe in unicorns. --ChOcObO_23
- ::Why not? --jd650
Adding tables
Tables are a diverse way to lay out information on a page. Because they can be very specific, the table below shows a quick how-to when creating Wiki tables as opposed to standard XHTML tables.
XHTML | Wiki | |
---|---|---|
Table | <table></table> | {| |} |
Styles | <table class="standard-table"></table> | {| class=standard-table |
Header cell | <th>heading</th> | ! heading |
Row | <tr></tr> | |- |
Data cell |
<td>cell1</td> |
| cell1 | cell2 |
Data cell | <td>cell1</td> <td>cell2</td> <td>cell3</td> | | cell1 || cell2 || cell3 |
Sample table | <table> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> <tr> <td>5</td> <td>6</td> </tr> </table> |
{| | 1 || 2 |- | 3 || 4 |- | 5 || 6 |} |
Sample table | <table> <tr> <th>Quantity</th> <th>Grocery Item</th> </tr> <tr> <td>4</td> <td>Apples</td> </tr> <tr> <td>3</td> <td>Oranges</td> </tr> <tr> <td>12</td> <td>Eggs</td> </tr> <tr> <td>9</td> <td>Bananas</td> </tr> </table> |
{| ! Quantity || Grocery Item |- | 4 || Apples |- | 3 || Oranges |- | 12 || Eggs |- | 9 || Bananas |} |
Syntax highlighting
To enable syntax highlighting for blocks of code, the syntax is pretty simple.

<source>
tag, because XML uses that tag in some scripts. You can use it in place of the lengthy <syntaxhighlight>
tag, though. The choice is yours.For a list of supported languages, see Help:Syntax Highlighting for more information.
Redirecting pages
Sometimes you'll come across pages that are named incorrectly, or improperly named. You can redirect pages to their intended destination by a couple different methods.
The easiest way to redirect a page that already contains data is to click the http://developer.valvesoftware.com/w/skins/vector/images/arrow-down-icon.png icon next to the search box above the page, then selecting Move Page. Follow instructions carefully before you decide to move a page.
The manual way to redirect a page is to use the following syntax:
http://developer.valvesoftware.com/w/images/f/fd/Iosyntax.png Syntax
#REDIRECT [[new_page]]

#REDIRECT
tag.You can go back to a Redirect and edit it by clicking the link underneath the new page's title.
Message boxes
To make a portion of text standout from the rest, you can place them in preformatted boxes by simply placing a single space at the beginning of a line.
You can also use the <pre>
tag for a message box. Just use <pre>Message box.</pre>
.
Categorizing pages
If you'd like a page to show up in the automatically generated category tables (full category list found here.) like on the category page Category:Half-Life 2, you will need to append the [[Category:name]]
at the bottom of the page.
For an example of how pages can be categorized, the bottom of this page have the following [[Category]]
tags:
[[Category:Tutorials]] [[Cateogry:Wiki]] [[Category:Help]]
Go ahead and scroll down to the bottom of the page. You'll notice the three categories that were just listed are available at the bottom.
Page Templates
Inline Templates
Note
Adds an indented message to note information.
Tip
Adds a helpful tip.
Warning
Adds a warning message.
Bug
Used for describing a bug.
Todo
Describes what needs changed to a page.
Confirm
Marks information that needs confirmation.