home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / wiki / lib / defaults.php < prev    next >
PHP Script  |  2004-03-08  |  13KB  |  296 lines

  1. <?php
  2. // $Id: defaults.php,v 1.1 2004/01/12 22:14:05 comsubvie Exp $
  3.  
  4. //**********************************************************************
  5. // DO NOT EDIT THIS FILE.
  6. //
  7. // This file contains configuration defaults for 'Tavi that are over-
  8. // written on installation.  Instead, you should edit 'config.php' to
  9. // re-set these options, or use the 'configure.pl' script to create a
  10. // 'config.php' for yourself.
  11. //
  12. // If you see options in here that are not present in 'config.php',
  13. // you can safely copy them to 'config.php' and set them to a new
  14. // value.  This will override the default set here.
  15. //**********************************************************************
  16.  
  17. // The following variables establish the format for WikiNames in this wiki.
  18. $UpperPtn = "[A-Z\xc0-\xde]";
  19. $LowerPtn = "[a-z\xdf-\xfe]";
  20. $AlphaPtn = "[A-Za-z\xc0-\xfe]";
  21. $LinkPtn = $UpperPtn . $AlphaPtn . '*' . $LowerPtn . '+' .
  22.            $UpperPtn . $AlphaPtn . '*(?:(?:\\/' . $UpperPtn . $AlphaPtn . '*)+)?';
  23.  
  24. // $UrlPtn establishes the format for URLs in this wiki.
  25. $UrlPtn  = "(?:https?:|mailto:|ftp:|gopher:|news:|file:)" .
  26.            "(?:[^ |\\/\"\']*\\/)*[^ |\\t\\n\\/\"\']*[A-Za-z0-9\\/?=&~_]";
  27.  
  28. // $InterWikiPtn establishes the format for InterWiki links in this wiki.
  29. $InterwikiPtn = "([A-Za-z0-9]+):" .
  30.                 "((?:[^ |\\/\"\']*\\/)*[^ |\\t\\n\\/\"\']*[\\/=&~A-Za-z0-9])";
  31. // Note: To avoid side effect of using parentheses in both $LinkPtn, $UrlPtn and
  32. //       $InterwikiPtn the special syntax (?: is used. This hides the parentheses
  33. //       from respectively parse_wikinames, parse_hyperlinkXXX and parse_interwiki
  34. //       in parse/transforms.php
  35.  
  36. // $ImgPtn is used in html_url() and check_images() to detect
  37. // image-links. Usually tied against the end of the text
  38. $ImgPtn = ".jpe?g|.png|.gif|.bmp";
  39.  
  40. // $ExtRef contains the strings to be used around external references.
  41. $ExtRef = array ('[', ']');
  42. // $ExtRef = array ('', ''); // Use this if you don't want anything
  43.  
  44. // !!!WARNING!!!
  45. // If $AdminEnabled is set to 1, the script admin/index.php will be accessible.
  46. //   This allows administrators to lock pages and block IP addresses.  If you
  47. //   want to use this feature, YOU SHOULD FIRST BLOCK ACCESS TO THE admin/
  48. //   DIRECTORY BY OTHER MEANS, such as Apache's authorization directives.
  49. //   If you do not do so, any visitor to your wiki will be able to lock pages
  50. //   and block others from accessing the wiki.
  51. // If $AdminEnabled is set to 0, administrator control will be disallowed.
  52. $AdminEnabled = 0;
  53.  
  54. // Old versions of pages will be deleted after $ExpireLen days.  If $ExpireLen
  55. //   is set to 0, old versions of pages (and pages set to empty) will never
  56. //   be removed from the database.
  57. $ExpireLen = 14;
  58.  
  59. // Set $Charset to indicate the character set used for storage, editing,
  60. //   and display in your wiki.  The default is "ISO-8859-1" (Latin-1).
  61. //   "utf-8" is supported, and is recommended for international text;
  62. //   however you should be cautioned that Netscape does not behave correctly
  63. //   when editing utf-8 text.  Hence, "utf-8" is not currently the default.
  64. $Charset = 'ISO-8859-1';
  65.  
  66. // $SeparateTitleWords determines whether spaces should be inserted in page
  67. //   titles.  If nonzero, the page title (but not header) of WikiName would
  68. //   show 'Wiki Name' instead.  Pages that have free link titles will not
  69. //   be changed.
  70. $SeparateTitleWords = 1;
  71.  
  72. // $SeparateHeaderWords determines whether spaces should be inserted in page
  73. //   headers.  If nonzero, the page header of WikiName would show 'Wiki Name'
  74. //   instead.  Pages that have free link names would not have changed headers.
  75. $SeparateHeaderWords = 0;
  76.  
  77. // $SeparateLinkWords determines whether spaces should be inserted in links
  78. //   to pages.  If nonzero, all links to pages such as WikiName would display
  79. //   as 'Wiki Name'.  Pages that have free link names would not have changed
  80. //   links.
  81. $SeparateLinkWords = 0;
  82.  
  83. // $CookieName determines the name of the cookie that browser preferences
  84. //   (like user name, etc.) are stored in.
  85. $CookieName = 'prefs';
  86.  
  87. // $EditRows and $EditCols determine the default dimensions of the wiki edit
  88. //   box for users that have not set their preferences.
  89. $EditRows = 20;
  90. $EditCols = 65;
  91.  
  92. // Initialize the default user name to empty.
  93. $UserName = '';
  94.  
  95. // Default time zone offset (in minutes) for visitors who haven't yet set their
  96. //   preferences.
  97. $TimeZoneOff = 0;
  98.  
  99. // $AuthorDiff indicates whether history pages should show a diff for the last
  100. //   edit (zero), or for all edits made by the same author (not zero).  The
  101. //   default here is used if the user has not set their preferences.
  102. $AuthorDiff = 1;
  103.  
  104. // $DayLimit determines how many days worth of changes show in a category list.
  105. //   This default is used if the user has not set their preferences.
  106. $DayLimit = 14;
  107.  
  108. // $MinEntries determines the absolute minimum size of a category list (unless
  109. //   there are fewer pages *in* the category).  This default is used if the
  110. //   user has not set their preferences.
  111. $MinEntries = 20;
  112.  
  113. // $HistMax determines the maximum number of entries on a page's history list.
  114. //   This default is used if the user has not set their preferences.
  115. $HistMax = 8;
  116.  
  117. // $RatePeriod determines how many seconds of time to record a visitor's access
  118. //   to the site.  If it is set to zero, ALL RATE CHECKING AND IP ADDRESS
  119. //   BLOCKING WILL BE DISABLED.
  120. $RatePeriod = 300;
  121.  
  122. // $RateView determines how many pages a visitor can view in $RatePeriod
  123. //   amount of time.
  124. $RateView   = 100;
  125.  
  126. // $RateSearch determines how many processor-intensive operations (search,
  127. //   diff, etc.) a visitor can perform in $RatePeriod amount of time.
  128. $RateSearch = 50;
  129.  
  130. // $RateEdit determines how many edits a visitor can make in $RatePeriod
  131. //   amount of time.
  132. $RateEdit   = 20;
  133.  
  134. // $TempDir determines the location of temp files used for computing diffs.
  135. // The default makes a choice based on the environment
  136. $TempDir = isset($_ENV['TMP'])  ? $_ENV['TMP'] :
  137.              isset($_ENV['TEMP']) ? $_ENV['TEMP'] : "/tmp";
  138.  
  139. // $DiffCmd determines what command to run to compute diffs.
  140. $DiffCmd = '/usr/bin/diff';
  141.  
  142. // $MaxPostLen determines the size, in bytes, of the largest edit allowed.
  143. $MaxPostLen = 204800;
  144.  
  145. // $MaxNesting determines the maximum allowed nesting of lists.
  146. $MaxNesting = 20;
  147.  
  148. // $MaxHeading determines the maximum allowed heading level in headings.
  149. $MaxHeading = 6;
  150.  
  151. // $EnableWikiLinks determines if WikiLinks are available
  152. $EnableWikiLinks = 1;
  153.  
  154. // $EnableFreeLinks determines if ((free links)) are available
  155. $EnableFreeLinks = 1;
  156.  
  157. // $EnableTextEnhance determines if the enhanced text markers for bold, 
  158. // italic, super-/sub-script, ins/del are available
  159. $EnableTextEnhance = 1;
  160.  
  161. // $ParseEngine indicates what parsing rules will be run when displaying a
  162. //   wiki page.  To disable a particular rule, you can place a comment at the
  163. //   beginning of its line.  The order of this list is important.
  164. // Note that free links and wiki names are disabled above, using config
  165. //   variables.  This is because wiki names are parsed in other places than
  166. //   just the wiki page.
  167. // Raw HTML parsing is turned off by default, since this is a potential
  168. //   security hole.
  169. $ParseEngine = array(
  170. //                 'parse_raw_html',
  171.                  'parse_htmlisms',
  172.                  'parse_nowiki',
  173.                  'parse_hyperlink_ref',
  174.                  'parse_hyperlink_description',
  175.                  'parse_hyperlink',
  176.                  'parse_macros',
  177.                  'parse_transclude',
  178.                  'parse_freelink',
  179.                  'parse_interwiki',
  180.                  'parse_wikiname',
  181.                  'parse_textenhance',
  182.                  'parse_bold',
  183.                  'parse_italic',
  184.                  'parse_teletype',
  185.                  'parse_heading',
  186.                  'parse_table',
  187.                  'parse_horiz',
  188.                  'parse_indents',
  189.                  'parse_newline',
  190.                  'parse_elements'
  191.                );
  192.  
  193. // $DiffEngine indicates what parsing rules will be run to display differences
  194. //   between versions.  This should be a shorter list than $ParseEngine,
  195. //   since we just want minimal things like bold and italic and wiki links.
  196. $DiffEngine = array(
  197.                 'parse_elem_flag',
  198.                 'parse_diff_skip',
  199.                 'parse_diff_message',
  200.                 'parse_diff_color',
  201.                 'parse_htmlisms',
  202.                 'parse_nowiki',
  203.                 'parse_hyperlink_ref',
  204.                 'parse_hyperlink_description',
  205.                 'parse_hyperlink',
  206.                 'parse_freelink',
  207.                 'parse_interwiki',
  208.                 'parse_wikiname',
  209.                 'parse_textenhance',
  210.                 'parse_bold',
  211.                 'parse_italic',
  212.                 'parse_teletype',
  213.                 'parse_newline',
  214.                 'parse_elements'
  215.               );
  216.  
  217. // $DisplayEngine indicates what functions will be used to translate wiki
  218. //   markup elements into actual HTML.  See parse/html.php
  219. $DisplayEngine = array(
  220.                    'bold_start'   => 'html_bold_start',
  221.                    'bold_end'     => 'html_bold_end',
  222.                    'italic_start' => 'html_italic_start',
  223.                    'italic_end'   => 'html_italic_end',
  224.                    'superscript_start' => 'html_superscript_start', 
  225.                    'superscript_end' => 'html_superscript_end', 
  226.                    'subscript_start' => 'html_subscript_start', 
  227.                    'subscript_end'   => 'html_subscript_end', 
  228.                    'del_start'       => 'html_del_start', 
  229.                    'del_end'         => 'html_del_end', 
  230.                    'ins_start'       => 'html_ins_start', 
  231.                    'ins_end'         => 'html_ins_end', 
  232.                    'tt_start'     => 'html_tt_start',
  233.                    'tt_end'       => 'html_tt_end',
  234.                    'head_start'   => 'html_head_start',
  235.                    'head_end'     => 'html_head_end',
  236.                    'newline'      => 'html_newline',
  237.                    'paragraph_start'    => 'html_paragraph_start',
  238.                    'paragraph_end'      => 'html_paragraph_end',
  239.                    'ref'          => 'html_ref',
  240.                    'url'          => 'html_url',
  241.                    'interwiki'    => 'html_interwiki',
  242.                    'raw'          => 'html_raw',
  243.                    'code'         => 'html_code',
  244.                    'phpcode'      => 'html_phpcode',
  245.                    'hr'           => 'html_hr',
  246.                    'nowiki'       => 'html_nowiki',
  247.                    'anchor'       => 'html_anchor',
  248.                    'bullet_list_start'   => 'html_ul_start',
  249.                    'bullet_list_end'     => 'html_ul_end',
  250.                    'bullet_item_start'   => 'html_li_start',
  251.                    'bullet_item_end'     => 'html_li_end',
  252.                    'indent_list_start'   => 'html_dl_start',
  253.                    'indent_list_end'     => 'html_dl_end',
  254.                    'indent_item_start'   => 'html_dd_start',
  255.                    'indent_item_end'     => 'html_dd_end',
  256.                    'term_item_start'     => 'html_dt_start',
  257.                    'term_item_end'       => 'html_dt_end',
  258.                    'numbered_list_start' => 'html_ol_start',
  259.                    'numbered_list_end'   => 'html_ol_end',
  260.                    'numbered_item_start' => 'html_li_start',
  261.                    'numbered_item_end'   => 'html_li_end',
  262.                    'diff_old_start'      => 'html_diff_old_start',
  263.                    'diff_old_end'        => 'html_diff_end',
  264.                    'diff_new_start'      => 'html_diff_new_start',
  265.                    'diff_new_end'        => 'html_diff_end',
  266.                    'diff_change'         => 'html_diff_change',
  267.                    'diff_add'            => 'html_diff_add',
  268.                    'diff_delete'         => 'html_diff_delete',
  269.                    'reflist'             => 'html_reflist'
  270.                  );
  271.  
  272. // $ViewMacroEngine determines what macro names will be processed when
  273. //   displaying a page.  For each name, a function must be provided.
  274. //   See parse/macros.php
  275. $ViewMacroEngine = array(
  276.                      '!'             => 'view_macro_category',
  277.                      'Anchor'        => 'view_macro_anchor',
  278.                      'Transclude'    => 'view_macro_transclude',
  279.                      'PageSize'      => 'view_macro_pagesize',
  280.                      'LinkTable'     => 'view_macro_linktab',
  281.                      'OrphanedPages' => 'view_macro_orphans',
  282.                      'WantedPages'   => 'view_macro_wanted',
  283.                      'TitleSearch'   => 'view_macro_titlesearch',
  284.                      'PageLinks'     => 'view_macro_outlinks',
  285.                      'PageRefs'      => 'view_macro_refs',
  286.                      'RefList'       => 'view_macro_reflist'
  287.                    );
  288.  
  289. // $SaveMacroEngine determines what save macros will be called after a
  290. //   page is saved.  See parse/save.php
  291. $SaveMacroEngine = array(
  292.                      'parse_define_interwiki',
  293.                      'parse_define_sisterwiki',
  294.                      'parse_define_links'
  295.                    );
  296. ?>