Difference between pages "Module:Unsubst" and "August 01 2010"

From Kailasapedia
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
 
Line 1: Line 1:
local checkType = require('libraryUtil').checkType
+
<!-- SCANNER_START_OF_PHOTOS -->
 +
<!-- SCANNER_START_OF_PHOTOS -->
 +
==Photos==
  
local p = {}
+
<div align="center">
  
local BODY_PARAM = '$B'
+
{{#css: img.hsimg { padding: 2px 0; } }}
  
local specialParams = {
+
<img src="http://drive.google.com/uc?export=view&id=1ioSWW-9PGu2vlLmvQVYiJGQdM8XlljWW" alt="Photos Of The Day - DSC_7092.jpg" height = "400">
['$params'] = 'parameter list',
+
<img src="http://drive.google.com/uc?export=view&id=1nNZG8CtXxr-5N_VAhrbIOzadkLNWKUxH" alt="Photos Of The Day - DSC_7259.jpg" height = "400">
['$aliases'] = 'parameter aliases',
+
<img src="http://drive.google.com/uc?export=view&id=1zLk7MLRv0rixKdblEf5-21FRd_xT_RNz" alt="Photos Of The Day - DSC_7269.jpg" height = "400">
['$flags'] = 'flags',
+
<img src="http://drive.google.com/uc?export=view&id=1NUDx9Po9hzhGlcoSH1e_UkgmZg76cmm9" alt="Photos Of The Day - DSC_7250.jpg" height = "400">
['$B'] = 'template content'
+
<img src="http://drive.google.com/uc?export=view&id=1OjbZ8CIWfwTfmyemmAngCy4EOpaVh3zZ" alt="Photos Of The Day - DSC_7251.jpg" height = "400">
}
+
<img src="http://drive.google.com/uc?export=view&id=1KL2TeAAG3IbF7QoVO9srGI0pqTaR9OUy" alt="Photos Of The Day - DSC_7346.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1YIyOWmh88EVEc-nVNeo-04qJfGK4NHCC" alt="Photos Of The Day - DSC_7261.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1-Jd42Ej6WOHOgUghHghGwTWfi2u9xjcr" alt="Photos Of The Day - DSC_7345.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1Eu7M3ET7ED4Zy8MNvYtewHmAo9p9FUaI" alt="Photos Of The Day - DSC_7258.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1cjqa_BmSuv3qEE3QKn86z1fvl4mRGyuv" alt="Photos Of The Day - DSC_7334.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1hTjqt_Qtj_eL36H7iviyB97VCbUnuhky" alt="Photos Of The Day - DSC_7340.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=164xAM-sVe3WKPexg-6p8moVbRJixPcG4" alt="Photos Of The Day - DSC_7249.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1CzbjQxZv09_oGeExxy0V0bB04LjtpGDf" alt="Photos Of The Day - DSC_7246.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1p0toOT0O3kCUCAAXpwrQRfs5OPeIGkIm" alt="Photos Of The Day - DSC_7173.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1ZQ1hz_-6lZbSyfKi-vwLP0bF_96hex7V" alt="Photos Of The Day - DSC_7178.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=16XmRZUYIzefWmRtFvbU95qWowLXJ706D" alt="Photos Of The Day - DSC_7177.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1ZY4jI_B0GmSdf93qJpkne17SB3WS6kzR" alt="Photos Of The Day - DSC_7175.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1duHL03fWxbstGqCQAlielVkcxgF6b22i" alt="Photos Of The Day - DSC_7084.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1Wu9oRnr-QEzVbneyFjXOPRjB9R4PDRSR" alt="Photos Of The Day - DSC_7172.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=17AuATNSPnL6zwsQ0l25yMvZoHGhb3uHz" alt="Photos Of The Day - DSC_7176.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1g5fndD26d0i73ZyScHpQ6LgeVeoVJxdR" alt="Photos Of The Day - DSC_7174.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1tGXXm60rOh0RVYPa3b-UDPs0uidEYyP-" alt="Photos Of The Day - DSC_7103.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1dmf7e5H0u-BuqhCuRhi7eUz_CaOsc6AI" alt="Photos Of The Day - DSC_7083.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1lyLLPdxKd_TCO5XhQ--X2dlNRy9nEuvR" alt="Photos Of The Day - DSC_6993.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=15O3xlDNXuaOWzvl2uZdldzlrzcx-aCsD" alt="Photos Of The Day - DSC_6988.jpg" height = "400">
 +
<img src="http://drive.google.com/uc?export=view&id=1JkHQv2i-fV-C224BII_GxkwpmILtebNW" alt="Photos Of The Day - DSC_6857.jpg" height = "400">
  
function p.main(frame, body)
 
-- If we are substing, this function returns a template invocation, and if
 
-- not, it returns the template body. The template body can be specified in
 
-- the body parameter, or in the template parameter defined in the
 
-- BODY_PARAM variable. This function can be called from Lua or from
 
-- #invoke.
 
  
-- Return the template body if we aren't substing.
+
</div>
if not mw.isSubsting() then
 
if body ~= nil then
 
return body
 
elseif frame.args[BODY_PARAM] ~= nil then
 
return frame.args[BODY_PARAM]
 
else
 
error(string.format(
 
"no template content specified (use parameter '%s' from #invoke)",
 
BODY_PARAM
 
), 2)
 
end
 
end
 
  
-- Sanity check for the frame object.
+
<!-- SCANNER_END_OF_PHOTOS -->
if type(frame) ~= 'table'
 
or type(frame.getParent) ~= 'function'
 
or not frame:getParent()
 
then
 
error(
 
"argument #1 to 'main' must be a frame object with a parent " ..
 
"frame available",
 
2
 
)
 
end
 
  
-- Find the invocation name.
+
[[Category: 2010]] [[Category: 2010]]
local mTemplateInvocation = require('Module:Template invocation')
+
<!-- SCANNER_END_OF_TAGS -->
local name = mTemplateInvocation.name(frame:getParent():getTitle())
 
 
 
-- Combine passed args with passed defaults
 
local args = {}
 
if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then
 
for k, v in pairs( frame:getParent().args ) do
 
args[k] = v
 
end
 
for k, v in pairs( frame.args ) do
 
if not specialParams[k] then
 
if v == '__DATE__' then
 
v = mw.getContentLanguage():formatDate( 'F Y' )
 
end
 
args[k] = v
 
end
 
end
 
else
 
for k, v in pairs( frame.args ) do
 
if not specialParams[k] then
 
if v == '__DATE__' then
 
v = mw.getContentLanguage():formatDate( 'F Y' )
 
end
 
args[k] = v
 
end
 
end
 
for k, v in pairs( frame:getParent().args ) do
 
args[k] = v
 
end
 
end
 
 
 
-- Trim parameters, if not specified otherwise
 
if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then
 
for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end
 
end
 
 
 
-- Pull information from parameter aliases
 
local aliases = {}
 
if frame.args['$aliases'] then
 
local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' )
 
for k, v in ipairs( list ) do
 
local tmp = mw.text.split( v, '%s*>%s*' )
 
aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2])
 
end
 
end
 
for k, v in pairs( aliases ) do
 
if args[k] and ( not args[v] or args[v] == '' ) then
 
args[v] = args[k]
 
end
 
args[k] = nil
 
end
 
 
 
-- Remove empty parameters, if specified
 
if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then
 
local tmp = 0
 
for k, v in ipairs( args ) do
 
if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then
 
tmp = k
 
else
 
break
 
end
 
end
 
for k, v in pairs( args ) do
 
if v == '' then
 
if not (type(k) == 'number' and k < tmp) then args[k] = nil end
 
end
 
end
 
end
 
 
 
-- Order parameters
 
if frame.args['$params'] then
 
local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {}
 
for k, v in ipairs(params) do
 
v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v
 
if args[v] then tmp[v], args[v] = args[v], nil end
 
end
 
for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end
 
args = tmp
 
end
 
 
 
return mTemplateInvocation.invocation(name, args)
 
end
 
 
 
p[''] = p.main -- For backwards compatibility
 
 
 
return p
 

Revision as of 07:31, 5 April 2019

Photos


Photos Of The Day - DSC_7092.jpg Photos Of The Day - DSC_7259.jpg Photos Of The Day - DSC_7269.jpg Photos Of The Day - DSC_7250.jpg Photos Of The Day - DSC_7251.jpg Photos Of The Day - DSC_7346.jpg Photos Of The Day - DSC_7261.jpg Photos Of The Day - DSC_7345.jpg Photos Of The Day - DSC_7258.jpg Photos Of The Day - DSC_7334.jpg Photos Of The Day - DSC_7340.jpg Photos Of The Day - DSC_7249.jpg Photos Of The Day - DSC_7246.jpg Photos Of The Day - DSC_7173.jpg Photos Of The Day - DSC_7178.jpg Photos Of The Day - DSC_7177.jpg Photos Of The Day - DSC_7175.jpg Photos Of The Day - DSC_7084.jpg Photos Of The Day - DSC_7172.jpg Photos Of The Day - DSC_7176.jpg Photos Of The Day - DSC_7174.jpg Photos Of The Day - DSC_7103.jpg Photos Of The Day - DSC_7083.jpg Photos Of The Day - DSC_6993.jpg Photos Of The Day - DSC_6988.jpg Photos Of The Day - DSC_6857.jpg