Help:Editing/mn

    From The Document Foundation Wiki
    This page is a translated version of the page Help:Editing and the translation is 0% complete.

    Wiki-editing Help

    The Mediawiki Help provides very extensive help pages. Please have a look there and search the help over there for your editing question. See also the German page for some content.

    Linking to Image or File

    MediaWiki allows us to upload a file. In that page, there are some information for how to link to file after upload. But this guide will split that into some more cases, depending on what you want users to see. I will use a file named "Example.jpg" as an example. Make sure you use correct file name ;)

    • If the link to a file comes from inside this wiki (or from Wikimedia Commons)
      • If you want to show the image directly in a page
        • Use [[File:Example.jpg]] or you could use some other options from mediawiki help
        • But if the file isn't an image, such as a pdf or odt file, using this syntax will give you a link to the file description page instead. (Click for a preview) Users may download the file there.
      • If you want a direct link to file. That is, users clicking it will instantly get the file. No file description page.
        • Use [[Media:Example.jpg]] or [[Media:Example.jpg|text to show]] for piping link. MediaWiki will automatically generate direct links for you. (Click for a preview)
        • Please, DO NOT hard-code direct link which copy-and-paste from browser like http://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg. It might cause some problems when upgrading MediaWiki. (It has been causing problems when upgraded from MediaWiki 1.16 to 1.17)
      • If you want a link to the file description page, that is, images won't show in any case
        • Use [[:File:Example.jpg]]. Note there are two colons here. Piping link also available.
    • If the link to a file comes from outside the wiki
      • Currently, MediaWiki doesn't allow using a direct link from external page, like http://wiki.documentfoundation.org/Media:Example.jpg. Accessing via this link will bahave like using File:Example.jpg method. That is, it will go to the file description page.[1]
        • For example, use http://wiki.documentfoundation.org/File:Example.jpg
        • It's safe when upgrading MediaWiki, and a link will be accessible forever, or at least if this wiki doesn't down ;)
        • Although users might get confused what to do next when getting there.
      • So, using copy-and-paste direct link might be better in some cases.
        • But these links need some love when upgrading MediaWiki.

    1. "Alias NS_MEDIA page URLs to NS_FILE...we only use NS_MEDIA in wikitext links to tell Parser to make a direct file link". From MediaWiki's includes/Wiki.php. Licensed under GPLv2.