stdconfig.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php if (!defined('PmWiki')) exit();
  2. /* Copyright 2002-2004 Patrick R. Michaud (pmichaud@pobox.com)
  3. This file is part of PmWiki; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published
  5. by the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version. See pmwiki.php for full details.
  7. This file allows features to be easily enabled/disabled in config.php.
  8. Simply set variables for the features to be enabled/disabled in config.php
  9. before including this file. For example:
  10. $EnableQAMarkup=0; #disable Q: and A: tags
  11. $EnableDefaultWikiStyles=1; #include default wikistyles
  12. Each feature has a default setting, if the corresponding $Enable
  13. variable is not set then you get the default.
  14. To avoid processing any of the features of this file, set
  15. $EnableStdConfig = 0;
  16. in config.php.
  17. */
  18. SDV($DefaultPage,"$DefaultGroup/$DefaultTitle");
  19. if ($pagename=='') $pagename=$DefaultPage;
  20. if (isset($EnableStdConfig) && !$EnableStdConfig) return;
  21. if (!isset($EnablePerGroupCust) || $EnablePerGroupCust)
  22. include_once("$FarmD/scripts/pgcust.php");
  23. if (!isset($EnableAuthorTracking) || $EnableAuthorTracking)
  24. include_once("$FarmD/scripts/author.php");
  25. if (!isset($EnablePrint) || $EnablePrint)
  26. include_once("$FarmD/scripts/print.php");
  27. if (!isset($EnableTemplateLayout) || $EnableTemplateLayout)
  28. include_once("$FarmD/scripts/tlayout.php");
  29. if ($action=='diff' && @!$HandleActions['diff'])
  30. include_once("$FarmD/scripts/pagerev.php");
  31. if (!isset($EnableQAMarkup) || $EnableQAMarkup)
  32. include_once("$FarmD/scripts/faq.php");
  33. if (!isset($EnableWikiTrails) || $EnableWikiTrails)
  34. include_once("$FarmD/scripts/trails.php");
  35. if (!isset($EnableStdWikiStyles) || $EnableStdWikiStyles)
  36. include_once("$FarmD/scripts/wikistyles.php");
  37. if (!isset($EnableThisWiki) || $EnableThisWiki)
  38. include_once("$FarmD/scripts/thiswiki.php");
  39. if (@$EnableMailPosts)
  40. include_once("$FarmD/scripts/mailposts.php");
  41. if (@$EnableUpload)
  42. include_once("$FarmD/scripts/upload.php");
  43. if (!isset($EnableSearch) || $EnableSearch)
  44. include_once("$FarmD/scripts/search.php");
  45. if (!isset($EnableVarMarkup) || $EnableVarMarkup)
  46. include_once("$FarmD/scripts/vardoc.php");
  47. if (@(!isset($EnablePreviewOnRequestOnly) || $EnablePreviewOnRequestOnly)
  48. && @!$preview) $PagePreviewFmt='';
  49. if (!isset($EnableCrypt) || $EnableCrypt)
  50. include_once("$FarmD/scripts/crypt.php");
  51. SDV($MetaRobots,
  52. ($action!='browse' || preg_match('#^PmWiki[./](?!PmWiki$)#',$pagename))
  53. ? 'noindex,nofollow' : 'index,follow');
  54. if ($MetaRobots)
  55. $HTMLHeaderFmt[] = " <meta name='robots' content='$MetaRobots' />\n";
  56. if (@$EnableDiag)
  57. include_once("$FarmD/scripts/diag.php");
  58. ?>