सामग्री पर जाएँ
मुख्य मेन्यू
मुख्य मेन्यू
साइडबार पर जाएँ
छुपाएँ
नेविगेशन
मुखपृष्ठ
हाल में हुए बदलाव
बेतरतीब पृष्ठ
मीडियाविकि के बारे में सहायता
खोजें
खोजें
हिन्दी
दिखावट
खाता बनाएँ
लॉग-इन करें
व्यक्तिगत उपकरण
खाता बनाएँ
लॉग-इन करें
लॉग-आउट किए गए संपादकों के लिए पृष्ठ
अधिक जानें
योगदान
वार्ता
मॉड्यूल:Subject bar
सम्पादन
Module
वार्ता
English
पढ़ें
स्रोत सम्पादित करें
इतिहास देखें
उपकरण
उपकरण
साइडबार पर जाएँ
छुपाएँ
क्रियाएँ
पढ़ें
स्रोत सम्पादित करें
इतिहास देखें
सामान्य
कड़ियाँ
पृष्ठ से जुड़े बदलाव
विशेष पृष्ठ
पृष्ठ की जानकारी
दिखावट
साइडबार पर जाएँ
छुपाएँ
सावधान:
आपने लॉग-इन नहीं किया है। अगर आप सम्पादन करते हैं तो इस पृष्ठ के संपादन इतिहास में आपका IP पता दृश्य होगा। अगर आप
लॉग-इन
करते हैं या
खाता बनाते हैं
तो दूसरे सुविधाओं के साथ-साथ आपके संपादनों का श्रेय आपके सदस्यनाम पर दिया जाएगा।
ऐन्टी-स्पैम जाँच। इसे
नहीं
भरें!
require('strict') local getArgs = require('Module:Arguments').getArgs local yesNo = require('Module:Yesno') -- Determine whether we're being called from a sandbox local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) local sandbox = isSandbox and '/sandbox' or '' local p = {} local sisters = {'commons','species','voy','n','wikt','b','q','s','v','iw','iw1','iw2','d','f'} local function findNumericArgs(key, args) local pattern = "^"..key.."_?(%d+)$" -- pattern to match local values = {} for k, v in pairs(args) do --- loop through all arguments local ord = tonumber(mw.ustring.match(k,pattern)) --- if "foo_?%d+", extract number if ord then values[ord] = v end end if args[key] ~= nil then values[1] = args[key] end local compressSparseArray = require('Module:TableTools').compressSparseArray values = compressSparseArray(values) --- squeeze out gaps/nils in values, keep ordering return values end function p._main(args) local result = "" local hasPortal = false for key, _ in pairs(args) do if mw.ustring.sub(key,1,6) == 'portal' or tonumber(key) then hasPortal = true break end end local hasSister = yesNo(args.auto,true) or yesNo(args.author,true) or yesNo(args.cookbook,true) for _, sister in ipairs(sisters) do if hasSister then break end if yesNo(args[sister],true) or yesNo(args[sister..'-search'],true) then hasSister = true end end if hasPortal then local portalList = findNumericArgs("portal",args) for _, positional in ipairs(args) do table.insert(portalList, positional) end local portalBar = require('Module:Portal bar'..sandbox)._main result = result..portalBar(portalList, {tracking=args.tracking, qid=args.qid}) end if hasSister then local sisterArgs = {auto=1, bar=1, trackSingle=not hasPortal} sisterArgs[1] = args.search for _, k in ipairs({'author','commonscat','cookbook','display','tracking','qid'}) do sisterArgs[k] = args[k] end for _, t in ipairs(sisters) do sisterArgs[t] = args[t..'-search'] or args[t] end local sisterBar = require('Module:Sister project links'..sandbox)._main result = result..sisterBar(sisterArgs) end return result end function p.main(frame) -- If called via #invoke, use the args passed into the invoking template, -- or the args passed to #invoke if any exist. Otherwise assume args are -- being passed directly in from the debug console or from another Lua module. local args = getArgs(frame) return p._main(args) end return p
सारांश:
कृपया ध्यान दें कि वर्ल्डपीडिया को किये गये सभी योगदान क्रिएटिव कॉमन्स एट्रिब्यूशन-शेयरअलाइक ४.० लाइसेंस की शर्तों के तहत होंगे (अधिक जानकारी के लिये
वर्ल्डपीडिया:कॉपीराइट
देखें)। यदि आप अपने योगदान को लगातार बदलते और पुनः वितरित होते नहीं देख सकते हैं तो यहाँ योगदान न करें।
आप यह भी प्रमाणित कर रहे हैं कि यह आपने स्वयं लिखा है अथवा सार्वजनिक क्षेत्र या किसी समान मुक्त स्रोत से प्रतिलिपित किया है।
कॉपीराइट सुरक्षित कार्यों को बिना अनुमति के यहाँ न डालें!
रद्द करें
सम्पादन सहायता
(नई विंडो में खुलता है)
इस पृष्ठ पर प्रयुक्त साँचा:
मॉड्यूल:Subject bar/doc
(
सम्पादन
)