Like all pages on the World Wide Web, the pages delivered by Fandom's servers have URLs to identify them. These are the addresses that appear in your browser's address bar when you view a page. Memory Alpha editors also have the ability to create hyperlinks to chosen URLs, pointing to pages either within Memory Alpha or elsewhere on the Web.
Linking to URLs
When editing a page, hyperlinks to other pages within Memory Alpha are normally written as wikilinks, using the [[...]] syntax described here. If you want to link to an outside website, or to certain specially generated Memory Alpha pages (such as the raw version of an article), it is necessary to provide the full URL. This is done using external link syntax.
There are three forms of external link syntax:
- If the URL is simply included in the wikitext, without square brackets, then it appears as written, and a hyperlink is created:
https://www.startrek.com/produces https://www.startrek.com/ - If the URL is placed in square brackets, then a hyperlink is created with a serial number as its label:
[https://www.startrek.com/]gives [1] - If the URL is placed in square brackets followed by a space and some text, then that text is used as the label for the hyperlink:
[https://www.startrek.com/ The Official ''Star Trek'' Website]gives The Official Star Trek Website
Making a link to elsewhere on Memory Alpha using the external link syntax can be simplified by using {{SERVER}}. Example: [{{SERVER}}/wiki/Star_Trek?action=raw].
Fixing links with unsupported characters
- The URL must start with a supported URI scheme.
http://andhttps://are always supported.gopher://,irc://,ircs://,ftp://,news://,nntp://,worldwind://,telnet://,svn://,git://,mms://, andmailto:will create a link but require an agent registered in the browser. - URLs containing certain characters will display and link incorrectly unless those characters are percent-encoded. For example, a space must be replaced by
%20(this can be done using the PATH option of the urlencode parser function).
| sp | " | ' | , | ; | < | > | ? | [ | ] | { | | | } |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| %20 | %22 | %27 | %2C | %3B | %3C | %3E | %3F | %5B | %5D | %7B | %7C | %7D |
- Single apostrophes do not need to be encoded; but unencoded multiples will be parsed as italic or bold markup
- Titles containing certain characters will display and link incorrectly unless those characters are encoded with HTML character references.
| newline | [ | ] | | |
|---|---|---|---|
| space | [ | ] | | |
- Even though PHP's urlencode() automatically percent-encodes them, these characters do not get URL-encoded by wfUrlencode(). The ":" symbol is a partial exception – it is not encoded anywhere except for IIS 7.0.
| ; | @ | $ | ! | * | ( | ) | , | / | ~ | : |
|---|---|---|---|---|---|---|---|---|---|---|
| %3B | %40 | %24 | %21 | %2A | %28 | %29 | %2C | %2F | %7E | %3A |
URLs of Memory Alpha pages
URLs of pages on the English Memory Alpha begin https://memory-alpha.fandom.com/. That address on its own redirects a user to the main page, the recent changes page, or Discussions, depending on that user's preferences. Pages in the Memory Alpha database are located in the /wiki/ directory. The page name may include a namespace prefix (such as "MA Help:" for this page). There are various query strings that can be appended to a page URL to modify its presentation. Some of the most important ones are listed below:
- To go to a redirect page without following the redirect: https://memory-alpha.fandom.com/wiki/STAR_TREK?redirect=no
- The action parameter has several possible values:
- To go to the edit page (or view the source of a protected page): https://memory-alpha.fandom.com/wiki/Star_Trek?action=edit. Other parameters can be added, such as section=5, section=new, or preload=pagename to edit the fifth section of a page, add a section to a page, or preload wikitext from pagename into the edit box of a new page. When no additional parameters are needed, please use
[[Special:EditPage/Pagename]]to link to history pages. - To access an article's page history: https://memory-alpha.fandom.com/wiki/Star_Trek?action=history. Further parameters can be added, as in https://memory-alpha.fandom.com/wiki/Star_Trek?action=history&limit=5, which displays the five most recent edits. When other parameters are not needed, please use
[[Special:PageHistory/Pagename]]to link to history pages. - To watch or unwatch a page: https://memory-alpha.fandom.com/wiki/Star_Trek?action=watch (or action=unwatch).
- To purge a page from the server cache (to have it rendered with the latest template versions, et cetera): https://memory-alpha.fandom.com/wiki/Star_Trek?action=purge (this is not the same as purging your browser cache). Please use
[[Special:Purge/Pagename]]to link to page purge pages. - action=render renders the page without CSS.
- action=info displays the page info. Please use
[[Special:Info/Pagename]]to link to info displays. - To obtain the raw wikitext of a page without downloading the full HTML: https://memory-alpha.fandom.com/wiki/Star_Trek?action=raw
- These are available only to administrators:
- action=delete provides admins with the page deletion interface. If this is linked to in the wikitext, please use
[[Special:Delete/Pagename]] - action=protect and action=unprotect can be used interchangeably; use
[[Special:Protect/Pagename]]to link to the protection screen. - action=markpatrolled can be used by admins to mark new pages as patrolled.
- action=delete provides admins with the page deletion interface. If this is linked to in the wikitext, please use
- To go to the edit page (or view the source of a protected page): https://memory-alpha.fandom.com/wiki/Star_Trek?action=edit. Other parameters can be added, such as section=5, section=new, or preload=pagename to edit the fifth section of a page, add a section to a page, or preload wikitext from pagename into the edit box of a new page. When no additional parameters are needed, please use
- To link to a particular version of a page: https://memory-alpha.fandom.com/wiki/Star_Trek?oldid=1374279 (where
oldidis the revision number). A permanent link to the present version of the page can be accessed by clicking "Permanent link" under "Page Tools" on the right side of the page. The version ID is unique across all pages; the title parameter here has no effect. Special:PermanentLink/1374279 is a wikilink to a page version. - To link to a diff between two versions of a page: https://memory-alpha.fandom.com/wiki/Star_Trek?diff=3099059&oldid=3089717, where diff is the ID of the version to appear on the right. Set diff=0 to compare the current version; set diff=0 and oldid=0 to compare the two most recent versions. Again the title parameter has no real effect (you can in fact compare versions of two different pages). Special:Diff/1374279 is a wikilink to a diff (documentation).
- To view a category listing starting from a specified point: https://memory-alpha.fandom.com/wiki/Category:Memory_Alpha_disambiguations?from=B
- To specify parameters for special pages, as in: https://memory-alpha.fandom.com/wiki/Special:Contributions?target=Sulfur (in this case the target parameter is a username, but many other parameters are possible, depending on the page).
- To display a page with a particular interface language: https://memory-alpha.fandom.com/wiki/Star_Trek?uselang=de (
deis the language code for German). This parameter can also be set toqqxto reveal the names of the MediaWiki pages that generate the interface. - To display a page formatted for mobile devices: https://memory-alpha.fandom.com/wiki/Star_Trek?useskin=fandommobile
If constructing URLs for Memory Alpha pages, remember to convert spaces into underscores, and to percent-code special characters where necessary, as described in the previous section. (For how to do this in template code, see Templates and programming below.)
Various kinds of error message may appear if an invalid URL, or one to which you do not have access, is submitted. In other cases, the URL may redirect to a valid one (for example, page titles are converted to their canonical form as they are when they appear in wikilinks).
Templates and programming
For use in templates, correct URLs can be constructed using certain magic words and parser functions such as fullurl, urlencode, and others. Details of these can be found at Help:Magic words at MediaWiki.org.
Most programmatic interaction with Memory Alpha can be performed most efficiently using the API, for which URLs beginning https://memory-alpha.fandom.com/api.php are used. For details, see API at MediaWiki.org.