stdconfig.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php if (!defined('PmWiki')) exit();
  2. /* Copyright 2002-2006 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. $EnableWikiStyles=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. $pagename = ResolvePageName($pagename);
  19. if (!IsEnabled($EnableStdConfig,1)) return;
  20. if (IsEnabled($EnablePGCust,1))
  21. include_once("$FarmD/scripts/pgcust.php");
  22. if (IsEnabled($EnableRobotControl,1))
  23. include_once("$FarmD/scripts/robots.php");
  24. if (IsEnabled($EnableCaches, 1))
  25. include_once("$FarmD/scripts/caches.php");
  26. ## Scripts that are part of a standard PmWiki distribution.
  27. if (IsEnabled($EnableAuthorTracking,1))
  28. include_once("$FarmD/scripts/author.php");
  29. if (IsEnabled($EnablePrefs, 1))
  30. include_once("$FarmD/scripts/prefs.php");
  31. if (IsEnabled($EnableSimulEdit, 1))
  32. include_once("$FarmD/scripts/simuledit.php");
  33. if (IsEnabled($EnableDrafts, 0))
  34. include_once("$FarmD/scripts/draft.php"); # after simuledit + prefs
  35. if (IsEnabled($EnableSkinLayout,1))
  36. include_once("$FarmD/scripts/skins.php"); # must come after prefs
  37. if (@$Transition || IsEnabled($EnableTransitions, 0))
  38. include_once("$FarmD/scripts/transition.php"); # must come after skins
  39. if (IsEnabled($EnableStdMarkup,1))
  40. include_once("$FarmD/scripts/stdmarkup.php");
  41. if ($action=='diff' && @!$HandleActions['diff'])
  42. include_once("$FarmD/scripts/pagerev.php");
  43. if (IsEnabled($EnableWikiTrails,1))
  44. include_once("$FarmD/scripts/trails.php");
  45. if (IsEnabled($EnableWikiStyles,1))
  46. include_once("$FarmD/scripts/wikistyles.php");
  47. if (IsEnabled($EnableMailPosts,0))
  48. include_once("$FarmD/scripts/mailposts.php");
  49. if (IsEnabled($EnablePageList,1))
  50. include_once("$FarmD/scripts/pagelist.php");
  51. if (IsEnabled($EnableVarMarkup,1))
  52. include_once("$FarmD/scripts/vardoc.php");
  53. if (!function_exists(@$DiffFunction))
  54. include_once("$FarmD/scripts/phpdiff.php");
  55. if ($action=='crypt')
  56. include_once("$FarmD/scripts/crypt.php");
  57. if ($action=='edit' && IsEnabled($EnableGUIButtons,0))
  58. include_once("$FarmD/scripts/guiedit.php");
  59. if (IsEnabled($EnableForms,1))
  60. include_once("$FarmD/scripts/forms.php"); # must come after prefs
  61. if (IsEnabled($EnableUpload,0))
  62. include_once("$FarmD/scripts/upload.php"); # must come after forms
  63. if (IsEnabled($EnableNotify,0))
  64. include_once("$FarmD/scripts/notify.php");
  65. if (IsEnabled($EnableDiag,0))
  66. include_once("$FarmD/scripts/diag.php");