Manual:Huggle/Deploying/zh

在自定义安装的MediaWiki上安装huggle
huggle3可以被用于任何MediaWiki，但要记住它原本是为维基媒体基金会的维基网站制作的，而那可以认为是一个巨大的维基农场. 所以huggle主要是为大型维基农场设计的，因而要想让它在简单的小型维基上运行，你可能要稍作调整. 这篇向导介绍了在所有wiki上的安装.

Huggle首頁
这是huggle里一个叫做huggle首页的特殊文件夹. This folder is displayed by huggle in logs when it starts, for example:

Wed Feb 11 10:01:47 2015  Home: /home/petanb/.local/share/data/Wikimedia/Huggle/

This folder contains all configuration files of huggle and we will refer to it as $huggle_home in this manual. It is possible to have multiple homes in order to create a number of separate huggle installations that are running isolated from each other by passing argument --chroot. If you want to use huggle with WMF wikis and your own wiki farm, it is recommended to create 2 homes for it. If you only want to use huggle for 1 wiki farm, you can ignore this.

全域wiki
Since huggle is designed to run on wiki farms, it requires 1 wiki that is called "global wiki" this wiki contains global configuration file that has the information about individual wikis. In case you have only 1 wiki, you will need to make it a global wiki as well, so that you will have both global and local configuration file there.

配置文件
参见

huggle按以下顺序使用4个配置文件：


 * $huggle_home/Configuration/huggle3.xml Local configuration on pc where it is installed - this file contains URL of global wiki
 * Huggle/Config Global configuration on global wiki which contains information about local wikis
 * Project:Huggle/Config Local configuration on wiki to which you login
 * User:$NAME/huggle3.css User configuration on local wiki

Step by step deployment on 3rd wiki farm
In this scenario we have a wiki farm with 4 wikis on domains:


 * meta.testfarm.wmflabs.org
 * wiki1.testfarm.wmflabs.org
 * wiki2.testfarm.wmflabs.org
 * wiki3.testfarm.wmflabs.org

On meta.testfarm.wmflabs.org/wiki/Huggle/Configuration we need to have following content:

enable-all:true

version:3.1.0 min-version:3.1.0

config:Project:Huggle/Config documentation:https://www.mediawiki.org/wiki/Manual:Huggle feedback:https://en.wikipedia.org/wiki/Wikipedia:Huggle/Feedback // Only if you have irc recent change stream for your wikis - this is optional // irc-server:irc.wikimedia.org // irc-server-name:irc.wikimedia.org

user-agent:Huggle/$1 http://en.wikipedia.org/wiki/Wikipedia:Huggle user-config:Special:Mypage/huggle.css user-config-hg3:Special:Mypage/huggle3.css

// URL of your whitelist server, if you don't have any, keep this commented out // whitelist-server:http://huggle.wmflabs.org/data/

In Project:Huggle/List put

Important xmlrcs_name is name of your wiki as seen by XmlRcs provider, if you don't have this provider, you can remove it from XML entry. Same applies for wl (whitelist id).

Now on each of these 3 wikis, you put this in Project:Huggle/Config

Now all you need is update the huggle local configuration, open $huggle_home/Configuration/huggle3.xml and change



to



Now you can start huggle and hit reload button. It should load a list of local wikis. Since now you should be able to use huggle on your wikis.

Note: If your wiki doesn't support HTTPS you must not check it on login form