aboutsummaryrefslogtreecommitdiff
path: root/wikilib.d/PmWiki.WikiFarms
diff options
context:
space:
mode:
authorpmichaud <pmichaud@524c5546-5005-0410-9a3e-e25e191bd360>2005-08-31 20:44:38 +0000
committerpmichaud <pmichaud@524c5546-5005-0410-9a3e-e25e191bd360>2005-08-31 20:44:38 +0000
commit6b0815a1a7bd0fd089a04b5927fc05c96805f59b (patch)
tree80fa86527958af5bd347b36f6228097bce9a512f /wikilib.d/PmWiki.WikiFarms
parentc48bc92ab5ea4675638a3c6e1c509e8598f50d10 (diff)
downloadpmwiki.svn-6b0815a1a7bd0fd089a04b5927fc05c96805f59b.tar.bz2
*** empty log message ***
git-svn-id: svn://pmwiki.org/trunk/pmwiki@781 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'wikilib.d/PmWiki.WikiFarms')
-rw-r--r--wikilib.d/PmWiki.WikiFarms13
1 files changed, 6 insertions, 7 deletions
diff --git a/wikilib.d/PmWiki.WikiFarms b/wikilib.d/PmWiki.WikiFarms
index 321f3dfa..1033eb79 100644
--- a/wikilib.d/PmWiki.WikiFarms
+++ b/wikilib.d/PmWiki.WikiFarms
@@ -1,10 +1,9 @@
-version=pmwiki-2.0.beta44 ordered=1
-newline=²
-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
+version=pmwiki-2.0.beta55 ordered=1 urlencoded=1
+agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
author=Pm
host=24.1.26.255
name=PmWiki.WikiFarms
-rev=43
-targets=Category.DocumentationToDo,PmWiki.WikiFarms,PmWiki.WikiGroups,PmWiki.LocalCustomizations,PmWiki.QuickFarms,PmWiki.PmWiki,PmWiki.Installation,Cookbook.FarmSecurity,PmWiki.PerGroupCustomizations,PmWiki.UploadsAdmin,PmWiki.InterMap,PmWiki.WikiArchitecture,PmWiki.DocumentationIndex,PmWiki.Troubleshooting
-text=[[!Documentation ToDo]] -- clean up out-of-date information, add note that include needs a filesystem path and not a url²²[[WikiFarms]] are a mechanism for running multiple independent wikis from a single PmWiki installation. If a `WikiFarm is a collection of independent wikis, then each wiki in the farm is commonly called a ''`WikiField''. A person who manages the PmWiki software installation is commonly called a ''farm administrator'', while any administrators of individual fields are called ''field administrators''. Each field must have its own base URL, but could [[Cookbook:UseCommonPagesInAWikiFarm|share pages]] and [[Wiki Groups]], uploads, page templates, passwords, and other [[local customizations]] with other fields. For a quick explanation of what goes where and what it controls, see [[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]].²²!!!Setting up a `WikiFarm (farm administrator)²²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) with 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:²² <?php² $FarmPubDirUrl = [='http://www.example.com/pmwiki/pub'=];² ?>²²$FarmPubDirUrl is used to provide fields with the URL location of the farm's ''pub/'' directory.²²->%red%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. --Peter M²²That's all there is to it--your PmWiki installation is now set up for farming!²²!!!Setting up a field within the `WikiFarm (field administrator)²²Once PmWiki has been set up for `WikiFarming, a new field is created by doing the following:²²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 ouside or inside the farm's home-directory.²²2. Create a PHP script (e.g., ''field.php'') in the field directory with the following line²² <?php include([='=]''path/to/pmwiki.php'''); ?>²²where ''path/to/pmwiki.php'' is the file path to the farm's installation of 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. ²²->%note% 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.²²3. Change the field's directory permissions to 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).²²²!!!Local customizations in fields and farms²²Each field administrator can create a ''local/'' directory within the field directory for [[local customization(s)]] 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).²²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.²²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:²² <?php² # 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.²²!!!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]]).²²* 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/''.²²* 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.²²* 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.²²%trail% <<|[[DocumentationIndex]]|>>
-time=1121014090
+rev=46
+targets=PmWiki.WikiFarms,PmWiki.WikiGroups,PmWiki.LocalCustomizations,PmWiki.QuickFarms,PmWiki.PmWiki,PmWiki.Installation,Cookbook.FarmSecurity,PmWiki.PerGroupCustomizations,PmWiki.UploadsAdmin,PmWiki.InterMap,PmWiki.WikiCascades,PmWiki.DocumentationIndex,PmWiki.Troubleshooting
+text=%25audience%25 administrators (intermediate)%0a%0a[[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 could [[Cookbook:UseCommonPagesInAWikiFarm|share pages]] and [[Wiki Groups]], uploads, page templates, passwords, and other [[local customizations]] with other fields. For a quick explanation of what goes where and what it controls, see [[QuickFarms]].%0a%0aThe 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]].%0a%0aAny PmWiki [[installation]] can become the `WikiFarm on a particular web server.%0a%0a!!!Setting up a `WikiFarm (farm administrator)%0a%0aSetting 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:%0a%0a %3c?php%0a $FarmPubDirUrl = [='http://www.example.com/pmwiki/pub'=];%0a ?>%0a%0a$FarmPubDirUrl is used to provide fields with the URL location of the farm's ''pub/'' directory.%0a%0a->%25red%25Note: 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. --Peter M%0a%0aYour PmWiki installation is now set up for farming. Now you need to create fields to see it in action.%0a%0a!!!Setting up a field within the `WikiFarm (field administrator)%0a%0aOnce PmWiki has been set up for `WikiFarming, a new field is created by doing the following:%0a%0a1. 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 ouside or inside the farm's home-directory.%0a%0a2. Create a PHP script (e.g., ''field.php'') in the field directory with the following line%0a%0a %3c?php include([='=]''path/to/pmwiki.php'''); ?>%0a%0awhere ''path/to/pmwiki.php'' is the file path to the farm's installation of 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. %0a%0a->%25note%25 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.%0a%0a3. Change the field's directory permissions to 777.%0a%0a4. 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).%0a%0a%0a!!!Local customizations in fields and farms%0a%0aEach field administrator can create a ''local/'' directory within the field directory for [[local customization(s)]] 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).%0a%0aThe 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.%0a%0aA 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:%0a%0a %3c?php%0a # Settings performed before field-customizations%0a $FarmPubDirUrl = 'http://www.example.com/pmwiki/pub';%0a $Skin = 'pmwiki-farm';%0a%0a # load the field's global and per-group customizations%0a include_once('local/config.php');%0a include_once('local/pgcust.php');%0a%0a # Override field customizations here%0a $EnableUpload = 0; # disable uploads%0a ?>%0a%0aIf 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:\\%0a [@include_once("$FarmD/cookbook/scriptname.php");@]\\%0asimilar includes can be done in any field's local/config.php file. Note the double quotes "..."; single quotes do not work.%0a%0a!!!Notes%0a%0a* 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]]).%0a%0a* 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/''.%0a%0a* 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.%0a%0a* 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.%0a%0a%25trail%25 %3c%3c|[[DocumentationIndex]]|>>%0a%0a
+time=1125520810