zoukankan      html  css  js  c++  java
  • mediawiki 的使用

    首先,程序里会先加载 includes/DefaultSettings.php,然后再加载 LocalSettings.php,这样定义一些权限。其中 DefaultSettings.php 是默认的权限,里面的 visitors 表示所有用户(包括未注册用户), user 表示注册用户,sysop表示系统管理员。注意,必须先定义 all visitors 的权限,再定义其它组的权限,不然先定义的会被 all visitors 的定义覆盖。

    建议把未注册用户的权限从 DefaultSettings.php 拷贝到 LocalSettings.php里,然后全部禁用。对于注册用户的权限 DefaultSettings.php 文件里并不全面,因此可以考虑加入如下的delete等权限:

    自定义用户组就这么简单: 在LocalSettings.php里加入(user组是所有注册用户的组):

    # Start with assigning the default permissions from group "user"
    $wgGroupPermissions['minor_admin'] = $wgGroupPermissions['user']; # Now modify these rights: $wgGroupPermissions['user']['delete'] = false; $wgGroupPermissions['user']['protect'] = false; $wgGroupPermissions['user']['patrol'] = false; $wgGroupPermissions['user']['purge'] = false; # delete the cache of a page

    namespace就是所有同类型的文档组成的一个组,相当于group。User groups are simply standard wiki pages that are part of a namespace other than the default namespace。此句出自这里

    extensions:

    Where can I find a list of installed extensions?

    The Special:Version page on each wiki contains a list of extensions that have registered themselves with the MediaWiki software. All extensions can be installed without showing up onSpecial:Version, if the developer does not include the correct code to list it there.

    推荐的必装extension:

    Extension:AccessControl

    allows to restrict access to specific pages based on internal groups or group lists from user space. 可以定制让 “首页”等很多配置页面不被普通用户编辑等等。

    Extension:ConfirmEdit

    让你使用各种不同的验证码技术,来阻止Spam机器 和其他自动化工具来编辑你的wiki,并阻止自动化登录来猜密码。(阻止暴力破用户解密码)

    Extension:TopTenPages

    allows to display the most popular pages of the wiki on a page. 由于1.26版本(含)之后取消了 HitCounters,因此TopTenPages也不能使用了(依赖HitCounters)。注意,1.26之后的版本安装HitCounters后运行时会出错,但TopTenPages本身在运行时不会出错。

    Extension:CheckUser

    allows a user (with the checkuser permission) to check which IPs are used by a given username and which usernames are used by a given IP, without having to run queries directly against the database by hand. The extension is running live on all Wikimedia wikis.

    Extension:Chat

    adds a chat tab to every wiki article that switches to an embedded chatroom with the same name as the article title. It can be configured to have only one chatroom for the entire site, rather than one chatroom per article (the default). This extension usesPhpFreeChat.

    Extension:DiscussionThreading

    MediaWiki supports a discussion model called talk pages. These are regular wiki pages whose only distinction is that they are associated with a subject page. That is, these two types of pages are always linked to each other, a subject page and a talk page. Since talk pages are regular wiki pages, they suffer many usability shortcomings.

    Extension:VisualEditor

    create a reliable rich-text editor for the Web and for MediaWiki. More information can be found on the project page; this page is just about the VisualEditor-MediaWiki extension itself. The extension relies on the separate nodeJS-based Parsoid parser service to be up and running in order to edit pages.

    Parsoid: is an application which can translate back and forth, at runtime, between MediaWiki's wikitext syntax and an equivalent HTML/RDFa document model with enhanced support for automated processing and rich editing. It has been under development by a team at the Wikimedia Foundation since 2012. It is currently used extensively by VisualEditor, Flow, Content Translation and other applications.

    Extension:Mpdf

    MPdf seems to be the only backend to support UTF-8 character sets and TrueType fonts. It should be considered if you are using a non-English language wiki. It supports most styles and layouts although in testing, it had problems with floating of tables (in infoboxes for example). It also doesn't handle thumbnailed images perfectly.  也就是说 Mpdf 是唯一支持中文的extension。 它可能会依赖 Extension:PdfExport。

    Extension:PdfExport

    This extension lets you view wiki pages as PDF.

    Extension:Google Analytics Integration

    inserts Google Universal Analytics (and/or other web analytics) tracking code in every page viewed. Exclusion of specific pages, namespaces, special pages and all pages for specific groups of users is configurable.

  • 相关阅读:
    HTML5第二节
    HTML5在移动端开发的12大特性
    移动端开发遇到的坑
    html5 meta(移动端)介绍及使用
    CSS的margin塌陷(collapse)
    Block Demo
    设计模式之代理
    OC Block网上转载
    GCD之全局、主线程
    Spark SQL中 RDD 转换到 DataFrame
  • 原文地址:https://www.cnblogs.com/welhzh/p/5878200.html
Copyright © 2011-2022 走看看