User:Mattshu/sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Ready to be moved!)
(Cleaned the workspace up)
 
Line 1: Line 1:
__NOTOC__
{{category header|background-color=#E0E0E0|border-color=lightgray}}
{{category newcolumn|rowspan=5|width=50%|background-color=#F7F7F7|border-color=lightgray}}


== Page Creation ==
* [[Help:Editing#Creating_a_How-to_Page|How-to pages]]
* [[Help:Editing#Creating_a_Mod_Page|Mod pages]]
* [[Help:Editing#Creating_an_Entity_Page|Entity pages]]
* [[Help:Editing#Creating_Categories|Categories]]
* [[Help:Editing#Creating_User_Pages|User pages]]
* [[Help:Editing#Creating_Discussion_Pages|Discussion pages]]
* [[Help:Editing#Editing_Guidelines|'''Editing Guidelines''']]
== Editing Toolbar ==
http://developer.valvesoftware.com/w/skins/common/images/button_bold.png [[Help:Editing#Bold_text|Bold text]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_italic.png [[Help:Editing#Italicized_text|Italic text]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_link.png [[Help:Editing#Internal_links|Adding internal links]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_extlink.png [[Help:Editing#External_links|Adding external links]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_headline.png [[Help:Editing#Adding_a_headline|Adding a headline]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_image.png [[Help:Editing#Embedded_pictures|Inserting a picture]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_nowiki.png [[Help:Editing#Ignore_Wiki_formatting|Ignore Wiki formatting]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_sig.png [[Help:Editing#Signature|Inserting your signature]]<br />
http://developer.valvesoftware.com/w/skins/common/images/button_hr.png [[Help:Editing#Horizontal_lines|Horizontal lines]]<br />
{{category newcolumn|rowspan=1|width=50%|background-color=#FBF7EA|border-color=#E4DCCD}}
== Formatting Pages ==
* [[Help:Editing#Bullet_points|Bullet points]]
* [[Help:Editing#Numbered_lists|Numbered lists]]
* [[Help:Editing#Indenting|Indenting]]
* [[Help:Editing#Redirecting_pages|Redirecting pages]]
* [[Help:Editing#Adding_tables|Adding tables]]
* [[Help:Editing#Categorizing_pages|Categorizing pages]]
* [[Help:Editing#Syntax_highlighting|Syntax highlighting for script/code]]
* [[Help:Editing#Message_boxes|Message boxes]]
{{category cell|width=50%|background-color=white|border-color=lightgray}}
== Page Templates ==
* [[Help:Editing#Markup_Templates|Markup templates]]
* [[Help:Editing#Maintenance_Templates|Maintenance templates]]
* [[Help:Editing#Formatting_Templates|Formatting templates]]
* [[Help:Editing#Entity-specific_Templates|Entity-specific templates]]
{{category cell|width=50%|background-color=white|border-color=lightgray}}
== Specific Formatting Guidelines ==
* [[Help:Editing#Mod_Page_Guidelines|Mod Page Guidelines]]
* [[Help:Editing#Italics|Italics]]
* [[Help:Editing#Bolding|Bolding]]
* [[Help:Editing#Code_tag|<nowiki><code></nowiki> tag]]<br />
* [[Help:Editing#See_also|See also]]
{{category end}}
= 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.
{{warning|Make sure the subject of the page you have in mind isn't already on the wiki. For example, you want to create the page "Portal 2 Particles", but you didn't notice the [[List of Portal 2 Particles]] page.}}
: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 "<span style="color:#ba5859;">Foobar</span>" on this wiki!'''
:In this scenario, you are able to click the <span style="color:#ba5859;">Foobar</span> link and begin editing your new page.
{{tip|Red links are pages that have not been created yet, and blue links are pages that already exist.}}
* You can can modify the URL in your address bar to go where you'd like (in this case using the address ''<nowiki>http://developer.valvesoftware.com/wiki/Foobar</nowiki>'').
* 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.
{{backtotop|align=right}}
== Creating a How-to Page ==
{{todo|Insert guidelines for creating tutorial/how-to pages}}
== Creating a Mod Page ==
Please review the [[Help:Mod_Profiles|Mod page guidelines]] before creating a page for a Source/GoldSrc mod.
== Creating an Entity Page ==
{{todo|Insert guidelines for creating entity pages here}}
== 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 <code>[[Category:'''CATEGORY NAME''']]</code> 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]].
{{backtotop|align=right}}
== 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 [http://developer.valvesoftware.com/w/index.php?title=Special:UserLogin&type=signup 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: <code><nowiki>http://developer.valvesoftware.com/wiki/User:YOUR USERNAME HERE</nowiki></code>
{{backtotop|align=right}}
== 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.
{{tip|You can also use the keystroke {{key|Alt}}+{{key|T}} to quickly switch to the discussion page, that is if your web browser/operating system allows it.}}
Discussion pages have a special flow. When you are commenting on posts in a discussion page, indents are used to reply to comments. [[Help:Editing#Indenting|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 (<nowiki>~~~~</nowiki>) will automatically be replaced with your public user information along with the time and date of the post. Signatures are explained further [[Help:Editing#Signature|here]].
{{backtotop|align=right}}
== Editing Guidelines ==
{{todo|Insert a few details about editing guidelines. Since there aren't really any rules, other than warez/porn/span(etc), there should be a couple tips of common courtesy among other editors.}}
= Editing Toolbar =
http://developer.valvesoftware.com/w/images/1/1e/Mediawiki_editbuttons.png{{clr}}
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.
{{syntax2
|syn=<nowiki>'''Bold text'''</nowiki>
|in=<nowiki>Remember to '''always''' brush your teeth.</nowiki>
|out=Remember to '''always''' brush your teeth.
}}
== 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.
{{syntax2
|syn=<nowiki>''Italic text''</nowiki>
|in=<nowiki>The ''Queen Mary'' sailed last night.</nowiki>
|out=The ''Queen Mary'' sailed last night.
}}
== 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!
{{syntax2
|syn=<nowiki>[[Link title]]</nowiki>
|in=<nowiki>Click here to go to the main page: [[Main Page]]</nowiki>
|out=Click here to go to the main page: [[Main Page]]
}}
{{note|Currently, spaces and underlines both work the same in internal links. You can use <nowiki>[[Main_Page]]</nowiki> as well.}}
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
|syn=<nowiki>[[Link title|Text for link]]</nowiki>
|in=<nowiki>[[Main Page|Click here]] to go to the main page.</nowiki>
|out=[[Main Page|Click here]] to go to the main page.
}}
== 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.
{{syntax2
|syn=<nowiki>[http://www.example.com link title]</nowiki>
|in=<nowiki>[http://www.valvesoftware.com/jobs/ Click here]</nowiki> to learn more about applying to Valve.
|out=[http://www.valvesoftware.com/jobs/ Click here] to learn more about applying to Valve.
}}
== 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.
:{|class=standard-table
! <code>http://developer.valvesoftware.com/w/images/f/fd/Iosyntax.png Syntax</code>
| <code><nowiki>= Extra-Large Headline =</nowiki></code>
|-
!
| <code><nowiki>== Large Headline ==</nowiki></code>
|-
!
| <code><nowiki>=== Medium Headline ===</nowiki></code>
|-
!
| <code><nowiki>==== Small Headline ====</nowiki></code>
|-
|}
= 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]].
{{warning|Please read the [[Valve_Developer_Community:Image_use_policy|image use policy]] before uploading images.}}
{{syntax2
|syn=<nowiki>[[Image:Filename.png]]</nowiki>
|in=<nowiki>[[Image:Steam_available.png]]</nowiki>
|out=[[Image:Steam_available.png]]
}}
The <code><nowiki>[[Image:Filename.png]]</nowiki></code> syntax has a few options that you can use. These can be placed as an option anywhere in the line:
:{| class=standard-table
! Option || Example || Description
|-
| ''thumb'' || <code><nowiki>[[Image:Filename.png|thumb]]</nowiki></code> || Produces a framed thumbnail version of the image.
|-
| ''###px'' (size) || <code><nowiki>[[Image:Filename.png|300px|thumb|This is an example image]]</nowiki></code> || Changes the pixel size of the images.
|-
| ''left (right, center)'' || <code><nowiki>[[Image:Filename.png|thumb|150px|right]]</nowiki></code> || 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.
{{syntax2
|syn=<nowiki><nowiki>Insert non-formatted text here</nowiki></nowiki>
|in=<nowiki><nowiki>This is '''bold''' text.</nowiki></nowiki>
|out=<nowiki>This is '''bold''' text.</nowiki>
}}
== 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#mw-htmlform-signature|Special:Preferences]].
{{tip|The syntax includes two hyphens (--), but you really only need four tildes (<nowiki>~~~~</nowiki>) to insert a signature.}}
:{{syntax2
|syn=<nowiki>--~~~~</nowiki>
|in=<nowiki>This discussion page may need archived soon. --~~~~</nowiki>
|out=This discussion page may need archived soon. --[[User:FakeUser23|FakeUser23]] 21:38, 17 October 2011 (PDT)
}}
== Horizontal lines http://developer.valvesoftware.com/w/skins/common/images/button_hr.png ==
{{syntax2
|syn=<nowiki>----</nowiki>
}}
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 [[#Adding_a_headline|headlines]] can render these unnecessary.
{{backtotop|align=right}}
= Formatting Pages =
== Bullet points ==
This function can create unordered lists. Bullet points are useful for listing multiple items that fall into a similar category.
{{syntax2
|syn=
<nowiki>* Item 1</nowiki><br />
<nowiki>* Item 2</nowiki><br />
<i>* etc...</i>
|in=
<nowiki>* Red</nowiki><br />
<nowiki>* Blue</nowiki><br />
<nowiki>* Green</nowiki>
|out=<br />
* Red
* Blue
* Green
}}
== Numbered lists ==
You can create ordered lists using this syntax. Numbered lists automatically number items according to their placement in the page.
{{syntax2
|syn=
<nowiki># Item 1</nowiki><br />
<nowiki># Item 2</nowiki><br />
<i># etc...</i>
|in=
<nowiki># This is the first step.</nowiki><br />
<nowiki># This is the second step.</nowiki><br />
|out=<br />
# This is the first step.
# This is the second step.
}}
== 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 {{key|Tab}} key.
{{syntax2
|in=<nowiki>:This line will be indented once.</nowiki><br />
<nowiki>::This line will be indented twice.</nowiki><br />
<nowiki>:::This line will be indented thrice.</nowiki>
|out=&nbsp;
:This line will be indented once.
::This line will be indented twice.
:::This line will be indented thrice.
}}
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? --<span style="color:#8BB9E0;">jd650</span>
:<b><nowiki>:</nowiki></b>Yes. Actually, I've bred a couple of them. --<span style="color:#8BB9E0;">MarcusTwain</span>
::<b><nowiki>::</nowiki></b>Really? Do you have photos? --<span style="color:#8BB9E0;">jd650</span>
::<b><nowiki>::</nowiki></b>I, too, am interested in these photos. --<span style="color:#8BB9E0;">Halifax</span>
:::<b><nowiki>:::</nowiki></b>I, err.. don't have a camera.. --<span style="color:#8BB9E0;">MarcusTwain</span>
:<b><nowiki>:</nowiki></b>No, I don't believe in unicorns. --<span style="color:#8BB9E0;">ChOcObO_23</span>
::<b><nowiki>::</nowiki></b>Why not? --<span style="color:#8BB9E0;">jd650</span>
== 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.
<table class="wikitable">
<tr><th>&nbsp;</th><th>XHTML</th><th>Wiki</th>
<tr>
<th>Table</th>
<td><nowiki><table></table></nowiki>
<td><pre><nowiki>{|
|}</nowiki></pre>
<tr>
<th>Styles</th>
<td><nowiki><table class="standard-table"></table></nowiki></td>
<td><pre><nowiki>{| class=standard-table</nowiki></pre></td>
<tr>
<th>Header cell</th>
<td><nowiki><th>heading</th></nowiki></td>
<td><pre><nowiki>! heading</nowiki></pre></td>
<tr>
<th>Row</th>
<td><nowiki><tr></tr></nowiki></td>
<td><pre><nowiki>|-</nowiki></pre></td>
<tr>
<th>Data cell</th>
<td>
<nowiki><td>cell1</td></nowiki><br>
<nowiki><td>cell2</td></nowiki>
</td>
<td>
<pre><nowiki>| cell1
| cell2</nowiki></pre>
</td>
</tr>
<tr>
<th>Data cell</th>
<td><nowiki><td>cell1</td> <td>cell2</td> <td>cell3</td></nowiki></td>
<td><pre><nowiki>| cell1 || cell2 || cell3</nowiki></pre></td>
</tr>
<tr>
<th>Sample table</th>
<td><pre><nowiki>
<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>
</nowiki></pre></td>
<td><pre><nowiki>
{|
| 1 || 2
|-
| 3 || 4
|-
| 5 || 6
|}</nowiki></pre></td>
</tr>
<tr>
<th>Sample table</th>
<td><pre><nowiki>
<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>
</nowiki></pre></td>
<td><pre><nowiki>
{|
! Quantity || Grocery Item
|-
| 4 || Apples
|-
| 3 || Oranges
|-
| 12 || Eggs
|-
| 9 || Bananas
|}</nowiki></pre></td>
</tr>
</table>
== Syntax highlighting ==
To enable syntax highlighting for blocks of code, the syntax is pretty simple.
{{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
|syn=<nowiki><syntaxhighlight lang="cpp">C++ source code</syntaxhighlight></nowiki>
|in=<nowiki><syntaxhighlight lang="cpp"></nowiki><i>(Insert [[FireBullets()]] method here)</i><nowiki></syntaxhighlight></nowiki>
|out=<syntaxhighlight lang="cpp">
void CBaseEntity::FireBullets( const FireBulletsInfo_t &info )
{
static int tracerCount;
trace_t tr;
CAmmoDef* pAmmoDef = GetAmmoDef();
int nDamageType = pAmmoDef->DamageType(info.m_iAmmoType);
int nAmmoFlags = pAmmoDef->Flags(info.m_iAmmoType);
        //...
        //remainder omitted
        //...
}
</syntaxhighlight>
}}
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:
{{syntax2
|syn=<nowiki>#REDIRECT [[new_page]]</nowiki>
}}
{{warning|This method can only be used if the page is empty. If you are manually moving a page, copy the edit source of the page and paste it into the new page. Then the original page can be replaced with the <code><nowiki>#REDIRECT</nowiki></code> 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.
{{syntax2
|syn=<nowiki>&nbsp;Insert text after the space.</nowiki>
|in=<nowiki>&nbsp;There is a space at the beginning of this line.</nowiki>
|out=<pre>There is a space at the beginning of this line.</pre>
}}
You can also use the <code><nowiki><pre></nowiki></code> tag for a message box. Just use <code><nowiki><pre>Message box.</pre></nowiki></code>.
== Categorizing pages ==
If you'd like a page to show up in the automatically generated category tables (<i>full category list [[Special:Categories|found here]]</i>) like on the category page [[:Category:Level_Design]], you will need to append the <code><nowiki>[[Category:name]]</nowiki></code> at the bottom of the page.
For an example of how pages can be categorized, the bottom of this page have the following <code><nowiki>[[Category]]</nowiki></code> tags:
<nowiki>[[Category:Tutorials]]</nowiki>
<nowiki>[[Cateogry:Wiki]]</nowiki>
<nowiki>[[Category:Help]]</nowiki>
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.
{{backtotop|align=right}}
= Page Templates =
A template is a page created to be included in other pages. Templates usually contain repetitive material that might need to show up on any number of articles or pages. They are commonly used for boilerplate messages, standard warnings or notices, infoboxes, navigational boxes and similar purposes. [http://en.wikipedia.org/wiki/Help:Template]
{{note|Many of the templates below are translated into several other languages. Before using any of these, be sure to check for alternate translations. Please use them accordingly with the page language.}}
Templates are easy to add to pages. Just surround a template name with '''<nowiki>{{</nowiki>''' '''<nowiki>}}</nowiki>''' and voila.
== Markup Templates ==
=== [[Template:Note|Note]] ===
Adds an indented message to note information.
{{syntax2
|syn=<nowiki>{{note|</nowiki>''<message>''<nowiki>}}</nowiki>
|in=<nowiki>{{note|You will never be [[VAC]] banned for using built-in cheat commands.}}</nowiki>
|out={{note|You will never be [[VAC]] banned for using built-in cheat commands.}}
}}
=== [[Template:Tip|Tip]] ===
Adds a helpful tip.
{{syntax2
|syn=<nowiki>{{tip|</nowiki>''<message>''<nowiki>}}</nowiki>
|in=<nowiki>{{tip|With the Face Edit Sheet window, you can right-click on any surface to apply the current texture to it.}}</nowiki>
|out={{tip|With the Face Edit Sheet window, you can right-click on any surface to apply the current texture to it.}}
}}
=== [[Template:Warning|Warning]] ===
Adds a warning message.
{{syntax2
|syn=<nowiki>{{warning|</nowiki>''<message>''<nowiki>}}</nowiki>
|in=<nowiki>{{warning|Do not release a mod without first checking for leaks.}}</nowiki>
|out={{warning|Do not release a mod without first checking for leaks.}}
}}
=== [[Template:Bug|Bug]] ===
Used for describing a bug.
{{syntax2
|syn=<nowiki>{{bug|</nowiki>''<message>''<nowiki>}}</nowiki>
|in=<nowiki>{{bug|Hammer will sometimes hang during play-testing.}}</nowiki>
|out={{bug|Hammer will sometimes hang during play-testing.}}
}}
=== [[Template:Todo|Todo]] ===
Describes what needs changed to a page.
{{syntax2
|syn=<nowiki>{{todo|</nowiki>''<message>''<nowiki>}}</nowiki>
|in=<nowiki>{{todo|Add more information on textures}}</nowiki>
|out={{todo|Add more information on textures}}
}}
=== [[Template:Confirm|Confirm]] ===
Marks information that needs confirmation.
{{syntax2
|syn=<nowiki>{{confirm|</nowiki>''<message>''<nowiki>}}</nowiki>
|in=<nowiki>{{confirm|<code>multiplayer_break</code> determines where the gibs from a [[prop_physics_multiplayer]] are simulated.}}</nowiki>
|out={{confirm|<code>multiplayer_break</code> determines where the gibs from a [[prop_physics_multiplayer]] are simulated.}}
}}
{{syntax2
|syn=<nowiki>{{confirm}}</nowiki>
|in=<nowiki>* '''-exit''' - Exits the engine. {{confirm}}</nowiki>
|out=* '''-exit''' - Exits the engine. {{confirm}}
}}
=== [[Template:Unsigned|Unsigned]] ===
For those who are slightly obsessive-compulsive, this template signs posts that were left unsigned in discussion pages.
{{syntax2
|syn=<nowiki>{{unsigned|</nowiki>''<username>''<nowiki>}}</nowiki>
|in=<nowiki>Anybody else hate it when people don't sign their own comments? {{unsigned|FakeUser27}}</nowiki>
|out=Anybody else hate it when people don't sign their own comments? {{unsigned|FakeUser27}}
}}
=== [[Template:Clr|Clr]] ===
Clears vertical space after an image. In the example below, <code><nowiki>{{clr}}</nowiki></code> is omitted in the input, then added between the text and image in the output.
{{syntax2
|in=This is not cleared. http://developer.valvesoftware.com/w/images/thumb/1/1a/Skull_and_crossbones.png/50px-Skull_and_crossbones.png
|out=This is cleared. {{clr}} http://developer.valvesoftware.com/w/images/thumb/1/1a/Skull_and_crossbones.png/50px-Skull_and_crossbones.png
}}
{{backtotop|align=right}}
== Maintenance Templates ==
{{note|These templates should be placed at the beginning of each page.}}
=== [[Template:Cleanup|Cleanup]] ===
Used to mark articles in need of a general cleanup to conform to a sufficient level of quality. Pages with this template are added to [[:Category:Cleanup]].
{{Messagebox
|text = This article needs to be '''cleaned up''' to conform to a higher standard of quality.
|small = For help, see the [[Help:Editing|VDC Editing Help]] and [[Wikipedia:Wikipedia:Cleanup_process#Advice_on_fixing_articles|Wikipedia cleanup process]]. Also, remember to check for any notes left by the tagger at this article's [[{{TALKPAGENAME}}|talk page]].
|image = [[File:broom_icon.png|40px|link=]]
|bdcolor = #F4C430
}}
=== [[Template:Stub|Stub]] ===
Used to mark [[Wikipedia:Wikipedia:Stub#Basic_information|stub]] articles. Stubs are small articles that may need expanded. Pages with this template are added to [[:Category:Stubs]].
{{messagebox
|text = This article is a [[Help:Stubs|stub]]. You can help by adding to it.
|image = None
}}
=== [[Template:Delete|Delete]] ===
Used to mark a page for deletion. Pages with this template are added to [[:Category:Candidates for speedy deletion]].
{{messagebox
|text = '''This page is a [[Help:Deletion|candidate for speedy deletion]]{{#if: {{{1|}}} | &nbsp;because:''' <p style="font-style: italic;">{{{1}}}</p>| .''' }}
If you disagree with its speedy deletion, please explain why on [[{{NAMESPACE}} talk:{{PAGENAME}}|its talk page]].  If this page obviously does not meet the criteria for speedy deletion, or you intend to fix it, please remove this notice, but do not remove this notice from articles that you have created yourself.
|small =
''Administrators - Remember to check [[Special:Whatlinkshere/{{NAMESPACE}}:{{PAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=delete}} deleting].''
|image = [[File:Warning_icon.png|40px|link=]]
|bdcolor = #B22222
}}
=== [[Template:Orphan|Orphan]] ===
Used to mark pages that have few or no links to it. Pages with this template are added to [[:Category:Cleanup]] and [[:Category:Orphans]].
{{messagebox
|text = This article is an '''''orphan''''', meaning that few or no articles link to it.<br/> You can help by adding links to this article from other relevant articles.
|image = [[File:broom_icon.png|40px|link=]]
|bdcolor = #F4C430
}}
=== [[Template:Screenshot|Screenshot]] ===
Used to mark pages that are in need of a screenshot to visually convey the subject. Pages with this template are added to [[:Category:Cleanup]] and [[:Category:Screenshot needed]].
{{messagebox
|text = This article needs a [[screenshot]] to help visually convey the subject.
|small = You can upload screenshots at [[Special:Upload]]. For help, see [[Help:Images]].
|image = [[File:Nuvola apps ksnapshot.png|50px|link=]]
|bdcolor = #F4C430
}}
=== [[Template:Pov|POV]] ===
Used to mark pages that are not formatted in third-person. For help, see [[Help:Cleanup#Point_of_View]]. Pages with this template are added to [[:Category:Cleanup]] and [[:Category:POV Cleanup]].
{{messagebox
|text = This article should be [[Help:Cleanup#Point_of_View|converted to third person]] to conform to wiki standards.
|image = [[File:broom_icon.png|40px|link=]]
|bdcolor = #F4C430
}}
=== [[Template:Wip|WIP]] ===
Used to mark pages that are currently undergoing ''active'' construction. Pages with this template are added to [[:Category:Articles actively undergoing construction]].
{{messagebox
|text =
'''This article is actively undergoing a [[Wikipedia:Wikipedia:Edit_lock|major edit]].'''<br /> As a courtesy, please do not edit this article while this message is displayed. If this page has not been edited for several hours, please remove this template. This message is intended to help reduce [[Wikipedia:Help:Edit_conflict|edit conflicts]]; please remove it between editing sessions to allow others to edit the page.
The person who added this notice will be listed in its [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} edit history] should you wish to contact him or her.
|image = [[File:Under construction.png|55px]]
|bdcolor = #FF7700
}}
=== [[Template:Merge|Merge]] ===
Used to mark similar pages that should be considered for a merge. For more information, see {{wiki|Help:Merging}}. Pages with this template are added to [[:Category:Articles to be merged]].
:{|class=standard-table
! <code>http://developer.valvesoftware.com/w/images/f/fd/Iosyntax.png Syntax</code>
| <code><nowiki>{{merge|</nowiki>''<article>''<nowiki>}}</nowiki></code>
|}
{{messagebox
|text =
It has been suggested that this article or section be [[Wikipedia:Merging and moving pages|merged]] with ''<code><nowiki><article name></nowiki></code>''. ([[:{{NAMESPACE}} talk:{{PAGENAME}}|Discuss]])
|image = [[File:Merge-arrows.gif|link=]]
|bdcolor = #9932CC
}}
=== [[Template:Update|Update]] ===
Used to mark outdated articles that need updated with current information. Pages with this template are added to [[:Category:Cleanup]].
{{messagebox
|text = This article needs to be '''updated''' to include current information regarding the subject.
|image = [[File:broom_icon.png|40px]]
}}
=== [[Template:Totranslate|Totranslate]] ===
Used to mark pages that aren't translated for the page's language. Pages with this template are added to [[:Category:To be translated]].
{{messagebox
|text =
'''This page needs to be translated.'''
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article tries to comply with the [[Valve Developer Community:Alternative Languages|alternate languages guide]].
|image = [[File:Info_content.png|40px|link=]]
|bdcolor= #F28500
}}
=== [[Template:Finishtranslation|Finishtranslation]] ===
Used to mark pages that have a reasonable amount of translated information, but isn't completely translated. Pages with this template are added to [[:Category:To be translated]].
{{messagebox
|text =
'''This page has not been fully translated.'''
You can help by [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} finishing the translation].
Also, please make sure the article tries to comply with the [[Valve Developer Community:Alternative Languages|alternate languages guide]].
|image = [[File:Info_content.png|40px|link=]]
|bdcolor= #F28500
}}
=== [[Template:Updatetranslation|Updatetranslation]] ===
Used to mark pages that require an update to its current translation. Pages with this template are added to [[:Category:To be translated]].
{{messagebox
|text =
'''This translated page needs to be updated.'''
You can help by [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} updating the translation].
Also, please make sure the article tries to comply with the [[Valve Developer Community:Alternative Languages|alternate languages guide]].
|image = [[File:Info_content.png|40px|link=]]
|bdcolor= #F28500
}}
{{backtotop|align=right}}
== Formatting Templates ==
{{note|These templates effect elements outside of the editing boundaries and should be placed at the beginning of the article.}}
=== [[Template:Otherlang2|Otherlang2]] ===
Successor of the outdated <code><nowiki>{{otherlang}}</nowiki></code> template, this template is used to add a navigational bar at the upper-right corner of the page that links to other available translations for the current article.
{{syntax2
|syn=
<nowiki>{{otherlang2</nowiki><br /><nowiki>
title=Title of page (optional)</nowiki><br /><nowiki>
noborder=true/false (optional)</nowiki><br /><nowiki>
lang=Page name:lang</nowiki><br /><nowiki>
lang2=Page name:lang2</nowiki><br /><nowiki>
etc...</nowiki>
}}
For more detailed information, please see [[Template:Otherlang2|the template's page]]. It includes a list of available languages and explanations.
=== <code><nowiki>{{DISPLAYTITLE}}</nowiki></code> ===
This is a MediaWiki feature that is similar to the now-deprecated <code><nowiki>{{wrongtitle}}</nowiki></code> template. It changes the title of the page. This is mostly used for grammatical changes, as used on the page [[Filter_activator_team]] to make the name lowercase, as is the actual entity <code>filter_activator_team</code>. Another popular use is for translated pages. Instead of "[[Make_a_model_with_3DS_and_Photoshop:fr]]" as the title for French page, it reads ''Faire un modèle avec 3DS et Photoshop''.
{{syntax2
|syn=<nowiki>{{DISPLAYTITLE:Title of page}}</nowiki>
}}
{{note|Do not use this template if the page uses the [[Template:Otherlang2|otherlang2]] template. Instead, use the template's <code>title&#61;Title of page</code> option.}}
==== Behavior switches ====
These templates can be placed anywhere in the page. A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content.
:{|class="standard-table"
! Syntax || Description
|-
| <code><nowiki>__NOTOC__</nowiki></code> || Hides the table of contents (TOC). Useful for small pages with many headers.
|-
| <code><nowiki>{{</nowiki>[[Template:Toc-right|toc-right]]<nowiki>}}</nowiki></code> || Acts as a behavior switch. This aligns the Table of Contents box to the right side of the page instead of the default left side.
|-
| <code><nowiki>__NOEDITSECTION__</nowiki></code> || Hides the &#91;[[#|edit]]&#93; boxes beside the headers.
|-
| <code><nowiki>__NEWSECTIONLINK__</nowiki></code> || Enables the option to add a sections to non-discussion pages.
|}
{{backtotop|align=right}}
== Entity-specific Templates ==
=== Valve Game Icons ===
These are generally placed on entity pages. They're used to help identify that an entity is only for certain Valve games.
:{|class="standard-table"
! Input || Output || Game
|-
| <nowiki>{{source}}</nowiki> || {{source}} || Source icon
|-
|
|-
| <nowiki>{{as}}</nowiki> || {{as}} || [[Alien Swarm]]
|-
| <nowiki>{{css}}</nowiki> || {{css}} || [[Counter-Strike: Source]]
|-
| <nowiki>{{dm}}</nowiki> || {{dm}} || [[Dark Messiah of Might and Magic]]
|-
| <nowiki>{{dods}}</nowiki> || {{dods}} || [[Day of Defeat: Source]]
|-
| <nowiki>{{hl2}}</nowiki> || {{hl2}} || [[Half-Life 2]]
|-
| <nowiki>{{l4d}}</nowiki> || {{l4d}} || [[Left 4 Dead]]
|-
| <nowiki>{{l4d2}}</nowiki> || {{l4d2}} || [[Left 4 Dead 2]]
|-
| <nowiki>{{portal}}</nowiki> || {{portal}} || [[Portal]]
|-
| <nowiki>{{portal2}}</nowiki> || {{portal2}} || [[Portal 2]]
|-
| <nowiki>{{tf2}}</nowiki> || {{tf2}} || [[Team Fortress 2]]
|-
| <nowiki>{{ship}}</nowiki> || {{ship}} || [[Half-Life]]
|-
|
|-
| <nowiki>{{hl1}}</nowiki> || {{hl1}} || [[Half-Life]]
|-
| <nowiki>{{ricochet}}</nowiki> || {{ricochet}} || [[Ricochet]]
|-
|}
=== {{source}}[[Template:EP2 add|EP2 add]] ===
Lists a feature added with the Orange Box Source Engine update.
{{syntax2
|syn=<nowiki>{{EP2 add|</nowiki>''feature''<nowiki>}}</nowiki>
|in=<nowiki>{{EP2 add|barrels}}</nowiki>
|out={{EP2 add|barrels}}
}}
=== {{l4d}}[[Template:L4D add|L4D add]] ===
Lists a feature added with the Left 4 Dead Source Engine update.
{{syntax2
|syn=<nowiki>{{L4D add|</nowiki>''feature''<nowiki>}}</nowiki>
|in=<nowiki>{{L4D add|crates and barrels}}</nowiki>
|out={{L4D add|crates and barrels}}
}}
=== {{l4d2}}[[Template:L4D2 add|L4D2 add]] ===
Lists a feature added with the Left 4 Dead 2 Source Engine update.
{{syntax2
|syn=<nowiki>{{L4D2 add|</nowiki>''feature''<nowiki>}}</nowiki>
|in=<nowiki>{{L4D2 add|vscripts and squirrels}}</nowiki>
|out={{L4D2 add|vscripts and squirrels}}
}}
=== {{portal2}}[[Template:P2 add|P2 add]] ===
Lists a feature added with the Portal 2 Source Engine update.
{{syntax2
|syn=<nowiki>{{P2 add|</nowiki>''feature''<nowiki>}}</nowiki>
|in=<nowiki>{{P2 add|excursion funnel}}</nowiki>
|out={{P2 add|excursion funnel}}
}}
=== [[Template:OutputsTable|OutputsTable]] ===
Easily creates an entity outputs table. See the template page for more information on it's syntax.
=== Keyvalues ===
* [[Template:KV_Angles]]
* [[Template:KV_EnableDisable]]
* [[Template:KV_Global]]
* [[Template:KV_Origin]]
* [[Template:KV_Parentname]]
* [[Template:KV_Shadow]]
* [[Template:KV_Targetname]]
=== Inputs ===
* [[Template:I_EnableDisable]]
* [[Template:I_Parentname]]
* [[Template:I_Shadow]]
* [[Template:I_Targetname]]
=== Outputs ===
* [[Template:O_Targetname]]
=== {{css}} Counter-Strike: Source Templates ===
* [[Template:BasicCSSweapon]]
=== {{tf2}} Team Fortress 2 Templates ===
* [[Template:KV_TFTeam]]
* [[Template:Tfitem]]
{{backtotop|align=right}}
= Specific Formatting Guidelines =
There are no hard rules for specific formatting, other than keeping HTML at a bare minimum. There are some generally accepted styles you can use, though.
== Mod Page Guidelines ==
{{todo|Condense [[Help:Mod_Profiles]] for quick list of tips.}}
== Italics ==
* Should in general follow standard English usage -- italics are meant for ''slight'' emphasis. Italics should ''not'' be used for full sentences, as that is not minor emphasis and actually makes the emphasis unintelligible.
* Newly defined words in a sentence. For example: "Levels are created with a series of blocks, called ''[[brush]]es'', which can be created in all manner of sizes. Brushes are the basic components of levels". After the first italicized instance, the word is no longer italicized. If the newly defined word has an article, make it a link as well.
* Parameters in a command-line that are to be replaced by the user: <code>hl2.exe +map ''mapname'' -dev</code>
* Can be combined with "<" and ">" for parameters with longer names: <code>hl2.exe -game ''<game directory>''</code>
* Other standard uses in English can be found at [[Wikipedia:Italic_type]].
== Bolding ==
* Strong emphasis: "'''Note:''' Using this command can cause your hard drive to '''explode'''." Like italics, over-use of bolding renders the emphasis unintelligible.
* Menu commands and other program UI: "First, go to the '''File''' menu and choose '''Map Properties''' to bring up the '''Object Properties''' dialog box. Click the '''Skybox Texture Name''' field."
* If the word is a wiki link, you do not usually need to bold it.
== Code tag ==
* Are fine to use, as there is no other wiki markup equivalent.
* Command-line statements: <code>c:\program files\valve\steam\</code>
* Variables in code or text files: <code>$staticprop</code> or <code>m_nCounter</code>
* In-game console commands: <code>mat_wireframe 1</code>
* Filenames: <code>bspzip.exe</code>
* Entity names: <code>info_player_start</code>
* Other in-game or Hammer data, such as texture names, input and output names, etc.
== See also ==
*[[Help:Contents]]
*[[Help:Cleanup]]
*[[:Category:Cleanup]]
Wikipedia has excellent resources on text formatting available [[Wikipedia:Wikipedia:How to edit a page|here]]. The information is referential of the Wikipedia site, but is applicable to all MediaWiki powered sites, including the Valve Developer Community.
{{backtotop|align=right}}
[[Category:Tutorials]]
[[Category:Wiki]]
[[Category:Help]]

Latest revision as of 23:44, 6 November 2011