Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  



























Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  














Module:Category handler/shared






Afrikaans
Алтай тил

Аԥсшәа
العربية
Aymar aru
Azərbaycanca
تۆرکجه
Basa Bali

Башҡортса
Беларуская
Беларуская (тарашкевіца)

Bikol Central
Български
Bosanski
Brezhoneg
Буряад
Català
Чӑвашла
Cebuano
Chamoru
Dansk
الدارجة
Eesti
Ελληνικά
Euskara
فارسی
Fiji Hindi
Føroyskt
Galego


  / Gõychi Konknni
/Hak-kâ-ngî

Hausa
Ido
Ilokano
িি ি
Bahasa Indonesia
Ирон
IsiXhosa
Jawa
Kabɩyɛ

Kapampangan

Қазақша
Ikirundi
Kurdî
Кыргызча
Ladin
Latviešu
Lietuvių
Magyar
ि
Македонски

Malti

مصرى

Bahasa Melayu
Minangkabau
 / Mìng-dĕ̤ng-nḡ
Mirandés
Мокшень
Монгол

Nāhuatl
Na Vosa Vakaviti


Нохчийн
Norfuk / Pitkern
Norsk bokmål
ି

ि
Pangasinan
Pangcah
پنجابی

پښتو
Tok Pisin
Português
Română
Русиньскый
Русский
Sakizaya

سرائیکی
Scots

Simple English
سنڌي
Slovenščina
کوردی
Српски / srpski
Srpskohrvatski / српскохрватски
Suomi
Tagalog
ி
 

Tetun

Thuɔŋjäŋ
Тоҷикӣ


Türkçe
Українська
اردو
Tiếng Vit
Volapük
Winaray



Batak Toba
 

Edit links
 









Module
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
Wikimedia Foundation
MediaWiki
Meta-Wiki
Wikimedia Outreach
Multilingual Wikisource
Wikispecies
Wikibooks
Wikidata
Wikifunctions
Wikimania
Wikiquote
Wikisource
Wikiversity
 

















Permanently protected module

From Wikipedia, the free encyclopedia
 

< Module:Category handler

Usage

{{#invoke:Category handler|function_name}}

-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.

local p = {}

function p.matchesBlacklist(page, blacklist)
 for i, pattern in ipairs(blacklist) do
  local match = mw.ustring.match(page, pattern)
  if match then
   return true
  end
 end
 return false
end

function p.getParamMappings(useLoadData)
 local dataPage = 'Module:Namespace detect/data'
 if useLoadData then
  return mw.loadData(dataPage).mappings
 else
  return require(dataPage).mappings
 end
end

function p.getNamespaceParameters(titleObj, mappings)
 -- We don't use title.nsText for the namespace name because it adds
 -- underscores.
 local mappingsKey
 if titleObj.isTalkPage then
  mappingsKey = 'talk'
 else
  mappingsKey = mw.site.namespaces[titleObj.namespace].name
 end
 mappingsKey = mw.ustring.lower(mappingsKey)
 return mappings[mappingsKey] or {}
end

return p

Retrieved from "https://en.wikipedia.org/w/index.php?title=Module:Category_handler/shared&oldid=948472498"

Category: 
Modules subject to page protection
Hidden category: 
Wikipedia fully protected modules
 



This page was last edited on 1 April 2020, at 06:12 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki