Extension:StructuredDiscussions/zh

StructuredDiscussions扩展提供对话页面的讨论和协作系统. ‎本页涵盖了如何安装和管理结构化讨论，使用指南，请参阅‎. 你可以自己在沙盒讨论页面尝试结构式讨论.

本扩展此前成为Flow，其名称在有些地方（例如在Git仓库）仍能体现出了.

‎结构式讨论扩展由维基媒体基金会的Collaboration团队开发. ‎ 本扩展仍在维护中以修复bug，但是自从2015之后本扩展就没有后续开发了，而是在2017年9月更名为“StructuredDiscussions”. ‎未来可能会重新开始开发‎. 关于本扩展的开发状态的更多信息，以及其设计的概览，参见Structured Discussions.

安裝


安裝後
You also need to run the command "composer update --no-dev" from the command line, on the folder where MediaWiki is installed, even if you don't download from git.

Make sure you follow the full instructions for enabling or disabling StructuredDiscussions, including the scripts mentioned there.

依赖

 * 必需
 * - 用于通知（例如回复您的帖子）
 * It is required to have an object cache. It is recommended that you use memcached for this.  You may encounter problems with Redis currently.
 * - for the templates that are automatically installed (e.g. #time)
 * Required for Special:EnableStructuredDiscussions and to avoid corruption if you change the content model of namespaces (towards or away from StructuredDiscussions) if there are already pages in that namespace.


 * 强烈推荐

This is how WMF wikis are configured, and hence is the most tested configuration by far. If you use MediaWiki-Vagrant, enabling StructuredDiscussions enables Parsoid and sets the format to 'html'.
 * Parsoid for the option to store posts as HTML which improves performance.


 * 可选


 * - if you want to use the opt-in beta feature for user talk.
 * - for human-friendly timestamps such as "3 days ago"
 * - 用于可视编辑器支持（）
 * bug? if you have the VisualEditor present (e.g. perhaps to provide OOUI),then StructuredDiscussions will attempt to contact Parsoid even if VE is not enabled
 * StructuredDiscussions can integrate with, , and , see
 * StructuredDiscussions will integrate with if you have it installed.
 * - to "Thank" users for their posts
 * - for analytics



验证安装
Visit one of the pages you enabled for StructuredDiscussions (see ) and try adding a topic and editing its header.

升级
The variable, which enumerated StructuredDiscussions boards, was removed as part of. Before upgrading to 1.26 or later, run the maintenance scripts:

The first script was part of MediaWiki core until version 1.34. From 1.35 onward, it is no longer needed.

-{zh-hans:配置; zh-hant:組態;}-
这里有一些你需要在 中进行的设置.



启用或禁用结构式讨论
在1.35之前，要在MediaWiki的特定命名空间启用或禁用结构式讨论，首先在受影响的命名空间中运行（或者也可以在 中完成）. ‎从1.35开始，不再需要这样做. 例如，如果你需要在NS_TALK (1)和NS_USER_TALK (3)启用或禁用，如下面的PHP配置所示.

如果mwscript没有配置，将 替换成

再此之后，为特定的命名空间设置. 举个例子：

不要重新赋值全局（ ）.

要在单个页面启用，使用Special:EnableStructuredDiscussions. 这需要flow-create-board权限，该权限可以赋予任何用户组（参见手册:用户组权限#更改组权限）.

关于如何在您的wiki关闭所有的结构化讨论页面，参见.



Parsoid配置
StructuredDiscussions uses the Virtual REST Service to contact a Parsoid or RESTBase service. If your wiki loads the extension, then you've probably already set this up. Look for the following in your :

A single Parsoid server can handle multiple wikis. The Parsoid  setting identifies your wiki configuration to Parsoid. By default it is set to the hostname named by, but you can pick an arbitrary string. Older versions of Parsoid also used a unique "prefix" to identify the server; you may need to list that here as well.

Parsoid must have been configured to match, using a line in Parsoid's  like:

Again, the "domain" property is optional in the Parsoid configuration; it defaults to the hostname used in the  property if not specified. The "prefix" property can also be omitted unless you are running an older version of Parsoid. Make sure the  and   listed in Parsoid's   match what's in your wiki's.

See Parsoid/Setup#Configuration for more details.



“达到最大功能嵌套级别'100'，正在中止”
如果您遇到此错误，需要设置 ，通常在 .中



“捕获到的异常：Xyz中未实现CAS”
StructuredDiscussions invokes and some cache implementations including   (APCBagOStuff) don't implement CAS. You probably need to use a different cache, for example install memcached and set.

权限
Users must have the core  permission to perform any write action in StructuredDiscussions. Many wikis only grant this permission to the 'user' (logged-in) group.

StructuredDiscussions defines many actions such as  and   (see the list in ). The permissions vary depending on whether the post is your own and whether it has been moderated. For example, by default users can edit their own posts, but only users in the 'sysop' group have the  permission to edit anyone's post. You can override which groups have which permissions and what permissions are required for each Flow action; see for an overview of permissions.



迁移现有页面
To migrate a single existing page, use Special:EnableStructuredDiscussions. It will handle archiving of a single page (then enabling StructuredDiscussions) automatically.

The script  automates this namespace conversion and archiving, see Flow/Converting talk pages. It is somewhat WMF-specific, so evaluate its operation and backup your database before running it. Another script  converts LiquidThreads pages and their threads to Flow boards and topics, see Flow/Converting LiquidThreads. Similar caveats apply.

Flow adds a Topic: namespace, see Extension default namespaces. You can visit Special:PrefixIndex/Topic: to see if there are existing pages that conflict with this; if so run the maintenance script.

配置


系统消息
Using the "Source editing" option on StructuredDiscussions boards makes visible the help text. The "uses markup" part is linked through the system message MediaWiki:Flow-wikitext-editor-help-uses-wikitext which makes use of an interwiki link to MediaWiki.org.

In some cases, this interwiki link, instead of pointing to on MediaWiki.org, points to a (usually non-existent) Help:Formatting page on the host Wiki. This can be corrected by changing the interwiki link on MediaWiki:Flow-wikitext-editor-help-uses-wikitext to an external link such as.

故障排除
Not getting Flow as expected? There are different fixes, depending on the source of the problem:



错误的自定义名字空间声明顺序
The Flow declares must go after the declare for a custom namespace. Correct order is:



错误的本机常数
Talk pages in the Main namespace are defined as, not

The correct declaration is:

$wgNamespaceContentModels[NS_TALK] = 'flow-board';



未注册的扩展常数
namespace constant is supposed to be. But that constant does not work in the Flow declare-- you must use the actual number: 107. This works:

$wgNamespaceContentModels[107] = 'flow-board';

It's unknown to this author whether Page_Forms failed to register its constants correctly, or whether all extension must use numbers (not constants) with Flow. See list of some other extension namespace constants.



旧残留物
If you're correctly getting Flow on all talk-pages in a namespace, except for one page in that namespace, there may be remnant junk in the talk page (even if it appears empty). Do the following:


 * 1) Browse to the talk page that won't load Flow, e.g.: Portal_Talk:Welcome
 * 2) Delete the Talk page using the Delete tab.
 * 3) Go to the content page for that talk page, e.g.: Portal:Welcome
 * 4) Click Discuss.
 * 5) You get Flow.

架构
参见Flow/Architecture

垃圾内容
See for more information on how to fight spam in Flow.

審核
关于在Flow中审核的更多信息，参见.



导入导出
There is maintenance script to export Flow data similar to Manual:DumpBackup.php

- gives some hints about the import.