« Module:Version imprimable » : différence entre les versions

Contenu supprimé Contenu ajouté
MEP
MEP
Ligne 8 :
Ending1 = "GFDL"
Ending2 = ""
templateLeft = '<div style="float: left;">[[File:Go-previous-grey.svg|48px|link=]] [[printf]]</div>'
templateRight = '<div style="float: right;">[[printf]] [[File:Go-next-grey.svg|48px|link=]] [[</div>'
TOC = "Sommaire"
sep = "/"
Ligne 185 :
if (PageName ~= nil and PageName ~= '') then
if found == true then
table.insert(footer, templateLeft .. previousChapter "<font color=red>Previous & next ..chapter ']]insertion</divfont>'\n")
theTemplateLeft, nb = mw.ustring.gsub(templateLeft, "printf", previousChapter)
table.insert(footer, templateRight .. BookName .. sep .. PageName .. '|' .. PageName .. ']]</div>')
table.insert(footer, theTemplateLeft)
table.insert(footertheTemplateRight, templateRightnb = mw.ustring.gsub(templateRight, "printf", BookName .. sep .. PageName .. '|' .. PageName .. ']]</div>')
table.insert(footer, theTemplateRight)
break
elseif PageName == currentPageName then
Ligne 204 ⟶ 207 :
 
if found == true and table.getn(footer) == 0 then
table.insert(footer, "<font -- color=red>No next chapter</font>\n")
theTemplateLeft, nb = tablemw.insertustring.gsub(footertemplateLeft, templateLeft .."printf", previousChapter .. ']]</div>')
table.insert(footer, templateRight .. '../|' .. TOC .. ']]</div>'theTemplateLeft)
theTemplateRight, nb = mw.ustring.gsub(templateRight, "printf", '../|' .. TOC)
table.insert(footer, theTemplateRight)
end