Jump to content
Menyu yikuru
Menyu yikuru
move to sidebar
kubisa
Mayendelo
Jani likulu
Vidumbizgano vya chikaya
Vakuchitika vasono
Kusintha kuphya
Jani lililose
Wovwili
To Do
Vyakuti vinozgeke
Vinyake
Mafumbo
Mazgo ghakomi
Helpful Pages (Wovwili)
Need for Fix
Need for Review
Admin Pages
Home pages
Home templates
Kufufuza
Kufufuza
Kaonekelo
Chakupeleka
Panga akaunti
Njila
Vilwelo vyako
Chakupeleka
Panga akaunti
Njila
Pages for logged out editors
learn more
vyakulemba
Pakuchezgela
Kulemba
Module:Transclude DYK
Sazgapo viyowoyelo
Module
Kudumbizgana
English
Ŵelengani
Kulemba source
Kuona umo mayambilo
Vilwelo
Vilwelo
move to sidebar
kubisa
Vyakuchita
Ŵelengani
Kulemba source
Kuona umo mayambilo
Vya masiku ghose
Ivo vikwiza pano
Vyaku sintha
Kwezgela chinthu
Va jani lino
Penjani URL yakufupikizgika
Sangululani kodi ya QR
Kaonekelo
move to sidebar
kubisa
Chenjezgo:
Mundanjile mu akaunti yinu. Pala mulembenge chilichose IP adilesi yinu waliyose waionenge. Pala
mwanjila
mu akaunti yinu
panji
mwapanga akaunti
, vyakulemba vinu vyose viŵenge mu zina linu, na uwemi unyake.
Anti-spam check. Do
not
fill this in!
local p = {} -- Transclude randomly selected "Did you know?" entries function p.main(frame) -- args = { 1,2,... = page names, paragraphs = list e.g. "1,3-5", files = list, more = text} local args = {} -- args[k] = frame.args[k] or frame:getParent().args[k] for all k in either (numeric or not) for k, v in pairs(frame:getParent().args) do args[k] = v end for k, v in pairs(frame.args) do args[k] = v end -- args from a Lua call have priority over parent args from template -- Read the input page local page = args[1] or error("No page name given") local title = mw.title.new(page) or error("Missing input page " .. page) local text = title:getContent() or error("No content for page " .. page) -- Limit to the DYK section if present local sectionstart = mw.ustring.find(text, "\n==''Did you know?'' articles==", 1, true) if sectionstart then local sectionend = mw.ustring.find(text, "\n==", sectionstart + 1, true) or -1 text = mw.ustring.sub(text, sectionstart, sectionend) end -- Parse the entries entries = {} for entry in mw.ustring.gmatch(text, "\n%*[.…%s]*([^\n]+)") do if not mw.ustring.find(entry, "article's talk page missing blurb", 1, true) then table.insert(entries, entry) end end -- Swap some random entries into the first n positions local n = math.min(#entries, args.count or 10) -- the number of entries to produce math.randomseed(os.time()) for i = 1, n do j = math.random(i, #entries) entries[i], entries[j] = "*... " .. entries[j], entries[i] end -- Return the first n entries text = table.concat(entries, "\n", 1, n) return frame:preprocess(text) end return p
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Kuleka
Wowili wakalembelo
(julani mu windo lanyuwani)
Preview page with this template
Nkhwaska yagwiliskika apa:
Module:Transclude DYK/doc
(
lemba
)
Kufufuza
Kufufuza
Kulemba
Module:Transclude DYK
Sazgapo viyowoyelo
Add topic