version=pmwiki-2.1.14 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.6) Gecko/20060728 SUSE/1.5.0.6-1.3 Firefox/1.5.0.6 author=Pm csum= host=24.1.26.255 name=PmWiki.CustomWikiStyles rev=34 targets=PmWiki.WikiStyles,PmWiki.WikiAdministrator,PmWiki.DocumentationIndex text=%25audience%25 administrators (intermediate)%0aThis page describes the predefined [[WikiStyles]] and how a [[Wiki Administrator]] can define additional WikiStyles as a local customization for all pages (in local/config.php) or specific groups (in local/$Group.php).%0a%0aAll predefined WikiStyles are setup in the global array $WikiStyle.%0aTo define your own WikiStyles, add the setting of the correspondent `WikiStyle within the array.%0a%0a[[#predef]]%0a!!Predefined WikiStyles%0a%0aThe following array-values are set by [@scripts/wikistyles.php@] using the [[Cookbook:Functions#SDV |SDV()-function]] (so you can overwrite them by setting them prior in config.php or farmconfig.php):%0a%0a||width=70%25 border=1 cellpadding=3 cellspacing=0%0a||'''markup:''' ||'''definition:''' ||%0a||[[%3c%3c]]'''text colors:''' [[%3c%3c]] (equiv. to [@%25color=xxxx define=xxxx%25@] ||||%0a|| [@%25black%25@] ||[@$WikiStyle['black']['color'] = 'black';@] ||%0a|| [@%25white%25@] ||[@$WikiStyle['white']['color'] = 'white';@] ||%0a|| [@%25red%25@] ||[@$WikiStyle['red']['color'] = 'red';@] ||%0a|| [@%25yellow%25@] ||[@$WikiStyle['yellow']['color'] = 'yellow';@] ||%0a|| [@%25blue%25@] ||[@$WikiStyle['blue']['color'] = 'blue';@] ||%0a|| [@%25gray%25@] ||[@$WikiStyle['gray']['color'] = 'gray';@] ||%0a|| [@%25silver%25@] ||[@$WikiStyle['silver']['color'] = 'silver';@] ||%0a|| [@%25maroon%25@] ||[@$WikiStyle['maroon']['color'] = 'maroon';@] ||%0a|| [@%25green%25@] ||[@$WikiStyle['green']['color'] = 'green';@] ||%0a|| [@%25navy%25@] ||[@$WikiStyle['navy']['color'] = 'navy';@] ||%0a|| [@%25purple%25@] ||[@$WikiStyle['purple']['color'] = 'purple';@] ||%0a||[[%3c%3c]]'''list-styles:''' ||||%0a|| [@%25decimal%25@] ||[@$WikiStyle['decimal']['apply'] = 'list';@][[%3c%3c]][@$WikiStyle['decimal']['list-style'] = 'decimal';@] ||%0a|| [@%25roman%25@] ||[@$WikiStyle['roman']['apply'] = 'list';@][[%3c%3c]][@$WikiStyle['roman']['list-style'] = 'lower-roman';@] ||%0a|| [@%25ROMAN%25@] ||[@$WikiStyle['ROMAN']['apply'] = 'list';@][[%3c%3c]][@$WikiStyle['ROMAN']['list-style'] = 'upper-roman';@] ||%0a|| [@%25alpha%25@] ||[@$WikiStyle['alpha']['apply'] = 'list';@][[%3c%3c]][@$WikiStyle['alpha']['list-style'] = 'lower-alpha';@] ||%0a|| [@%25ALPHA%25@] ||[@$WikiStyle['ALPHA']['apply'] = 'list';@][[%3c%3c]][@$WikiStyle['ALPHA']['list-style'] = 'upper-alpha';@] ||%0a||[[%3c%3c]]'''special:''' ||||%0a||open links in a new browser-window: ||||%0a|| [@%25newwin%25@] ||[@$WikiStyle['newwin']['target'] = '_blank';@] ||%0a||Turns markup into a comment via display:none CSS ||||%0a|| [@%25comment%25@] ||[@$WikiStyle['comment']['display'] = 'none';@] ||%0a%0a!!Author-Defined WikiStyles%0a%0a# The first index of the array defines the style name (e.g. mynewstyle, projectentry etc)%0a# the second index defines the attribute name (e.g. color, bgcolor, etc.)%0a# the value set defines the attribute value (e.g. red, bold, #00ffcc, etc.)%0a%0a'''Sample:''' If you want to define a (site-wide) style the same as the page style%0a->[@%25define=projectentry color:red%25@]%0ause%0a->[@$WikiStyle['projectentry']['color'] = 'red';@]%0a%0a%0aThe [@$WikiStyle['projectentry']['apply']@] variable may be defined if the wikistyle concerns a particular tag. It may be @@'item' (for li|dt), 'list' (for ul|ol|dl), 'div', 'pre', 'img', 'p'@@ or the combining @@'block' (for p|div|ul|ol|dl|li|dt|pre|h[1-6])@@. Example:%0a%0a [@$WikiStyle['top']['apply'] = 'item';@]%0a [@$WikiStyle['top']['class'] = 'top';@]%0a%0athen a markup%0a [@* %25top%25 An important list-item@]%0awill output%0a [@%3cli class="top">An important list-item%3c/li>@]%0a%0a!!Notes%0a%0a!!!To be done:%0a%0a%25trail%25%3c%3c|[[Documentation Index]]|>> time=1156526670