Meta/Syntax Guide

From TDN

Contents

Introduction

TDN is built with an easy-to-learn combination of HTML and wiki markup. HTML is widely known throughout the tech and business world. Wiki, on the other hand, is relatively new, often particular to specific wiki engines, and thus, not universally understood. This document will show you what you need to know in order to move around in the TDN environment. Don't worry—we've worked to make sure that everything is as easy as possible to understand!

Linking to Other Pages on TDN

A basic link

The simple code

[[Interesting_Content]]

creates a link that displays as "Interesting_Content" and also links to a TDN page called Interesting_Content.

A more complex link

The code with optional parameter

[[Interesting_Content|click here!]]

creates a link that displays as “click here!” while still linking to a TDN page called Interesting_Content.

Directory paths in links

While TDN is not actually organized by a directory structure, several features on the site allow you to organize documents as if they were arranged hierarchically. Example are:

[[art/3dsmax/Getting Started|The 3ds Max Getting Started Guide]]

and

[[art/Maya/Getting Started|The Maya Getting Started Guide]]

which appear to link up a directory tree. But thats just an illusion: you are merely creating a document with a long name that includes /'s. The reason to do this is to make creating complex documents (having many pages, such as the official art/code/torquescript references) more managable, since they allude to higher organization. Also, certain features, like the breadcrumb links at the top of the page and some security functionality, assume this arrangement.

For more information about links, see the MediaWiki Help:Link.

Adding Images

To add an image, you first must upload it to TDN. To do this, you click "Upload File" under the &ldquote;TOOLBOX&rdquote; heading in the navigation bar to the left. Fill out all the appropriate fields. You are strongly encouraged to add a summary for any images you upload. After you've uploaded your images, you can link to them as follows.

Basic Image Link

[[Image:ImageName.jpg]]

Image Link With an Alt Tag

[[Image:ImageName.jpg|A really great image]]

For more information about embedding images, see the MediaWiki Help:Images.

Adding Movie and Sound Files

Linking to movie and sound files is similar to images except that instead of "Image", you use "Media". The result is a link which, when clicked, allows the reader to see the media using a helper application.

[[Media:Example.mp3]]

Linking to Other Files

Files besides movies and sound can be linked to as well, using the same syntax; the upload process is exactly the same as it is for images. There are restrictions, however, on what you can upload: executables, binaries, etc. must be zipped.

Categories

Categorization helps to make a wiki work better by linking similar articles to each other. You are very strongly encouraged to place Category tags at the bottom of any article you write.

Category Syntax

[[Category:Example]]

For example, imagine you are writing a tutorial on 3d modeling. At the end of the tutorial, you would type

[[Category:Tutorial]]
[[Category:Art]]
[[Category:3d]]
[[Category:Modeling]]

which would place your work in the Tutorial, Art, 3d, and Modeling categories. A user who was interested in looking at all articles dealing with, for instance, 3d could then go view the list of all topics in the 3d category and see your tutorial as a link.

You can access the Category lists by clicking on Special Pages on the left navbar and then selecting Categories from the list of links, which is the same as Special:Categories.

An alternative is to use the Special:Allpages page, with “Category” selected in the Namespace popup menu.

Displaying Code

Code be shown in with the <pre> tag to give it special formatting, which makes it easier to read in a browser environment.

<pre>
//------------------------------------
Code that you want to display
//------------------------------------
<⁄pre>

produces

//------------------------------------
Code that you want to display
//------------------------------------

Using Templates

Templates are predesigned ways of organizing your article and should be used whenever possible. Using templates keeps a TDN looking uniform, which in turn makes it easier and more enjoyable to use.

While the possibilities of templates are exceptionally vast, there are two main ways TDN utilizes templates. The first simply pulls a block of information into an existing page. An example of this is the work in progress template. If you added:

{{Template:wip}}

to a page you were working on, an orange bar with the sentence "This page is a work in progress" would appear where you entered it in your article. If you edited the actual WIP template, you'd notice that it consists of only a single line of code which places "This page is a work in progress" in an orange box. This type of template is useful so you don't have to keep rewriting commonly used things like the WIP tag. It's useful to know that a template's name is case sensitive.

The second type of template is more useful for actual organization. With this template, you can call forth a block of tables or divs and plug content into predefined spaces.

For instance, Template:ContentStandard looks like this:

<table width="740" cellspacing="0" cellpadding="0" border="0">

<tr>
<td width="740">
{{{1}}}
</td>
</tr>

</table>

Those of you familiar with HTML markup recognize this is as a table. What makes it useful as a template is the {{{1}}}; that's what indicates where your text is going to be entered.

When you want to use this in a page, you'd type:

{{Template:ContentStandard|
This is my article.  
It is well written, very informative, and enjoyable to read.  
This article is a shining example of how a person can share knowledge with an interested community.
}}

This code would result in a page that had the following:

This is my article. It is well written, very informative, and enjoyable to read. This article is a shining example of how a person can share knowledge with an interested community.

written in it.

The benefit of doing this is hard to see without some background information. If you look at the table which makes up ContentStandard, you'll notice that it's set to be 740 pixels wide, which means all the text that's formatted with ContentStandard will have lines that are no more than 740 pixels wide. This is important because the shorter lines make things much easier to read. If you weren't formatting your text with a template, then the text would fill the entire text area. This wouldn't be too much of a problem if you were viewing your article on a screen set to a 1024x768 resolution, but bigger resolutions would result in much longer (and harder to read) lines.

When all is said and done, though, ContentStandard is a relatively simple template. Let's say that a template had a {{{2}}} in addition to the {{{1}}}. Template:WIPby is such an example. Using that template, you'd enter:

{{Template:WIPby|
Your name
|
Current date
}}

resulting in:

This page is a Work In Progress by Your name , dated Current date .


As this example illustrates, you separate all your content, whatever it is, with pipes (the verticle line that, until now, had no use outside of graphic design and UNIX). With templates, you can create increasingly complex formats with many content areas.

For a full listing of all official templates, refer to the TDN Style Guide.

An alternative is to use the Special:Allpages page, with “Template” selected in the Namespace popup menu.

Advanced Features

TDN is based on MediaWiki: the Help:Editor section of their handbook is a good guide to advanced MediaWiki features you can apply to TDN.