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

Last change on this file since 104335 was 104335, checked in by spip.franck@…, 4 years ago

plugins.spip est maintenant en https, donc j'ajoute le "s"

File size: 5.3 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:
44- a folder plugins/auto/
45- a folder lib/
46
47The pgn4web folder has a size of 13 MB.
48In the case of site having a limited hard disk,
49one can eventually delete certain unused fonts
50among alpha, merida, svgchess or demo files.
51Keep at least the fonts uscf/20 and 26.
52________________
53
542. Configuration of the plugin
55
56http://mysite.tld/ecrire/?exec=admin_plugin
57SPIP Configuration > Manage plugins
58
59Click [x] to activate the plug-in.
60Confirm clicking to "SUBMIT".
61
62Click to the name "pgn4spip" to get help.
63
64Click to the tools icon on the right at the level of the name pgn4spip
65
66The configuration can be optionally tested on-line in
67http://pgn4web.casaschi.net/board-generator.html
68
69________________
70
713. Advanced usage
72
73The plugin can be optionally configured in the parameters of the [pgn] tag
74inside an article. See the help during the configuration of the plugin.
75
76doc\pgn4web parameters.txt
77http://localhost/spip/plugins/pgn4spip/pgn4web/board.html?help=true
78
79Example in the body of an article:
80
81Before
82[pgn height=260 autoplayMode=loop] 1. e4 Nf6 [/pgn]
83After
84
85Examples of articles SPIP with the [pgn] tag
86
87Text file example of test to be copied-pasted in a SPIP 2 or SPIP 3 article:
88Test01 Symbol eval.txt : variations, evaluations symbols "with the idea of"
89Test02 MultiPgn.txt    : several chess games
90Test03 Puzzle Fen.txt  : two chess problems
91Test04 Puzzle URL      : chess problems through the URL of .pgn file
92Test05 Puzzle Doc.txt  : chess problems in .pgn file attached to the article
93Test06 Comment.txt     : comments in a chess game
94Test07 Puzzle Docs     : the .pgn file is attached to the article as a document
95Test08 Table 2 board   : two pgn tags horizontally in a table
96Test09 Live horizontal : broadcast in real time live.pgn in horizontal mode
97Test10 Live vertical   : broadcast in real time live.pgn in vertical mode
98
99The folder test\ is not required at run-time for the plugin.
100________________
101
1023.1 Troubleshooting
103
104Symptom 1: with Swiss Knife enabled
105Instead of the chessboard, I see the header of the PGN with eventually
106some strange quotes or even chess figurines inside PGN comments.
107
108Solution 1: disable pgn4spip then reenable pgn4spip.
109This allows pgn4spip to be enabled after Swiss Knife.
110
111Solution 2: if the problem persists, try again emptying the SPIP cache
112between disabling and reenabling the pgn4spip plugin.
113SPIP 3 : Maintenance > Empty the cache > Click "Empty the cache" in Current cache size
114
115Solution 3: if the problem persists, try again emptying equally the browser cache otherwise
116disable Swiss Knife or its tool "Curly inverted commas".
117__________
118
119Symptom 2: parameters inside tag <pgn> of attached document are not taken in consideration
120Wrong syntax: <pgn1 | movesDisplay = puzzle bd = s>
121
122Solution: add option="..." and remove each blank separator
123except after a value and the next parameter.
124<pgn1|option="movesDisplay=puzzle bd=s sS=35">
125
126See test\Test05
127________________
128
1293.2 Live broadcast of the chess game
130
131test\Test09 and test10 show the usage of parameters movesDisplay=live and refreshMinutes=0.25
132that manage the periodic refresh of the chessboard from file
133pgnData=http://localhost/spip/plugins/pgn4spip/pgn4web/live/live.pgn
134updated at a different frequency using the simulator
135spip\plugins\pgn4spip\pgn4web\live\live-simulation.sh
136
137This is an Unix Bash script that can be run in Windows with the freeware c:\cygwin
138Read instructions in test\Test09
139
140spip\plugins\pgn4spip\test\MacroRunSimu.bat is a batch tool to be customized.
141Indicate the full path of your web server and the folder of the plugin.
142It defines doskey macros for the command line "Command Prompt" in Windows
143to launch your web server and the (s)imulateur.
Note: See TracBrowser for help on using the repository browser.