Editing Module:Pagetype/config

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 10: Line 10:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- This table holds the default page types for each namespace. Keys to this
-- This table holds the values to use for "main=true", "user=true", etc. Keys to
-- table should be integers that can be used as keys to mw.site.namespaces.
-- this table should be namespace parameters that can be used with
-- [[Module:Namespace detect]].  
cfg.pagetypes = {
cfg.pagetypes = {
[0]   = 'article', -- Main namespace
['main']             = 'article',
[2]   = 'user page',
['user']             = 'user page',
[4]   = 'project page',
['project']          = 'project page',
[6]   = 'file',
['wikipedia']         = 'project page',
[8]   = 'interface page', -- MediaWiki namespace
['wp']               = 'project page',
[10]   = 'template',
['file']              = 'file',
[12]   = 'help page',
['image']             = 'file',
[14]   = 'category',
['mediawiki']        = 'interface page',
[100] = 'portal',
['template']         = 'template',
[118] = 'draft',
['help']             = 'help page',
[710] = 'Timed Text page',
['category']         = 'category',
[828] = 'module',
['portal']           = 'portal',
[2300] = 'gadget',
['draft']             = 'draft',
[2302] = 'gadget definition',
['timedtext']         = 'Timed Text page',
[-1]   = 'special page',
['module']           = 'module',
[-2]   = 'file', -- Media namespace
['topic']            = 'topic',
['gadget']           = 'gadget',
['gadget definition'] = 'gadget definition',
['talk']             = 'talk page',
['special']          = 'special page',
['media']             = 'file',
}
}


-- This table holds the namespaces to be looked up from cfg.pagetypes by
-- This table holds the names of the namespaces to be looked up from
-- default.
-- cfg.pagetypes by default.
cfg.defaultNamespaces = {
cfg.defaultNamespaces = {
[0] = true,   -- main
'main',
[6] = true,   -- file
'file',
[10] = true, -- template
'template',
[14] = true, -- category
'category',
[828] = true, -- module
'module'
}
}


-- This table holds the namespaces to be looked up from cfg.pagetypes if
-- This table holds the names of the namespaces to be looked up from
-- cfg.defaultnsExtended is set.
-- cfg.pagetypes if cfg.defaultnsExtended is set.
cfg.extendedNamespaces = {
cfg.extendedNamespaces = {
[0] = true,   -- main
'main',
[2] = true,   -- user
'user',
[4] = true,   -- project
'project',
[6] = true,   -- file
'file',
[8] = true,   -- mediawiki
'mediawiki',
[10] = true, -- template
'template',
[12] = true, -- help
'category',
[14] = true, -- category
'help',
[100] = true, -- portal
'portal',
[118] = true, -- draft
'module',
[828] = true, -- module
'draft'
}
 
-- This table holds custom aliases for each namespace.
cfg.customNamespaceAliases = {
[0] = {'main'},
}
}


Line 75: Line 76:
-- The value of cfg.defaultns to set no default namespaces.
-- The value of cfg.defaultns to set no default namespaces.
cfg.defaultnsNone = 'none'
cfg.defaultnsNone = 'none'
-- The parameter name to use for talk pages.
cfg.talk = 'talk'
-- The default value for talk pages.
cfg.talkDefault = 'talk page'


-- The parameter name to use for disambiguation pages page.
-- The parameter name to use for disambiguation pages page.
Line 88: Line 83:
-- pages. These should be lower-case.
-- pages. These should be lower-case.
cfg.dabAliases = {
cfg.dabAliases = {
['disambiguation'] = true,
'disambiguation',
['disambig'] = true,
'disambig',
['disamb'] = true,
'disamb',
['dab'] = true,
'dab'
}
}


Line 102: Line 97:
-- This table holds the different possible aliases for N/A-class pages. These
-- This table holds the different possible aliases for N/A-class pages. These
-- should be lower-case.
-- should be lower-case.
cfg.naAliases = {
cfg.naAliases = {'na', 'n/a'}
['na'] = true,
['n/a'] = true,
}


-- The default value for N/A-class pages.
-- The default value for N/A-class pages.

Please note that all contributions to Timeline of History may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Timeline of History:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: