source: spip-zone/_plugins_/pgn4spip/trunk/_ReadMe.txt @ 106855

Last change on this file since 106855 was 106855, checked in by jack@…, 4 years ago

Des mises à jour de LisezMoi/ReadMe? en attente...

File size: 5.1 KB
Line 
1The pgn4spip plug-in displays the chessboard and the chess game
2in PGN format inside an article between [pgn] and [/pgn] tags or [PGN] and [/PGN] tags.
3
4Usage in the body of an article:
5
6Before
7[pgn] 1. e4 Nf6 [/pgn]
8After
9
10pgn4spip is the SPIP interface of pgn4web by Paolo Casaschi
11http://pgn4web.casaschi.net/home.html
12
13Demo on-line
14http://pgn4web.casaschi.net/demo.html
15
16pgn4spip has been developed by Matt Chesstale in PHP, Javascript, HTML, CSS, CFG and SPIP.
17matteo.chesstale@gmail.com
18license: GNU GPL 3.0 (c) 2012
19
20    This program is free software: you can redistribute it and/or modify
21    it under the terms of the GNU General Public License as published by
22    the Free Software Foundation, either version 3 of the License, or
23    (at your option) any later version.
24
25    This program is distributed in the hope that it will be useful,
26    but WITHOUT ANY WARRANTY; without even the implied warranty of
27    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28    GNU General Public License for more details.
29
30    You should have received a copy of the GNU General Public License
31    along with this program.  If not, see <http://www.gnu.org/licenses/>.
32
33It does not require the CFG 3.x plug-in for its configuration in SPIP 3.x
34It requires the CFG 1.x plug-in for its configuration in SPIP 2.x
35https://plugins.spip.net/cfg.html
36
37In case you use the tool "Curly inverted commas" << French double quotes >> of the plug-in Swiss Knife, then pgn4spip must be enabled AFTER Swiss Knife.
38
39________________
40
411. Setup of the plug-in
42
43As all plugins once you have first created a folder plugins/auto/
44
45________________
46
472. Configuration of the plugin
48
49http://mysite.tld/ecrire/?exec=admin_plugin
50SPIP Configuration > Manage plugins
51
52Click [x] to activate the plug-in.
53Confirm clicking to "SUBMIT".
54
55Click to the name "pgn4spip" to get help.
56
57Click to the tools icon on the right at the level of the name pgn4spip
58
59The configuration can be optionally tested on-line in
60http://pgn4web.casaschi.net/board-generator.html
61
62________________
63
643. Advanced usage
65
66The plugin can be optionally configured in the parameters of the [pgn] tag
67inside an article. See the help during the configuration of the plugin.
68
69doc\pgn4web parameters.txt
70http://localhost/spip/plugins/pgn4spip/pgn4web/board.html?help=true
71
72Example in the body of an article:
73
74Before
75[pgn height=260 autoplayMode=loop] 1. e4 Nf6 [/pgn]
76After
77
78Examples of articles SPIP with the [pgn] tag
79
80Text file example of test to be copied-pasted in a SPIP 2 or SPIP 3 article:
81Test01 Symbol eval.txt : variations, evaluations symbols "with the idea of"
82Test02 MultiPgn.txt    : several chess games
83Test03 Puzzle Fen.txt  : two chess problems
84Test04 Puzzle URL      : chess problems through the URL of .pgn file
85Test05 Puzzle Doc.txt  : chess problems in .pgn file attached to the article
86Test06 Comment.txt     : comments in a chess game
87Test07 Puzzle Docs     : the .pgn file is attached to the article as a document
88Test08 Table 2 board   : two pgn tags horizontally in a table
89Test09 Live horizontal : broadcast in real time live.pgn in horizontal mode
90Test10 Live vertical   : broadcast in real time live.pgn in vertical mode
91
92The folder test\ is not required at run-time for the plugin.
93________________
94
953.1 Troubleshooting
96
97Symptom 1: with Swiss Knife enabled
98Instead of the chessboard, I see the header of the PGN with eventually
99some strange quotes or even chess figurines inside PGN comments.
100
101Solution 1: disable pgn4spip then reenable pgn4spip.
102This allows pgn4spip to be enabled after Swiss Knife.
103
104Solution 2: if the problem persists, try again emptying the SPIP cache
105between disabling and reenabling the pgn4spip plugin.
106SPIP 3 : Maintenance > Empty the cache > Click "Empty the cache" in Current cache size
107
108Solution 3: if the problem persists, try again emptying equally the browser cache otherwise
109disable Swiss Knife or its tool "Curly inverted commas".
110__________
111
112Symptom 2: parameters inside tag <pgn> of attached document are not taken in consideration
113Wrong syntax: <pgn1 | movesDisplay = puzzle bd = s>
114
115Solution: add option="..." and remove each blank separator
116except after a value and the next parameter.
117<pgn1|option="movesDisplay=puzzle bd=s sS=35">
118
119See test\Test05
120________________
121
1223.2 Live broadcast of the chess game
123
124test\Test09 and test10 show the usage of parameters movesDisplay=live and refreshMinutes=0.25
125that manage the periodic refresh of the chessboard from file
126pgnData=http://localhost/spip/plugins/pgn4spip/pgn4web/live/live.pgn
127updated at a different frequency using the simulator
128spip\plugins\pgn4spip\pgn4web\live\live-simulation.sh
129
130This is an Unix Bash script that can be run in Windows with the freeware c:\cygwin
131Read instructions in test\Test09
132
133spip\plugins\pgn4spip\test\MacroRunSimu.bat is a batch tool to be customized.
134Indicate the full path of your web server and the folder of the plugin.
135It defines doskey macros for the command line "Command Prompt" in Windows
136to launch your web server and the (s)imulateur.
Note: See TracBrowser for help on using the repository browser.