Un certain nombre d’options sont paramétrables en écrivant les paramètres en appelant le modèle avec la valeur que l’on souhaite donner.
Par exemple <pgn485|option="movesDisplay=puzzle bd=s">
Signifie qu’on
– affiche le document (fichier pgn) numéro 485
– on a un affichage type puzzle (position à résoudre - le texte n’est pas affiché)
– les boutons (bd) sont de type "standard"
ou <pgn121|option="l=v ss=34 lch=FFCC99 dch=CC9966 bbch=252ACC am=l d=1000">
– layout vertical
– taille des cases de 34
– des cases blanches de la couleur #FFCC99
– des cases noires de la couleur #CC9966
– une couleur d’échiquier #252ACC
– autoplay boucle
– le délai entre chaque coup est de 1000 microsecondes (1 seconde)
La même ligne de personnalisation de l’affichage pourrait s’appeller ainsi en utilisant les noms longs :
<pgn121|option="layout=v squareSize=34 lightColor=FFCC99 darkColor=CC9966 boardBorderColor=252ACC autoplayMode=l delay=1000">
ou encore <pgn489|option="initialHalfmove=11 movesDisplay=puzzle ">
– affiche le document (fichier pgn) numéro 489
– le coup à jouer à partir de la position affichée est le 6ème pour les noirs (initialHalfmove=11)
– on a un affichage type puzzle (position à résoudre - le texte n’est pas affiché)
| raccourci | valeur actuelle / par défaut | paramètre | valeurs possibles pour chaque paramètre |
| am | n | autoplayMode | [n]one / ; (g)ame / ; (l)oop |
| bbch | E0E0E0 | boardBorderColor | [E0E0E0] was 000000 |
| bch | F6F6F6 | backgroundColorHex | [F6F6F6] was FFFFFF, (t)ransparent to use the parent’s background color |
| bd | c | buttonsDisplay | [c]ustom, (h)idden, (s)tandard |
| bsch | TRANSPARENT | boardShadowColor | [t]ransparent no shadow ; (b)order ; nbr |
| cbch | F0F0F0 | controlBackgroundColor | [F0F0F0] was standard buttons |
| cd | n | commentsDisplay | [n]ewline, (i)nline,(h)idden |
| ctch | 696969 | controlTextColor | [696969] was 000000 |
| d | 3000 | delay | [3000] was 1000 in ms |
| dch | E0E0E0 | darkColor | [E0E0E0] was C6CEC3 |
| fcch | 000080 | fontCommentsColor | [000080] |
| fcs | m | fontCommentsSize | [m]oves <- fontMovesSize |
| fh | frameHeight | [""], (p)age, (b)oard, nbr, overriding textHeight. See FrameHeightEval() | |
| fhch | 000000 | fontHeaderColor | [000000] |
| fhs | 14 | fontHeaderSize | [14] was 16 |
| fmch | 000000 | fontMovesColor | [000000] |
| fms | 14 | fontMovesSize | [14] was 16 |
| fp | 13 | framePadding | [13] was 0 |
| fw | p | frameWidth | [p]age, (b)oard, nbr, overriding textHeight |
| hch | ABABAB | highlightColor | [ABABAB] was DAF4D7 |
| hd | j | headerDisplay | [j]ustified ; (h)idden ; (c)entered ; (l)ive ; (v)ariations |
| hl | t | horizontalLayout | [t]rue layout=[h]orizontal, (f)alse layout=(v)ertical |
| hm | b | highlightMode | [b]order, (s)quare, (n)one |
| hmch | E0E0E0 | highlightMovesColor | [E0E0E0] was DAF4D7 ; (b)ackground for no highligh |
| ig | f | initialGame | [f]irst ; (l)ast ; (r)andom |
| ih | s | initialHalfmove | [s]tart ; (e)nd ; (r)andom ; (c)omment ; (v)ariation ; nbr |
| iv | 0 | initialVariation | [0] |
| l | ’h | layout | [h]orizontal, (v)ertical. See OptionParser() |
| lch | F6F6F6 | lightColor | [F6F6F6] was EFF4EC. suffix ’h’ stands for hex |
| md | f | movesDisplay | [f]igurine ; (t)ext ; (p)uzzle ; (h)idden |
| pf | DEFAULT_Val | pieceFont | [d]efault <- pieceSize ; (a)lpha ; (m)erida ; (u)scf ; (s)vgchess |
| ps | DEFAULT_Val | pieceSize | [d]efault <- squareSize |
| rd | f | refreshDemo | [f]alse ; (t)rue |
| rm | 1 | refreshMinutes | [1] minute |
| ss | DEFAULT_ss | squareSize | [26] was 28 |
| textHeight | nbr, optional if frameHeight | ||
| tm | 13 | textMargin | [13] was 0. Set left/right margin width of the textual section, header and/or moves text |
Des ressources
Des ressources utiles pour des sites de clubs d’échecs