# # TWiki WikiClone (see wiki.pm for $wikiversion and other info) # # Configuration and custom extensions for wiki.pm of TWiki. # # Copyright (C) 1999, 2000 Peter Thoeny, peter@thoeny.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details, published at # http://www.gnu.org/copyleft/gpl.html # # Notes: # - Latest version at http://twiki.org/ # - Installation instructions in $dataDir/TWiki/TWikiDocumentation.txt # - Customize variables in TWiki.cfg when installing TWiki. # - Optionally create a new plugin or customize DefaultPlugin.pm for # custom extensions of rendering rules. # - Upgrading TWiki is easy as long as you only customize DefaultPlugin.pm. # - Variables that can be accessed from topics (see details in # TWikiDocumentation.html) : # %TOPIC% name of current topic # %WEB% name of current web # %WIKIHOMEURL% link of top left icon # %SCRIPTURL% base TWiki script URL (place of view, edit...) # %SCRIPTURLPATH% like %SCRIPTURL%, but path only (cut protocol and domain) # %SCRIPTSUFFIX% script suffix (empty by default, ".pl" if required) # %PUBURL% public URL (root of attachment URL) # %PUBURLPATH% path of public URL # %ATTACHURL% attachment URL of current topic # %ATTACHURLPATH% path of attachment URL of current topic # %DATE% today's date # %WIKIVERSION% tool version # %USERNAME% login user name # %WIKIUSERNAME% wiki user name # %WIKITOOLNAME% site name of this TWiki installation (TWiki) # %MAINWEB% main web name (Main) # %TWIKIWEB% TWiki system web name (TWiki) # %HOMETOPIC% home topic name (WebHome) # %NOTIFYTOPIC% notify topic name (WebNotify) # %WIKIUSERSTOPIC% user list topic name (TWikiUsers) # %WIKIPREFSTOPIC% site-level preferences topic name (TWikiPreferences) # %WEBPREFSTOPIC% web preferences topic name (WebPreferences) # %STATISTICSTOPIC statistics topic name (WebStatistics) # %INCLUDE{...}% server side include # %SEARCH{...}% inline search # variables that need to be changed when installing on a new server: # ================================================================== # %WIKIHOMEURL% : link of TWiki icon in upper left corner : $wikiHomeUrl = "http://rwanda/bin/view"; # Host of TWiki URL : (Example "http://myhost.com:123") $defaultUrlHost = "http://rwanda"; # %SCRIPTURLPATH% : cgi-bin path of TWiki URL: $scriptUrlPath = "/bin"; # %PUBURLPATH% : Public data path of TWiki URL (root of attachments) : $pubUrlPath = "/pub"; # Public data directory, must match $pubUrlPath : $pubDir = "/twiki/pub"; # Template directory : $templateDir = "/twiki/templates"; # Data (topic files) root directory : $dataDir = "/twiki/data"; # FIGURE OUT THE OS WE'RE RUNNING UNDER - from CGI.pm # ================================================================== # Some systems support the $^O variable. If not # available then require() the Config library unless ($OS) { unless ($OS = $^O) { require Config; $OS = $Config::Config{'osname'}; } } if ($OS=~/darwin/i) { # Suggested by Todd Jonker on Codev $OS = 'UNIX'; } elsif ($OS=~/Win/i) { $OS = 'WINDOWS'; } elsif ($OS=~/vms/i) { $OS = 'VMS'; } elsif ($OS=~/bsdos/i) { $OS = 'UNIX'; } elsif ($OS=~/dos/i) { $OS = 'DOS'; } elsif ($OS=~/^MacOS$/i) { $OS = 'MACINTOSH'; } elsif ($OS=~/os2/i) { $OS = 'OS2'; } else { $OS = 'UNIX'; } # variables that might need to be changed: # ================================================================== # Defines which attachments will be treated as ASCII in RCS $attachAsciiPath = "\.(txt|html|xml|pl)\$"; # %SCRIPTSUFFIX% : Suffix of TWiki Perl scripts (i.e. ".pl") : $scriptSuffix = ""; # Set ENV{'PATH'} explicitly for taint checks ( #!perl -T option ) : # (Note: PATH environment variable is not changed if set to "") # Unix separator is : Windows is ; $safeEnvPath = "/bin"; # Mail program used in case Net::SMTP is not installed. # See also SMTPMAILHOST in TWikiPreferences. $mailProgram = "/usr/sbin/sendmail -t -oi -oeq"; # Prevent spambots from grabing addresses, default "". # I.e. set to "NOSPAM" to get "user@somewhereNOSPAM.com" $noSpamPadding = ""; # Pathname of mime types file that maps file suffixes to MIME types : # For Apache server set this to Apache's mime.types file pathname. # Default "$dataDir/mime.types" $mimeTypesFilename = "$dataDir/mime.types"; # RCS directory (find out by 'which rcs') : $rcsDir = "c:/cygwin/bin"; # Initialise RCS file, ignored if empty string, # needed on Windows for binary files. Added JET 22-Feb-01 $rcsArg = ""; $rcsArg = "-x,v" if( $OS eq "WINDOWS" ); # null device /dev/null for unix, NUL for windows $nullDev = { UNIX=>'/dev/null', OS2=>'', WINDOWS=>'NUL', DOS=>'NUL', MACINTOSH=>'', VMS=>'' }->{$OS}; # Store RCS history files in directory (RCS under content dir), default "0" # Don't change this in a working installation, only change when initially setting up a TWiki installation # You also need to create an RCS directory for each Web. TWiki will create RCS directories under pub for attachments historys. $useRcsDir = "1"; $storeTopicImpl = "RcsLite"; $rcsDir = "/usr/bin/"; # Command quote ' for unix, \" for Windows $cmdQuote = "'"; $cmdQuote = "\"" if( $OS eq "WINDOWS" ); # RCS init command, needed when initialising a file as binary $revInitBinaryCmd = "$rcsDir/rcs $rcsArg -q -i -t-none -kb %FILENAME%"; # RCS check in command : $revCiCmd = "$rcsDir/ci $rcsArg -q -l -m$cmdQuote%COMMENT%$cmdQuote -t-none -w$cmdQuote%USERNAME%$cmdQuote %FILENAME%"; #FIXME more entries need %COMMENT% # RCS check in command with date : $revCiDateCmd = "$rcsDir/ci -l $rcsArg -q -mnone -t-none -d$cmdQuote%DATE%$cmdQuote -w$cmdQuote%USERNAME%$cmdQuote %FILENAME%"; # RCS check out command : $revCoCmd = "$rcsDir/co $rcsArg -q -p%REVISION% %FILENAME%"; # RCS history command : $revHistCmd = "$rcsDir/rlog $rcsArg -h %FILENAME%"; # RCS history on revision command : $revInfoCmd = "$rcsDir/rlog $rcsArg -r%REVISION% %FILENAME%"; # RCS revision diff command : $revDiffCmd = "$rcsDir/rcsdiff $rcsArg -q -w -B -r%REVISION1% -r%REVISION2% %FILENAME%"; # RCS delete revision command : $revDelRevCmd = "$rcsDir/rcs $rcsArg -q -o%REVISION% %FILENAME%"; # RCS unlock command : $revUnlockCmd = "$rcsDir/rcs $rcsArg -q -u %FILENAME%"; # RCS lock command : $revLockCmd = "$rcsDir/rcs $rcsArg -q -l %FILENAME%"; # RCS for breaking a lock $revBreakLockCmd = "$rcsDir/rcs $rcsArg -q -l -M %FILENAME%"; # NOTE: You might want to avoid c: at start of cygwin unix command for # Windows, seems to cause a problem with pipe used in search # Unix ls command : $lsCmd = "/bin/ls"; # Unix egrep command : $egrepCmd = "/bin/grep -E"; # Unix fgrep command : $fgrepCmd = "/bin/grep -F"; # variables that probably do not change: # ================================================================== # %WIKITOOLNAME% : Site name of this TWiki installation, i.e. "Foo TWiki", default "TWiki" : $wikiToolName = "SPWX Wiki"; # Regex security filter for web name, topic name, user name : $securityFilter = "[\\\*\?\~\^\$\@\%\`\"\'\&\;\|\<\>\x00-\x1F]"; # Regex security filter for uploaded files : # (Matching files will have a ".txt" appended) $uploadFilter = "^(\.htaccess|.*\.php[0-9s]?|.*\.phtm[l]?)\$"; # Default user name, default "guest" : $defaultUserName = "guest"; # Site Web.Topic name, i.e. "Main.BostonOffice". Default "" : $siteWebTopicName = "UIDesign"; # %MAINWEB% : Name of Main web, default "Main" : $mainWebname = "Main"; # %TWIKIWEB% : Name of TWiki system web, default "TWiki" : $twikiWebname = "TWiki"; # Pathname of debug file : $debugFilename = "$dataDir/debug.txt"; # Pathname of warning file (default $dataDir/warning.txt), if empty no warnings written $warningFilename = "$dataDir/warning.txt"; # Pathname of user name/password file for authentication : $htpasswdFilename = "$dataDir/.htpasswd"; # Pathname of log file : $logFilename = "$dataDir/log%DATE%.txt"; # Pathname of remote users file that maps IP to user : $remoteUserFilename = "$dataDir/remoteusers.txt"; # %WIKIUSERSTOPIC% : Name of users list topic : $wikiUsersTopicname = "TWikiUsers"; # Pathname of users topic, used to translate Intranet name to Wiki name : $userListFilename = "$dataDir/$mainWebname/$wikiUsersTopicname.txt"; # %HOMETOPIC% : Name of main topic in a web, default "WebHome" : $mainTopicname = "WebHome"; # %NOTIFYTOPIC% : Name of topic for email notifications, default "WebNotify" : $notifyTopicname = "WebNotify"; # %WIKIPREFSTOPIC% : Name of site-level preferences topic, default "TWikiPreferences" : $wikiPrefsTopicname = "TWikiPreferences"; # %WEBPREFSTOPIC% : Name of preferences topic in a web, default "WebPreferences" : $webPrefsTopicname = "WebPreferences"; # %STATISTICSTOPIC% : Name of statistics topic, default "WebStatistics" : $statisticsTopicname = "WebStatistics"; # Number of top viewed topics to show in statistics topic, default "10" : $statsTopViews = "10"; # Number of top contributors to show in statistics topic, default "10" : $statsTopContrib = "10"; # Show how many number of revision links, "0" for all, default "3" : $numberOfRevisions = "3"; # Number of seconds a topic is locked during edit, default "3600" : $editLockTime = "3600"; # Group of users that can use cmd=repRev # or that ALWAYS have edit powers (set $doSuperAdminGroup=1) $superAdminGroup = "TWikiAdminGroup"; # flag variables that could change: # ================================================================== # values are "0" for no, or "1" for yes # Keep same revision if topic is saved again within edit lock time. Default "1" $doKeepRevIfEditLock = "1"; # Build $scriptUrlPath from $query->url parameter. Default "0". # Note that links are incorrect after failed authentication if "1" $doGetScriptUrlFromCgi = "0"; # Remove port number from URL. Default "0" $doRemovePortNumber = "0"; # Remember remote user by matching the IP address # in case REMOTE_USER is empty. Default "0" # (Note: Does not work reliably with dynamic IP addresses) $doRememberRemoteUser = "0"; # Change non existing plural topic name to singular, # e.g. TestPolicies to TestPolicy. Default "1" $doPluralToSingular = "1"; # Hide password in registration email $doHidePasswdInRegistration = "1"; # Remove ".." from %INCLUDE{""}% filename, to # prevent includes of "../../file". Default "1" $doSecureInclude = "1"; # Log topic views to $logFilename. Default "0" $doLogTopicView = "1"; # Log topic edits to $logFilename. Default "1" $doLogTopicEdit = "1"; # Log topic saves to $logFilename. Default "1" $doLogTopicSave = "1"; # Log renames to $logFilename. Default "1". Added JET 22-Feb-01 $doLogRename = "1"; # Log view attach to $logFilename. Default "1" $doLogTopicAttach = "1"; # Log file upload to $logFilename. Default "1" $doLogTopicUpload = "1"; # Log topic rdiffs to $logFilename. Default "0" $doLogTopicRdiff = "1"; # Log view changes to $logFilename. Default "0" $doLogTopicChanges = "1"; # Log view changes to $logFilename. Default "0" $doLogTopicSearch = "1"; # Log user registration to $logFilename. Default "1" $doLogRegistration = "1"; # Disable plugins. Set to "1" in case TWiki is non functional after # installing a new plugin. This allows you to remove the plugin from # the ACTIVEPLUGINS list in TWikiPreferences. Default "0" $disableAllPlugins = "0"; # Enable super-powers to $superAdminGroup members # see Codev.UnchangeableTopicBug $doSuperAdminGroup = "1"; ############################################################# ########## Administration notes ################## ############################################################# # # Don't forget to customize also the TWiki.TWikiPreferences topic. # # You can alter the most recent revision of a topic using /edit/web/topic?cmd=repRev # - use only as a last resort, as history is altered # - you must be in TWikiAdminGroup # - you will be presented with normal edit box, but this will also include meta # information, modify this with extreme care # # You can delete the most recent revision of a topic using /edit/web/topic?cmd=delRev # - use only as a last resort, as history is lost # - you must be in TWikiAdminGroup # - fill in some dummy text in the edit box # - ignore preview output # - when you press save last revision will be deleted #