Prise2Tete Wiki
PmWiki
» Custom Wiki Styles
Menu
HomePage
WikiSandbox
PmWiki
Initial Setup Tasks
Basic Editing
Documentation Index
PmWiki FAQ
PmWikiPhilosophy
Release Notes
ChangeLog
pmwiki.org
Cookbook (addons)
Skins (themes)
PITS (issue tracking)
Mailing Lists
edit SideBar
Édition de la page
PmWiki.CustomWikiStyles
%audience% administrators (intermediate) This 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). All predefined WikiStyles are setup in the global array $WikiStyle. To define your own WikiStyles, add the setting of the correspondent `WikiStyle within the array. [[#predef]] !!Predefined WikiStyles The 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): ||width=70% border=1 cellpadding=3 cellspacing=0 ||'''markup:''' ||'''definition:''' || ||[[<<]]'''text colors:''' [[<<]] (equiv. to [@%color=xxxx define=xxxx%@] |||| || [@%black%@] ||[@$WikiStyle['black']['color'] = 'black';@] || || [@%white%@] ||[@$WikiStyle['white']['color'] = 'white';@] || || [@%red%@] ||[@$WikiStyle['red']['color'] = 'red';@] || || [@%yellow%@] ||[@$WikiStyle['yellow']['color'] = 'yellow';@] || || [@%blue%@] ||[@$WikiStyle['blue']['color'] = 'blue';@] || || [@%gray%@] ||[@$WikiStyle['gray']['color'] = 'gray';@] || || [@%silver%@] ||[@$WikiStyle['silver']['color'] = 'silver';@] || || [@%maroon%@] ||[@$WikiStyle['maroon']['color'] = 'maroon';@] || || [@%green%@] ||[@$WikiStyle['green']['color'] = 'green';@] || || [@%navy%@] ||[@$WikiStyle['navy']['color'] = 'navy';@] || || [@%purple%@] ||[@$WikiStyle['purple']['color'] = 'purple';@] || ||[[<<]]'''list-styles:''' |||| || [@%decimal%@] ||[@$WikiStyle['decimal']['apply'] = 'list';@][[<<]][@$WikiStyle['decimal']['list-style'] = 'decimal';@] || || [@%roman%@] ||[@$WikiStyle['roman']['apply'] = 'list';@][[<<]][@$WikiStyle['roman']['list-style'] = 'lower-roman';@] || || [@%ROMAN%@] ||[@$WikiStyle['ROMAN']['apply'] = 'list';@][[<<]][@$WikiStyle['ROMAN']['list-style'] = 'upper-roman';@] || || [@%alpha%@] ||[@$WikiStyle['alpha']['apply'] = 'list';@][[<<]][@$WikiStyle['alpha']['list-style'] = 'lower-alpha';@] || || [@%ALPHA%@] ||[@$WikiStyle['ALPHA']['apply'] = 'list';@][[<<]][@$WikiStyle['ALPHA']['list-style'] = 'upper-alpha';@] || ||[[<<]]'''special:''' |||| ||open links in a new browser-window: |||| || [@%newwin%@] ||[@$WikiStyle['newwin']['target'] = '_blank';@] || ||Turns markup into a comment via display:none CSS |||| || [@%comment%@] ||[@$WikiStyle['comment']['display'] = 'none';@] || !!Author-Defined WikiStyles # The first index of the array defines the style name (e.g. mynewstyle, projectentry etc) # the second index defines the attribute name (e.g. color, bgcolor, etc.) # the value set defines the attribute value (e.g. red, bold, #00ffcc, etc.) '''Sample:''' If you want to define a (site-wide) style the same as the page style ->[@%define=projectentry color:red%@] use ->[@$WikiStyle['projectentry']['color'] = 'red';@] The [@$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: [@$WikiStyle['top']['apply'] = 'item';@] [@$WikiStyle['top']['class'] = 'top';@] then a markup [@* %top% An important list-item@] will output [@<li class="top">An important list-item</li>@] !!Notes !!!To be done: %trail%<<|[[Documentation Index]]|>>
Résumé:
Auteur:
Ceci est une modification mineure
Page mise à jour le 25/08/2006 19:24
Vue
Éditer
Historique
Imprimer
© Prise2Tete