Jump to content

Extension:PageProperties

From mediawiki.org
This page is a translated version of the page Extension:PageProperties and the translation is 21% complete.
MediaWiki 拡張機能マニュアル
PageProperties
リリースの状態: 安定
実装 フック , 特別ページ
説明 Allows to easily edit the display title , language and content model of a page, and to set SEO metadata for the entire wiki or for specific pages
作者 thomas-topway-it (thomas-topway-itトーク)
最新バージョン 1.5.2 (2024-08-03)
互換性の方針 master は後方互換性を維持しています。
MediaWiki >= 1.35.0
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • $wgPagePropertiesDisplayAlwaysUnprefixedTitles
  • $wgPagePropertiesAddTrackingCategory
  • $wgPagePropertiesDisableNavigationLink
  • $wgPagePropertiesDisableVersionCheck
  • $wgPagePropertiesDisableSidebarLink
  • pageproperties-caneditpageproperties
四半期ごとのダウンロード数 27 (Ranked 110th)
translatewiki.net で翻訳を利用できる場合は、PageProperties 拡張機能の翻訳にご協力ください

PageProperties allows to easily edit the display title, language and content model of a page, and to set SEO metadata for the entire wiki or for specific pages.


UI elements

The extension adds a link in the navigation menu and a link on the sidebar, within the "Tools" section: their visibility can be handled using the parameters below

  • The action-link "Page properties"

frameless

  • The sidebar link pointing to the same special page

frameless

インストール

  • Download and place the file(s) in a directory called PageProperties in your extensions/ folder.
  • 以下のコードを LocalSettings.php の末尾に追加します
wfLoadExtension( 'PageProperties' );
  • optionally run composer update --no-dev in the extension's folder, this will install the required libraries to annotate JSON-LD[1] within the page (see section below to find out more)
  • Run php maintenance/update.php (this will install the required tables)
  • follow the instructions here to migrate from previous versions of PageProperties if applicable
  • Yes 完了 – ウィキの Special:Version に移動して、拡張機能が正しくインストールされたことを確認します。



Page Properties' Special page

Page Properties' special page is a convenient special page where to quickly set display title, language and content model of a page, as well as to associate SEO metadata at page level or site level (if accessed from the Main Page). It works at its best when used in conjunction with WikiSEO and Display Title . However, they aren't strictly necessary, 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.

メインタブ

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)

SEO タブ

From the SEO[2] 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 wikiSEO extension is installed

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

権限 description
pageproperties-caneditpageproperties Can edit page properties

Example configuration

$wgPagePropertiesDisableJsonLD = true;

$wgGroupPermissions['*']["pageproperties-caneditpageproperties"] = false;

Groups

group Can edit page properties
sysop, bureaucrat Yes  
pageproperties-admin Yes  
pageproperties-editor Yes  

グローバル パラメーター

変数 説明 既定
$wgPagePropertiesAddTrackingCategory add the Tracking category "Pages with PageProperties" on pages containing properties false
$wgPagePropertiesDisableSidebarLink hide the link to the PageProperties special page on the sidebar false
$wgPagePropertiesDisableNavigationLink hide the link to the PageProperties special page on the navigation panel false
$wgPagePropertiesOpenExternalLinksInNewTab inserts an attribute target="_blank" to all external links, so they open in a new tab false
$wgPagePropertiesDisplayAlwaysUnprefixedTitles display unprefixed titles for all namespaces, also those not explicitly set through the extension false
$wgPagePropertiesDisableVersionCheck disable version check of the extension false

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


Maintenance

If PageProperties prior to 1.5.0 was installed on your wiki, please run

php extensions/PageProperties/maintenance/migrateSlots.php --remove-slot

to migrate slot contents to dedicated tables.


If you are also using Extension:VisualData, run the latter command without the option remove-slot

php extensions/PageProperties/maintenance/migrateSlots.php 

and then run:

php extensions/VisualData/maintenance/RebuildData.php

(this will rename the pageproperties slot role to jsondata slot role)


Roadmap

  • rewrite dynamictable following OO model

サポートとバグ

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.

For professional support please write at the email address posted User:Thomas-topway-it

関連項目

  1. JavaScript Object Notation for Linked Data (JSON-LD)
  2. Search Engine Optimisation (SEO)

Test it out!