Modulo:Versione stampabile: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Translations on Commons
Replace <font> tag
Riga 54:
if (PageName ~= nil and PageName ~= '') then
if Break ~= "" then table.insert(PrintVersion, frame:expandTemplate{title = Break}) end
table.insert(PrintVersion, '\n<div style="clear:both;page-break-before:always;"></div>\n=' .. PageName .. '=\n')
end
table.insert(PrintVersion, frame:expandTemplate{ title = ':' .. fullPageName } .. '\n\n')
else
if debug then table.insert(PrintVersion, '<fontspan colorclass=red"error">Missing subpage "' .. fullPageName .. '" on line "' .. v .. '" for the book:</fontspan> ' .. BookName .. '\n\n') end
end
end
Riga 91:
chapter = mw.ustring.gsub(chapter, "_", " ")
else
if debug then chapter = '<fontspan colorclass=red"error">Incorrect book or chapter name</fontspan>' else chapter = '' end
end
 
Riga 121:
 
if chapter == BookName or chapter == BookName .. sep or mw.ustring.find(chapter, "%#") ~= nil then
if debug then chapter = '<fontspan colorclass=red"error">Chapter = ' .. chapter .. ' => book name or another subpage name</fontspan> with Ending = ' .. Ending else chapter = '' end
else
if OnlySubpages then
-- Book subpages only (and ignoring the other links like "see also")
if mw.ustring.find(chapter, BookName .. sep, 1, true) == nil then
if debug then chapter = "<fontspan colorclass=red\"error\">No book subpage into the internal link:</fontspan> '" .. chapter .. "' doesn't include '" .. BookName .. sep .. "'" else chapter = '' end
end
end
end
else
if debug then chapter = "<fontspan colorclass=red\"error\">No internal link</fontspan> for: " .. chapter .. "\n" else chapter = '' end
end
return chapter
Riga 187:
if frame.args[3] == 'programming' then
if debug then table.insert(footer, " skin=programming\n\n") end
templateLeft = '{| style="width:100%; border:solid 1px #71c837; background:#c6e9af; color:#2d5016;" class="navlinks noprint"\n| style="text-align:left; width:33%; font-size:90%;" class="navprevious" |[[Image:Navigation_Left_Arrow.svg|18px|link=printf|alt=]] [[printf]]\n'
templateRight = '| style="text-align:center; width:34%;" class="navtitle" | [['..mw.title.getCurrentTitle().rootText..']]<br><b>'..mw.title.getCurrentTitle().subpageText..'</b>\n| style="text-align:right; width:33%; font-size:90%;" class="navnext" | [[printf]] [[Image:Navigation_Right_Arrow.svg|18px|link=printf|alt=]]\n|}'
end
end
Riga 211:
fullPageName = p.getFullPageName(BookName, rawFullPageName)
if debug then
if mw.ustring.find(fullPageName, "<fontspan colorclass=red\"error\">No internal link</fontspan>") ~= nil then
fullPageName = nil
else
Riga 229:
if (subpageName ~= nil and subpageName ~= "") then
if found == true or homepage == true then
if debug then table.insert(footer, "<fontspan colorclass=red\"error\">Previous & next chapter insertion</fontspan>\n") end
 
if homepage == false then
Riga 244:
break
elseif subpageName == currentPageName then
if debug then table.insert(footer, "<fontspan colorclass=red\"error\">Page</fontspan> '" .. currentPageName .. "' found\n\n") end
found = true
elseif fullPageName ~= "" then
Riga 250:
previousChapter = subpageName
else
if debug then table.insert(footer, "<fontspan colorclass=red\"error\">The current page</fontspan> '" .. subpageName .. "' is not '" .. currentPageName .. "'") end
end
end
else
if debug then table.insert(footer, "<fontspan colorclass=red\"error\">The page</fontspan> '" .. fullPageName .. "' doesn't exist, for '" .. currentPageName .. "'\n\n") end
end
end
Riga 261:
 
if found == true and table.getn(footer) == 0 then
if debug then table.insert(footer, "<fontspan colorclass=red\"error\">No next chapter</fontspan>\n") end
theTemplateLeft, nb = mw.ustring.gsub(templateLeft, "printf", BookName .. sep .. previousChapter .. "|" .. previousChapter)
table.insert(footer, theTemplateLeft)