Help:Long parameter demo

From WikiNASIOC
Jump to: navigation, search

This is the result of calling Template:P1 se with a parameter value that is a long string of wikitext, look in the edit box, and see the opening braces a little below, and the closing braces at the end. It is a copy of part of Help:Images and other uploaded files with the template calls and a separate pipe in nowiki tags. It demonstrates that a parameter value can have (the wikitext for) sections, links, and images.

Start of parameter

MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/-


Contents

To add an image, the image file has to be uploaded. Also other files can be uploaded, see below. The system uses the term "image" for any uploaded file.

First give the file a suitable name, because renaming during or after uploading is not possible. Make sure that the file name has the proper extension.

With the file an image page (also called "image description page") will be associated, with a page name consisting of the file name (including extension), prefixed with "Image:" (or in general the value of variable {{ns:Image}}). Thus the file names are case-sensitive (this applies even for the file name extension) except, in most projects, for the first character.

Although on each project files can be uploaded, a family of projects may have designated one in particular for this, with sharing of those files enabled. For Wikimedia projects this is Wikicommons (free content only, no "fair use" content), in general this is referred to below as Commons.

To upload a file, go to Commons, log in there, and upload the file using the upload link commons:Special:Upload.

Image at the left

[[image:tst.png|left|thumb|50px|[[help:contents|demo]]]] puts the image at the left; text that follows floats to the right of it; if a second image immediately comes after the first, the second abuts to the right side of the first; if there is text in between then the second image is at the lower right of the first, under this text:

text text text text text text text text text text text text text text text text between the 3rd and 4th images. text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text after the 4th image.


With [[image:tst.png|none|thumb|50px|[[help:contents|demo]]]] the image is put at the left, and text that follows starts below it.

text text text text text text text text text text text text text text text text text text text text text text text text text text text text

Image at the right

[[image:tst.png|right|thumb|50px|[[help:contents|demo]]]] puts the image at the right; text that follows floats to the left of it. The situation is not symmetric with the case above: a second image is put at the extreme right again, under the first.

text text text text text text text text text text text text text text text text text text text text text text text text text text text text after the 1st image. text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text after the 2nd image.{{clr}}

Using full width again

Use <br style="clear:both;" />, or on projects that have Template:Clr (Meta and en:): {{clr}}. Text floats around the image until it gets to {{clr}} (in Meta) like this.{{clr}}After {{clr}}, however, text can float no longer, and restarts from under the image, using the full width again like this,...... like this, like this, like this, like this, like this, like this, like this.

Inline images

Inline images cannot have a caption, but they can have a "title"-attribute (often misidentified as the "alt" attribute, which has a different purpose), which is shown in the hoverbox (in the cases above, for the image it is the same as the caption, and for the enlarge icon it is "Enlarge"). It is the last item of the image code, hence, if there is only the image name with prefix "image:" it gives that; if there is an empty item by ending with a pipe character ("|") it gives none; otherwise, it gives the image code item that happens to be last, unless a proper text is specified.

The size of the images can be reduced but they can not be enlarged.

Example (note the hoverbox too): "text [[image:tst.png]] text [[image:tst.png|5px|]] text [[image:tst.png|500px|demo]] text" gives "text File:Tst.png text File:Tst.png text demo text".

See also below.

See also


Links to other help pages

Help contents | search (all help pages)
Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s:
Reading
Go | Search | Stop words | URL | Namespace | Page name | Section
Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
Logging in and preferences
Logging in | Preferences | User style
Editing
Advanced editing | Editing FAQ | Edit toolbar | Export
Editing shortcuts
Tracking changes
Recent changes (enhanced) | Related changes | Watching pages | Diff
Page history | Edit summary | User contributions | Minor edit | Patrolled edit
Style & formatting
Wikitext examples | Reference card
HTML in wikitext | HTML elements
List | Table | Sorting
Mathematical symbols on English Wikipedia
Special input and output
Inputbox | Special characters | Displaying a formula | Images and other uploaded files | EasyTimeline
Advanced functioning
Template | Advanced templates | Parser function | ParserFunctions | Parameter default | Variable | Magic word | System message | Substitution
Array | Calculation
Page management
Starting a new page | Renaming (moving) a page | Maintenance | Merging and moving pages | Protecting pages
Resolving disputes | Deleting a page
Special pages
Talk page | Testing | Sandbox
Lists of resources
Lists of Categories | Copyrights | Infobox
Redirect | Reference Desk | Shortcuts | Stub types


Other languages: English (en) Deutsch (de) français (fr) русский (ru) shqip (sq) 日本語 (ja) Tiếng Việt (vi) 中文(台灣)‎ (zh-tw) български (bg) +/-

End of parameter