Modul:Uses TemplateStyles: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Modul:Uses TemplateStyles (Quelltext anzeigen)
Version vom 1. Juli 2021, 19:06 Uhr
, 19:06, 1. Jul. 2021Undo revision 4678331 by ExE Boss (talk): this is a global module; change the local config if you want to modify categories (I don’t think it’s necessary)
StadtbahnBI>Tacsipacsi (i18n from Data:I18n/Uses TemplateStyles.tab) |
StadtbahnBI>Tacsipacsi (Undo revision 4678331 by ExE Boss (talk): this is a global module; change the local config if you want to modify categories (I don’t think it’s necessary)) |
||
Zeile 5: | Zeile 5: | ||
local mMessageBox = require('Module:Message box') | local mMessageBox = require('Module:Message box') | ||
local TNT = require('Module:TNT') | local TNT = require('Module:TNT') | ||
local p = {} | local p = {} | ||
local function format(msg, ...) | local function format(msg, ...) | ||
return TNT. | return TNT.format('I18n/Uses TemplateStyles', msg, ...) | ||
end | end | ||
Zeile 29: | Zeile 28: | ||
end | end | ||
function p._main(args) | function p._main(args, cfg) | ||
local tStyles = mTableTools.compressSparseArray(args) | local tStyles = mTableTools.compressSparseArray(args) | ||
local box = p.renderBox(tStyles) | local box = p.renderBox(tStyles) | ||
Zeile 98: | Zeile 97: | ||
local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil | local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil | ||
if cfg['protection_conflict_category'] and tsProt ~= currentProt and not addedLevelCat then | if cfg['protection_conflict_category'] and tsProt ~= currentProt and not addedLevelCat then | ||
addedLevelCat = true | |||
cats[#cats + 1] = cfg['protection_conflict_category'] | cats[#cats + 1] = cfg['protection_conflict_category'] | ||
end | end |