Help:Linksearch

From Wikipedia, the free encyclopedia

This is a copy of the master help page at Meta. Do not edit this copy.
Edits will be lost in the next update from the master page. See below for more information.
Navigating
Search, [ Go ]
What links here
Random page
Special pages
Printable version

Tracking changes
Recent changes {enhanced}
Related changes
Watching pages
Page history
Diff page
Image page
Contributions

Accounts
Logging in
Preferences
User style
View this alone


Special:Linksearchhttp://en.wikipedia.org../../../../articles/l/i/n/Special%7ELinksearch_3efd.html is one of the special pageshttp://en.wikipedia.org../../../../articles/s/p/e/Help%7ESpecial_page_4353.html. It is an extension installed on Wikimedia wikis [1].

Using the externallinks tablehttp://www.mediawiki.org../../../../articles/e/x/t/Externallinks_table.html it provides a list of links in external link style from the site on which it is applied, or a selected namespace of it, to a given URL pattern. For each link the source page is provided, and the exact target, both linked.

The URL pattern can be:

In the input box "http://" is allowed but not needed.

In the URL of the special page where the search string contains an anchor, or the first part of an anchor name, the hash character # has to be coded as "%23" and the required style is

    w/index.php?title=Special:Linksearch&target=URL

In each of the styles

    wiki/Special:Linksearch/target_page_name#anchor_name
    wiki/Special:Linksearch/target_page_name%23anchor_name

the anchor is ignored. ("w" and "wiki" can be different on other than Wikimedia wikis.)

Remarks:

  • Even if multiple URLs lead to the same target, with regard to capitalisation, multiple underscores, and using "index.php" or not, Linksearch is case-sensitive and also does not find alternatively written URLs. Therefore, when creating an external link, for optimal use of Linksearch, use a canonical form for the URL. In particular, if after following a link the address bar shows a modified URL, change the URL in the link to that.
  • The list is alphabetichttp://en.wikipedia.org../../../../articles/a/l/p/Help%7EAlphabetic_order_d053.html in the URL. Note that an underscore, unlike a blank space, is alphabetically positioned between "Z" and "a".

For links in external link style, Linksearch provides backlinks of sections, which "Special:Whatlinkshere" does not for links in internal link style. For links in interwiki link style there is no backlink feature at all.

On the other hand, links in internal link style provide existence detection. Also each of the three styles can have a different look, depending on CSS.

Therefore it is useful to combine the advantages of various link styles adding "hidden external links" to internal section links and to all interwiki links, except those for which the interlanguage link feature applies. This is done by adding <span style="display:none">http://...</span>; this can conveniently be done with a template, see below. Although no actual link is added (which would be superfluous because we have already an internal or interwiki link), it is recorded as external link, and therefore Linksearch can find it.

Since Linksearch allows specifying the first part of an anchor, it is useful, if anchor names are numerical or have a numerical end, to use leading zeros. Otherwise, when searching for links to e.g. "1", we also get links to "10", etc. This is e.g. applied in Portal:Current events/DateHeader2http://en.wikipedia.org../../../../articles/c/u/r/Portal%7ECurrent_events_DateHeader2_1fbc.html. More generally, if there are anchors "a" and "ab", it may or may not be desired that a search for links to "a" also gives links to "ab"; if not, use an anchor "_a".

Also, if anchor names have multiple components, it is useful to put the most significant component first, e.g. if anchors indicate months or dates, we could have the format YYYY-MM, or YYYY-MM-DD, or in a year page MM-DD (see also Calendar date#Big endian forms, starting with the yearhttp://en.wikipedia.org../../../../articles/c/a/l/Calendar_date.html#Big_endian_forms.2C_starting_with_the_year), with leading zeros (see also Help:Date formatting and linking#Link to date content other than required for autoformattinghttp://en.wikipedia.org../../../../articles/d/a/t/Help%7EDate_formatting_and_linking_8db8.html#Link_to_date_content_other_than_required_for_autoformatting). This applies also for page names, but since these are highly visible, as opposed to anchors, other considerations play a role too. In the case of sections, if for link targets another naming scheme is desired than for display of section headers, anchorscan be put explicitly instead of using section names. This is applied in Portal:Current events/DateHeader2http://en.wikipedia.org../../../../articles/c/u/r/Portal%7ECurrent_events_DateHeader2_1fbc.html, where the use in links of the names of explicitly put anchors is enforced by using pseudo sections, with displayed headers that cannot be used as anchors.

In the case of multiple sections with the same name, the HTML produced has an HTML ID that is the section name, with, from the second occurrence, "_2", "_3", etc. appended. This does not apply when other anchors are used.

See also

edit

Wikipedia-specific help

-


This page is a copy of the master help page at Meta (for general help information all Wikimedia projects can use), with two Wikipedia-specific templates inserted. To update the main text, edit the master help page for all projects at m:Help:Linksearch. For Wikipedia-specific issues, use Template:Ph:Linksearch (the extra text at the bottom of this page) or Template:Phh:Linksearch for a Wikipedia-specific lead (text appears at the top of this page). You are welcome to replace the full wikitext of this page with that of the master page at Meta at any time. To view this page in other languages see the master page at Meta.