[pmwiki-users] Config File organization

Dr Fred C drfredc at drfredc.com
Tue May 23 15:02:00 CDT 2006


After fooling around with the poorly organized distribution config files 
are too long, I came up with a simple organized format for config files 
that makes them much easier to deal with, especially for those new to 
pmwiki.   Customizations are categorized into specific areas of the 
config file so they are easy to work with.  IMHO, something similar 
ought to the standard config and/or farm config file in distributions.  
Just a thought... The one below is a farm config.  But the same 
organization applies to local config files.

-----------------
<?php if (!defined('PmWiki')) exit();
      $FarmPubDirUrl = 'http://www.example/pub';
      $WikiTitle = 'Example Farm Config';

## Farm Config holds any config customizations that apply across the 
whole farm.

#----------- farmwide configs start here

#------------  Browser config ---------------

$EnablePathInfo = 1;
$EnableIMSCaching = 1;                   # allow browser caching

#----------  Password and permissions info -----------------

$DefaultPasswords['admin'] = crypt('admin');
$DefaultPasswords['edit']=crypt('wikiuser');
$EnableUpload = 1;
$DefaultPasswords['upload'] = crypt('wikiuser');

# ------------------- skin config -------------

$Skin = 'dropdown';
include_once("$FarmD/cookbook/views.php");

# --------------------- wiki config --------------

$SpaceWikiWords = 1;                     # turn on WikiWord spacing
$LinkWikiWords = 1;                      # enable WikiWord links
$WikiWordCountMax = 1;                   # converts only first WikiWord
$WikiWordCount['PMWiki'] = 0;            # Disables PMWiki as WikiWord

# --------------------  GUI keys and stuff ----------

$EnableGUIButtons = 1; # Includes GUI buttons below.
include_once("$FarmD/cookbook/tabtable.php"); ## converts excel pastes 
to tables

##  The following lines make additional editing buttons appear in the
##  edit page for subheadings, lists, tables, etc.
$GUIButtons['h2'] = array(400, '\\n!! ', '\\n', '$[Heading]', 
'$GUIButtonDirUrlFmt/h2.gif"$[Heading]"');
$GUIButtons['h3'] = array(402, '\\n!!! ', '\\n', '$[Subheading]', 
'$GUIButtonDirUrlFmt/h3.gif"$[Subheading]"');
$GUIButtons['indent'] = array(500, '\\n->', '\\n', '$[Indented text]', 
'$GUIButtonDirUrlFmt/indent.gif"$[Indented text]"');
$GUIButtons['outdent'] = array(510, '\\n-<', '\\n', '$[Hanging indent]', 
'$GUIButtonDirUrlFmt/outdent.gif"$[Hanging indent]"');
$GUIButtons['ol'] = array(520, '\\n# ', '\\n', '$[Ordered 
list]','$GUIButtonDirUrlFmt/ol.gif"$[Ordered (numbered) list]"');
$GUIButtons['ul'] = array(530, '\\n* ', '\\n', '$[Unordered 
list]','$GUIButtonDirUrlFmt/ul.gif"$[Unordered (bullet) list]"');
$GUIButtons['hr'] = array(540, '\\n----\\n', '', '', 
'$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"');
$GUIButtons['table'] = array(600, '||border=1 width=80%\\n||!Hdr ||!Hdr 
||!Hdr ||\\n||     ||     ||     ||\\n||     ||     ||     ||\\n', '', 
'','$GUIButtonDirUrlFmt/table.gif"$[Table]"');

## -----------------  Cookbook stuff
# to properly work, the following Cookbook recipes must be properly 
installed Farms Cookbook folder.

## for pdf publishing & extensions add
## include_once("$FarmD/cookbook/wikipublisher/extensions.php");
## include_once("cookbook/wikipublisher/extensions.php");
## if  wikipublisher not used, may need to add various markup extensions 
below
include_once("$FarmD/cookbook/extendmarkup.php");
    include_once("$FarmD/cookbook/break_page.php");

include_once("$FarmD/cookbook/smileys.php");  ## adds smileys.  :) disabled
include_once("$FarmD/cookbook/includeurl.php"); ## allows portals of htm 
urls
include_once("$FarmD/cookbook/pmcal.php"); ## Calendar
include_once("$FarmD/cookbook/randomsection.php");  ## Random Banners

-------------

-- 
Always, Dr Fred Chittenden
drfredc at drfredc.com





More information about the pmwiki-users mailing list