Help:Tutorial/Media

From The TMS Wiki
Jump to: navigation, search
Introduction   Registration   Editing   Formatting   Wiki links   Media   Citing sources   Keep in mind   Wrap-up    

The TMS Wiki uses a variety of multimedia files to enhance content and explain concepts that are difficult to convey via text alone. The multimedia files may be images (photographs or diagrams), audio or video. Permitted file types are: png, gif, jpg, jpeg, ogg, ogv, oga.

Uploading a File

Files can be uploading by going to the Upload file page. From there you can choose a file saved on your computer to upload to the site. Depeding on the file name you may need to change the name in the "Description filename" field. It is important to choose a file name that is very descriptive and easy to remember. The standard format for filenames is to make them "CamelCase." For instance the image file for Howard Schubiner is HowardSchubiner.png. The next step is to click on the "upload file" button on the bottom of the page.

Adding file to a Page

Multimedia files can be added to any wiki page. The syntax to use is [[File:filename|options|caption]].The options can be zero or more of the following, separated by pipes (|):

  • Format option: one of border and/or frameless, frame, thumb (or thumbnail); Controls how the rendered image is formatted and embedded in the rest of the page.
  • Resizing option: one of {width}px — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
    • x{height}px — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
    • {width}x{height}px — Resizes the image to fit within the given width and height in pixels;
    • upright — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width).
    • Note that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up). The default maximum size depends on the format and the internal image dimensions (according to its media type).
  • Horizontal alignment option: one of left, right, center, none; Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).
  • Vertical alignment option: one of baseline, sub, super, top, text-top, middle, bottom, text-bottom; Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is middle).
  • Link option: one of
    • link={target} — Allows you to link the image to any page. [[File:Practitioner Howard Schubiner.jpg|20px|link=Howard Schubiner, MD]] renders as Practitioner Howard Schubiner.jpg
  • Other specific options: alt={alternative text} — Defines the alternative text of an image that will be rendered if either the referenced image cannot be downloaded and embedded, or if the support media must use the alternative description text (e.g. when using a Braille reader or with accessibility options set by the user in its browser).

The options can be given in any order. If the given options conflict each other, the latter is applied, except for the format options, where the options take the priority in the order of: frame; thumb (or thumbnail); frameless and/or border.

YouTube Videos

If you wish to upload a video file to the site itself use the syntax as shown above. However, if you wish display a video on youtube the syntax is different. In order to ensure that youtube videos are accessible there is a widget that is used. It works in a similar fashion as a template. The syntax is {{YouTube|ID=embed code|width=|height=}} .

The code: {{YouTube |ID=PLtPiOVVJ-U |width=600 |height=400}}

Gives you:


For further information on using images visit the Mediawiki Help Guide.


For more information, see TMSWiki:Categorization
Test what you have learned in the sandbox


Continue the tutorial with Citing sources