Extension:PageProperties/de

PageProperties allows users to easily edit the display title, language and content model of a page; to associate semantic properties with pages without having to manually annotate them (provided that Semantic MediaWiki is installed); and to set SEO metadata for the entire wiki or for specific pages.

The extension adds an action to the top menu of wiki articles through which authorized users can set all the relevant properties of the page.

'''Since version 1.2.4 PageProperties features a complete GUI for the creation of semantic properties, semantic categories and semantic forms, completely based on OOUI and slots ! '''

The extension adds a tab "Edit semantic" to the page navigation, a section in the sidebar, and adds a link to the page menu action. The visibility of each of them can be managed using the parameters below





Installation

 * Download and place the file(s) in a directory called  in your   folder.
 * Add the following code at the bottom of your LocalSettings.php
 * optionally run  in the extension's folder, this will install the required libraries to annotate JSON-LD within the page (see section below to find out more)
 * ✅ – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.



Main tab
From the main tab you can edit the display title of the page, language and content model. The display title can be left blank to hide the title completely without having to deal with css tricks.



Key features:
 * set language is correctly shown in the Page information page
 * display title is added to the Page props table so that it can be autonomously handled by other extensions, like Display Title
 * optional tracking category "Pages with PageProperties"
 * support for html content model and enhanced support for plain text content model (in this case, the font of page content will be set to monospace, and white spaces/new lines will be preserved unless when necessary to fill line boxes)
 * properties are recorded within a dedicated slot on the related page and can be shown through the tab "properties" on the page menu (Attention: currently the content model of the slot is correctly displayed only on Mediawiki 1.38 and above, in other versions it will use the content model of the main slot)

(this tab is shown when the parameter  is set to true or the user has   right)

SEO tab
From the SEO tab you can easily add meta tags or meta properties to specific pages or the entire wiki.

If the extension Extension:wikiSEO is installed, PageProperties will provide a combobox with the parameters allowed by the extension, and they will be internally handled by the WikiSEO extension itself without the need to manually annotate them on the page.

Note that the checkbox "apply to entire wiki" will be only shown if the properties are related to the Main Page of the wiki.



available combobox when the Extension:wikiSEO extension is installed

Edit semantic
(this feature is only available when Semantic MediaWiki is installed)

From the "Edit semantic" tab you can interactively assign semantic forms and single semantic properties to wiki pages without using parser functions and without annotating them manually on the page.

Set properties will be visible on the SMW FactBox and they will be correctly handled by askqueries.



Here are the two "entry-points" to respectively add/remove forms to/from a page and add/remove single properties (unrelated to a specific form) to/from a page. Each property is associated to a OOUI input widget and can allow multiple fields.

This is a form once added to a page. The form is composed of properties defined through the "Manage properties" special page (see below) and then grouped in a form defined through the same page. Forms can be also used to create new articles as in Extension:PageForms (see also here).



The relevant sections for creating properties, categories, and even forms, are accessible from the "Edit semantic" tab itself, through the following icon (except for the tab "Semantic import" which is only accessible from the "Manage properties" special page)



Key-features
 * multiple forms and single properties can be interactively added to any wiki page
 * each form can feature their own default categories, pagename formula (only for new pages) and content model. When different between each other the user is provided with a radio input, to select the desired values
 * a large set of native OOUI inputs are available and can be added to a form through a simple interface
 * properties and forms can be edited/created seamlessly, without to leave the interface
 * supports the upload of multiple files

Manage properties
From the "Manage properties" special page you can create/edit semantic properties, semantic categories, semantic forms and even to perform a semantic import based on csv files.



Properties tab
This is where you can define a property. Supported options:
 * property type (any of those listed here)
 * imported vocabulary (see here)
 * multiple fields
 * preferred input
 * all options related to properties listed here





A large set of native Mediawiki's, and OOUI native inputs are supported, like:
 * mw.widgets.DateInputWidget
 * mw.widgets.datetime.DateTimeInputWidget
 * mw.widgets.CategoryMultiselectWidget
 * mw.widgets.TitlesMultiselectWidget
 * mw.widgets.UsersMultiselectWidget
 * OO.ui.MultilineTextInputWidget
 * OO.ui.TagMultiselectWidget
 * OO.ui.ComboBoxInputWidget
 * OO.ui.SelectFileWidget
 * International Telephone Input for telephone_number data type

and more !



When you delete/rename a property all the pages containing that property will be affected as well, and the property will be either deleted or renamed on all relevant pages, so take into account the following tip!

Categories tab
This is where you can define a category. Supported options:
 * each category can be associated with any imported vocabulary saved on the wiki.



Forms tab
This is where you can define a form. Supported options:
 * pagename formula or title widget input
 * show/hide free text input
 * default categories
 * default content model

This is where (in the same window) you can assign fields to a form. Fields can be rearranged and through buttons located besides each of them you can access the related property window, and the field window.



This is where you can define the property/field assigned to a form. Supported options:
 * required
 * field help text (can override the same attribute of the related property)
 * preferred input (can override the same attribute of the related property)
 * option-values for multiple choice inputs retrieved from property declaration, hard-coded values, wikilist or an ask query (see here)
 * multiple values (can override the same attribute of the related property)
 * on create only (whether the input should be used only to compose the form pagename formula)





Created forms will be listed in a dedicated section in the sidebar, as follows:



Import tab
From the "Import" tab you can import in your wiki csv files, mapping their fields to semantic properties defined or to be defined in the wiki. Also large set of csv lists can be incrementally imported and even previewed before the actual import through the interface. A page will be created for each csv entry, with a large set of options in order to define the target pagename, the page content, values separator, defined categories, and more !

Here is where you can upload/drop the cvs file to be imported.



Here is where you can check the consistency of your data and to set/remove the heading.



Here is where you can map the csv fields to semantic properties recorded in the wiki and even to create new properties on the fly.



Here is where you can preview the import, so to avoid or to minimize mistakes: note indeed that by default a single wiki page will be created for each csv entry.



#pagepropertiesform
The  parser function can be used to display multiple forms in any wiki page, each of them composed by multiple forms (handled as form sections). Simply create a form through the interface as shown above, then use the following wikitext to render a composite form on the page.

where "Form a", "Form b" and "Form c" are the names of different forms. After you have placed the forms on an article of your choice, a form submission will either create a new article based on the form's pagename formula or the title entered by the user in the form itself, or will trigger an error in case that an article with the same title already exists. By contrast, in order to edit the semantic properties of the current article, just use the Edit semantic tab. Finally, through this parser function, an arbitrary number of forms can be inserted in any article in the desired position.

#pagepropertiesformbutton
The  parser function can be used to display a link button pointing to a new form rendered in a special page. The new form, as above, can in turn be composed by multiple forms.

where "text" is the button's text, "Form a", "Form b" and "Form c" are the forms to be rendered on the special page, "button-type" is an optional parameter to determine whether the form button will be rendered as button or as text (use the values "button" and "text"), and class is an optional parameter to add to the button link one or more classes.

#pageproperties
The  parser function can be used to easily display the semantic properties associated to a page, using templates, both for the given set of properties, and for each value of a given property (useful when a property contains multiple values, for instance pictures to be rendered in some way)

Example:

(in the second example the parser function will retrieve the value of the semantic property,  , will display the   using the template "Organization logo", and will display such parameters using the template "Organization" (the value of the property Logo is translated using the desired template)

Note: This parser function could be subjected to design changes in the next version!

JSON-LD
JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON (from Wikipedia). PageProperties automatically includes the ontology associated with the page, if any, in the following form { "@context": { "name": "http://xmlns.com/foaf/0.1/name", "homepage": { "@id": "http://xmlns.com/foaf/0.1/workplaceHomepage", "@type": "@id" },   "Person": "http://xmlns.com/foaf/0.1/Person" }, "@id": "https://me.example.com", "@type": "Person", "name": "John Smith", "homepage": "https://www.example.com/" }

This feature is available when PageProperties is used in conjunction with Semantic MediaWiki, and is especially useful, for the purpose of search engine optimization, when the wiki contains pages describing schema.org items, like Person, Book, Organization and more.

Konfiguration
The extension works at its best when used in conjunction with Semantic MediaWiki, WikiSEO and Display Title. However, none of them are necessary, when used without Semantic MediaWiki the semantic tab will be omitted, when used without WikiSEO meta tags have to be entered without a dropdown, and when used without Display Title it is possible that the alternate page title cannot be used for linking.

Global parameters

(n) true if user has right, otherwise false

(if both  and   are set to , the PageProperties special page will be not accessible from the interface)



Rechte und Privilegien
The extension creates the following user rights. They can be both included manually in the LocalSettings.php or to be managed through the interface (special page Special:UserRights).

Sysops and bureaucrats are assigned with the complete set of permissions by default.

Rights:

Example configuration:

Groups:



Bekannte Probleme

 * Subsequent edits of the name of a file through the specif implementation of  do not yet update the name of the published file. This will be fixed on a coming version.
 * rename of properties does not yet reflect on form descriptors



Unterstützung & Fehler
Please post error messages in the Talk page of the extension. Updates will be posted on the Semantic MediaWiki user list and occasionally in the MediaWiki's Wikitech mailing list.

Demo & testing
You are welcome to test the extension here: wikienterprise.org

Latest improvements

 * and  parser functions (forms can be inserted in any wiki article)
 * native input validation (with regard of the required attribute) for all OOUI inputs
 * dynamic option values for multiple choice input widgets, based on user's entered values, wiki-lists, and ask queries
 * hidden inputs
 * value-formula (keeps track of the original value, to be used for subsequent edits)
 * renaming/deletion of properties through the interface automatically updates all pages and forms with that property, with a notice about the jobs to be executed
 * categories created by the GUI are correctly handled in ask queries
 * optimized loading of required data

Roadmap

 * option-inputs with search api and infinite scroll (for long lists)
 * editable input label, and default value
 * subitems or subobjects
 * searchable properties in slots and preload content
 * dedicated window for options of each available input, as outlined here (OO.ui.TextInputWidget as an example), consistent across Manage Properties and (Form edit's) Edit field
 * bulk edit
 * additional inputs, like tree and rating



Siehe auch

 * Extension:Semantic MediaWiki
 * Extension:wikiSEO
 * Extension:MetaMaster
 * Extension:Semantic Meta Tags
 * Extension:AdvancedMeta
 * Extension:PageOwnership