You must log in to edit PetroWiki. Help with editing

Content of PetroWiki is intended for personal use only and to supplement, not replace, engineering judgment. SPE disclaims any and all liability for your use of such content. More information


Changes

Jump to navigation Jump to search
5,608 bytes added ,  17:40, 17 September 2013
no edit summary
{{#ev:youtube|oq30C5wk1Mo}}
{{#ev:youtube|019mH5ApTN8}}

There are two primary types of links in PetroWiki:
# '''[[#Internal links|Internal links]]''' to other pages in the wiki
# '''[[#External links|External links]]''' to other websites

== Internal links ==
The easiest way to create an internal link is to use the [[File:Vector_toolbar_insert_internal_link_button.png]] link on the [[Help:Edit toolbar|edit toolbar]]. Highlight the text you want to hyperlink, then adjust the top box for the name of the page to link to. As you type, you will see existing page names that may be the one you want that you can select. You can create a link to an existing page, or to a page that needs to be created. (Be sure you search for appropriate [[Help:Page names|page names]] -- try using a second browser tab or window.)

Alternatively, to add an internal link, enclose the name of the page you want to link to in double square brackets. When you save the page, you'll see the new link pointing to your page. If the page exists already it is displayed in blue, if it does not, in red.

Selflinks to the current page are not transformed in URLs but displayed in bold.
(If you really want to link to the current page, use an anchor (see below), or <nowiki>[[#top|current page]]</nowiki> which always links to the top.)

The first letter of the target page is automatically capitalized, unless otherwise set by the admins, and spaces are represented as underscores (typing an underscore in the link will have a similar effect as typing a space, but is not recommended, since the underscore will also be shown in the text).

{| border="1" class="wikitable"
!Description
!You type
!You get
|-
|Internal link
|<pre>[[Main Page]]</pre>
|[[Main Page]]
|-
|Piped link
|<pre>[[Main Page|different text]]</pre>

|[[Main Page|different text]]
|-
|Internal link to an anchor on the same page
|<pre>[[#See also]]</pre>
[[Help:Formatting|Section headings]] and the [[#top|top]] of the page are automatically anchored.
|[[#See also]]
|-
|Internal link to an anchor that you reference with different text
|<pre>[[#See also|different text]]</pre>
|[[#See also|different text]]
|-
|Setting an internal link anchor so you'll be able to link to it
|<pre><div id="NameOfAnchorHere">optional text</div></pre>
Omit the "optional text" for invisible anchor.
|<div id="NameOfAnchorHere">optional text</div>
|-
|Internal link to an anchor on another page
|<pre>[[Help:Images#Supported media types for images]]</pre>
|[[Help:Images#Supported media types for images]]
|}

== External links ==
To add an external link, enclose the name of the page you want to link to in single square brackets. When you save the page, you'll see the new link pointing to your page, with an arrow icon after it to show that it was coded with single bracket external link syntax, and thus may lead to another site.

{| class="wikitable"
!style="width:15%"|Description
!style="width:45%"|You type
!style="width:40%"|You get
|-
|External link
|<tt><nowiki>http://www.petrowiki.org</nowiki></tt>
|http://www.petrowiki.org
|-
|External link with different label
|<tt><nowiki>[http://www.petrowiki.org PetroWiki]</nowiki></tt>
|[http://www.petrowiki.org PetroWiki]
|-
|Numbered external link
|<tt><nowiki>[http://www.petrowiki.org]</nowiki></tt>
|[http://www.petrowiki.org]
|-
|External links with file icons
|<tt><nowiki>
[http://en.wikipedia.org/wiki/.avi video]
[http://en.wikipedia.org/wiki/.ogg sound]
[http://en.wikipedia.org/wiki/.pdf document]
</nowiki></tt>
<small>See [[#External link icons]] for currently supported icons and extensions.</small>
|
[http://en.wikipedia.org/wiki/.avi video]<br/>
[http://en.wikipedia.org/wiki/.ogg sound]<br/>
[http://en.wikipedia.org/wiki/.pdf document]<br/>

|}

=== External link icons ===
{| class="wikitable"
! Test link !! Icon !! Trigger
|-
| [http://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/external-link-ltr-icon.png external-link-ltr-icon.png] || <code>.external</code>, <code>http://</code>, <code>gopher://</code>
|-
| [https://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/lock-icon.png lock-icon.png] || <code>https://</code>
|-
| [mailto:.] || [http://bits.wikimedia.org/skins-1.17/vector/images/mail-icon.png mail-icon.png] || <code>mailto:</code>
|-
| [news://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/news-icon.png news-icon.png] || <code>news<nowiki/>://</code>
|-
| [ftp://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/file-icon.png file-icon.png] || <code>ftp://</code>
|-
| [irc://.] || [http://bits.wikimedia.org/skins-1.17/vector/images/talk-icon.png talk-icon.png] || <code>irc://</code>
|-
| [http://.ogg] || [http://bits.wikimedia.org/skins-1.17/vector/images/audio-icon.png audio-icon.png] || <code>.ogg</code>, <code>.mid</code>, <code>.midi</code>, <code>.mp3</code>, <code>.wav</code>, <code>.wma</code>
|-
| [http://.ogm] || [http://bits.wikimedia.org/skins-1.17/vector/images/video-icon.png video-icon.png] || <code>.ogm</code>, <code>.avi</code>, <code>.mpeg</code>, <code>.mpg</code>
|-
| [http://.pdf] || [http://bits.wikimedia.org/skins-1.17/vector/images/document-icon.png document-icon.png] || <code>.pdf</code>, <code>.pdf#</code>, <code>.pdf?</code>
|}

=== How to avoid auto-links ===

When you put a URL on a wiki page it will be automatically converted into an external link, like this:

http://Petrowiki.org

To avoid that effect, put the URL between <code>&lt;nowiki&gt;</code> tags, like this:

<pre><nowiki><nowiki>http://Petrowiki.org</nowiki></nowiki></pre>

To get this:

<nowiki>http://Petrowiki.org</nowiki>
contributors, createpage, createtalk, diff, displaysubtitle, edit, editsandbox, history, member, minoredit, reupload, reupload-own, upload, viewlinktolatest, watch, wysiwyg
129

edits

Navigation menu