source: spip-zone/_plugins_/pgn4spip/branches/_ReadMe.txt @ 90061

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

Avant de tout casser on passe le trunk dans "branches"

File size: 6.2 KB
Line 
1The pgn4spip 2.61.0 plug-in for SPIP 2 and 3 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
16Demo off-line
17http://localhost/spip/plugins/pgn4spip/pgn4web/demo.html
18
19pgn4spip has been developed by Matt Chesstale in PHP, Javascript, HTML, CSS, CFG and SPIP.
20matteo.chesstale@gmail.com
21license: GNU GPL 3.0 (c) 2012
22
23    This program is free software: you can redistribute it and/or modify
24    it under the terms of the GNU General Public License as published by
25    the Free Software Foundation, either version 3 of the License, or
26    (at your option) any later version.
27
28    This program is distributed in the hope that it will be useful,
29    but WITHOUT ANY WARRANTY; without even the implied warranty of
30    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
31    GNU General Public License for more details.
32
33    You should have received a copy of the GNU General Public License
34    along with this program.  If not, see <http://www.gnu.org/licenses/>.
35
36It does not require the CFG 3.x plug-in for its configuration in SPIP 3.x
37It requires the CFG 1.x plug-in for its configuration in SPIP 2.x
38http://plugins.spip.net/cfg.html
39
40pgn4spip is compatible with the plug-in Swiss Knife 1.8.x,
41tool "Curly inverted commas" << French double quotes >>
42pgn4spip must be enabled AFTER Swiss Knife.
43pgn4spip does not require Swiss Knife.
44________________
45
461. Setup of the plug-in
47
48Unzip pgn4spip-2.61.0.zip in the folder of SPIP plug-ins.
49For example: D:\Xampp\Xampp177\htdocs\spip\plugins\
50
51Download the latest version of pgn4web: pgn4web-2.61.zip
52http://code.google.com/p/pgn4web/downloads/list
53
54Unzip pgn4web-2.61.zip in the pgn4spip folder
55For example: D:\Xampp\Xampp177\htdocs\spip\plugins\pgn4spip
56
57The name of plug-in folder is always in lowercase.
58
59Remove the version number:
60rename pgn4spip\pgn4web-2.61 into pgn4spip\pgn4web
61For example: D:\Xampp\Xampp177\htdocs\spip\plugins\pgn4spip\pgn4web
62
63The pgn4web folder has a size of 13 MB.
64In the case of site having a limited hard disk,
65one can eventually delete certain unused fonts
66among alpha, merida, svgchess or demo files.
67Keep at least the fonts uscf/20 and 26.
68________________
69
702. Configuration of the plugin
71
72http://localhost/spip/ecrire/?exec=admin_plugin
73SPIP Configuration > Manage plugins
74
75Click [x] to activate the plug-in.
76In SPIP 3, confirm clicking to "SUBMIT" even grayed.
77
78Click to the name "pgn4spip" to get help.
79
80Click to cfg-16.png icon on the right at the level of the name pgn4spip
81
82The folder doc\ is not required at run-time for the plugin.
83You do not need to upload it in your on-line SPIP web site.
84
85The configuration can be optionally tested on-line in
86http://pgn4web.casaschi.net/board-generator.html
87
88or off-line
89http://localhost/spip/plugins/pgn4spip/pgn4web/board-generator.html
90________________
91
923. Advanced usage
93
94The plugin can be optionally configured in the parameters of the [pgn] tag
95inside an article. See the help during the configuration of the plugin.
96
97doc\pgn4web parameters.txt
98http://localhost/spip/plugins/pgn4spip/pgn4web/board.html?help=true
99
100Example in the body of an article:
101
102Before
103[pgn height=260 autoplayMode=loop] 1. e4 Nf6 [/pgn]
104After
105
106Examples of articles SPIP with the [pgn] tag
107
108Text file example of test to be copied-pasted in a SPIP 2 or SPIP 3 article:
109Test01 Symbol eval.txt : variations, evaluations symbols "with the idea of"
110Test02 MultiPgn.txt    : several chess games
111Test03 Puzzle Fen.txt  : two chess problems
112Test04 Puzzle URL      : chess problems through the URL of .pgn file
113Test05 Puzzle Doc.txt  : chess problems in .pgn file attached to the article
114Test06 Comment.txt     : comments in a chess game
115Test07 Puzzle Docs     : the .pgn file is attached to the article as a document
116Test08 Table 2 board   : two pgn tags horizontally in a table
117Test09 Live horizontal : broadcast in real time live.pgn in horizontal mode
118Test10 Live vertical   : broadcast in real time live.pgn in vertical mode
119
120The folder test\ is not required at run-time for the plugin.
121________________
122
1233.1 Troubleshooting
124
125Symptom 1: with Swiss Knife enabled
126Instead of the chessboard, I see the header of the PGN with eventually
127some strange quotes or even chess figurines inside PGN comments.
128
129Solution 1: disable pgn4spip then reenable pgn4spip.
130This allows pgn4spip to be enabled after Swiss Knife.
131
132Solution 2: if the problem persists, try again emptying the SPIP cache
133between disabling and reenabling the pgn4spip plugin.
134SPIP 3 : Maintenance > Empty the cache > Click "Empty the cache" in Current cache size
135SPIP 2 : Configuration > Empty the cache > Click "Empty the cache" in Current size of the cache
136
137Solution 3: if the problem persists, try again emptying equally the browser cache otherwise
138disable Swiss Knife or its tool "Curly inverted commas".
139__________
140
141Symptom 2: parameters inside tag <pgn> of attached document are not taken in consideration
142Wrong syntax: <pgn1 | movesDisplay = puzzle bd = s>
143
144Solution: add option="..." and remove each blank separator
145except after a value and the next parameter.
146<pgn1|option="movesDisplay=puzzle bd=s sS=35">
147
148See test\Test05
149________________
150
1513.2 Live broadcast of the chess game
152
153test\Test09 and test10 show the usage of parameters movesDisplay=live and refreshMinutes=0.25
154that manage the periodic refresh of the chessboard from file
155pgnData=http://localhost/spip/plugins/pgn4spip/pgn4web/live/live.pgn
156updated at a different frequency using the simulator
157spip\plugins\pgn4spip\pgn4web\live\live-simulation.sh
158
159This is an Unix Bash script that can be run in Windows with the freeware c:\cygwin
160Read instructions in test\Test09
161
162spip\plugins\pgn4spip\test\MacroRunSimu.bat is a batch tool to be customized.
163Indicate the full path of your web server and the folder of the plugin.
164It defines doskey macros for the command line "Command Prompt" in Windows
165to launch your web server and the (s)imulateur.
Note: See TracBrowser for help on using the repository browser.