DokuWiki

It's better when it's simple

用户工具

站点工具


zh:config

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
zh:config [2016-04-25 17:37] – 已恢复为旧版 (2016-04-08 11:35) achzh:config [2023-02-16 03:10] (当前版本) – 已恢复为旧版 (2021-05-17 14:57) yzqzss
行 1: 行 1:
 ====== 配置 DokuWiki ======  ====== 配置 DokuWiki ====== 
  
-许多 DokuWiki 功能可以通过配置不同的配置选项,最简单的方法是使用 [[plugin:config|配置管理器]] 来修改这些选项 Wiki管理员能用自己喜欢的网页浏览器轻松在线更改配置选项。+许多 DokuWiki 功能可以通过配置不同的选项值来实现,最简单的方法是使用[[plugin:config|配置管理器]]来修改这些选项值,Wiki 管理员能用自己喜欢的网页浏览器轻松在线更改配置选项。
  
-请用超级用户身份登录后点击 **管理** 按钮。+请用超级用户身份登录后点击**管理**按钮来启用[[plugin:config|配置管理器]]
  
  
-===== 那些能被配置? =====+===== 配置项目有哪些 =====
  
-DokuWiki 的“系统” 配置可以在文件 ''conf/dokuwiki.php''找到。然而这个文件只包含系统“缺省”设置。你可以通过编辑 ''conf/local.php'' 文件来修改相关配置如果文件不存在,你也可以自己创建。  你可以通过下面的 [[#可用选项]] 中的列表来查找出除了这些文件以外的配置选项+DokuWiki 的“系统” 配置在文件 ''conf/dokuwiki.php''然而这个文件只包含系统“默认”设置。如果想要定制相关项目,你可以通过编辑 ''conf/local.php'' 文件来修改相关配置值(如果文件不存在,创建该文件)在该文件中修改相关配置值,[[#可用选项]]参见下面说明
  
-用户账号,(认证)密码和访问控制规则都包含在文件[[acl|users.auth.php and acl.auth.php]]中。+用户账号,(加密)密码和访问控制规则都包含在文件[[acl|users.auth.php 和 acl.auth.php]]中。
  
-当通过媒体管理器上传一个新文件,可能出现 ''"上传失败。该扩展名被禁止!"'' 的提示。这是由 ''conf/mime.conf'' 文件来控制扩展名的。要想上传其他格式文件,可以在 [[mime|mime.conf]] 文件中指定。+当通过媒体管理器上传一个新文件时,可能出现 ''"上传失败。该扩展名不符合要求(被禁止!"''的提示。这是由 ''conf/mime.conf'' 文件来控制扩展名的。要想上传格式文件,需要先在 [[mime|mime.conf]] 文件中指定。
  
- +当你编辑页面的时候会有自动转换功能。例如生成工具提示笑脸表情或者特殊字符,这些功能都是由 [[abbreviations|acronyms.conf]][[smileys|smileys.conf]] 和 [[entities|entities.conf]] 文件控制的
-当你修改页面的时候会有自动保全功能。生成工具提示笑脸表情或者特殊字符,这些行为都是由 [[abbreviations|acronyms.conf]][[smileys|smileys.conf]] 和 [[entities|entities.conf]] 文件约束+
  
 ===== 配置文件 ===== ===== 配置文件 =====
  
-所有的配置文件都可以在 ''./conf'' 目录中找到,如果通过Debian package安装的话,配置文件目录是 ''/etc/dokuwiki''+所有的配置文件都可以在 ''./conf'' 目录中找到,如果通过 Debian package 安装的话,配置文件目录是 ''/etc/dokuwiki'' 
 + 
 +"主体文件" 通常由 DokuWiki 管理, 然而 "本地文件" 必须由维基管理员创建。  
 + 
 +如果可以使用本地文件,你应该尽量使用本地文件而不是修改主体文件以避免升级出现问题。 
 + 
 +^主体文件           ^本地文件                ^配置类型                 ^ 简介^ 
 +| ''dokuwiki.php''          | ''local.php''\\ ''local.protected.php''            | 见后面                 | 常用 Wiki 配置信息                       | 
 +| ''acronyms.conf''         | ''acronyms.local.conf''                            | [[abbreviations|简写]]  自动简写提示                  | 
 +| ''entities.conf''         | ''entities.local.conf''                            | [[entities|实体]]     | 自动文本转换                  | 
 +| ''interwiki.conf''        | ''interwiki.local.conf''                           | [[interwiki|WIKI 链接]]     | 维基间链接简写              | 
 +| ''mime.conf''             | ''mime.local.conf''                                | [[mime|媒体数据类型]]              | 上传数据类型设置             | 
 +| ''smileys.conf''          | ''smileys.local.conf''                             | [[smileys|笑脸]]           | 图象转换                   | 
 +|                           | ''acl.auth.php''                                   | 查看[[acl|权限控制]]           | 权限控制设置                | 
 +|                           | ''users.auth.php''                                 | 查看[[acl|权限控制]]           | 用户和密码                  | 
 +| ''license.php''           | ''license.local.php''                              | [[config:license|授权协议]]| 可提供协议清单           | 
 +| ''scheme.conf''           | ''scheme.local.conf''                              | [[urlschemes]]        | URL链接可识别模式             | 
 +| ''mediameta.php''         | ''mediameta.local.php''                            | [[exif]]              | 图像可编辑元数据               | 
 +| ''wordblock.conf''        | ''wordblock.local.conf''                           | [[blacklist|黑名单]]         | 垃圾信息黑名单              | 
 +| ''plugins.required.php''  | ''plugins.local.php''\\ ''plugins.protected.php''  | 查看后面             | 启用/关闭插件                 | 
 +|                           | ''userscript.js''                                  | [[devel:javascript]]  | 定制 JavaScript 增强         | 
 +|                           | ''userstyle.css''                                  | [[devel:css]]         | 定制 CSS 增强                | 
 +| ''manifest.json''         | ''manifest.local.json''                            | [[devel:manifest]]    | PWA 清单                     |
  
-"主文件" 通常由 DokuWiki 管理, 然而 "局部文件" 必须由 wiki管理员创建.  
  
-如果本地文件支持,你应该直接使用而不是修改主文件以避免升级错误。+==== 题配置文件 ====
  
-^主文件           ^局部文件                ^配置类型                 ^ 简要信息^ +附加配置文件在 ''/var/lib/dokuwiki/lib/tpl/dokuwiki'' (Debian), 例如: ''[[devel:style.ini]]''。 Style.ini 是默认主题读取的文本文件,用户可以通过该文件定制主题,例如 background-color。
-|''dokuwiki.php''    |''local.php''\\ ''local.protected.php''|see below    | general wiki configuration | +
-|''acronyms.conf''   |''acronyms.local.conf''   |[[abbreviations]]         | automatic abbreviation hints | +
-|''entities.conf''   |''entities.local.conf''   |[[entities]]              | automatic text replacements | +
-|''interwiki.conf''  |''interwiki.local.conf''  |[[interwiki]]             | interwiki shortcut links | +
-|''mime.conf''       |''mime.local.conf''       |[[mime]]                  | mime type settings for uploads | +
-|''smileys.conf''    |''smileys.local.conf''    |[[smileys]]               | image replacements | +
-|                    |''acl.auth.php''          |参照 [[acl]]               | Access Control settings | +
-|                    |''users.auth.php''        |参照 [[acl]]               | Users and passwords | +
-|''license.php''     |''license.local.php''     |[[config:license]]        | list of available licenses | +
-|''scheme.conf''     |''scheme.local.conf''     |[[urlschemes]]            | URL schemes to be recognized as links | +
-|''mediameta.php''                            |[[exif]]                  | Metadata editable for images | +
-|''wordblock.conf''  |''wordblock.local.conf''  |[[blacklist]]             | Spam blacklist | +
-|''plugins.required.php'' |''plugins.local.php''\\ ''plugins.protected.php'' |see below      | Enabling/disabling plugins | +
-|                    |''userscript.js''         |[[devel:javascript]]      | Custom JavaScript enhancements | +
-|                    |''userstyle.css''         |[[devel:css]]             | Custom CSS enhancements |+
  
 ===== 启用/关闭 插件 ===== ===== 启用/关闭 插件 =====
  
-默认被安装的插件会被立即启用, 当然你可以试试 [[plugin:plugin|Plugin Manager]] ,她可以通过改写 ''plugins.local.php'' 文件来将其关闭。你可以将某些插件放置到''conf/plugins.protected.php''此来将其保护起来 。+安装的插件默认为启用当然你可以通过 [[plugin:extension|插件管理器]]关闭(该配置在 ''plugins.local.php'' 文件里)。你可以将某些插件放置到 ''conf/plugins.protected.php'' 以将其保护起来。
  
  
-DokuWiki 默认按照以下顺序加载她的配置文件:+DokuWiki 默认按照以下顺序加载配置文件:
  
-  - ''conf/plugins.php'' -- 默认插件 +  - ''conf/plugins.php'' -- 默认插件 
-  - ''conf/plugins.local.php'' -- 通过插件管理器更改 +  - ''conf/plugins.local.php'' -- 通过插件管理器更改的插件 
-  - ''conf/plugins.required.php'' -- 这些核心插件不能通过插件管理器控制 +  - ''conf/plugins.required.php'' -- 这些核心插件不插件管理器控制 
-  - ''conf/plugins.protected.php'' -- 其他文件里重新设+  - ''conf/plugins.protected.php'' -- 通过其他文件里进行了重置
  
-配置文件的加载顺序是通过全局变量 ''$config_cascade'' 控制,你可以通过修改 [[devel:preload|preload.php]] 改变其顺序 +配置文件的加载顺序是通过全局变量 ''$config_cascade'' 控制,你可以通过修改 [[devel:preload|preload.php]] 改变其顺序。
-===== Configuration Options =====+
  
-Most of [[DokuWiki]]'s features can be configured through various config options. The easiest way to modify these options is using the [[plugin:config|Configuration Manager]].+===== 配置选项 =====
  
-The available settings are listed below. Their default values are stored in a file called ''conf/dokuwiki.php''. If you want to modify a setting you should do this in a file called ''conf/local.php'' -- this makes sure your special configs are not overwritten by a later upgrade. The config manager will use this file as well.  The file ''conf/local.protected.php'' can be used for configuration settings which cannot be modified.+多数 [[DokuWiki]] 的功能都可通过配置选项来控制,最简单的方法就是利用[[plugin:config|配置管理器]]来控制。
  
-Here is a sample ''conf/local.php'':+可配置选项在后面列出。每个选项的默认值保存在 ''conf/dokuwiki.php'' 中。如果你修改了默认值,那么修改后的值会保存在 ''conf/local.php'' 中 -- 这样做是为了以后系统升级时不会覆盖掉用户的设置。配置管理器也是这样做的。文件 ''conf/local.protected.php'' 中保存的是不希望被修改的选项值。 
 + 
 +这是一个 ''conf/local.php'' 示例:
  
 <code php> <code php>
行 71: 行 77:
 </code> </code>
  
-Some notes about the config file. The file is a piece of PHP code so the PHP syntax has to be preserved. E.g. each line has to have a semicolon at the end. There are multiple types of variables:+关于配置文件需要知道:文件属于 PHP 类型文件,所以支持 PHP 语法。例如,每一行以分号结束。并且支持多种类型变量:
  
-  * **Number**s can be written as is. Example: ''9'' +  * **Number** 数字可用,例如:''9'' 
-  * **String**s have to be enclosed in single or double quotes. Example: ''%%'foo bar'%%'' +  * **String** 字符串需要使用单引号或者双引号引用。例如: ''%%'foo bar'%%'' 
-  * **Boolean**s can be either ''1'' or ''0'' +  * **Boolean** 布尔值可接受 ''1'' 或者 ''0'' 
-  * **Array**s contain multiple values of one of the above types+  * **Array** 数列可包含上述类型的多个值
  
  
-==== Available Options ====+==== 可用选项 ====
  
-  * **Basic Settings **+  * ** 基本设置 **
     * [[config:title]]     * [[config:title]]
     * [[config:startpage|start]]     * [[config:startpage|start]]
     * [[config:lang]]     * [[config:lang]]
     * [[config:template]]     * [[config:template]]
 +    * [[config:tagline]]
 +    * [[config:sidebar]]
     * [[config:license]]     * [[config:license]]
     * [[config:savedir]]     * [[config:savedir]]
     * [[config:basedir]]     * [[config:basedir]]
     * [[config:baseurl]]     * [[config:baseurl]]
 +    * [[config:cookiedir]]
     * [[config:dmode]]     * [[config:dmode]]
     * [[config:fmode]]     * [[config:fmode]]
     * [[config:allowdebug]]     * [[config:allowdebug]]
-  * **Display Settings**+  * ** 显示设置 **
     * [[config:recent]]     * [[config:recent]]
 +    * [[config:recent_days]]
     * [[config:breadcrumbs]]      * [[config:breadcrumbs]] 
     * [[config:youarehere]]     * [[config:youarehere]]
行 109: 行 119:
     * [[config:deaccent]]     * [[config:deaccent]]
     * [[config:useheading]]     * [[config:useheading]]
-    * [[config:refcheck]] +    * [[config:sneaky_index]] 
-    * [[config:refshow]] +    * [[config:hidepages]] 
-  * **Authentication Settings**+  * ** 验证设置 **
     * [[config:useacl]]     * [[config:useacl]]
     * [[config:autopasswd]]     * [[config:autopasswd]]
行 121: 行 131:
     * [[config:profileconfirm]]     * [[config:profileconfirm]]
     * [[config:rememberme]]     * [[config:rememberme]]
-    * [[config:registernotify]] 
     * [[config:disableactions]]     * [[config:disableactions]]
-    * [[config:sneaky_index]] 
     * [[config:auth_security_timeout]]     * [[config:auth_security_timeout]]
     * [[config:securecookie]]     * [[config:securecookie]]
-  * ** Anti-Spam Settings **+    [[config:remote]] 
 +    [[config:remoteuser]] 
 +  ** 反垃圾信息设置 **
     * [[config:usewordblock]]     * [[config:usewordblock]]
     * [[config:relnofollow]]     * [[config:relnofollow]]
行 132: 行 142:
     * [[config:mailguard]]     * [[config:mailguard]]
     * [[config:iexssprotect]]     * [[config:iexssprotect]]
-  * ** Editing Settings **+  * ** 编辑设置 **
     * [[config:usedraft]]     * [[config:usedraft]]
     * [[config:htmlok]]     * [[config:htmlok]]
     * [[config:phpok]]     * [[config:phpok]]
-    * [[config:notify]] 
-    * [[config:subscribers]] 
     * [[config:locktime]]     * [[config:locktime]]
     * [[config:cachetime]]     * [[config:cachetime]]
-  * ** Link Settings **+  * ** 链接设置 **
     * [[config:target|target (wiki, interwiki, extern, media, windows)]]     * [[config:target|target (wiki, interwiki, extern, media, windows)]]
-  * ** Media Settings **+  * ** 多媒体设置 ** 
 +    * [[config:mediarevisions]]
     * [[config:gdlib]]     * [[config:gdlib]]
     * [[config:im_convert]]     * [[config:im_convert]]
     * [[config:jpg_quality]]     * [[config:jpg_quality]]
     * [[config:fetchsize]]     * [[config:fetchsize]]
-  * ** Advanced options **+    [[config:refcheck]] 
 +  * ** 通知设置 ** 
 +    * [[config:subscribers]] 
 +    * [[config:subscribe_time]] 
 +    * [[config:notify]] 
 +    * [[config:registernotify]] 
 +    * [[config:mailfrom]] 
 +    * [[config:mailreturnpath]] 
 +    * [[config:mailprefix]] 
 +    * [[config:htmlmail]] 
 +  * ** 供稿设置 ** 
 +    * [[config:sitemap]] 
 +    * [[config:rss_type]] 
 +    * [[config:rss_linkto]] 
 +    * [[config:rss_content]] 
 +    * [[config:rss_media]] 
 +    * [[config:rss_update]] 
 +    * [[config:rss_show_summary]] 
 +    * [[config:rss_show_deleted]] 
 +  * ** 高级设置 **
     * [[config:updatecheck]]     * [[config:updatecheck]]
     * [[config:userewrite]]     * [[config:userewrite]]
行 155: 行 183:
     * [[config:fnencode]]     * [[config:fnencode]]
     * [[config:autoplural]]     * [[config:autoplural]]
-    * [[config:mailfrom]] 
     * [[config:compress]]     * [[config:compress]]
     * [[config:cssdatauri]]     * [[config:cssdatauri]]
     * [[config:gzip_output]]     * [[config:gzip_output]]
-    * [[config:hidepages]] 
     * [[config:send404]]     * [[config:send404]]
     * [[config:compression]]     * [[config:compression]]
-    * [[config:sitemap]] 
-    * [[config:rss_type]] 
-    * [[config:rss_linkto]] 
-    * [[config:rss_content]] 
-    * [[config:rss_update]] 
-    * [[config:recent_days]] 
-    * [[config:rss_show_summary]] 
     * [[config:broken_iua]]     * [[config:broken_iua]]
     * [[config:xsendfile]]     * [[config:xsendfile]]
-    * [[config:remote]] 
-    * [[config:remoteuser]] 
     * [[config:renderer_xhtml]]     * [[config:renderer_xhtml]]
     * [[config:readdircache]]     * [[config:readdircache]]
-  * ** Network Settings ** +    * [[config:search_nslimit]] 
-    * [[config:proxy|proxy (host, port, user, pass, ssl)]] +    * [[config:search_fragment]] 
-    * [[config:safemodehack]] +  * ** 网络设置 ** 
-    * [[config:ftp|ftp (host, port, user, pass, root)]]+    * [[config:dnslookups]] 
 +    * [[config:jquerycdn]] 
 +    * [[config:proxy|proxy (host, port, user, pass, ssl, except)]] 
 +    * [[config:trustedproxy]] 
 +    * [[config:safemodehack]] (removed since release 2020 Hogfather) 
 +    * [[config:ftp|ftp (host, port, user, pass, root)]] (removed since release 2020 Hogfather) 
 +  * ** 功能标志 ** 
 +    * [[config:defer_js]]
zh/config.1461598655.txt.gz · 最后更改: 2016-04-25 17:37 由 ach

除额外注明的地方外,本维基上的内容按下列许可协议发布: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki