https://en.seminaverbi.bibleget.io/w/index.php?title=Module:Other_uses&feed=atom&action=history
Module:Other uses - Revision history
2024-03-29T12:28:14Z
Revision history for this page on the wiki
MediaWiki 1.41.0
https://en.seminaverbi.bibleget.io/w/index.php?title=Module:Other_uses&diff=22533&oldid=prev
Johnrdorazio: 1 revision imported
2020-09-08T19:08:21Z
<p>1 revision imported</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:08, September 8, 2020</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Johnrdorazio
https://en.seminaverbi.bibleget.io/w/index.php?title=Module:Other_uses&diff=22532&oldid=prev
en>Nihiltres: Removed p.otheruses2 function per its template's deletion
2020-06-01T23:06:08Z
<p>Removed p.otheruses2 function per its template's deletion</p>
<p><b>New page</b></p><div>local mHatnote = require('Module:Hatnote')<br />
local mHatlist = require('Module:Hatnote list')<br />
local mArguments --initialize lazily<br />
local mTableTools --initialize lazily<br />
local libraryUtil = require('libraryUtil')<br />
local checkType = libraryUtil.checkType<br />
local p = {}<br />
<br />
-- Produces standard {{other uses}} implementation<br />
function p.otheruses(frame)<br />
mArguments = require('Module:Arguments')<br />
mTableTools = require('Module:TableTools')<br />
local args = mTableTools.compressSparseArray(mArguments.getArgs(frame))<br />
local title = mw.title.getCurrentTitle().prefixedText<br />
return p._otheruses(args, {title=title})<br />
end<br />
<br />
--Implements "other [x]" templates with otherText supplied at invocation<br />
function p.otherX(frame)<br />
mArguments = require('Module:Arguments')<br />
mTableTools = require('Module:TableTools')<br />
local x = frame.args[1]<br />
local args = mTableTools.compressSparseArray(<br />
mArguments.getArgs(frame, {parentOnly = true})<br />
)<br />
local options = {<br />
title = mw.title.getCurrentTitle().prefixedText,<br />
otherText = x<br />
}<br />
return p._otheruses(args, options)<br />
end<br />
<br />
-- Main generator<br />
function p._otheruses(args, options)<br />
--Type-checks and defaults<br />
checkType('_otheruses', 1, args, 'table', true)<br />
args = args or {}<br />
checkType('_otheruses', 2, options, 'table')<br />
if not (options.defaultPage or options.title) then<br />
error('No default title data provided in "_otheruses" options table', 2)<br />
end<br />
local emptyArgs = true<br />
for k, v in pairs(args) do<br />
if type(k) == 'number' then emptyArgs = false break end<br />
end<br />
if emptyArgs then<br />
args = {<br />
options.defaultPage or<br />
mHatnote.disambiguate(options.title, options.disambiguator)<br />
}<br />
end<br />
--Generate and return hatnote<br />
local text = mHatlist.forSeeTableToString({{<br />
use = options.otherText and "other " .. options.otherText or nil,<br />
pages = args<br />
}})<br />
return mHatnote._hatnote(text)<br />
end<br />
<br />
return p</div>
en>Nihiltres