Help:Editing:ru

From Valve Developer Community
Revision as of 10:25, 26 April 2009 by 00000 (talk | contribs) (New page: {{totranslate:ru}} == Создание новой страницы == Чтобы создать ноую страницу, вам надо просто ввести её '''URL''' в ст...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Создание новой страницы

Чтобы создать ноую страницу, вам надо просто ввести её URL в строке адреса. Еслы вы хотите создать статью "Amazing New Tutorial"(Увлекательный Новый Урок), введите адрес http://developer.valvesoftware.com/wiki/Amazing_New_Tutorial. Затем отредактируйте страницу и сохраните её.

Alternately, modify an (appropriate) existing page to include a wikilink to the new page (for the example, [[Amazing New Tutorial]]), then click the link to bring you to its edit page.

Editing existing pages

When you select Edit on a page that is unlocked, you will be taken to a new page, where the top will be the page as it is currently, and the bottom will be a text box with simple editing features. You can make whatever changes you like, add a quick summary of your changes (useful if you're fixing an obscure spelling error), and then save it. And that's it! Your changed page is now the "official" page — that is, until someone else edits it. You can use various edit buttons to insert Wiki markup code to format the article.

The editing buttons

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 button_bold.png

Syntax: '''Bold text'''

Bold text is very simple. Put in three (3) single apostrophes before the section of text you wish to bold, and three (3) after.

If you want to make text bold, then the required code would be:

    If you want to '''make text bold'''

Italicized text button_italic.png

Syntax: ''Italic text''

Italics are just as easy as bold text. Put in two (2) single apostrophes before the section of text you wish to bold, and two (2) after.

If you want to make text italicized, then the code would run as so:

    If you want to ''make text italicized''

Internal links button_link.png

Syntax: [[Link title]]

If you want to link to another page that is in this particular wiki database, you simply need the title of the page. To link to the Main Page, you simple use "Main_Page". Simple!

So to link to Main_Page, I would need the following code:

    So to link to [[Main_Page]]

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.

So to link to A Page that is in the manner of being Main, you need the following code:

    So to link to [[Main_Page|A Page that is in the manner of being Main]]

External links button_extlink.png

Syntax: [http://www.example.com link title]

External links are used to link to web pages that are not in this wiki.

To link to a site like Steampowered.com, use the following code:

    To link to a site like [http://www.steampowered.com Steampowered.com]

Headline text button_headline.png

Syntax: ==Headline text==

A headline is often used as an eye-catching title or brief summary of a wiki page. The first time a headline is used in a page, it will be very large. The second time it is used, it is somewhat smaller. All additional headlines will be the same size as the second. You can also vary 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 title box to the beginning of the page, allowing a viewer to instantly click down to the subject they want.

So to get nice big beautiful text like this

Use the following code:

    ===So to get nice big beautiful text like this===

Embedded pictures button_image.png

Syntax: [[Image:Example.jpg]]

Embedded pictures are pictures that have been uploaded to the wiki and are now directly hosted by it. Special:Upload is where you can go to upload your pictures.

Warning.png Warning: MAKE SURE UPLOADED IMAGES ARE NOT COPYRIGHTED.

So to show this little picture of a smiley face Test.gif, use the following code:

    So to show this silly little picture of a smiley face [[Image:Test.gif]]

Ignore Wiki formatting button_nowiki.png

Syntax: <nowiki>Insert non-formatted text here</nowiki>

This is rarely used, except in the making of a Help with Editing page, where you need to show what a tag is like, but you can't write it out, because the wiki will then think it is formatted text. To get around that, you put a <nowiki> tag and a </nowiki> tag around the entire tag.

<code>Insert text here</code>

<nowiki><code>Insert formula here</code></nowiki>

Signature button_sig.png

Syntax: --~~~~

Inserts your user name and a time stamp once. This is mainly used to "sign" your posts when inserting comments on Talk (discussion) pages. -- Since anyone can add to or edit pages in the Valve Developer Community, signatures should not be used on standard articles in most cases.

Horizontal lines button_hr.png

Syntax: ----

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. To separate


text this easily, just use the following code:

    To separate
    ----
    text this easily

Other, unlisted formatting tools

Categorizing your pages

Syntax: [[Category:Category Name]]

If you want your page to show up in the automatically generated category tables like on the Special:Categories page, you will need to add a tag (or two, or three, or however many apply) to the end of your page. Code examples:

[[Category:Level Design]]
[[Category:Tutorials]]

Cite code

Syntax: <code>inline code text</code>

Open a <code> tag before your text and close it after your text with </code>.

If you want to cite a piece of code, then the code would run as so:

    If you want to cite a <code>piece on code</code>

If you want to cite an entire block of code, do not use <code> tags, instead add an extra space character to the beginning of each line of code. Empty lines where there should be breaks in the code must also begin with a space character.

For example:

int a;

// comment

a = 10;
Note.png Note: HTML <pre> tags can also be used, but should be avoided unless absolutely necessary.

"Code" boxes

To make those pretty little code boxes used throughout this guide, just make a new paragraph with a space character before the first character and a line break above and below. Be careful though, text that is inside a code box will not wrap. So if you happen to copy in Shakespeare's entire works, the formatted page is going to be about 600 pixels tall and about 60 billion wide.

So if you want a pretty code box kinda like this...

Insert a space at the beginning of the paragraph.

Bullet points

Bullet points are useful for listing multiple items that all fall into a simple category.

  • Thing 1
  • Thing 2
  • Thing 3

A bulleted list like the previous one can be made using the following code:

* Thing 1
* Thing 2
* Thing 3

Indenting

Not indented

Indented once
Indented Twice
Etc.

You can indent lines easily by just using the colon (:) character at the beginning of a line. Like the following:

:I am indented once.
::I am indented twice.

Which displays as:

I am indented once.
I am indented twice.

Redirects

To redirect a page to another, use the following syntax:

#REDIRECT [[new_page]]

Anyone visiting the page will be redirected automatically. Example: Game Cache File

You can go back to a Redirect and edit it by clicking the link underneath the new page's title.

Tables

Tables are exceedingly complex, and cannot be described here in sufficient detail. Please use the Wikimedia Help:Table page to assist you in creating them. They are just as versatile as their HTML counterparts.

Templates

Templates are an easy and fast way to apply a uniform structure to pages and frequently quoted pieces of information.

Several of the common templates available for use:

  • {{Cleanup}} — used to mark articles in need of cleanup to conform to a sufficient level of quality.
  • {{Pov}} — used to mark articles which do not follow the point of view guideline.
  • {{Spoiler}} — used to mark spoilers in conjuction with {{Endspoiler}}
Example: {{Spoiler}}The secret revealed!{{Endspoiler}} Produces:

The secret revealed!Template:Endspoiler

  • {{wip}} — use this to tell other editors you are currently editing the article.
  • {{Wrongtitle}} — used to display the correct title for articles misnamed by MediaWiki.
Example: {{wrongtitle|title=func_detail}} Produces:

Template:Wrongtitle

  • {{Note}} — This is used for adding a note message
Example: {{Note|This is a note}} Produces:
Note.png Note: This is a note
  • {{tip}} — This is used for adding a helpful tip
Example: {{tip|This is a helpful tip}} Produces:
Tip.png Tip: This is a helpful tip
  • {{warning}} — Add a warning message
Example: {{warning|This is a bad idea}} Produces:
Warning.png Warning: This is a bad idea
  • {{bug}} — Used for describing a known bug
Example: {{bug|This is a bug}} Produces:
Bug.png Bug: This is a bug
  • {{clr}} — This is used for clearing vertical space after an image
  • {{Wiki}} — used to link to a wikipedia article.
Example: {{Wiki|Valve Corporation}} Produces:
Valve Corporation
  • {{todo}} — Used for listing unfinished work on an article
Example: {{todo|add some stuff}} Produces:
To do: add some stuff
  • {{PD}} — Used for marking an image as being in the Public Domain
  • {{HL1}} — Goldsource Icon
  • {{HL2}} — Source Icon
  • {{EP1 add}} — For listing a feature added with Episode 1 Source Engine update
Example: {{EP1 add|crates}} Produces:
crates (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
  • {{EP2 add}} — For listing a feature added with the Orange Box Source Engine update
Example: {{EP2 add|barrels}} Produces:
barrels (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
  • {{L4D add}} — For listing a feature added with the Left 4 Dead Source Engine update
Example: {{L4D add|crates and barrels}} Produces:
crates and barrels (in all games since <Left 4 Dead>)
  • {{OutputsTable}} — For creating an entity outputs table
  • {{Split-apart}} — For suggesting an article has become too long or is covering too broad a subject
  • {{Shortcut}} — used to put a little box to the right, displaying a shortcut title to a redirect page to that article.
  • {{Stub}} — used to mark and categorize a stub article.
  • {{Delete}} — For suggesting a candidate for speedy deletion, no reason given.
  • {{Deletebecause}} — For suggesting a candidate for speedy deletion, reason given.
  • {{Deleteagain}} — For suggesting reposted content that has been removed before but brought back.
  • {{Nonsense}} — For suggesting a candidate for speedy deletion because article is patent nonsense.

 
All templates (Contains two pages at the time of writing, so click on Next page to see the rest.)

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:

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 brushes, 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.
  • Parameters in a command-line that are to be replaced by the user: hl2.exe +map mapname -dev
  • Can be combined with "<" and ">" for parameters with longer names: hl2.exe -game <game directory>
  • Other standard uses in English can be found at Wikipedia:Italic_type.

<code> tags

  • Are fine to use, as there is no other wiki markup equivalent.
  • Command-line statements: c:\program files\valve\steam\
  • Variables in code or text files: $staticprop or m_nCounter
  • In-game console commands: mat_wireframe 1
  • Filenames: bspzip.exe
  • Entity names: info_player_start
  • Other in-game or Hammer data, such as texture names, input and output names, etc.

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.

Entity-specific templates

Entity articles follow a strict guideline which can be seen at the Entity_Article_Template page. To simplify the creation of these articles, preformatted templates for certain keyvalues, inputs, outputs, or whole pages have been added to the VDC wiki.

Note.png Note: Only the commonly used templates are listed here. For game-specific templates, see the last sections.

Keyvalues

Inputs

Outputs

Counter-Strike Source Templates

Team Fortress 2 Templates

See also

Wikipedia has excellent resources on text formatting available here. The information is referential of the Wikipedia site, but is applicable to all MediaWiki powered sites, including the Valve Developer Community.