Extension:CreateWiki

This page is a translated version of the page Extension:CreateWiki and the translation is 100% complete.
MediaWiki扩展手册
CreateWiki
发行状态: 稳定版
描述 提供一個允许维基创建者在另一个维基站点内创建新的维基站点的功能。 创建3个额外的“特殊页面”(RequestWiki、RequestWikiQueue、和CreateWiki)。
作者 Southparkfan, John Lewis, Paladox, Universal Omega
维护者 Miraheze system administrators
最新版本 continuous updates
MediaWiki 1.37.0+
PHP 7.4+
数据库更改
Composer miraheze/create-wiki
cw_comments
cw_requests
cw_wikis
许可协议 GNU通用公眾授權條款3.0
下載
  • $wgCreateWikiUseExperimental
  • $wgCreateWikiCacheDirectory
  • $wgCreateWikiDatabase
  • $wgCreateWikiCollation
  • $wgCreateWikiContainers
  • $wgCreateWikiDatabaseClusters
  • $wgCreateWikiStateDays
  • $wgCreateWikiNotificationEmail
  • $wgCreateWikiAIThreshold
  • $wgCreateWikiUseJobQueue
  • $wgCreateWikiGlobalWiki
  • $wgCreateWikiUseInactiveWikis
  • $wgCreateWikiCategories
  • $wgCreateWikiAutoApprovalFilter
  • $wgCreateWikiUseCustomDomains
  • $wgCreateWikiUseEchoNotifications
  • $wgCreateWikiUseClosedWikis
  • $wgCreateWikiUseCategories
  • $wgCreateWikiPersistentModelFile
  • $wgCreateWikiSQLfiles
  • $wgCreateWikiDatabaseClustersInactive
  • $wgCreateWikiSubdomain
  • $wgCreateWikiDisallowedSubdomains
  • $wgCreateWikiShowBiographicalOption
  • $wgCreateWikiInactiveExemptReasonOptions
  • $wgCreateWikiUsePrivateWikis
  • $wgCreateWikiEmailNotifications
  • $wgCreateWikiPurposes
  • $wgCreateWikiCustomDomainPage
  • $wgCreateWikiEnableManageInactiveWikis
  • $wgCreateWikiDatabaseSuffix
  • $wgCreateWikiCannedResponses

  • createwiki
  • requestwiki
翻译CreateWiki扩展

CreateWiki是一个扩展,它允许维基农场上的一个Wiki站点的注册用户请求新的Wiki站点或在该Wiki群上创建新的Wiki站点。

它提供了三个额外的特殊页面:

  • Special:RequestWiki — 用于请求新的wiki
  • Special:RequestWikiQueue — 用于查看新的wiki请求队列和处理新的wiki请求
  • Special:CreateWiki — 它允许某些用户创建新的wiki站点

此特定版本的CreateWiki基于Tim StarlingAaron Schulz的早期Checkuser 扩展,以及Kudu的另一个CreateWiki扩展。

警告 警告: CreateWiki是专门为Miraheze维基场设计和创建的,因此,可能并不总是在不同的站点或配置上工作。虽然已经努力让它更容易被非Miraheze维基站点使用,但这个扩展仍然是一个主要专注于Miraheze的扩展,并与Miraheze的配置和风格保持一致。

Issues and bug reporting

要报告问题或错误,请使用Miraheze Phabricator。 请参见来拿操纵板

安装

  • 下载文件,并将其放置在您extensions/文件夹中的CreateWiki目录内。
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'CreateWiki' );
    
  • 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
  •   完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

用法

All users (those in the User group by default) can request new wiki sites at Special:RequestWiki. Once they have requested a new wiki, they will be assigned a queue number and can check the status of their request at Special:RequestWikiQueue.

Those with the 'Wiki Creators' (createwiki) user right are able to check Special:RequestWikiQueue, and handle all wiki creation requests. At that page, they can either approve or decline wiki requests, and also change the visibility of a request. Everyone can check RequestWikiQueue at any time to see all requests ever submitted or filter by approved, declined, or in review tasks. Users can also filter by user.

Those with the 'Wiki Creators' (createwiki) user right can also bypass Special:RequestWiki, and manually create new wiki sites themselves at Special:CreateWiki.

配置

参数 默认值 评论
$wgCreateWikiDisallowedSubdomains [] Regex to match for disallowed subdomains.
$wgCreateWikiCacheDirectory "" The path to store CreateWiki cache files at. This configuration variable is required.
$wgCreateWikiCannedResponses false Array of default responses to give. If this is enabled, free-text options are removed.
$wgCreateWikiCategories false 用于维基分类的类别数组。
$wgCreateWikiCollation "" Sets the collation to use when creating the wiki database. Example is 'DEFAULT SET utf8mb4 COLLATE utf8mb4_unicode_ci'
$wgCreateWikiCustomDomainPage false 要链接到的页面名称,以获取有关自定义域的详细信息。
$wgCreateWikiDatabase false 存储CW_Wikis的数据库名称。
$wgCreateWikiDatabaseClusters [] Array. LBFactory clusters which CreateWiki considers active.
$wgCreateWikiDatabaseClustersInactive [] Array. LBFactory clusters which are not considered active for use of automatic load-balancing.
$wgCreateWikiStateDays
 'inactive' => 45,
 'closed' => 15,
 'removed' => 120,
 'deleted' => 7,
Array. Integer values in days when a wiki is deemed inactive, closed, removed (hidden), and deleted. Number of days passed since last change - not from initial inactivity.
$wgCreateWikiEmailNotifications false 是否为新的维基创建发送电子邮件(或不发送)。
$wgCreateWikiNotificationEmail root@localhost 内部生成的通知电子邮件要发送到的电子邮件地址。 不依赖于$wgCreateWikiEmailNotifications!
$wgCreateWikiGlobalWiki false 全局维基的数据库名称。 (其中应启用RequestWiki,并提供Special:CreateWiki。)
$wgCreateWikiInactiveExemptReasonOptions [] Array of possible options for marking an individual wiki as exempt from inactivity.
$wgCreateWikiPurposes [] Array. List of identified purposes to show when requesting a new wiki.
$wgCreateWikiShowBiographicalOption false Boolean. Whether to show a biographical person option when requesting a new wiki.
$wgCreateWikiSQLfiles false 创建新Wiki时要默认创建的SQL文件。 此配置变量是必需的。
$wgCreateWikiSubdomain false 子域名的主部分,例如wiki.miraheze.org,miraheze.org是主部分。
$wgCreateWikiUseCategories false 是否使用类别对维基进行分类。
$wgCreateWikiUseClosedWikis false 是否实现关闭维基的前端逻辑。
$wgCreateWikiUseCustomDomains false 是否实现前端逻辑来处理RequestWiki中Wiki的自定义域名请求。
$wgCreateWikiUseEchoNotifications false Whether to use Echo notifications (beta feature).
$wgCreateWikiUseExperimental false Whether to implement front-end logic for marking wikis as experimental.
$wgCreateWikiUseInactiveWikis false 是否为非活跃维客实现前端逻辑。
$wgCreateWikiUseJobQueue false Whether to defer intensive tasks to the jobqueue.
$wgCreateWikiUsePrivateWikis false 是否实现将维基标记为私有的前端逻辑。

REST API

wiki_request

This is an experimental API and is not production-ready!

Route: /createwiki/v0/wiki_request/{id}

Method: GET

Description

Request example

curl https://example.com/w/rest.php/createwiki/v0/wiki_request/1

Request parameters

parameter required example description
id Yes 1 The ID of the wiki request whose data you want to retrieve

Responses

200 Success
Response example
{
  "comment": "Purpose:  None of the above\ntest",
  "dbname": "testwiki",
  "language": "en",
  "sitename": "TestWiki",
  "status": "approved",
  "timestamp": "20230426042416",
  "url": "test.example.com",
  "requester": "Example",
  "category": "uncategorised",
  "bio": "0",
  "comments": [
    {
      "comment": "Request approved.",
      "timestamp": "20231129035014",
      "user": "Admin"
    }
  ]
}
400 Wiki request ID does not exist, or the request has been suppressed
Response example
{
  "message": "Invalid request ID",
  "httpCode": 400,
  "httpReason": "Bad Request"
}

Response schema

TODO

另见