Help:Link
Help: | Contents | Getting Started | New to BRWiki | Editing BRWiki | Editing BRWiki (advanced) | Communication and Community | Additional Help |
The help pages are currently being redesigned so they are more helpful. If you have any comments or are interested in helping out, please see the help team. |
This article or section needs to be cleaned up to a higher standard of quality.
style="Template:stub explanationcss;" |
This may include editing to correct spelling and grammar, rewriting sections to ensure they are clear and concise, and wikifying.
This may include editing to correct spelling and grammar, rewriting sections to ensure they are clear and concise, and wikifying.
[top]Linking from a page
The following types of hyperlink can be distinguished:
[list=1][*] internal link in internal link style (no class, class='stub', or class='new', see below)
[*] interwiki link in internal link style (class='extiw')
[*] link in external link style (class='external')
[/redirect]
(the classes can be used for separate colors or fonts per class by means of a specification in a CSS)
If no link label is specified, 1 and 2 are of the form target (with in case 2 target starting with a prefix) and 3 is of the form target, where target is the URL including "http://" (ftp:// also works, but file:// does not). In case 3 no blank space is allowed in the URL. For MediaWiki pages the blank space can be replaced by an underscore, in general also %20 can be used; see also URLs in external links.
There are two ways of allowing the link label and the (eventual) link target to be chosen independently:
[list][*]a label can be specified with in case 1 and 2 label and in case 3 [ target label ], with a blank space in between, see Piped link.
[*]a page with the name of the link label redirects to the eventual link target.
[/redirect]
In the first case the link title is the name of the (eventual) target page, in the second case it is equal to the link label. By using a piped link and a redirect, the label, title, and target can all be chosen independently, see also below.
Correspondingly, there are two ways to use an image as link to a page:
[list][*]In the first method, only possible in projects that allow embedding images in external link style, an image plays the role of the label.
[*]In the second method, the image description page contains a redirect.
[/redirect]
In case 3, links like [ target ] are automatically labelled with serial numbers 1, 2, 3, ...
For link type 1 there is an existence detection feature: it will be a link to the viewing page if the page exists at the time of loading or previewing of the referring page (no class or class='stub'), otherwise to the edit page (class='new').
[list=1][*] internal link in internal link style (no class, class='stub', or class='new', see below)
[*] interwiki link in internal link style (class='extiw')
[*] link in external link style (class='external')
[/redirect]
(the classes can be used for separate colors or fonts per class by means of a specification in a CSS)
If no link label is specified, 1 and 2 are of the form target (with in case 2 target starting with a prefix) and 3 is of the form target, where target is the URL including "http://" (ftp:// also works, but file:// does not). In case 3 no blank space is allowed in the URL. For MediaWiki pages the blank space can be replaced by an underscore, in general also %20 can be used; see also URLs in external links.
There are two ways of allowing the link label and the (eventual) link target to be chosen independently:
[list][*]a label can be specified with in case 1 and 2 label and in case 3 [ target label ], with a blank space in between, see Piped link.
[*]a page with the name of the link label redirects to the eventual link target.
[/redirect]
In the first case the link title is the name of the (eventual) target page, in the second case it is equal to the link label. By using a piped link and a redirect, the label, title, and target can all be chosen independently, see also below.
Correspondingly, there are two ways to use an image as link to a page:
[list][*]In the first method, only possible in projects that allow embedding images in external link style, an image plays the role of the label.
[*]In the second method, the image description page contains a redirect.
[/redirect]
In case 3, links like [ target ] are automatically labelled with serial numbers 1, 2, 3, ...
For link type 1 there is an existence detection feature: it will be a link to the viewing page if the page exists at the time of loading or previewing of the referring page (no class or class='stub'), otherwise to the edit page (class='new').
[top]Linking from an image
There are several ways to link from an image:
[list][*] Default internal image page link from an internal image. See image linking.
[list][*] Code example: [[ Image: ]]
[/redirect]
[*] Linking to the internal image from itself. See image linking.
[list][*] Code example: [[ :Image: ]]
[/redirect]
[*] Linking to an internal page from an internal image.
[list][*] Code example: [[ | :Image: ]]
[/redirect]
[*] Linking to an external page from an internal image.
[list][*] Not sure how to do this with built-in wiki functions. --Fandyllic
[/redirect]
[*] Linking to an external page from an external image.
[list][*] Code example: [ ]
[/redirect]
[/redirect]
[list][*] Default internal image page link from an internal image. See image linking.
[list][*] Code example: [[ Image:
[/redirect]
[*] Linking to the internal image from itself. See image linking.
[list][*] Code example: [[ :Image:
[/redirect]
[*] Linking to an internal page from an internal image.
[list][*] Code example: [[
[/redirect]
[*] Linking to an external page from an internal image.
[list][*] Not sure how to do this with built-in wiki functions. --Fandyllic
[/redirect]
[*] Linking to an external page from an external image.
[list][*] Code example: [
[/redirect]
[/redirect]
[top]Using the imagelink extension
An image link extension is implemented on [[BRWiki]] that uses SGML tags to link extneral pages to from external images. Rustak knows the details of where this came from and how it was installed, but it works well for this case.
[list][*]
[list][*] Code example: |
[/redirect]
[/redirect]
NOTE: The order of the target and label are reversed from typical wiki links. Imagelink uses label then target, whereas most wiki links use target then label.
[list][*]
[list][*] Code example:
[/redirect]
[/redirect]
NOTE: The order of the target and label are reversed from typical wiki links. Imagelink uses label then target, whereas most wiki links use target then label.
[top]Stub feature
A link in internal link style to an existing internal page will be in class 'stub' iff all the following is true:
[list][*]the page is in the main namespace
[*]the page is not a redirect
[*]the number of bytes of the wikitext is less than the value of the "threshold for stub display" specified in the preferences
[/redirect]
The idea behind this is that such pages are "stubs" which need fixing, or which are less worthwhile to go to. Alternatively, with a higher threshold value, the feature allows indication that a page is large (with a slow connection perhaps a reason not to go to it). However, note that due to the possible inclusion of templates and images, a small wikitext does not necessarily mean a small composite page in terms of amount of information, or amount of bytes to load.
Also, by specifying a very high value as threshold, this feature allows, instead of the intended use of distinction according to size:
[list][*]distinction according to namespace (in the main namespace or not); however, redirects in the main space are marked "as if in another namespace", regardless of the namespace of the target of the redirect
[*]for links to the main namespace, known from the hoverbox or status bar, an indication of links having a redirect as target
[/redirect]
However, linking to a section of what according to this criterion is a stub does not seem to work, except when external link style is used!
[list][*]the page is in the main namespace
[*]the page is not a redirect
[*]the number of bytes of the wikitext is less than the value of the "threshold for stub display" specified in the preferences
[/redirect]
The idea behind this is that such pages are "stubs" which need fixing, or which are less worthwhile to go to. Alternatively, with a higher threshold value, the feature allows indication that a page is large (with a slow connection perhaps a reason not to go to it). However, note that due to the possible inclusion of templates and images, a small wikitext does not necessarily mean a small composite page in terms of amount of information, or amount of bytes to load.
Also, by specifying a very high value as threshold, this feature allows, instead of the intended use of distinction according to size:
[list][*]distinction according to namespace (in the main namespace or not); however, redirects in the main space are marked "as if in another namespace", regardless of the namespace of the target of the redirect
[*]for links to the main namespace, known from the hoverbox or status bar, an indication of links having a redirect as target
[/redirect]
However, linking to a section of what according to this criterion is a stub does not seem to work, except when external link style is used!
[top]Miscellaneous
Reasons to use type 3 to link to an internal page or a page on a sister wiki include:
[list][*]linking to the edit page of an existing internal page
[*]linking to an edit page on a sister wiki (including a non-existing page, the link being an invitation or preparation for creating one, just like is common for internal pages)
[*]linking to a page for which internal link style is not possible, such as an old version of a page, a diff of two versions, Recent Changes or Watchlist with parameters, Backlinks page, etc.
[/redirect]
A redirect to a section of a page does not go to the section. One can use it anyway as a clarification, and at least it works when clicking on the link from the redirect page.
A link that specifies a section of a redirect page corresponds to a link to that section of the target of the redirect.
On some browsers, putting the mouse pointer over a hyperlink will show a hover box with the title attribute in the link anchor in the HTML code. This is the page name (without the possible section indication) in case 1, the page name with prefix in case 2, and the URL in case 3.
This can be switched off in the preferences. The browser may also show similar info, but with the possible section indication, in the adress bar.
[list][*]linking to the edit page of an existing internal page
[*]linking to an edit page on a sister wiki (including a non-existing page, the link being an invitation or preparation for creating one, just like is common for internal pages)
[*]linking to a page for which internal link style is not possible, such as an old version of a page, a diff of two versions, Recent Changes or Watchlist with parameters, Backlinks page, etc.
[/redirect]
A redirect to a section of a page does not go to the section. One can use it anyway as a clarification, and at least it works when clicking on the link from the redirect page.
A link that specifies a section of a redirect page corresponds to a link to that section of the target of the redirect.
On some browsers, putting the mouse pointer over a hyperlink will show a hover box with the title attribute in the link anchor in the HTML code. This is the page name (without the possible section indication) in case 1, the page name with prefix in case 2, and the URL in case 3.
This can be switched off in the preferences. The browser may also show similar info, but with the possible section indication, in the adress bar.
[top]Plus sign in a link
In internal and interwiki link style, a plus sign in a page name is not allowed, the HTML and hence the rendered page just shows the wikitext, e.g. a+b. In external link style a plus sign in the URL is retained. It is often equivalent with a space. See also below.
[top]Other conversions
In accordance with the rules explained in Page name, conversions are made. This is demonstrated in the following examples:
Note that a project does not keep a record of namespace prefixes or capitalization settings of sister projects, therefore less conversions can take place in an interwiki link than in an internal link.
class="bbcode_container" |
become links toCode:
[[__%20_%70RoJecT %20 : a b : c # d___%20]]
[[__%20_%70RoJekT %20 : a b : c # d___%20]]
[[ wikipedia:__%20_%70RoJecT %20 : a b : c # d___%20]]
class="bbcode_container" |
while inCode:
http://meta.wikipedia.org/w/wiki.phtml?title=Meta:A_b_:_c_&action=edit
http://meta.wikimedia.org/w/wiki.phtml?title=PRoJekT_:_a_b_:_c_&action=edit
http://en.wikipedia.org/wiki/pRoJecT_:_a_b_:_c_%23_d
class="bbcode_container" |
nothing is changed (except that when the browser reports the link target, %70 is converted to p).Code:
http://en.wikipedia.org/wiki/__%20_%70RoJecT_%20_:__a___b___:__c__#__d___%20
Note that a project does not keep a record of namespace prefixes or capitalization settings of sister projects, therefore less conversions can take place in an interwiki link than in an internal link.
[top]Linking to a page
A plus sign in the page name in the URL is equivalent with a space, e.g. http://www.birthright.net/forums/wiki/a+b leads to the page A b.
Apart from linking to the top, one can link to a section, see Section#Section_linking. If one wants to link to a position that is not suitable for starting a (sub)section, one can not use a HTML element "a" (see HTML in wikitext), but one can make a div tag <div id=".."></div> or add id=".." to the start tag of any existing HTML element. See e.g. the three rank links in wikipedia:Netherlands and their targets.
If, on applying the link, the page name has to be converted, e.g. capitalized, then section linking still works, but the anchor part of the address disappears from the address bar. A consequence is e.g. that one can not conveniently bookmark the URL with anchor, after applying the link.
This is not applicable for internal links, because the conversions have already taken place on Preview or Save of the referring page.
Consider e.g.:
[list][*]http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page#See_also
[*]http://en.wikipedia.org/wiki/wikipedia:How_to_edit_a_page#See_also
[*]http://en.wikipedia.org/wiki/Wikipedia:how_to_edit_a_page#See_also
[/redirect]
The anchor part of the address disappears from the address bar in the 2nd and 3rd case.
Conversions:
http://meta.wikipedia.org/w/wiki.phtml?title=Meta:A_b_:_c_&action=edit
http://en.wikipedia.org/wiki/pRoJecT_:_a_b_:_c_#_d
http://en.wikipedia.org/wiki/__%20_pRoJecT_%20_:__a___b___:__c__#__d
lead to Meta:A b : c and twice to wikipedia:Wikipedia:A b : c
Apart from linking to the top, one can link to a section, see Section#Section_linking. If one wants to link to a position that is not suitable for starting a (sub)section, one can not use a HTML element "a" (see HTML in wikitext), but one can make a div tag <div id=".."></div> or add id=".." to the start tag of any existing HTML element. See e.g. the three rank links in wikipedia:Netherlands and their targets.
If, on applying the link, the page name has to be converted, e.g. capitalized, then section linking still works, but the anchor part of the address disappears from the address bar. A consequence is e.g. that one can not conveniently bookmark the URL with anchor, after applying the link.
This is not applicable for internal links, because the conversions have already taken place on Preview or Save of the referring page.
Consider e.g.:
[list][*]http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page#See_also
[*]http://en.wikipedia.org/wiki/wikipedia:How_to_edit_a_page#See_also
[*]http://en.wikipedia.org/wiki/Wikipedia:how_to_edit_a_page#See_also
[/redirect]
The anchor part of the address disappears from the address bar in the 2nd and 3rd case.
Conversions:
http://meta.wikipedia.org/w/wiki.phtml?title=Meta:A_b_:_c_&action=edit
http://en.wikipedia.org/wiki/pRoJecT_:_a_b_:_c_#_d
http://en.wikipedia.org/wiki/__%20_pRoJecT_%20_:__a___b___:__c__#__d
lead to Meta:A b : c and twice to wikipedia:Wikipedia:A b : c
[top]Link titles
As shown by the examples a#b, wikipedia:a#b, http://a.b#c, giving the link titles a, wikipedia:a, and http://a.b#c, respectively (also for the piped link versions), the anchor is in the title in the external link style, but not in the internal link style and not in the interwiki link style. However, even if the anchor is not in the title and even if the browser does not show the URL in the hover box, the anchor can still be seen in the status bar.
Since the HTML element "a" is disabled when put directly in the wikitext, one can not choose the link target and link title independently. This would be useful e.g. to link the word "inch" to the article "inch", with link title "2.54 cm", so that one gets informed through the hover box even without following the link. A workaround is to link to a page named "2.54 cm", which redirects to "inch".
Since the HTML element "a" is disabled when put directly in the wikitext, one can not choose the link target and link title independently. This would be useful e.g. to link the word "inch" to the article "inch", with link title "2.54 cm", so that one gets informed through the hover box even without following the link. A workaround is to link to a page named "2.54 cm", which redirects to "inch".
[top]Subpage feature
Depending on the project, for certain namespaces a subpage feature is enabled. On Wikipedia this is in talk namespaces, and the user and project namespace, on Meta also in the main namespace. The default set in
DefaultSettings.php [1] is:
A page with a name of the form A/b is considered a so-called "subpage" of the page A.
From the parent page it can be linked to with simply [[/b]] or the corresponding piped link. In namespaces for which the feature is disabled, the slash is ignored and not displayed. On this project in this namespace (Help) it gives: [[/b]].
At the top of the subpage body a link to the parent page is shown automatically, without any corresponding wikitext. The link shows up even if the page A/b does not exist, provided that the page A exists.
Like most letters of a page name, the first letter after the slash is case-sensitive, A/B and A/b are different.
Subpages can have subpages themselves. Links to the whole hierarchy line of pages from the top is shown on the page.
What links here and Related changes ignore these automatic links.
See also wikipedia:Wikipedia:Subpages.
DefaultSettings.php [1] is:
class="bbcode_container" |
Settings per project are done in LocalSettings.php [2].Code:
# which namespaces should support subpages? See Language.php
# for a list of namespaces
# default: only discussion ("talk") namespaces and user pages
# allow subpages
# 0=no subpages, 1=subpages
$wgNamespacesWithSubpages = array(
-1 => 0,
0 => 0,
1 => 1,
2 => 1,
3 => 1,
4 => 0,
5 => 1,
6 => 0,
7 => 1
);
A page with a name of the form A/b is considered a so-called "subpage" of the page A.
From the parent page it can be linked to with simply [[/b]] or the corresponding piped link. In namespaces for which the feature is disabled, the slash is ignored and not displayed. On this project in this namespace (Help) it gives: [[/b]].
At the top of the subpage body a link to the parent page is shown automatically, without any corresponding wikitext. The link shows up even if the page A/b does not exist, provided that the page A exists.
Like most letters of a page name, the first letter after the slash is case-sensitive, A/B and A/b are different.
Subpages can have subpages themselves. Links to the whole hierarchy line of pages from the top is shown on the page.
What links here and Related changes ignore these automatic links.
See also wikipedia:Wikipedia:Subpages.
[top]External vs. Internal Links
External links should usually be used for content that cannot be put on BRWiki. If the information already exists within BRWiki an internal link should always be used. If the content doesn't exists in BRWiki, but can exist then there are many factors to consider. For example, if you are linking offsite to mob, quest, or item information that doesn't exist within BRWiki then that information has less of a chance of getting created. By using an internal link the page has a much higher chance of being created.
[list][*]Everyone who sees that page will see that the article needs to be created
[*]The page will be added to the wanted pages list.
[/redirect]
Many people use the wanted pages list to find out which articles need to be created or browse their favorite pages looking for dead internal links. Using internal links is a great way to help the wiki expand, but not the best solution for the users of BRWiki. Instead of being able to click on a link and access off site information they now have a dead link with nothing and are forced to go offsite and search for the information. There are several solutions to this.
[list][*]Create the article and add the required stub tag. In addition to the stub create a section called External Links and add links to external resources for the page.
[list][*]Users will now have more choices than before, instead of being forced to use whatever external link the article writer choose they can now select from a list of external links to go to their preffered site.
[*]The page will be added to the appropriate stub category and anyone expanding it will already have links to the resources to get the information from.
[*]The downside is that the page will no longer be added to the wanted page and people browsing any pages linking to it may not be aware that the article is only a stub, so it could potentially stay a stub forever.
[/redirect]
[*]The best solution is to use the {{item| | }} (Thottbot) tag.
[list][*] Example: Template:item was created with
[*] Users will be able to see that the page doesn't exist and then click on the thottbot link instead to access the information.
[*] Editers will be able to see that the page doesn't exist and create it, the page will also be added to the wanted pages list.
[/redirect]
[*]...or to use the {{item| | | }} tag to have both Allakhazam and Thottbot links.
[list][*] Example: Template:item2 was created with
[/redirect]
[/redirect]
[list][*]Everyone who sees that page will see that the article needs to be created
[*]The page will be added to the wanted pages list.
[/redirect]
Many people use the wanted pages list to find out which articles need to be created or browse their favorite pages looking for dead internal links. Using internal links is a great way to help the wiki expand, but not the best solution for the users of BRWiki. Instead of being able to click on a link and access off site information they now have a dead link with nothing and are forced to go offsite and search for the information. There are several solutions to this.
[list][*]Create the article and add the required stub tag. In addition to the stub create a section called External Links and add links to external resources for the page.
[list][*]Users will now have more choices than before, instead of being forced to use whatever external link the article writer choose they can now select from a list of external links to go to their preffered site.
[*]The page will be added to the appropriate stub category and anyone expanding it will already have links to the resources to get the information from.
[*]The downside is that the page will no longer be added to the wanted page and people browsing any pages linking to it may not be aware that the article is only a stub, so it could potentially stay a stub forever.
[/redirect]
[*]The best solution is to use the {{item|
[list][*] Example: Template:item was created with
{{item|5664|Cruel Barb}}
[*] Users will be able to see that the page doesn't exist and then click on the thottbot link instead to access the information.
[*] Editers will be able to see that the page doesn't exist and create it, the page will also be added to the wanted pages list.
[/redirect]
[*]...or to use the {{item|
[list][*] Example: Template:item2 was created with
{{item2|Cruel Barb|5191|5664}}
[/redirect]
[/redirect]
[top]Self Link
A self link is a link to the page itself. It appears as bold text when the article is viewed. Examples:
[list][*]Self link - [[Help:Self link]]
[*]piped self link - [[Help:Self link|piped self link]]
[/redirect]
Self links should not be used to create bold text, see Editing
An indirect self link is a link to a page that redirects back. Though it is undesirable, it is shown as a regular link.
[list][*]Self link - [[Help:Self link]]
[*]piped self link - [[Help:Self link|piped self link]]
[/redirect]
Self links should not be used to create bold text, see Editing
An indirect self link is a link to a page that redirects back. Though it is undesirable, it is shown as a regular link.
[top]Additional effects of links
[list][*]Related changes
[*]Backlinks
[*]Date format - since this effect applies for every link occurrence independently, a convention to avoid multiple linking to the same page within one page typically does not apply for date links.
[/redirect]
[*]Backlinks
[*]Date format - since this effect applies for every link occurrence independently, a convention to avoid multiple linking to the same page within one page typically does not apply for date links.
[/redirect]
[top]See also
[list][*]Calculation
[*]Editing#Links, URLs
[*]Interwiki linking
[*]Piped link
[*]Self link
[*]Template#Restrictions (and the next section)
[*]URL
[*]Parser testing/replaceInternalLinks
[*]Parser testing/replaceExternalLinks
[*]Links table
[*]Brokenlinks table
[*]wikipedia:Hyperlink
[*]wikipedia:Wikipedia:Canonicalization
[/redirect]
[*]Editing#Links, URLs
[*]Interwiki linking
[*]Piped link
[*]Self link
[*]Template#Restrictions (and the next section)
[*]URL
[*]Parser testing/replaceInternalLinks
[*]Parser testing/replaceExternalLinks
[*]Links table
[*]Brokenlinks table
[*]wikipedia:Hyperlink
[*]wikipedia:Wikipedia:Canonicalization
[/redirect]
Created by Last edited by , 10-23-2011 at 11:53 AM 0 Comments, 6,762 Views |
, 11-27-2006 at 09:30 PM
Bookmarks