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