World Library  
Flag as Inappropriate
Email this Article

Virgin TV

Article Id: WHEBN0009575098
Reproduction Date:

Title: Virgin TV  
Author: World Heritage Encyclopedia
Language: English
Subject: High-definition television in the United Kingdom, Smallworld Cable, Freewire, 4seven, Television in the United Kingdom
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Virgin TV

Virgin TV
Type Pay TV
Country United Kingdom
Availability Cable television
Founded March 2006
(February 2007 as Virgin TV)
Slogan "An Exciting Place to Live"
Broadcast area
United Kingdom
Owner Liberty Global
Parent Virgin Media
Official website
Official site

Virgin TV is a digital and analogue cable television service in the UK, owned by Liberty Global. Its origins date from NTL and Telewest, two of the largest cable operators in the country which merged on 6 March 2007. All services (including TV) were rebranded under the Virgin name in February 2007. Virgin TV is the largest cable television provider in the country.

Virgin TV ranks as the UK's second largest pay TV service. In 2007, it had 3.6m subscribers, compared to BSkyB's 8.2m on Sky, as of Q3 2007.[2] Virgin's digital cable television currently uses the Nagravision 3 conditional access system.[3][4]

Currently 55% of UK households potentially have access to Virgin's network,[5] while anyone in the UK with a line-of-sight view of the Astra & Eurobird satellites at 28.2° east has the ability to receive Sky's service.

All television signals broadcast in digital except for Milton Keynes, which remained analogue-only until the end of 2013, at which point the network was shutdown due to a contractual breakdown with BT, the owners of the network in Milton Keynes. It is unclear what will happen to this legacy network.

History

As of 2008, Virgin Media functioned as a single company; however, it relied on its three existing infrastructures: the Langley-based NTL, Bromley-based Cable and Wireless and Knowsley-based Telewest platforms. As part of the Next Generation Television network, the infrastructure was consolidated into a single super headend at Langley in 2010, with Knowsley serving as a backup.

In May 2008, Virgin Media began their "long term" region-by-region analogue television service switch off project, beginning with Coventry and Glasgow.[6][7] In areas where analogue transmission will be turned off but no digital replacement introduced customers will be offered Virgin's off-network services, with the company looking at developing a television-over-DSL service for areas outside its cable network. Analogue subscribers in areas where digital cable services are already available will be offered transfers to new packages. The firm signalled that it wants to use the capacity to provide faster broadband internet.

On 11 September 2009, Cisco Systems announced a deal to support Virgin Media's Internet Protocol TV distribution platform and upgrade its legacy digital TV infrastructure. Virgin Media deployed Cisco Digital Video Headend technology in all of its regional and central headends, across its national fibre optic network. The TV platform will be capable of delivering advanced services to more than 12.6 million UK homes. The infrastructure helped Virgin Media to reduce operating expenses, support the rollout of new conditional-access security services, and accelerate the introduction of new standard and high-definition services.[8] A Virgin Media spokesman later clarified that the plan "isn't quite announcing the 'launch of IPTV services'. The agreement with Cisco is to help enhance our existing TV platform, which broadcasts content over DVB-C and then our VoD service runs on IP."[9]

On 24 November 2009, Virgin Media entered into a strategic partnership with TiVo.[10] Under the mutually exclusive agreement, TiVo developed a converged television and broadband interactive interface to power Virgin Media's next generation, high definition set-top boxes. The terms of the deal were not disclosed. TiVo became the exclusive provider of middleware and user interface software for Virgin Media's next generation set top boxes. Virgin Media became the exclusive distributor of TiVo services and technology in the United Kingdom.

Virgin Media will pay TiVo monthly fees, which commenced upon delivery of its first set-top box, which are guaranteed and increase over time.[11] The agreement has a multi-year term with additional limited renewal rights granted to Virgin. The agreement created a mutually exclusive distribution arrangement under which TiVo will develop software for DVR set top box platforms and non-DVR set-top boxes that will be deployed in the future by Virgin in the United Kingdom. Virgin Media will promote the product and has exclusive rights to use the TiVo brand and technology in the United Kingdom. As part of the agreement, Virgin Media and TiVo entered into a mutual covenant not to assert with regards to each party's intellectual property. Investment bank Lazard Capital Markets estimated the hookup as a "$48 million deal" for TiVo. Virgin Media is to maintain its current Liberate middleware provided by SeaChange International through until at least January 2011.[12]

Availability

Non-digital areas

The BT Group owned (but Virgin Media leased) Milton Keynes franchise remains analogue-only.[6] BT's Openreach division has selected Milton Keynes for a large scale fibre-to-the-premises trial (as opposed to fibre-to-the-cabinet in other parts of the UK). It remains to be seen what impact, if any, this will have on the viability of the Virgin Media leasing arrangement of the analogue HFC network there, which, uniquely, is believed to pass through BT infrastructure – not wholly VM's. The leasing arrangement dates back to 1999 and was mandated by the European Union in response to competition concerns surrounding BT's Cable TV interests in Milton Keynes and Westminster.[13] Virgin Media completely withdrew its services in Westminster on 31 January 2012, after being unable to upgrade the network and deliver their digital services at a reasonable cost.[14] The Milton Keynes cable network, which has a significant number of users due to technical satellite and aerial reception issues down to local geography,[15] does not suffer the same 'conservation' area rules as the Borough of Westminster, and thus, has been spared for now.

During 2009 digital upgrade work began on the last Virgin Media owned analogue-only areas in Bolton, Slough and West London as well as parts of Leicester, Northern Ireland and Southampton, with most areas completed between 2010 and 2011. In these areas Virgin Media had only offered customers analogue cable television.

Non-cabled areas

For customers in non-cabled areas, Virgin Media offered a branded set-top box for the Freeview digital terrestrial television service, called "Free TV", until December 2009 when it was discontinued.[16] The set-top box was free to any customer taking the Bundle One subscription package or for an addition fee to other customers, up to five additional set-top boxes were available per account.

The next phase of this service was to be a combined IPTV and digital terrestrial television service similar to BT Vision and TalkTalk TV. Virgin Media signed an agreement with Cable & Wireless to become the unbundled local loop (LLU) network provider, providing access to 4 million homes outside of the Virgin Media cable franchise network and would include linear pay broadcast channels and video on demand. This was originally scheduled to be released during 2008 but was delayed and scaled back as Virgin Media concentrated on improving its cable broadband proposition instead of focusing on competing with Sky in the premium television market.[17][18][19] As of 2010, no further developments have been announced and the plans appear to have been abandoned.

Products and services

Virgin TV carries around 301 digital television and radio channels, including a mixture of subscription, premium subscription and pay-per-view channels.

HD services and PVR

Telewest (one of Virgin Media's predecessors) became the first UK broadcaster to offer HDTV, launching its service in December 2005; several months earlier than that of its chief competitor, Sky.[20] An HD-enabled set-top box is required to view HDTV.

Virgin TV branded its original high-definition (HD) Digital Video Recorder (PVR) service as V+. The service uses a PVR set-top box, with three tuners and a 160 GB hard disk for up to 80 hours' recording. The presence of three tuners means that V+ can record two channels at the same time while viewers watch a third. This contrasts with most other PVR systems such as Sky+, which supports only two tuners. In December 2010 a 1 TB TiVo HD PVR from Cisco was released,[21] with a 500 GB model released in May 2011.[22] From late 2011, Samsung Electronics will join Cisco as a second supplier of TiVo STBs for Virgin Media.[23]

Virgin also offer a Cisco V HD Box, for a fixed upgrade fee from their standard set-top box with no additional monthly subscription fee.[24]

HD channels

At the product launch of Telewest's TVDrive on 1 December 2005, the only HD channels available were BBC HD and ITV HD trial channels. ITV HD was removed from the network after the completion of the trial on 30 November 2006. On 1 December 2007, BBC HD was transformed into a full service.[25]

During 2009, Virgin launched FX HD,[26] MTVNHD,[26] National Geographic HD,[26] Channel 4 HD,[27] ESPN HD[28] and Living HD.[29] Living HD represented the first HD channel to be made exclusively available to Virgin TV.

In 2010, Media added E4 HD,[30] Syfy HD,[31] Discovery HD,[32] Eurosport HD,[33] ITV HD,[34][35] STV HD,[36] Channel 5 HD,[37] Film4 HD,[30] ten Sky Movies HD channels,[38] Sky Sports HD1 and HD2,[38] Sky1 HD,[39] Comedy Central HD,[40] UTV HD[41] and BBC One HD.[42] Both Film4 HD and UTV HD are exclusive to Virgin TV.

In 2011, Virgin Media added Sky Arts 1 HD and 2 HD,[43] Eurosport 3D,[44] Sky Movies Classics HD,[45] Dave HD and Watch HD.[46]

In 2012, Virgin Media added Eurosport 3D,[47] Alibi HD, British Eurosport HD,[48] the BBC's 24 Olympic HD channels[47] and Channel 4's 3 Paralympic channels.[49]

In 2013, Virgin Media added Cartoon Network HD, TCM HD,[50] British Eurosport 2 HD, ITV2 HD, ITV3 HD, ITV4 HD,[51] BBC Two HD, TLC HD, NHK World HD, Animal Planet HD, BBC Red Button HD,[52] MTV HD, Nickelodeon HD,[53] BT Sport 1 HD, BT Sport 2 HD and More4 HD.

On demand

Virgin TV ranks as the UK's largest provider of on-demand content, with over 3 million video on demand (VoD) customers and as of October 2011 over 6,500 hours of programming.[54]

The company currently brands its VOD service as "On Demand". In contrast to the Sky Anytime system from Sky, Virgin Media offers a "true" VOD system, allowing customers to stream programmes whenever they want to watch them from servers at the customer's local head end. As the broadcaster automatically stores content on Virgin Media servers, this removes the need to pre-record many programmes. Users can search through a large library of programmes (called "TV Choice") from content providers including the BBC, ITV,[55] Channel 4, Channel 5, Cartoon Network, Disney Channel, Discovery Networks, National Geographic, CBS Paramount, Buena Vista, Alliance Atlantis, Warner Bros., Viacom (MTV, Comedy Central, Nickelodeon), Current TV, BabyTV, PictureBox Movies, NBC Universal and BSkyB; and watch them when they want to. Subscribers to Virgin Media's premier television package, Size: XL, have the content included in their subscription, while other customers can pay £5 per month for unlimited access, or can utilise pay-per-view. In addition, Virgin Media offers a "Catch-up" service, which includes a free 7-day "watch-again" feature for selected television programmes broadcast by the BBC, ITV, Channel 4 and Channel 5. The service also offers over 500 films (service-branded "FilmFlex"), and more than 8000 music-videos. On 12 July 2007 the music videos became free for all XL customers.[56]

Additionally, it was revealed that as of 2008 one third of BBC television programmes viewed on its iPlayer service are accessed through Virgin Media's on Demand service and that 50% of all Virgin Media customers "regularly" use on Demand services.[57]

On 25 November 2009, Virgin Media added dynamic advertising using SeaChange International's AdPulse system.[58] Ads will appear in thirty second pre-roll and post-roll ads which will be matched to the programme being watched.

In January 2010, Virgin Media launched Virgin Media Music, offering over 3,500 videos to watch completely free.[59] Virgin Media confirmed it would be launching a rival to both the BBC iPlayer and Sky Player by the end of 2010, with subscribers accessing content both online and through their mobile devices.[60]

On 26 April 2010, Virgin Media announced the launch of its first online movies service: Virgin Media Online Movies.[61] All rentals will offer unlimited streamed views for 48 hours so viewers can pause, rewind and watch again, plus the film can be watched wherever the account holder logs on. Virgin Media Online Movies is powered by FilmFlex Movies Ltd., the service is delivered over the web using Microsoft Silverlight and will initially present movies in standard definition.[62] A HD version of the service is in testing, though there is no word on when it might become available.

On 29 July 2010, Virgin Media announced the beta launch of Virgin Media Player, an online and mobile TV player. Hundreds of hours of content for the beta trial were made available from ITV plc, Living, Disney, Cartoon Network, National Geographic, Discovery and MTV Networks Europe.[63] The beta trial is open to Virgin Media's XL TV customers who also have a broadband connection with the company. Virgin Media brought more content to Virgin Media Player as the company built towards full launch later in the year. Virgin Mobile pay monthly customers are able to access an hour of Virgin Media Player every day, at no extra charge. Virgin Media Player on mobile launched with 4oD content which was joined by MTV Snax, MTV Music, Nickelodeon and Comedy Central.

A full launch for Virgin Media Player happened in late October 2010 on both computers and mobiles, with the latter charging additional fees for each hour or part hour of access on an escalating price scale, and availability initially only over 3G not Wi-Fi.[64] A facility allowing customers to watch a programme on one device, pause it and then continue viewing from exactly the same point via another device expected to be added in mid-2011.[65]

On 7 September 2012, Virgin Media announced the launch of Virgin TV Anywhere, a new service that will enable Virgin TV customers to watch live TV channels and on-demand content via the internet through their computer or iOS device, similar to Sky Go.[66] The service was launched two months later on 7 November 2012, replacing Virgin Media Player..

HD on demand

At the product launch of Telewest's TVDrive on 1 December 2005, their Teleport service included a modest selection of on demand HD content including episodes of BBC nature documentaries Pride, The Blue Planet and Wild Weather, pay-per-view episodes of Lost and Desperate Housewives from Channel 4, a small selection of documentaries from the History Channel, Metropolitan Opera Live in HD's The Magic Flute and pay-per-view films from FilmFlex.[67][68]

On 8 October 2007, Virgin Media announced that they had struck a deal with Channel 4 that enables them to offer a selection of Channel 4 programming in HD via their TV on demand service.[69]

On 8 January 2009, it was announced that ITV Player would be added to Virgin Media's digital cable TV service.[70] A selection of ITV's High Definition programming was supposed to be made available on demand as part of the deal. 12 March 2010, it was announced that some of ITV HD's content will be available on demand via ITV Net Player on Virgin Media's TV platform.[35]

On 16 April 2009, the BBC announced that they would offer HD content through BBC iPlayer, with a Virgin Media spokesperson adding "We're working closely with the BBC to make this service available on our platform as soon as possible."[71][72] HD content, including Robin Hood, Friday Night with Jonathan Ross and Later... with Jools Holland, became available on 1 May 2009.[73]

On 29 June 2009, Virgin Media announced that from July the PictureBox movie service would be made available to Virgin Media's 3.6 million TV subscribers providing a broad selection of 28 films at any given time, with seven new titles being added to the line-up each Friday. Most of the PictureBox films are available in HD and many will not yet have been seen on free-to-air television in the UK. It marks the PictureBox's first UK platform to present films in HD.[74]

On 17 September 2009, Virgin Media announced an agreement with Disney, securing the rights for three TV channels (Disney Channel, Disney XD and Playhouse Disney), TV on demand content including HD programming and on demand content to be to made available online. The deal also includes the rights for Virgin Media to air Disney XD and on demand content from Disney XD via the mobile.[75]

On 10 February 2010, Virgin announced that Discovery Networks would make HD on demand content available, such as Deadliest Catch and Miami Ink, during Spring 2010 as part of a deal to add Discovery HD.[32] On 15 March 2010, Virgin Media and NBC Universal Global Networks announced that they would also look to make HD content available on demand where possible, as part of the deal to add Sci Fi HD.[31]

On 5 August 2010, Virgin Media announced that popular Comedy Central HD programmes available on demand from 1 September 2010.[40] HBO content such as The Sopranos were removed on 14 October 2010, following HBO's exclusive deal with Sky, which lead to the creation of Sky Atlantic.

On 25 October 2010, Virgin Media announced a deal with NBC Universal Television Distribution for the video-on-demand rights in the UK to a broad selection of NBC Universal series.[1] Under the terms of the agreement, these titles will be offered as new content across Virgin Media's three entertainment platforms; TV, online and mobile. From 1 December, Virgin Media customers were able to access past seasons of shows such as House, Heroes, The Office and 30 Rock, in HD through TV on Demand.

On 11 November 2010, Virgin Media announced a multiscreen deal with Channel Five to bring programming from all of Five's linear TV channels to its TV, online and mobile video on demand platforms, with some shows also available in HD.[76]

The service has access to video on demand: current HD providers include BBC, FilmFlex, Fox, History, National Geographic Channel and PictureBox programming. Notable content includes Planet Earth and Dexter.[1]

3D

All of Virgin Media's HD set-top boxes are 3D compatible.

Virgin Media had displayed a V+ in their Oxford Street store using polarised glasses and trialled over a private video on demand network using a HD stream interlaced with two pictures in 2009.[33][77][78] In March 2010, during the Ideal Home Show at the Earls Court Exhibition Centre, Virgin Media showcased a reel of 3D content – including sport and video games – as a taste of its plans for 3D television.[79] Virgin confirmed plans to start offering 3D content to subscribers via its on-demand platform rather than launching a static channel. The demo used active glasses but Virgin Media said that its 3D service would also support passive glasses.

On 28 September 2010, Virgin Media announced the launch of 3D Movies on Demand – the first commercially available 3D TV service in the UK.[80] All Virgin Media TV customers, with either a V HD, V+ or TiVo box, 3D TV and glasses, are able to experience 3D Movies on Demand. The launch of 3D Movies on Demand, powered by FilmFlex, initially featured StreetDance 3D, Garfield's Pet Force 3D, A Christmas Carol 3D, Step Up 3D and Despicable Me 3D. Virgin Media also announced an exclusive 3D TV partnership with Samsung Electronics which would see Samsung 3D TVs featured in Virgin Media stores as well as other joint 3D showcases and marketing opportunities.

Virgin Media also committed to investing in producing original 3D content. "We can confirm we're looking at producing original content in 3D, it makes sense for us to look at things like live music with the Virgin Media V Festival," said Cindy Rose, executive director of digital entertainment at Virgin Media.[81] Going on to explain that movies in 3D would remain available on a paid-for basis, but Virgin Media customers would be able to access other 3D content, such as TV shows, for free. She confirmed that the company has already secured the rights of a couple of TV programmes to be shown in 3D, but could not name them yet.

Between 22 May and 5 June 2011, Eurosport 3D was broadcast exclusively on Virgin Media for the 2011 French Open.[44] Selected 3D matches were also available on demand. The channel will return on 27 May 2012, to cover the 2012 French Open and 2012 Summer Olympics.[47]

See also

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. ^
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 eBook 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.