User blog:ChaoticShadow/Introduction to editing with the Source Editor

I haven't written a blog in 2 years so here goes. Also be forewarned the my writing style is very bland, so if it gets boring, take a break, do something else, come back and start reading again. :)

In this blog we will be exploring the features of the (much better, in my opinion,) source editor and how to do things in this editor much more efficiently than the visual ones. The source editor allows us to directly modify the "source" of the editor, hence its name.

Template tutorial coming soon!™

Editing Text (Plain Text, Bolding, Italicizing)
The difference between source and visual when editing pure textual things is virtually no difference. Plain text is plain text.

However, more "advanced" things (in comparison to just plain text) like bolding, italicizing, formatting text require more than just a few button clicks.

For quick reference, italicizing and bolding:
 *  Sample text italicizes the text
 * Simply put two apostrophes (not quotation marks) before and after the text you want to italicize.
 *  Sample text bolds the text
 * Similar to italicization, you use apostrophes, but use three this time.

Creating Links
This is one of the more commonly used things: links. The syntax itself is very simple:


 * Sample page
 * This links to the "Sample page" (Sample page)
 * Sample pages
 * This also links to "Sample page" but it displays as "Sample pages" (Sample pages)
 * This is useful when the page name is singular, but you want to display it as plural
 * replace
 * This also links to "Sample page" but is displayed as "replace" (replace)
 * This is useful when there is no need to display the page's actual title; fits well when what is displayed flows well with the sentence

As you can see, all three link to "Sample page" but display differently

Images, Videos and the sort
The general syntax of displaying files is very similar to links, as they both use square brackets.

For most purposes, the following model should do well for any situation:



I will now being to explain all the elements of this model:
 * Filename - Just your file's name, verbatim (REQUIRED)
 * fileextension - This is your file's extension (png, gif, jpg, jpeg, ico, pdf, svg, odt, ods, odp, odg, odc, odf, odi, odm, ogg, ogv, oga), should be in the title of your file along with the name (REQUIRED FOR IMAGES AND SOUNDS)
 * thumb - This makes the file a thumbnail
 * caption - This adds a caption to the file, it only works when "thumb" is present
 * size - This sets the size of the file, either in px (pixels) or percent (introduced since Darwin); I believe if you only put one dimension, it sets the height width, if you put both (as in 10x10px), it scales the file according to it's height width as well, without modifying the image in any way (stretching, etc.).
 * alignment - Self explanatory, either align the file, left, right, or center
 * link= - Add the name of the page which the image will link to; leaving it blank will make the image unclickable

In the model, it is required to have at the very least for images and sound files, and  for videos.

Next will be how to combine several images into a gallery, slideshow, or slider

Galleries, Slideshows, and Sliders
Galleries, Slidershows, and Sliders are very similar in the fact that they all use the tag!)

Galleries
You can modify this gallery in several ways, namely the widths, position, columns, spacing, and orientation. All of these can be added like "widths=" and adding things in quotes ("") after the equals sign, and make sure they are inside the gallery tag!


 * Widths (widths=) - The value can be any number from 50 to 310, it automatically will be in pixels
 * Position (position=) - right, left, or center
 * Columns (columns=) - any number from 1 to 6, leaving it blank will automatically fit to the page
 * Spacing (spacing=) - small, medium, or large
 * Orientation (orientation=) = none, square, landscape, portrait

Slideshows
In order to make your gallery a slideshow, add type="slideshow" inside the tag. Slideshow has similar modifiers, but they are slightly different.


 * Crop (crop=) - Set the value to either true or false; true enables wikia's smartautocrop, while false disables it
 * Widths (widths=) - Similar to the one in galleries, but is from 200 to 500
 * Position (position=) - right, left, or center; same as generic galleries

Sliders
To make a gallery a slider, add type="slider" inside the tag.


 * Orientation (orientation=) - right or bottom, this sets the slider previews to be either on the right or the bottom.

Tables
Tables are far simpler in visual editors no doubt, but the biggest restriction is styling the tables, as it is very hard to do such things visually if there is not function to do so (at least, last time I used visual mode, there was no such thing). The table code is actually really simple once you get the hang of it.

The more basic table looks something like this:

Tables must start with a {| and end with a |}. Table headers have a ! before the header text. Regular table cells use | instead of the ! used for headers. To separate rows, you'd use a |- between the two rows you need to split. An extremely useful technique for making all cells on the same line instead of having each on their separate lines, is using || between each cell's content and not putting a line break between cells and their content; this allows us to conserve space in case the table has many columns. You can style tables with CSS classes and elements in either one of these places the starting "tag" {| or before cells/headers, but you need to put the styles first add yet another | between the styles and the cell/header content.

Quick Reference:
 * Start tables with  {| 
 * End tables with |}
 * Start header cells with !
 * Start regular cells with |
 * Use || between two cells' content to save space if need be
 * Always add a "dividing" | between the styles and the cell/header contents

Next we'll explore some more interesting and perhaps, more useful things about table customization. First off declaring a table class, by default you should use the "wikitable" class or the "wikitable sortable" class (which allows you alphanumericize ) the cells. A table with the "wikitable sortable" class needs to have headers present or else it will look identical to a table with the class "wikitable".

But wait, what if I want a row or column to span more than one row or column?
Well you're in luck, since you can do things like colspan and rowspan, they tell the cell how many columns or rows to cover, respectively. So next time you need something that takes up multiple columns or rows, you can use colspan and rowspan. Now colspan and rowspan are basically modifiers mentioned earlier in the tables "umbrella section" and follow the same rules, you have to put them between the cell and their starting symbol (! or |). Remember: rowpsan counts how many rows it takes up, including the one the cell with this property is in.

Templates
The best thing about most templates (infoboxes in particular) is that they are basically tables, actually scratch that, they are tables. Other templates, like warning templates or notification templates, may use HTML's  and   tags. Templates are found the "Templates:" prefix, and can be used anywhere on the wiki it is resides. What makes a template different from a table is that it uses parameters. When looking at the source of Wikia's default infobox, we see things like, and that is a parameter. You can create your own parameters with three curly braces around a word or words.

Infoboxes
So how do you go on about making a template, well specifically an infobox? If you aren't experienced in styling tables, or CSS, then just use the class "infobox".

Others
Templates aren't strictly just infoboxes, they may be used for other things, as mentioned above, notification templates, and still they require parameters.