wikistyles.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 shows examples of predefining WikiStyles for use in PmWiki pages.
  8. It is automatically included via the stdconfig.php script unless
  9. disabled by
  10. $EnableStdWikiStyles = 0;
  11. To explicitly enable the markups defined below, insert the line
  12. include_once('scripts/wikistyles.php');
  13. in the config.php file.
  14. */
  15. # the %newwin% pattern causes links to open in a new window
  16. $WikiStyle['newwin']['target'] = '_blank';
  17. $WikiStyleTags['display'] = array('style' => 'display:$value; ');
  18. $WikiStyle['comment']['display'] = 'none';
  19. # define colored text styles as %black%, %white%, %red%, from CSS color names
  20. foreach (array('black','white','red','yellow','blue','gray',
  21. 'silver', 'maroon', 'green', 'navy', 'purple') as $c)
  22. $WikiStyle[$c]['color'] = $c;
  23. # define %darkgreen% from a CSS #RRGGBB color specification
  24. $WikiStyle['darkgreen']['color'] = '#006400';
  25. # example defining %highlight% with multiple attributes
  26. # $WikiStyle['highlight']['color'] = 'black';
  27. # $WikiStyle['highlight']['bgcolor'] = 'yellow';
  28. # To restrict wiki page authors to the styles you define, execute the
  29. # following statement in local.php:
  30. # $WikiStylePattern = '%[-\\w]*%'
  31. # To turn off WikiStyles completely, execute:
  32. # unset($WikiStylePattern);
  33. ?>