World Library  
Flag as Inappropriate
Email this Article

In Bruges

Article Id: WHEBN0009541497
Reproduction Date:

Title: In Bruges  
Author: World Heritage Encyclopedia
Language: English
Subject: Colin Farrell, 66th Golden Globe Awards, 62nd British Academy Film Awards, Clémence Poésy, Brendan Gleeson
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

In Bruges

In Bruges
Theatrical release poster
Directed by Martin McDonagh
Produced by
Written by Martin McDonagh
Starring
Music by Carter Burwell
Cinematography Eigil Bryld
Edited by Jon Gregory
Production
company
Distributed by
Release dates
  • 17 January 2008 (2008-01-17) (SFF)
  • 8 February 2008 (2008-02-08) (United States)
  • 18 April 2008 (2008-04-18) (United Kingdom)
Running time
107 minutes[1]
Country
  • United Kingdom
  • United States[2]
Language English
French
Flemish
Budget $15 million
Box office $33.4 million[3][4]

In Bruges is a 2008 British-American neo-noir black comedy crime film written and directed by Martin McDonagh. The film stars Colin Farrell and Brendan Gleeson as two Irish hitmen in hiding, with Ralph Fiennes as their gangster boss. The film takes place and was filmed in the Belgian city of Bruges.[5]

In Bruges was the opening night film of the 2008 Sundance Film Festival[6] and opened on limited release in the United States on 8 February 2008. The film garnered a cult status for its dark humor and dialogues.

Farrell won a Golden Globe Award for Best Actor in a Musical or Comedy for the film, while Martin McDonagh won a BAFTA Award for Best Original Screenplay.

Contents

  • Plot 1
  • Cast 2
  • Cultural references 3
  • Music 4
  • Release 5
    • Box office 5.1
    • Critical response 5.2
    • Accolades 5.3
    • Home media 5.4
  • References 6
  • External links 7

Plot

Carrying out orders to execute a priest, rookie hitman Ray accidentally also kills a young boy. He and his mentor Ken are sent to Bruges by their employer Harry, where they are to await further instructions. Placidly biding his time until they can return to England, Ken finds the city charming and quaint, while Ray has nothing but contempt for it.

One night, Ken indulges Ray's desire to get out of their small hotel room, and they explore the historic city, chancing upon a film shoot involving a dwarf actor, which amuses Ray. Ray strikes up a romance with Chloë, a local drug dealer moonlighting as a production assistant, taking her to a fancy restaurant, where he gets into an argument with a couple and ends up knocking them unconscious. Later at her apartment, Chloë's ex-boyfriend Eirik suddenly appears and brandishes a handgun loaded with blanks, but Ray disarms him, and blinds him in one eye by discharging the gun in his face. Chloë shamefully admits that she and Eirik occasionally rob tourists after she seduces them, insisting she'd told Eirik that Ray was not a target. Ray also becomes acquainted with Jimmy, the dwarf actor, who turns out to be a drug-abusing racist.

Ken finally receives a call from Harry, unexpectedly ordering him to kill Ray, on the principle that the killing of a child—even accidentally—is unforgivable. Harry explains that he sent the pair to Bruges because he loved the city as a boy and wanted to give Ray one last beautiful memory before dying. With a handgun supplied by Harry's local contact Yuri, Ken reluctantly tracks Ray to a park and prepares to kill him. But Ray, distraught at his killing of the boy, is about to shoot himself with Eirik's loaded gun, and Ken instead stops him. Ken admits that he has been ordered to kill Ray, but convinces him to instead get on a train out of Bruges and not return to England, to make a new start elsewhere. Ken informs Harry of this, who immediately sets out for Bruges, enraged at the disobedience.

However Ray is identified on the train by the couple he assaulted in the restaurant, and is escorted back to Bruges. Chloë bails him out, and the two share a drink on the market square beneath Bruges' belfry. Ken and Harry also meet for a drink nearby, then climb to the top of the carillon tower, where Ken argues that Ray deserves a chance at redemption, and accepts whatever fate Harry has for him in defense of that; baffled by Ken's principles, Harry shoots him in the leg. Eirik then alerts Harry that Ray has returned, and Ken is mortally wounded trying to stop Harry. As Harry descends the steps to kill Ray, Ken drags himself back to the top of the tower, but fog prevents him from using his gun. He throws coins onto the plaza, attracting the attention of the people below, before throwing himself down, living long enough to warn Ray of Harry's arrival.

Harry pursues Ray through the city and wounds him with a single shot from a distance. Ray staggers onto the street where the film is shooting, as Harry catches up. He shoots Ray repeatedly, also hitting Jimmy, who is costumed as a schoolboy. Believing he has killed a child (in the same way Ray had), adhering to his own principles, Harry kills himself. Gravely wounded, Ray is lifted into an ambulance as he reflects upon the nature of hell.

Cast

Cultural references

The plot has similarities to Harold Pinter's one-act play The Dumb Waiter.[7] When checking into the hotel, Ray and Ken use the names Cranham and Blakely, a reference to Kenneth Cranham and Colin Blakely who played the hitmen in the BBC version of Pinter's play.

The film also contains many references to Don't Look Now,[8] including the claim by Chloë that the film-within-a-film is almost an homage to it.

Likewise, the scene where Ken is instructed to kill Ray was shot in a single, unbroken take, in a nod to the 3-minute single-take opening of Orson Welles' Touch of Evil, which can be seen playing on a TV in the background.

Music

In Bruges: Original Motion Picture Soundtrack
Soundtrack album by Carter Burwell
Released 5 February 2008
Recorded 2007
Genre Classical
Folk
Length 44:08
Label Lakeshore Records
Carter Burwell chronology
No Country for Old Men
(2007)
In Bruges
(2008)
Burn After Reading
(2008)

In Bruges: Original Motion Picture Soundtrack is a soundtrack to the film of the same name, released by Lakeshore Records and featuring the score of Carter Burwell as well as additional music found in the film. The soundtrack was released on 5 February 2008 in the United States and Canada.[9]

All music composed by Carter Burwell, except where noted.
Track listing
No. Title Performer(s) Length
1. "Prologue"     1:17
2. "Medieval Waters"     1:40
3. "The Little Dead Boy"     1:46
4. "St. John the Gambler"   Townes Van Zandt 3:03
5. "The Last Judgement"     1:52
6. "View from the Tower"     1:04
7. "My Suicide Your Homicide"     1:38
8. "Brandy Alexander"   The Walkmen 2:30
9. "Save the Next Boy"     1:19
10. "Ray at the Mirror"     1:19
11. "Walking Bruges"     0:36
12. "The Magic Frog"     0:50
13. "Der Leiermann"   Andreas Schmidt and Rudolf Jansen 3:40
14. "Harry Walks"     1:21
15. "Dressing for Death"     1:11
16. "The Kiss Walk Past"     1:04
17. "On Raglan Road"   The Dubliners 4:15
18. "Thugs Passing in the Night"     1:13
19. "Shootout Part 1"     2:10
20. "When He's Dead"     1:08
21. "Shootout Part 2"     2:44
22. "Principles"     1:25
23. "I Didn't Want to Die"     1:35
24. "2000 Miles"   The Pretenders 3:38
Total length:
44:08

Release

Box office

In Bruges was released in limited theatres on 8 February 2008, and opened in 28 theatres in the United States, grossing $125,541 on its opening day and $459,575 on its opening weekend, ranking No. 25 with a per theatre average of $16,413.[10][11] On its second weekend, it was released in 112 theatres and moved up to No. 22 and grossed $970,211, with a per theatre average of $8,663.[12][13] By its third weekend it moved up even more to No. 21 and made $738,318 from 163 theatres it was released, with $4,530 per theatre average.[14][15]

Critical response

The film received mostly positive reviews. Rotten Tomatoes gives the film a score of 84% based on 184 reviews, with an average rating of 7.3/10.[16] Metacritic gives the film an average score of 67, based on 34 reviews, which indicates "generally favorable reviews".[17]

Chicago Sun-Times critic Roger Ebert gave the film a four-out-of-four-stars rating, saying "This film debut by the theater writer and director Martin McDonagh is an endlessly surprising, very dark, human comedy, with a plot that cannot be foreseen but only relished."[18] Tasha Robinson of The A.V. Club gave the film an "A-", praising the performances of the main cast: "Farrell, having successfully made the transition from overexposed-yet-underutilized action-thriller star to one-film-a-year artiste, gets a lot to work with, and he sells it all flawlessly, moving convincingly from offhanded, prickly asshole mode to nervous young lover to disintegrating martyr," and that "then again, all the leads are perfectly cast, and they help turn a light farce with thriller overtones into something deeper and sweeter." About the film itself, she added: "When it's funny, it's hilarious; when it's serious, it's powerful; and either way, it's an endless pleasant surprise."[19] Claudia Puig of USA Today gave the film three-and-a-half stars out of four and praised the two leads, stating that "Brendan Gleeson is brilliant as Ken ... along with his partner in crime, Ray, played by Colin Farrell in probably his best performance." About the film, she added that it's "sharply written, superbly acted, funny and even occasionally touching."[20] Damon Wise of Empire magazine gave the film four out of five stars, writing that "with In Bruges, the British gangster movie gets a Croydon facelift. It may not be new, but it's a wonderfully fresh take on a familiar genre: fucked-up, far-out and very, very funny."[21]

John Anderson of the Washington Post gave the film a positive review, writing that "those who know McDonagh's work know a vein of darkness will run deeply through the comedy. It has seldom been darker. Or funnier. He has made a hit-man movie in which you don't know what will happen and can't wait to find out. Every movie should be so cliched."[22] Mick LaSalle of San Francisco Chronicle also gave the film a positive review; he praised Farrell's performance, stating that "in the past few months, with Cassandra's Dream and now this, we've found out something about Farrell. He's not a matinee idol, and he's not a suave or heroic leading man. He's a terrific character actor, and he can go to low places that suave heroes can't risk, like anguish, self-hatred, embarrassment, utter confusion and buffoonery." About the film, he added that it's "witty and lively, with a soul to it, as well."[23] Dana Stevens of Slate magazine also praised the performances of the two leads: "Farrell, who just played a remarkably similar tortured killer for hire in Woody Allen's Cassandra's Dream, finds just the right tone for this twitchy, funny, emotionally volatile thug; for once, he seems to know exactly what movie he's in. So does Brendan Gleeson, the big, shambling, sad-eyed Irish actor known to American audiences mainly for his role in the last two Harry Potter movies." She continued about the film: "A jolly mess of a movie. Overplotted, choppy, and contrived, it nonetheless has a curious vitality that makes you wonder where McDonagh will go next."[24] James Berardinelli of ReelViews gave the film two-and-a-half stars out of four, writing that "the acting is top-notch. Colin Farrell, who seems to be gravitating increasingly toward smaller films, effectively channels his manic energy. He and Brendan Gleeson display chemistry in the Odd Couple vein, occasionally giving rise to instances of humor. Ralph Fiennes plays one of the most twisted roles of his career."[25]

Lisa Schwarzbaum of Entertainment Weekly gave the film a "C+", indicating a mixed review; she praised McDonagh's directing, stating that "he's a specialist in constructing satisfying, live-wire dramas of violence that crash up against despair, in upending his characters' miseries with moments of twisted humor, and in sustaining a writing voice that roars with a particularly Irish robustness of obscenity." She also added that "neither star is sloppy, but both are loose and mellow – a couple of pros who know they're the whole show."[26] Ella Taylor of Village Voice also gave the film a mixed review, stating that "Bruges may be the movie's rather too-long-running joke, but Farrell's shaggy brow is easily the most entertaining thing in Irish playwright Martin McDonagh's first foray into the crime caper."[27]

Seth Meyers is a known fan of the film, and has mentioned it multiple times on his show Late Night with Seth Meyers.

Accolades

In Bruges was nominated for seven awards by the British Independent Film Awards,[28] including the Douglas Hickox Award (Debut Director), Best Performance by an Actor in a British Independent Film and Best Screenplay, the latter of which it won.[29] It was also nominated for two Satellite Awards: for Best Actor (Brendan Gleeson) and Best Film.[30]

In November 2008, Martin McDonagh won the Irish Playwrights and Screenwriters Guild (IPSG) award for Best Film Script for the film.[31]

The film was also nominated for the Golden Globe Award for Best Motion Picture – Musical or Comedy, and both Brendan Gleeson and Colin Farrell were nominated for Best Actor – Motion Picture Musical or Comedy,[32] which Farrell won at the 66th Golden Globe Awards ceremony, broadcast on 11 January 2009.[33] McDonagh won the Best Original Screenplay award at the 62nd British Academy Film Awards in February 2009.[34]

The film was nominated for Best Original Screenplay award at the 81st Academy Awards in 2009, but lost to Milk.[35] In the same year, it won the Best International Film award at the 6th Irish Film & Television Awards.[36]

Home media

The film was released on DVD in region 1 on 24 June 2008; region 2 on 11 August 2008; and region 4 on 21 January 2009.require('Module:No globals')

local p = {}

-- articles in which traditional Chinese preceeds simplified Chinese local t1st = { ["228 Incident"] = true, ["Chinese calendar"] = true, ["Lippo Centre, Hong Kong"] = true, ["Republic of China"] = true, ["Republic of China at the 1924 Summer Olympics"] = true, ["Taiwan"] = true, ["Taiwan (island)"] = true, ["Taiwan Province"] = true, ["Wei Boyang"] = true, }

-- the labels for each part local labels = { ["c"] = "Chinese", ["s"] = "simplified Chinese", ["t"] = "traditional Chinese", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Cantonese Yale", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Zhuyin Fuhao", ["l"] = "literally", }

-- article titles for wikilinks for each part local wlinks = { ["c"] = "Chinese language", ["s"] = "simplified Chinese characters", ["t"] = "traditional Chinese characters", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Yale romanization of Cantonese", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Bopomofo", }

-- for those parts which are to be treated as languages their ISO code local ISOlang = { ["c"] = "zh", ["t"] = "zh-Hant", ["s"] = "zh-Hans", ["p"] = "zh-Latn-pinyin", ["tp"] = "zh-Latn", ["w"] = "zh-Latn-wadegile", ["j"] = "yue-jyutping", ["cy"] = "yue", ["poj"] = "hak", ["zhu"] = "zh-Bopo", }

local italic = { ["p"] = true, ["tp"] = true, ["w"] = true, ["j"] = true, ["cy"] = true, ["poj"] = true, } -- Categories for different kinds of Chinese text local cats = { ["c"] = "", ["s"] = "", ["t"] = "", }

function p.Zh(frame) -- load arguments module to simplify handling of args local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) return p._Zh(args) end function p._Zh(args) local uselinks = not (args["links"] == "no") -- whether to add links local uselabels = not (args["labels"] == "no") -- whether to have labels local capfirst = args["scase"] ~= nil

        local t1 = false -- whether traditional Chinese characters go first
        local j1 = false -- whether Cantonese Romanisations go first
        local testChar
        if (args["first"]) then
                 for testChar in mw.ustring.gmatch(args["first"], "%a+") do
          if (testChar == "t") then
           t1 = true
           end
          if (testChar == "j") then
           j1 = true
           end
         end
        end
        if (t1 == false) then
         local title = mw.title.getCurrentTitle()
         t1 = t1st[title.text] == true
        end

-- based on setting/preference specify order local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"} if (t1) then orderlist[2] = "t" orderlist[3] = "s" end if (j1) then orderlist[4] = "j" orderlist[5] = "cy" orderlist[6] = "p" orderlist[7] = "tp" orderlist[8] = "w" end -- rename rules. Rules to change parameters and labels based on other parameters if args["hp"] then -- hp an alias for p ([hanyu] pinyin) args["p"] = args["hp"] end if args["tp"] then -- if also Tongyu pinyin use full name for Hanyu pinyin labels["p"] = "Hanyu Pinyin" end if (args["s"] and args["s"] == args["t"]) then -- Treat simplified + traditional as Chinese if they're the same args["c"] = args["s"] args["s"] = nil args["t"] = nil elseif (not (args["s"] and args["t"])) then -- use short label if only one of simplified and traditional labels["s"] = labels["c"] labels["t"] = labels["c"] end local body = "" -- the output string local params -- for creating HTML spans local label -- the label, i.e. the bit preceeding the supplied text local val -- the supplied text -- go through all possible fields in loop, adding them to the output for i, part in ipairs(orderlist) do if (args[part]) then -- build label label = "" if (uselabels) then label = labels[part] if (capfirst) then label = mw.language.getContentLanguage():ucfirst( It was also released on Blu-ray on 27 January 2009; and in region 1 on 13 July 2010.[37]

References


-- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the and meta-templates and includes -- -- helper functions for other Lua hatnote modules. --


local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise Module:Arguments local yesno -- lazily initialise Module:Yesno

local p = {}


-- Helper functions


local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end

local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end

function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to true. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end

function p.formatPages(...) -- Formats a list of pages using formatLink and returns it as an array. Nil -- values are not allowed. local pages = {...} local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink(page) end return ret end

function p.formatPageTables(...) -- Takes a list of page/display tables and returns it as a list of -- formatted links. Nil values are not allowed. local pages = {...} local links = {} for i, t in ipairs(pages) do checkType('formatPageTables', i, t, 'table') local link = t[1] local display = t[2] links[i] = p._formatLink(link, display) end return links end

function p.makeWikitextError(msg, helpLink, addTrackingCategory) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- Module:Yesno, and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') local title = mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' (help)' else helpText = end -- Make the category text. local category if not title.isTalkPage and yesno(addTrackingCategory) ~= false then category = 'Hatnote templates with errors' category = string.format( '%s:%s', mw.site.namespaces[14].name, category ) else category = end return string.format( '%s', msg, helpText, category ) end


-- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the template.


function p.formatLink(frame) local args = getArgs(frame) local link = args[1] local display = args[2] if not link then return p.makeWikitextError( 'no link specified', 'Template:Format hatnote link#Errors', args.category ) end return p._formatLink(link, display) end

function p._formatLink(link, display) -- Find whether we need to use the colon trick or not. We need to use the -- colon trick for categories and files, as otherwise category links -- categorise the page and file links display the file. checkType('_formatLink', 1, link, 'string') checkType('_formatLink', 2, display, 'string', true) link = removeInitialColon(link) local namespace = p.findNamespaceId(link, false) local colon if namespace == 6 or namespace == 14 then colon = ':' else colon = end -- Find whether a faux display value has been added with the | magic -- word. if not display then local prePipe, postPipe = link:match('^(.-)|(.*)$') link = prePipe or link display = postPipe end -- Find the display value. if not display then local page, section = link:match('^(.-)#(.*)$') if page then display = page .. ' § ' .. section end end -- Assemble the link. if display then return string.format('%s', colon, link, display) else return string.format('%s%s', colon, link) end end


-- Hatnote -- -- Produces standard hatnote text. Implements the template.


function p.hatnote(frame) local args = getArgs(frame) local s = args[1] local options = {} if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end options.extraclasses = args.extraclasses options.selfref = args.selfref return p._hatnote(s, options) end

function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) local classes = {'hatnote'} local extraclasses = options.extraclasses local selfref = options.selfref if type(extraclasses) == 'string' then classes[#classes + 1] = extraclasses end if selfref then classes[#classes + 1] = 'selfref' end return string.format( '
%s
', table.concat(classes, ' '), s )

end

return p-------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the and meta-templates and includes -- -- helper functions for other Lua hatnote modules. --


local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise Module:Arguments local yesno -- lazily initialise Module:Yesno

local p = {}


-- Helper functions


local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end

local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end

function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to true. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end

function p.formatPages(...) -- Formats a list of pages using formatLink and returns it as an array. Nil -- values are not allowed. local pages = {...} local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink(page) end return ret end

function p.formatPageTables(...) -- Takes a list of page/display tables and returns it as a list of -- formatted links. Nil values are not allowed. local pages = {...} local links = {} for i, t in ipairs(pages) do checkType('formatPageTables', i, t, 'table') local link = t[1] local display = t[2] links[i] = p._formatLink(link, display) end return links end

function p.makeWikitextError(msg, helpLink, addTrackingCategory) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- Module:Yesno, and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') local title = mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' (help)' else helpText = end -- Make the category text. local category if not title.isTalkPage and yesno(addTrackingCategory) ~= false then category = 'Hatnote templates with errors' category = string.format( '%s:%s', mw.site.namespaces[14].name, category ) else category = end return string.format( '%s', msg, helpText, category ) end


-- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the template.


function p.formatLink(frame) local args = getArgs(frame) local link = args[1] local display = args[2] if not link then return p.makeWikitextError( 'no link specified', 'Template:Format hatnote link#Errors', args.category ) end return p._formatLink(link, display) end

function p._formatLink(link, display) -- Find whether we need to use the colon trick or not. We need to use the -- colon trick for categories and files, as otherwise category links -- categorise the page and file links display the file. checkType('_formatLink', 1, link, 'string') checkType('_formatLink', 2, display, 'string', true) link = removeInitialColon(link) local namespace = p.findNamespaceId(link, false) local colon if namespace == 6 or namespace == 14 then colon = ':' else colon = end -- Find whether a faux display value has been added with the | magic -- word. if not display then local prePipe, postPipe = link:match('^(.-)|(.*)$') link = prePipe or link display = postPipe end -- Find the display value. if not display then local page, section = link:match('^(.-)#(.*)$') if page then display = page .. ' § ' .. section end end -- Assemble the link. if display then return string.format('%s', colon, link, display) else return string.format('%s%s', colon, link) end end


-- Hatnote -- -- Produces standard hatnote text. Implements the template.


function p.hatnote(frame) local args = getArgs(frame) local s = args[1] local options = {} if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end options.extraclasses = args.extraclasses options.selfref = args.selfref return p._hatnote(s, options) end

function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) local classes = {'hatnote'} local extraclasses = options.extraclasses local selfref = options.selfref if type(extraclasses) == 'string' then classes[#classes + 1] = extraclasses end if selfref then classes[#classes + 1] = 'selfref' end return string.format( '
%s
', table.concat(classes, ' '), s )

end

return p
  1. ^
  2. ^
  3. ^
  4. ^
  5. ^
  6. ^
  7. ^
  8. ^
  9. ^
  10. ^
  11. ^
  12. ^
  13. ^
  14. ^
  15. ^
  16. ^
  17. ^
  18. ^
  19. ^
  20. ^
  21. ^
  22. ^
  23. ^
  24. ^
  25. ^
  26. ^
  27. ^
  28. ^
  29. ^
  30. ^
  31. ^
  32. ^
  33. ^
  34. ^
  35. ^
  36. ^
  37. ^

External links

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 



Copyright © World Library Foundation. All rights reserved. eBooks from World Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.