Home PageFacebook pageAbout Our ChurchSunday ServicesActivitiesInfo
|
Wiki Styles can be predefined in config.php by the Wiki Administrator.
The general format for defining Wiki Styles is:
$WikiStyle['stylename']['attribute'] = 'value';
So the line: $WikiStyle['darkgreen']['color'] = '#006400'; defines a style %darkgreen% that changes the text color attribute to #006400, like this. The standard Wiki Styles are automatically included via the stdconfig.php script unless disabled by $EnableStdWikiStyles = 0; To restrict wiki page authors to the styles you define, add the following statement in config.php: $WikiStylePattern = '%[-\\w]*%'; To turn off Wiki Styles completely, execute: unset($WikiStylePattern); The remainder of this page shows examples defining Wiki Styles for use in Pm Wiki pages. These examples are taken verbatim from scripts/wikistyles.php:
# the %newwin% pattern causes links to open in a new window
$WikiStyle['newwin']['target'] = '_blank';
# the %comment% style creates a comment in the markup
$WikiStyleTags['display'] = array('style' => 'display:$value; ');
$WikiStyle['comment']['display'] = 'none';
# define colored text styles as %black%, %white%, %red%,
# from CSS color names
foreach (array('black','white','red','yellow','blue','gray',
'silver', 'maroon', 'green', 'navy', 'purple') as $c)
$WikiStyle[$c]['color'] = $c;
# define %darkgreen% from a CSS #RRGGBB color specification
$WikiStyle['darkgreen']['color'] = '#006400';
# example defining %highlight% with multiple attributes
# $WikiStyle['highlight']['color'] = 'black';
# $WikiStyle['highlight']['bgcolor'] = 'yellow';
<< CustomInterMaps | PmWiki.Documentation Index | Custom Free Links >> |
|
Page last modified on February 18, 2004, at 06:26 PM
|
|