World Library  
Flag as Inappropriate
Email this Article

Battle of Dobro Pole

Article Id: WHEBN0009022782
Reproduction Date:

Title: Battle of Dobro Pole  
Author: World Heritage Encyclopedia
Language: English
Subject: Vardar Offensive, Second Army (Bulgaria), Armistice of Salonica, Battle of Skra-di-Legen, Bulgarian Land Forces
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Battle of Dobro Pole

The Battle of Dobro Pole (}

}}: Пробив при Добро Поле), was a World War I battle, fought between 15 and 18 September 1918. The battle was fought in the initial stage of the Vardar Offensive, in the Balkans Theatre. On September 15, a combined force of Serbian, French and Greek troops attacked the Bulgarian-held trenches in Dobro Pole ("Good Field"), at the time part of the Kingdom of Serbia (present day Republic of Macedonia). The offensive and the preceding artillery preparation had devastating effects on Bulgarian morale, eventually leading to mass desertions.

Despite being outnumbered and poorly equipped, certain Bulgarian units offered fierce resistance, delaying the Entente advance in Sbrosko. The collapse of the front-line enabled the Allies to assault Bulgarian positions from multiple directions and eventually quell the last pockets of resistance. The Central Powers' defeat at the Dobro Pole played a role in the Bulgarian withdrawal from the war and opened the way for the subsequent capture of Vardar Macedonia.

Prelude

Map of the Vardar Offensive.

The autumn 1915 defeat of the Serbian army at the hands of the Central Powers prompted France and Britain to transfer troops from the Gallipoli Campaign to Greek Macedonia. The Macedonian Front was thus established in an effort to support the remnants of the Serbian army to conquer Vardar Macedonia.[1]

On 17 August 1916, Bulgaria invaded Greece, easily conquering all Greek territory east of the Struma, since the Greek Army was ordered not to resist by the pro-German King Constantine. The surrender of territory recently won with difficulty in the Second Balkan War of 1913 was the last straw for many supporters of Liberal Party politician Eleftherios Venizelos. With Allied assistance, they launched a coup which secured Thessaloniki and most of Greek Macedonia, causing the National Schism. In June 1917, the Venizelists gained full control of the country, immediately declaring war on the Central Powers and joining the Allied Army of the Orient operating on the Balkan Front. The Greek entry into the war along with the 24 division reinforcements that the Army had received in the spring of the same year had created a strategic advantage for the Entente.[2][3][4]

In late July 1918, Bulgarian chief of staff Nikola Zhekov sent German field marshal general Paul von Hindenburg an epistle regarding a rumored Entente offensive, while also detailing his inability to adequately defend the Vardar portion of the front. Zhekov requested that Germany immediately reinforce the Balkan Front, hinting that Austria-Hungary would also be required to strengthen its positions in Albania. On 17 August, Hindenburg pledged to provide Bulgaria with support once the situation on other front permits it. Hindenburg's reluctance to support Bulgaria was also manifested by the early September redeployment of the last German Jäger battalion stationed in Macedonia back into Germany.[5]

After examining pieces of information provided by escaped prisoners of war, the Bulgarian command determined that the enemy was preparing to engage in hostile actions west of lake insubordination and desertions also plagued the Bulgarian troops who refused to participate in fortification works; poor rationing and fatigue contributed to the low morale. [6]

A day prior to the Entente offensive, General Louis Franchet d'Espèrey laid out the final plan for the operation. The first phase consisted of a combined Franco-Serbian attack on the positions of the 2nd and 3rd Bulgarian Divisions, which was expected to create a breach of the frontline in the area of Dobro Pole, while also posing a danger to the Bulgarian supply lines on river Vardar. Τhe 1,875 metres (6,152 ft) Dobro Pole ("Good Field") peak dominated the region, providing excellent observation points for the defenders. Dobro Pole was surrounded by a well-developed system of trenches which, in combination with the rough terrain, made the area impassable for wheeled transport. Dobro Pole was, however, lower and less steep than the mountains on other parts of the front that averaged 2,000 metres (6,600 ft).[7][8][9][10]

A second Anglo-Franco-Hellenic force would then attack the 1st Bulgarian Army between Kožuf and Lake Doiran, preventing it from forming new defensive positions in the area. The initial advance would allow the Armée d'Orient to progress in support of other units first to Prilep, Disma and Borran. In the meantime, an Anglo-Hellenic force would strike Mount Belasica, occupying the Rupel Pass.[9][10]

D'Espèrey expected to march the Crna. The prevention of such a retreat was to be achieved by a rapid, penetrating attack on Gradsko, Dren Planina and Visoka.[12][13]

Battle

German soldiers bathing in the Crna river in 1918.

At 8 a.m., 14 September 1918, Entente forces commenced a 566-gun artillery barrage on enemy positions; Entente aircraft also bombed enemy positions and strafed a 250-truck column moving towards Koziaka. On the same day, Scholtz sent Hindenburg the following telegraph: "All indications point out that an enemy offensive will target the 11th Army on both sides of Vardar as well as Dobro Pole ..." The Bulgarian high command did not attempt to perform a spoiling attack as it lacked the necessary vehicles and pack animals. The barrage did not cause a significant number of casualties but severely affected the Bulgarian esprit de corps. On the night between 14 and 15 September, Franco-Serbian patrols reported that the artillery barrage had dealt sufficient damage to the barbed wire entanglements separating the trenches.[14][15]

At 5:30 a.m. on 15 September, the French 122nd and 17th (Colonial) Divisions struck Sokol, Dobro Pole, Kravitski Kamene and Kravitsa, while the Serbian Shumadia Division assaulted Kamene and Veternik. The Greek Archipelago, 3rd and 4th Divisions under Panagiotis Gargalidis acted as a link between the Serbian and French troops without entering combat. The offensive immediately caused a wave of mass desertion among the Bulgarian units; a limited number of infantrymen and artillery squadrons were not able to hold their ground. During the course of the battle, the 122nd Division broke into two columns and suffered heavy casualties. The left column managed to reach a position located 50 metres (160 ft) from Sokol at 6:30 a.m. and take the peak at the end of the day. At 16:00 p.m., the right column captured Dobro Pole after rushing a 200 metres (660 ft) segment of steep terrain. The 17th Division seized Kravitsa at 7:00 a.m., suppressing the last signs of resistance.[15][16][17][14][18]

Two Franco-Greek Regiments attempted to storm Sbrosko but were pushed back in the ensuing counterattack, as powerful pockets of resistance between the Sousnitsa and Bigrut streams facilitated its defense. Greek units then focused on Sousnitsa the fall of which created an opening in the Bulgarian rear and put the surrounding units to flight. Taking cover behind dispersed bluffs, soldiers of the Shumadia Division took over Veternik, Kamene and the western part of a nearby mountain range with considerable difficulty. Elements of the same unit successfully flanked Kravitski Kamene while the 17th Division was engaging in a frontal assault. At 16:00 p.m., the Serbian 1st Army's thrust on Sokol failed to produce intended results; nevertheless, a night attack secured the peak. The two French divisions were then ordered to remain in their positions while the Serbian Timok and Yugoslav Divisions moved forward. By the end of the day, Bulgaria lost approximately 40–50 percent of all soldiers involved in the battle, including 3,000 prisoners of war, and 50 out of the initial 158 artillery pieces. Entente casualties amounted to 1,700 Frenchmen and 200 Serbians killed in action.[19][17][20][21][22]

On the morning of 16 September, the Serbians overrun the Koziaka mountain range and the Golo Bilo peak; they were soon joined by the 35th Greek Regiment, crossing the Poroi river and later marching on Topolets. At 11:00 a.m., Franco-Hellenic units stormed Sbrosko for a second time; the infantry charge was met by heavy artillery and machine gun fire. 158 Greeks were killed in the action while the French lost roughly the same number and ceased any further attempts to take the locale. Živojin Mišić's 1st Army and the Armée d'Orient performed a night attack on the Gradešnica fortified zone, suppressing the defenders. The 1st Division Group moved into a position on the Poroi river north of Brahovo in conjunction with the Timok Division. By the night of 16 September, the gap in what formerly constituted the front-line had extended to 25 kilometres (16 mi) in width and 7 kilometres (4.3 mi) in depth. The Allied command ordered its air department to continue attacking all bridges on the river Vardar.[17][21][23]

At 4.00 a.m. on 17 September, Hellenic components of the 1st Division Group raided mount Preslap, a key position housing Bulgarian artillery. The Greeks rapidly descended from Golo Bilo and then began climbing the cliffs of Preslap with their bare hands. The Preslap garrison proceeded to abandon their positions and retreat eastwards; having lost their artillery cover, the guardians of Sbrosko followed the example of their comrades. The Timok Division conquered Topolets and advanced towards Studena Voda and Preslap. The Morava and Yugoslav Divisions overcame the defenders of Koutskov Kamene. At the same time, the Drina and Danube Divisions seized Gradešnica along with the Poltsista and Besistsa peaks, halting at Melinitsa.[24][25]

On 18 September, the 11th French Colonial Division and the 6th Greek Regiment occupied the villages of Zovik, Staravina and Cebren, approaching towards the Cebren Monastery bridge on Crna. An Entente aviation raid destroyed another bridge north of Razim Bey. Bulgarian forces failed at putting a stop to the Allied offensive, abandoning their wounded and large quantities of military equipment. By the end of the day, Allied troops had advanced 15 kilometres (9.3 mi) into enemy territory while also seizing locales of strategic importance that would later enable them to continue pushing deeper into Vardar Macedonia.[26][17]

Aftermath

French military cemetery in Skopje.

Immediately afterwards, the Allies prevailed in the Kafadar area but were defeated at Lake Doiran on 18 September. However, the overwhelming majority of Bulgarian units continued to retreat deeper into Vardar Macedonia, leading to the complete collapse of the last defensive lines. A combination of multiple factors including combat fatigue and poor supplies manifested in the Radomir Rebellion. On 25 September, a band of Bulgarian deserters who had previously fled from Dobro Pole arrived at Kyustendil, looting the city and putting the Bulgarian High Command to flight. The mass of retreating Bulgarian mutineers then converged on the railway center of Radomir in Bulgaria, just 30 miles (48 km) from the capital city of Sofia. On 27 September, the leaders of the Bulgarian Agrarian National Union took control of these troops and proclaimed the establishment of the Bulgarian Republic. About 4,000–5,000 rebellious troops threatened Sofia the following day.[27][28][29]

Under those chaotic circumstances a Bulgarian delegation arrived in Thessaloniki to ask for an armistice. On 29 September, the Bulgarians were granted the Armistice of Salonica by General d'Esperey, disengaging from the conflict. The Bulgarian downfall turned the strategic and operational balance of the war against the Central Powers. The Macedonian Front was brought to an end at noon on 30 September, when the ceasefire came into effect. The Radomir Rebellion was finally put down by 2 October. Tsar Ferdinand I of Bulgaria abdicated and went into exile the following day.[27][28][30]

The British Army headed east towards the European side of the Ottoman Empire, while the French and Serbian forces continued north. The British Army neared Constantinople and with no serious Ottoman forces to stop it and the Ottoman government asked for an armistice (the Armistice of Mudros) on 26 October; Enver Pasha and his partners had fled several days earlier to Berlin. With "Desperate Frankie" (as the British nicknamed d'Esperey) pushing ever forward, the Serbo-French Army re-captured Serbia and overran several weak German divisions that tried to block its advance near Niš. On 3 November, Austria-Hungary was forced to sign an armistice on the Italian Front and the war there ended. On 10 November, d'Esperey's army crossed the Danube river and was poised to enter the Hungarian heartland. At the request of the French general, Count Mihály Károlyi, leading the Hungarian government, came to Belgrade and signed another armistice.[31]

See also

Notes

Footnotes

-- 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. ^ The 11th German Army consisted of Bulgarian soldiers commanded by German officers.[11]
Citations

-- 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. ^ Hall 2010, pp. 48–50.
  2. ^ Falls 1933, pp. 152–184.
  3. ^ Falls 1933, pp. 208–230.
  4. ^ Falls 1933, pp. 348–362.
  5. ^ Omiridis Skylitzes 1961, p. 111.
  6. ^ Omiridis Skylitzes 1961, pp. 111–112.
  7. ^ Omiridis Skylitzes 1961, pp. 7–8.
  8. ^ Omiridis Skylitzes 1961, p. 89.
  9. ^ a b Omiridis Skylitzes 1961, pp. 112–113.
  10. ^ a b Geramanis 1980, p. 129.
  11. ^ Korsun 1939, p. 95.
  12. ^ Omiridis Skylitzes 1961, p. 113.
  13. ^ Geramanis 1980, p. 130.
  14. ^ a b Omiridis Skylitzes 1961, p. 125.
  15. ^ a b Omiridis Skylitzes 1961, pp. 114–115.
  16. ^ Hall 2010, p. 130.
  17. ^ a b c d Korsun 1939, p. 98.
  18. ^ Omiridis Skylitzes 1961, p. 117.
  19. ^ Omiridis Skylitzes 1961, pp. 115–116.
  20. ^ Omiridis Skylitzes 1961, p. 126.
  21. ^ a b Omiridis Skylitzes 1961, pp. 118–119.
  22. ^ Villari 1922, p. 226.
  23. ^ Omiridis Skylitzes 1961, pp. 120–122.
  24. ^ Omiridis Skylitzes 1961, pp. 122–123.
  25. ^ Villari 1922, pp. 227–228.
  26. ^ Omiridis Skylitzes 1961, pp. 116–117.
  27. ^ a b Falls 1935, pp. 246–253.
  28. ^ a b Korsun 1939, pp. 105–108.
  29. ^ Omiridis Skylitzes 1961, pp. 124–125.
  30. ^ Doughty 2005, p. 491.
  31. ^ Falls 1935, pp. 254–279.

References

Further reading


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.