From the Eliovir
administrateurs (intermédiaire) Cette page décrit les WikiStyles prédéfinis et comment un Administrateur du Wiki peut définir un WikiStyles supplémentaire en tant que personnalisation pour toutes les pages (dans local/config.php) ou des groupes spécifiques (dans local/$Group.php).
Tous les WikiStyles prédéfinis sont définis dans le tableau global $WikiStyle
.
Pour définir votre propre style Wiki, ajoutez un élément au tableau correspondant à votre style Wiki.
Le tableau de valeurs suivant est définit par scripts/wikistyles.php
en utilisant les SDV()-fonctions (aussi vous pouvez les remplacer en les définissant préalablement dans config.php ou farmconfig.php):
balise: | 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'; |
Exemple: Si vous voulez définir un style pour tout le site un style similaire à
%define=projectentry color:red%
utilisez
$WikiStyle['projectentry']['color'] = 'red';
La variable $WikiStyle['projectentry']['apply']
peut être définie dans si le style concerne un élément particulier. Ce peut être ‘item’ (for li|dt), ‘list’ (for ul|ol|dl), ‘div’, ‘pre’, ‘img’, ‘p@ ou la combinaison @block’ (pour p|div|ul|ol|dl|li|dt|pre|h[1–6])
. Exemple:
$WikiStyle['top']['apply'] = 'item';
$WikiStyle['top']['class'] = 'top';
ensuite une balise
* %top% Un item de liste important
sortira
<li class="top">Un item de liste important</li>
Copyright © 2005–2025 the Main wiki and its authors
Retrieved from http://eliovir.free.fr/index.php5/PmWikiFr/CustomWikiStyles
Page last modified on August 24, 2009, at 05:50 AM EST