Extension:PageProperties/de-formal

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

The extension adds an action on the top menu of Wiki articles and then 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" in the page navigation, a section in the sidebar, and a link in 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 label (can override the same attribute of the related property)
 * preferred input (can override the same attribute of the related property)
 * 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.



Parser functions
Since version 1.2.4c PageProperties offers a parser function 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 feature 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)

Rights and privileges
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:

Known issues

 * The tab "Edit semantic" could be slow to open because it currently loads all the required data server-side. In a coming version of PageProperties this will be streamlined loading most of the data client-side.
 * 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

Support & bugs
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



Siehe auch

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