imported>Oetterer K (Schützte „Modul:Foundationclass/globalconfig“: Automatic protection of selected project pages ([Bearbeiten=Nur Administratoren erlauben] (unbeschränkt) [Verschieben=Nur Administratoren erlauben] (unbeschränkt))) |
|
(kein Unterschied)
|
Version vom 7. Oktober 2022, 16:56 Uhr
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This module provides global configuration data for Module:Foundationclass.
Usage[Quelltext bearbeiten]
local cfg = mw.loadData( 'Module:Foundationclass/globalconfig' )
--[==[ if you start off, please fill the entries and create the appropriate categories
-- formCategory (e.g. 'Project forms')
-- gardeningSuperCategory (e.g. 'Erroneous objects') (this is a global category. you can define an individual one for each class)
-- moduleCategory (e.g. 'Project modules')
-- projectSuperCategory (e.g. 'Project category')
-- propertyCategory, if you use datastore smw (e.g. 'Project properties')
-- templateCategory (e.g. 'Project templates')
-- also, remember to choose your prefered storage method. atm supported are: 'cargo', 'smw', or 'both'
-- when using datastore 'smw' uncomment all smwSpecialProperties that are active in your installation (and create the properties for smwClassProperty and uidFieldName)
-- HINT: When you use the classgenerator form and its autocreation feature, it creates all your categories defined here as well. to modify their content, please refer to [[Module:Classgenerator/class]]'s documentation page
--]==]
local superglobal = {
cargoSpecialFields = {}, -- filled further down below
cargoTypesElegibleForSize = {'text', 'string', 'wikitext', 'url'},
cargoTypesElegibleForValue = {'text', 'integer', 'string', 'url'},
classCategory = 'Lua class modules', -- this is the category, all classes based on this engine are put automatically
dataStore = 'cargo', -- supported types are 'cargo', 'smw', and 'both'
debugLevel = false, -- set this to the level you wish to display at render. false if disabled. this is a global setting, causing all children to debug. you can set this individually at any class
formCategory = 'Project forms', -- the category of the form pages
formTableClass = 'formtable',
gardeningSuperCategory = 'Project entities with erroneous input',
moduleCategory = 'Project modules',
moduleUseRatingTemplate = true,
projectSuperCategory = 'My Project', -- The category, all the categories are placed in.'
propertyCategory = 'Project properties', -- category for all the properties pages - if data store smw is used
restrictionRole = 'sysop', -- if you wish to set fields to a default restriction role, name it here
selectedCheckboxSubmitValue = 'Ja', -- (const) this is the value, a semantic forms checkbox submits when selected. used for plausibilityTest only
smwClassProperty = 'is_member_of_class', -- the name of the property, members of the class will be identified by; you have to create the property page, though
smwPropertyTypesAvailable = { 'Annotation URI', 'Boolean', 'Code', 'Date', 'Email', 'Geographic coordinate', 'Number', 'Page', 'Quantity', 'Record', 'Telephone number', 'Temperature', 'Text', 'URL' },
-- if you have more types of properties (due to an extension), add them here). in fact, Foundationclass does use this, but classgenerator/parameter makes a reference
smwSpecialProperties = {}, -- filled further down below
templateCategory = 'Project templates', -- the category for the templates
templateUseDocumentationSubsystem = true,
ucfirst = true, -- states, that your mw installation makes the first letter in any page name an uppercase letter
uidFieldName = 'is_identified_by_classengine_through', -- the name of the property/table fields, the individual object will be identified by (in cargo and smw respectively);
-- if you use smw, you have to create the property page manually
-- WARNING: If you reset this after beginning operation, you have to rebuild all cargo data tables, and/or create the new property and refresh all properties
}
superglobal.cargoSpecialFields = {
_ID = 'Integer, <small>holds a unique ID for this row</small>',
_pageName = 'Text, <small>holds the name of the page from which this row of values was stored</small>',
_pageTitle = 'Text, <small>similar to _pageName, but leaves out the namespace, if there is one</small>',
_pageNamespace = 'Integer, <small>holds the numerical ID of the namespace of the page from which this row of values was stored</small>',
_pageID = 'Integer, <small>holds the internal MediaWiki ID for that page</small>',
}
superglobal.smwSpecialProperties = {
-- by default, only _MDAT is active. see https://www.semantic-mediawiki.org/wiki/Help:$smwgPageSpecialProperties for documentation
-- please uncomment all special properties that apply to your installation
Creation_date = 'Date, <small>Erstelldatum der Seite.</small> (Alias _CDAT)',
--Is_a_new_page = 'Boolean, <small>Ist die Seite neu? Gibt es nur eine einzige Revision?</small> (Alias _NEWP)',
Last_editor_is = 'Page, <small>Benutzername des letzten Bearbeiters.</small> (Alias _LEDT)',
--Media_type = 'Text, <small>Speichert den Medientyp einer hochgeladenen Datei.</small> (Alias _MEDIA)',
--MIME_type = 'Text, <small>Speichert den MIME Typ einer hochgeladenen Datei.</small> (Alias _MIME)',
Modification_date = 'Date, <small>Datum der letzten Bearbeitung der Seite.</small> (Alias _MDAT)',
-- from Extension: Extra Special Properties
Seitenersteller = 'Page, <small>Erstellerbenutzer</small>',
Seitenbearbeiter = 'List of Pages, <small>Liste der Benutzer, die an der Seite mitgewirkt haben.</small>',
--EXIFDATA = 'Text, <small>Exif Daten einer Datei (Nur im Namensraum "Datei" gesetzt)</small>',
--PAGEID = 'Number, <small>ID der Seite</small>',
Bearbeitungskennung = 'Number, <small>ID der aktuellen Revision</small>',
--NREV = 'Number, <small>Geschätzte Anzahl der Revisionen.</small>',
--NTREV = 'Number, <small>Geschätzte Anzahl der Revisionen der Diskussionsseite.</small>',
--SHORTURL = 'Text, <small>KurzURL der Seite (Nur bei Verwendung der Extension:ShortUrl verfügbar)</small>',
Unterseite = 'List of Pages, <small>Liste der Unterseiten</small>',
--USERREG = 'Date, <small>Datum der Registrierung eines Benutzers (Nur im Namensraum "Benutzer" gesetzt)</small>',
--VIEWS = 'Number, <small>Geschätzte Anzahl der Seitenaufrufe (Achtung: Aufgrund von Caching kann die tatsächliche Zahl stark abweichen).</small>',
--CUSER = 'Page, <small>Erstellerbenutzer</small>',
--EUSER = 'List of Pages, <small>Liste der Benutzer, die an der Seite mitgewirkt haben.</small>',
--EXIFDATA = 'Text, <small>Exif Daten einer Datei (Nur im Namensraum "Datei" gesetzt)</small>',
--PAGEID = 'Number, <small>ID der Seite</small>',
--REVID = 'Number, <small>ID der aktuellen Revision</small>',
--NREV = 'Number, <small>Geschätzte Anzahl der Revisionen.</small>',
--NTREV = 'Number, <small>Geschätzte Anzahl der Revisionen der Diskussionsseite.</small>',
--SHORTURL = 'Text, <small>KurzURL der Seite (Nur bei Verwendung der Extension:ShortUrl verfügbar)</small>',
--SUBP = 'List of Pages, <small>Liste der Unterseiten</small>',
--USERREG = 'Date, <small>Datum der Registrierung eines Benutzers (Nur im Namensraum "Benutzer" gesetzt)</small>',
--VIEWS = 'Number, <small>Geschätzte Anzahl der Seitenaufrufe (Achtung: Aufgrund von Caching kann die tatsächliche Zahl stark abweichen).</small>',
}
return superglobal