Wikivvig

WikiFarms are a mechanism for running multiple independent wikis on the same web server from a single PmWiki installation.
If a WikiFarm is a collection of independent wikis, then each independent wiki in the farm is commonly called a WikiField.
A person who manages the PmWiki software installation is commonly called a farm administrator, the location of the PmWiki software is called the "farm directory" and any administrators of individual fields are called field administrators.
Each field must have its own base URL, but can share pages and WikiGroups?, uploads, page templates, passwords, and other local customizations? with other fields.
For a quick explanation of what goes where and what it controls, see PmWiki:QuickFarms.

WikiFarmsは単一のPm Wikiインストール場所から多数の独立したWikiを動かす為のメカニズムです。
Wiki Farmが独立したWikiのコレクションなら, ファームの各Wikiは一般に WikiField と呼ばれます。
個々のfieldの管理者はフィールド管理者と呼ばれるますが, PmWikiのインストールを管理する人は、一般にファーム管理者と呼ばれます。
フィールドは自身の基準URL、ページセット、Wikiグループ、添付, ページテンプレート, パスワード, 及び他のローカルカスタマイズを有することができます。 簡単な説明と設定については、PmWiki:QuickFarmsを参照してください。(?)

The remainder of this document describes how to setup WikiFarms and individual fields of the farm, and assumes you are already somewhat familiar with the details of PmWiki installation?.

この文書の残りはWikiFarmsとファームの各フィールドのセットアップ方法を説明するが、 すでに設置されたPmWikiの詳細を良く知っていることを前提とする。

Any PmWiki installation can become the WikiFarm on a particular web server.

設置された、どのPmWikiも特定のWebサーバのWikiFarmに出来る。

Setting up a WikiFarm (farm administrator)

WikiFarmのセットアップ(ファーム管理者)

Setting up a PmWiki installation to act as a WikiFarm is fairly straightforward.
The farm administrator simply creates a local/farmconfig.php file in the farm's "home directory" (the directory in which pmwiki.php is installed).
This file would contain any local customizations? that are to be performed for every field in the farm (farmconfig.php replaces the config.php file of a typical installation).
Usually, this will mean setting $FarmPubDirUrl to reasonable settings for the new field.
A minimal farmconfig.php file might look like this:

設置されたPmWikiをWikiFarmとして機能させるセットアップは、とても簡単です。
ファーム管理者は単に、ファームの"ホームディレクトリ"(pmwiki.phpがインストールされている)にlocal/famconfig.phpを作成します。
このファイルは、ファームに含まれる全てのフィールドに有効とするローカルカスタマイズが含まれているべきです(famconfig.phpは通常の設定ファイルであるconfig.phpを置き換えます)
通常、これが新たなフィールドを設定する為に便利な$FarmPubDirUrlを設定することを意味します。
最小のfarmconfig.phpは、このように見えるでしょう。

    <?php if (!defined('PmWiki')) exit();
      $FarmPubDirUrl = 'http://www.example.com/pmwiki/pub';

$FarmPubDirUrl is used to provide fields with the URL location of the farm's pub/ directory.

$FarmPubDirUrlはフィールドに、ファームpub/ディレクトリ(公開ディレクトリ)を与えるために使用される。

Note: Depending on your setup, you may want to choose to install the main farm script (i.e. pmwiki.php) in a non-web-server-accessible location.
If you don't, or can't, you may want to control access using .htaccess. See Cookbook:FarmSecurity for more info.

注)セットアップ要件によっては、主要なFarmスクリプト(つまりpmwiki.php)をWebサーバの非アクセス領域に設置したいでしょう。もし.htaccessで設定できなければ、詳細はCookbook:FarmSecurityを参照してください。

Your PmWiki installation is now set up for farming.
Now you need to create fields to see it in action.

今、PmWikiはファーミングの為にセットアップされています。さっそく動作を見るためにフィールドを作ってみましょう。

Setting up a field within the WikiFarm (field administrator)

WikiFarmのフィールドセットアップ(フィールド管理者)

Once PmWiki has been set up for WikiFarming, a new field is created by doing the following:

一度、PmWikiはWikiFarmingをセットアップするために、以下の手順で新しいフィールドを作成します。

1. Create a directory to hold the field. Normally the field directory goes in a web-accessible directory (e.g., under public_html), but it can be placed anywhere that a PmWiki installation would normally go. This could be a directory outside or inside the farm's home-directory.

1. フィールドを格納する為のディレクトリを作成します。 普通、フィールドディレクトリはWebアクセス可能とされます(例えばpublic_html以下)が、PmWiki設置場所のどこかに置いても、正常に動作します。 ファームのホームディレクトリの内側でも外側でも可能です。

2. Create a PHP script (e.g., field.php) in the field directory with the following line

2. フィールドディレクトリに下記のPHPスクリプト(例えばfield.php)を作成しなさい

    <?php include('path/to/pmwiki.php'); ?>

where path/to/pmwiki.php is the file path to the farm's installation of PmWiki.

path/to/pmwiki.php はPmWikiファームの設置場所のパスです。

Either an absolute file path (/home/username/pmwiki/pmwiki.php) or relative file path (../pmwiki/pmwiki.php) will usually work, although PHP doesn't understand ~username in file paths. Do not use a url path, i.e., there shouldn't be an 'http://' in it anywhere.

PHPは ~usenameパスを解釈しないが、絶対パス(/home/username/pmwiki/pmwiki.php)でも 相対パス(../pmwiki/pmwiki.php)でも通常は動作する。 URLパスは使用しない、つまり、'http://'にするべきではない。

Note that it's not sufficient to use symbolic links or file shortcuts to connect to the farm installation of pmwiki.php; one has to use an include statement in order for PmWiki to be able to correctly determine the location of the farm's scripts/ and other directories.

注)pmwiki.phpの設置場所へ接続する為に、シンボリックリンクやファイルショートカットを使用するのは十分でないことに注意してください。PmWikiがファームスクリプトと他のディレクトリの場所を正しく決定できる、include構文でなければならない

3. Change the field's directory permissions to 777.

3. フィールドディレクトリのパーミッションを777に変えてください。

4. Open a web browser and execute the field.php script you created in step #2. This will create the needed directories for the field and should bring up a default PmWiki installation (with any default settings the farm administrator may have set).

4. Webブラウザを開いて、手順2.で作成したfield.phpスクリプトを実行してください。 これはフィールドに必要なディレクトリを作成し、デフォルトのPmWikiインストールを持ち出すでしょう(デフォルト設定はファーム管理者が設定するかも)

Local customizations in fields and farms

ファームとフィールドのローカルカスタマイズ

Each field administrator can create a local/ directory within the field directory for local customization? to be applied to the field. This works just like a normal PmWiki installation--the file local/config.php holds settings for the entire field, and files of the form local/Group.php and local/Group.PageName.php are used for per-group and per-page customizations (see PerGroupCustomizations).

フィールド管理者はローカルカスタマイズをフィールドに適用する為、フィールドディレクトリにlocal/ディレクトリを作成できる。 通常のPmWikiインストールのように適用することが出来る--local/config.php ファイルは全フィールドの設定を掌握し、 local/Group.phplocal/Group.PageName.php ファイルはグループごと、ページごとのカスタマイズに使われます。(グループカスタマイズを参照)

The PmWiki variable $FarmD points to the "home directory" for the PmWiki farm installation; thus a field administrator can use $FarmD/scripts/ and $FarmD/pub/ to refer to the farm's scripts/ and pub/ directories.

PmWiki変数$FarmDはPmWikiインストールのホームディレクトリを示します。 よって、フィールド管理者はファームのscripts/pub/ ディレクトリを参照する為に $FarmD/scripts/$FarmD/pub/ を使用できます。

A farm administrator can use the local/farmconfig.php file for customizations to be applied to all fields within the farm.

 By default, farm customizations are performed before any field-customization files; 

however, the farm administrator can override some field-customizations by explicitly calling the field's config.php files (this effects all fields), as in:

ファーム管理者はlocal/farmconfig.phpファームに含まれる全てのフィールドに有効とするカスタマイズに使用できます。 デフォルトでは、ファームカスタマイズファイルは、任意のフィールドカスタマイズファイルより先に働きます。 ただし、ファーム管理者はフィールドのconfig.phpを、明示的な呼び出しにより、フィールドカスタマイズを上書きすることが出来ます(これは全てのフィールドに影響します)

  <?php if (!defined('PmWiki')) exit();
    # Settings performed before field-customizations
    $FarmPubDirUrl = 'http://www.example.com/pmwiki/pub';
    $Skin = 'pmwiki-farm';

    # load the field's global and per-group customizations
    include_once('local/config.php');
    include_once('local/pgcust.php');

    # Override field customizations here
    $EnableUpload = 0;            # disable uploads
  ?>

If extension scripts are used farm-wide and they are located in the farm's cookbook directory they should be loaded through entries in local/farmconfig.php like:
include_once("$FarmD/cookbook/scriptname.php");
similar includes can be done in any field's local/config.php file. Note the double quotes "..."; single quotes do not work.

拡張スクリプトが全ファームで使われ、それらがファームのcookbookディレクトリに配置されているならば、local/farmconfig.phpのエントリを通じてロードされるべきです。

   include_once("$FarmD/cookbook/scriptname.php");
どのフィールドのlocal/config.phpでも同じように含めることが出来ます。

2重引用符 "..." であることに注意してください、単一引用符では動作しません。

Notes

  • Field directories can also contain local pub/ (for installing any custom skins for the field for instance) and uploads/ directories.

A per-field uploads/ directory will normally be created in the field directory if uploads are enabled (see UploadsAdmin?).

  • フィールドディレクトリはpub/ディレクトリ(フィールド毎のカスタムスキンを設置するため)やuploads/ディレクトリを含めることが出来ます。

通常、アップロードが有効にされれば(アップロードを参照)、フィールド毎のuploads/ディレクトリがフィールドディレクトリ内に生成されます。

  • Pages distributed with PmWiki (e.g., documentation) are automatically shared among all fields in a farm. This is controlled through the $WikiLibDirs variable, which defaults to looking in the farm's copy of wikilib.d/.
  • PmWikiで配布されるページ(例えばドキュメント)は、ファーム内の全てのフィールドで自動的に共有されます。

これは$WikiLibDirs変数によって制御され、ファームのwikilib.d/のコピーを捜すことを放棄します。

  • Other pages can be shared by multiple fields in a farm, see Cookbook:SharedPages.
  • ファームの複数フィールドで他のページを共有することが出来ます。 Cookbook:SharedPages.を参照してください。
  • The file farmmap.txt in the farm's local/ directory can be used to provide farm-wide InterMap links. This may be useful for creating links to pages in other fields of the farm.
  • ファームのlocalディレクトリのfarmmap.txtをファーム全域のInterMapリンクとして提供できます。

これは他のフィールドのページへのリンクを生成するのに便利でしょう。

  • In general, fields can be created and administered from user accounts other than the one maintaining the farm if the underlying operating system permissions and PHP configuration settings allow it. PHP's default configuration normally allows this, but some system administrators and web hosting services change the PHP configuration such that this is not possible.

一般的に、オペレーティングシステムのパーミッションとPHPの設定が許可していれば、 フィールドはユーザアカウントにより生成され、管理される。通常のPHPのデフォルト設定ではこれを許可しているが、システム管理者やWebホスティングサービスによっては、PHP設定でこれを不可にしている。

<< | DocumentationIndex? | >>