PWP wiki processor

Configuration

TextRules . SimpleTextRules . Installation . Configuration
UserManual . FAQ . »find more online

 · Mapping config settings to variables
 · Application control
 · General HTML settings
 · Static HTML settings
 · Edit, Save, View pages
 · Calendar
 · File StaticHtml.inc
 · File Snippets.inc

This pages describes the settings in the file wiki/conf/config.inc and other config files within the same directory.

Mapping config settings to variables

For security reasons the config settings are not web editable. But if you feel some should, you can map a setting to a variable and enable "AllowEditConfig":

  1. Create a variable "DateFormat"
  2. Map the config setting to the variable:
    $this->mProp['DateFormat'] = $this->mVars['DateFormat'];

Be aware that variables can only contain strings. If you want to map a number, use a type cast:

$this->mProp['MinFileAge']     = (int)$this->mVars['MinFileAge'];
$this->mProp['UseGzipHandler'] = (bool)$this->mVars['UseGzipHandler'];

For arrays usa the PHP function "explode()".

Application control

UseGzipHandler

Compress HTML finally into a zip stream if the client signals support for this kind of communication (Mozilla/Firefox and MS IE will). May speed up internet based applications. May slow down internal applications if bandwidth does not matter.

Values: TRUE or FALSE
Sample: $this->mProp['UseGzipHandler'] = false;

UseCache

Removed in 1.5.0 PWP caches lists and search result but not Wiki pages.

AllowEditConfig

DANGER! Allows you to edit variables and InterWiki links in a web form. It means actually to change PHP code in your config file! Set this value to FALSE if you are running an open wiki.

Values: TRUE or FALSE
Sample: $this->mProp['AllowEditConfig'] = false;

UseJSLinks

JavaScript links will prevent search engine spiders from deleting your files by following the "erase" links. But people with user agents not supporting JavaScript won't be able to participate. Enable this option if you are running an open Wiki. The search engines will be able to follow the "view" links and to index your pages. Just the "maintenance" links will be composed of JavaScript.

Values: TRUE or FALSE
Sample: $this->mProp['UseJSLinks'] = false;

TextFileTypes

Affects the search in uploaded files. Which files are text files and shall become included in a full text search? Note: All files with a name matching one of the text file extensions are accepted: '.htm' matches 'web.html' and '.txt' matches 'my.txt.zip'.

Values: String, comma separated list of text file extensions
Sample: $this->mProp['TextFileTypes']	 = '.txt,.htm,.xml';

MinFileAge

Minimal age in days before history files and files from trash can be deleted physically. Prevents open Wikis from wipe out attacks.

Values: Integer (-1,0,N)
   0 clear the trash bin completely at any time
  -1 will keep all files forever
  30 will delete files which have been in trash for at least 30 days

Sample:$this->mProp['MinFileAge'] = 21;

DateFormat

String pattern for the date format in PWP. For more details see PHP documentation of date(). Default for ISO format: 'Y-m-d H:i:s'

Values: TEXT
  l = weekday
  Y = year 4 digits
  m = month 2 digits
  d = day of month, 2 digits
  H = hours, 2 digits
  i = minutes, 2 digits

Sample: $this->mProp['DateFormat'] = 'l, Y-m-d H:i';

MenuType

Now active in 1.5.0 Change the layout of the dynamic Wiki pages; doesn't affect the static pages.

Values: Integer
   1 Top&Bottom (standard)
   2 Left side only
   3 Right side only

Sample:$this->mProp['MenuType'] = 1;

Admins

New in 1.5.0 A comma separated list of all admin user names. The user name have to be provided in the variable 'REMOTE_USER' by the webserver. Most web servers will do so automatically.
A few actions like exporting static pages will required admin access if the corresponding config setting is not empty.

Values: Comma separated list of admin user names.

Sample: $this->mProp['Admins'] = '';  //feature disabled 
        $this->mProp['Admins'] = 'bill,george';

General HTML settings

These settings affect the (invisible) header of every HTML page. The title will show up in the title bar of the user agent window. The language setting is just an information for the user agent and for search engines.

HTML Header Settings

Sample: $this->mProp['HtmlTitle'] = 'PWP Wiki Processor';

Sample: $this->mProp['CommonDescription'] = "The PWP Wiki Processor.";

Sample: $this->mProp['CommonKeywords']	= "PWP, PHP, Wiki, WikiWiki, Community";

Values: Use two char ISO code: en, fr, de, dk, se, es, it, hu.
Sample: $this->mProp['Language'] = "fr";

LogoImg

Which logo should be at the top of the page? You have to provide a complete HTML img tag. Use a relative path (without http://webserver) - otherwise the logo might not be found on your static pages.

Values: A whole HTML image tag - or even more HTML.
Sample: $this->mProp['LogoImg'] = "<img src='../img/wiki.jpg' alt='PWP wiki'>";

StyleSheets

Web path and name of the style sheet(s). You can include more than one style sheet. The settings of a later included style sheet will override similar settings of previously included style sheets.

Values:
   old style: <link rel='STYLESHEET' type='text/css' href='fileName'>
   new style: <style type="text/css">@import url(../css/standard.css);</style>;

Sample: this->mProp['StyleSheets'] 
        = '<style type="text/css">@import url(../my.css);</style>';

Static HTML settings

EnableStaticExport

Allows or denies the export of static pages.

Values: TRUE|FALSE: 
Sample: $this->mProp['EnableStaticExport'] = TRUE;

CreateStaticLists

Removed in 1.5.0 Use reports instead.

Values: TRUE|FALSE: 
Sample: $this->mProp['CreateStaticLists'] = TRUE;

RemoveCommentsStatic

Removes all visible editor comments in static pages. These are lines starting with an '!'.

Values: TRUE|FALSE: 
Sample: $this->mProp['RemoveCommentsStatic'] = TRUE;

ConstructionMessage

The default message for static "under construction" pages. This message will appear on a static page instead of the page contents if a Wiki page contains the "under construction comment" which consists of '!?' and a following text is omitted.

Values: Text, HTML is allowed
Sample: $this->mProp['ConstructionMessage'] 
           = 'Sorry, this page is still <strong>under construction</strong>.';

Edit, Save, View pages

CreateTOC

Create a table of contents on top of each page, uses all contained H1 and H2 tags.

Values: TRUE|FALSE
Sample: $this->mProp['CreateTOC'] = TRUE;

ShowInfoLine

If TRUE every page will have a small line at the bottom informing about file size, create date and cache state.

Values: TRUE|FALSE
Sample: $this->mProp['ShowInfoLine'] = true;

EditRows

Number of rows of the text edit box. Default: 21.

Values: Integer
Sample: $this->mProp['EditRows'] = 21;

EditColumns

Number of chars in one line of the text edit box. Default: 85.

Values: Integer
Sample: $this->mProp['EditColumns'] = 85;

AllowedTags

Enumeration of allowed HTML tags inside a Wiki file. If this string is EMPTY , no HTML is allowed; chars like & < > will be converted into HTML entities '&...;'

If this string contains ANY tag(s), all undefined tags will be silently removed. You may use < > as single char with spaces around in mathematical meaning. But << and >> may cause the strip_tags() function to remove text or even to truncate your text starting at '<<'!

Values: Enumeration of opening HTML tags or empty string.
Sample: $this->mProp['AllowedTags'] 
           = '<h1><h2><h3><p><pre><div><ul><ol><li><img><a><hr><br><b><i>';
        $this->mProp['AllowedTags'] = '';

UseSnippets

The edit form will show snippet links if set to TRUE. A snippet is a user defined text fragment which can be appended at the edit form. Snippets are defined in the file config/Snippets.inc.

Values: TRUE|FALSE
Sample: $this->mProp['UseSnippets'] = TRUE;

MaxUploadSize

Max. size for uploaded files in KBytes. PHP itself has a default of max. 2048 KB. PWP can restrict it further. But the PWP setting cannot exceed the PHP setting. Default: 1024;

Values: Integer
Sample: $this->mProp['MaxUploadSize'] = 1024;

MaxPostSize

Max. file size for one Wiki page in KB. We are talking about Wiki code size, not HTML. 64 KB are about 12..16 typewriter pages with a lot of text on each. A user would have to scroll about 3 meters down in such a Wiki page.

Values: Integer
Sample: $this->mProp['MaxPostSize'] = 64;

RecentChangesLinks

Deprecated in 1.5.0 The array is now hard coded.

Values: Array containing integers.
Sample: $this->mProp['RecentChangesLinks'] = array(1,3,7,15,30,60,90);

IndexType

This setting affects the list of Wiki pages, uploaded files, recent changes and the trash bin. PWP supports two list types: A single column index with detailed information and a multi column index with less information.

Values: Integer
        1 = single column index with time information
        n = n column index without time information
        use n = 3 for 800 pixel screen resolution
        use n = 4 for 1024 pixel screen resolution
        0 or smaller: forbidden
Sample: $this->mProp['IndexType'] = 3;

ListLength

How many entries should appear on one list page? The number of lines per list depends on the IndexType setting, see also above. Default: 100

Values: Integer
Sample: $this->mProp['ListLength'] = 100;

HistoryBehaviour

New in PWP 1.5.0 How should PWP record changes of Wiki pages in the revision history?

Values:
 1: always record a change in the history on each save action
 0: leave it to the user (checkbox in edit view)
-1: never record any changes in the history

Sample: $this->mProp['HistoryBehaviour'] = 0;

Calendar

EnableCalendar

Enable or disable calendar creation.

Values: TRUE|FALSE
Sample: $this->mProp['EnableCalendar'] = TRUE;

IsUSCalendar

US calendars (and others?) have a week begin on Sunday. A German week starts on Monday. Affects the small month overview table. The contained week number is calculated by PHP corresponding to some ISO definition. This hopefully works around the globe...

Values: TRUE|FALSE
Sample: $this->mProp['IsUSCalendar'] = TRUE;

Holidays, Events and Entries

Deprecated in 1.5.0

Values: STRING: dd.mm;text
Sample:
  $this->mProp['CalendarHolidays'] = "25.12.;X-Mas;26.12.;X-Mas";
  $this->mProp['CalendarEvents'] = "21.06.;Summer;23.09.;Autum";
  $this->mProp['CalendarEntries'] = "10.03.;Annual Business Report";

File StaticHtml.inc

This file contains the HTML header and footer for static HTML pages. Header and footer for dynamic Wiki pages are contained in wiki/resp/out/Html.inc. However this file is not considered to be part of the configuration; it contains a whole bunch of program logic.

StaticHtml.inc consists of thee functions, each returning a string. Just edit the part between:

 return <<<eoh

 eoh;

You can access config settings and variables using:

{$gConfig->mProp['StartPage']}
{$gConfig->mVars['IconYes']}

Having some programming experience, you might use the passed $wikiPage to use different headers. For example, if a page name ends with ".EN" or ".DE", an appropriate header could be returned.

The third function returns an index (default) page which must match the naming requirements of your webserver. It simply forwards to the configured start page. Usually you do not have to change this function.

File Snippets.inc

Here are the snippets defined which appear as JavaScript links below the edit box. The function "_defineSnippets()" is of interest for you. It must return an array with a name => value mapping.

   (Powered by PWP Version 1-5-1)