Initialisation du projet
commit
272071d4cf
@ -0,0 +1,55 @@
|
||||
* text=auto !eol
|
||||
/LICENSE -text
|
||||
/LICENSE_maxiGos_v6 -text
|
||||
/README_usage -text
|
||||
lang/paquet-maxigos_en.php -text
|
||||
lang/paquet-maxigos_fr.php -text
|
||||
maxigos/_i18n/maxigos-rosewood-basic.js -text
|
||||
maxigos/_i18n/maxigos-rosewood-comment.js -text
|
||||
maxigos/_i18n/maxigos-rosewood-diagram.js -text
|
||||
maxigos/_i18n/maxigos-rosewood-game.js -text
|
||||
maxigos/_i18n/maxigos-rosewood-problem.js -text
|
||||
maxigos/_i18n/maxigos-rosewood-tree.js -text
|
||||
maxigos/_i18n/mgos-i18n-en.js -text
|
||||
maxigos/_i18n/mgos-i18n-fr.js -text
|
||||
maxigos/_i18n/mgos-i18n-ja.js -text
|
||||
maxigos/_i18n/mgos-i18n-zh-tw.js -text
|
||||
maxigos/_i18n/mgos-i18n-zh.js -text
|
||||
maxigos/fm.js -text
|
||||
maxigos/kifu.js -text
|
||||
maxigos/maxigos-chameleon-basic.js -text
|
||||
maxigos/maxigos-chameleon-comment.js -text
|
||||
maxigos/maxigos-chameleon-diagram.js -text
|
||||
maxigos/maxigos-chameleon-game.js -text
|
||||
maxigos/maxigos-chameleon-problem.js -text
|
||||
maxigos/maxigos-chameleon-tree.js -text
|
||||
maxigos/maxigos-classic-basic.js -text
|
||||
maxigos/maxigos-classic-comment.js -text
|
||||
maxigos/maxigos-classic-diagram.js -text
|
||||
maxigos/maxigos-classic-game.js -text
|
||||
maxigos/maxigos-classic-lesson.js -text
|
||||
maxigos/maxigos-classic-problem.js -text
|
||||
maxigos/maxigos-classic-tree.js -text
|
||||
maxigos/maxigos-edit.js -text
|
||||
maxigos/maxigos-minimalist-basic.js -text
|
||||
maxigos/maxigos-minimalist-comment.js -text
|
||||
maxigos/maxigos-minimalist-diagram.js -text
|
||||
maxigos/maxigos-minimalist-game.js -text
|
||||
maxigos/maxigos-minimalist-problem.js -text
|
||||
maxigos/maxigos-minimalist-tree.js -text
|
||||
maxigos/maxigos-neo-classic-basic.js -text
|
||||
maxigos/maxigos-neo-classic-comment.js -text
|
||||
maxigos/maxigos-neo-classic-diagram.js -text
|
||||
maxigos/maxigos-neo-classic-game.js -text
|
||||
maxigos/maxigos-neo-classic-problem.js -text
|
||||
maxigos/maxigos-neo-classic-tree.js -text
|
||||
maxigos/maxigos-tatami-basic.js -text
|
||||
maxigos/maxigos-tatami-comment.js -text
|
||||
maxigos/maxigos-tatami-diagram.js -text
|
||||
maxigos/maxigos-tatami-game.js -text
|
||||
maxigos/maxigos-tatami-problem.js -text
|
||||
maxigos/maxigos-tatami-tree.js -text
|
||||
maxigos/tiger.js -text
|
||||
/maxigos_administrations.php -text
|
||||
modeles/maxigos.html -text
|
||||
/paquet.xml -text
|
@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
@ -0,0 +1,9 @@
|
||||
maxiGos v6 Copyright (c) 1998-2016, Francois Mizessyn
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -0,0 +1,72 @@
|
||||
README_maxigos.txt
|
||||
|
||||
|
||||
maxigos est un modèle pour Spip qui permet l'implémentation des principales fonctionnalités de maxiGos, "un ensemble d'outils permettant d'insérer des parties, problèmes et diagrammes de go enregistrés au format sgf dans une page web."
|
||||
http://jeudego.org/maxiGos/
|
||||
Le contenu sgf peut être écrit en paramètre du modèle ou contenu dans un fichier au format sgf (Smart Game Format, https://en.wikipedia.org/wiki/Smart_Game_Format)
|
||||
|
||||
Le modèle a été testé sous Spip 3.1, mais il n'y a pas à priori de raison pour qu'il ne fonctionne pas également sous Spip 3.0, ou 2.1 et 2.0. Simplement, il faut tester. Des retours d'utilisateurs sont les bienvenus à ce propos.
|
||||
|
||||
***Configuration.***
|
||||
-* Les modèles sont à placer dans [votre_dossier_squelette]/modeles, par exemple: squelettes/modeles/maxigos.html et squelettes/modeles/autorise_sgf.html
|
||||
-* Le répertoire maxigos du package est à charger en sous répertoire immédiat de votre dossier squelettes
|
||||
|
||||
**Autoriser les documents SGF**
|
||||
Spip a "oublié" ;) d'autoriser les fichiers d'extension .sgf et les compresse zip. Il faut donc les autoriser directement dans la base de données, en ajoutant une ligne dans la table "spip_type_documents". Pour réaliser cela simplement, le package contient un modèle autorise_sgf.html qui ajoutera cette ligne dans la base si elle n'existe pas encore.
|
||||
Utilisation simplissime: <code><autorise_sgf|></code>. Ce modèle n'est évidemment à utiliser qu'une seule fois, et vous pouvez supprimer le fichier autorise_sgf.html ensuite. Si vous l'utilisez plusieurs fois, cela n'a pas d'impact, l'autorisation n'est créée qu'une seule fois.
|
||||
|
||||
Et si vous préférez, via ligne de commande:
|
||||
<code>INSERT INTO spip_type_documents (titre,extension,inclus,upload) VALUES("SGF","sgf","non","oui");</code> (les autres champs restent vides)
|
||||
Voir http://www.spip.net/fr_article2002.html
|
||||
|
||||
***Règles du format sgf.***
|
||||
Si vous voulez écrire du sgf directement dans le contenu, référez vous aux spécifications: http://www.red-bean.com/sgf/
|
||||
La plupart du temps, vous préférerez sans doute utiliser des fichiers sgf créés automatiquement.
|
||||
|
||||
|
||||
***Paramètres du modèle***
|
||||
**Formatage**
|
||||
- <code>langue=[langue]</code> où [langue] peut prendre les valeurs: fr (pour français, défaut), en (pour anglais), ja (pour japonais), zh (pour chinois), zh-tw (pour chinois taiwan)
|
||||
- <code>style=[style]</code> où [style] peut prendre les valeurs: classic (par défaut), neo (pour neo-classic), tatami, minimal (pour minimalist), cameleon, [qui sont des valeurs multitypes] ou fm, kifu, tiger [qui sont des valeurs monotypes]
|
||||
- <code>type=[type]</code> où [type] peut prendre les valeurs: basic (par défaut), comment, diagram, game, problem [qui sont des valeurs multistyles], tree, edit, lesson [qui sont des valeurs monostyles]
|
||||
|
||||
**Valeurs multitypes ou monotypes, et multistyles ou monostyles**
|
||||
-* Les valeurs de style multitypes et les valeurs de types multistyles peuvent être associées, par exemple: <code>|style=neo|type=comment</code> ou <code>|style=cameleon|type=problem</code>
|
||||
-* Par contre,
|
||||
-** les valeurs de style monotypes (fm, kifu, tiger) ont leur propre type (et donc, le paramètre <code>|type=[quelquechose]</code> ne servira à rien.
|
||||
-** et les valeurs de types monostyles (edit, lesson) ont leur propre style (et donc, le paramètre <code>|style=[quelquechose]</code> ne servira à rien.
|
||||
|
||||
Pour la signification des paramètres style et type, référez-vous aux exemples présentés sur cette page http://jeudego.org/maxiGos/_maxigos/_doc/_fr/download.php du site de maxiGos, sous l'intertitre "Téléchargement des lecteurs autonomes uniquement", et visualisez les exemples.
|
||||
|
||||
|
||||
**Contenu**
|
||||
Si les deux deux paramètres qui suivent (id_doc et contenu) sont présents, seul le paramètre id_doc sera pris en compte.
|
||||
- <code>id_doc=XX</code> -- le contenu est dans un fichier d'id=XX, avec l'extension .sgf, téléchargé via Spip; peu importe que ce fichier soit lié ou non à l'objet (article, par exemple) où l'appel du modèle est inséré
|
||||
- <code>contenu=un_contenu_sgf_ecrit_directement</code> -- le contenu SGF est écrit directement ou copié/collé dans l'objet Spip. {Attention, le contenu sgf écrit manuellement dans un article, ne supporte pas les "|" (pipe).} Ceci vaut uniquement pour le paramètre contenu.
|
||||
|
||||
***Exemples d'utilisation***
|
||||
Dans un article, vu que l'utilisation dans un squelette paraît ici peu pertinente.
|
||||
|
||||
<code><maxigos|contenu=(;FF[4]GM[1]SZ[19]VW[aa:ii]FG[1]AW[ee]AB[de][fe][ed];B[ef]C[Correct !])></code> présentera un exemple de problème (prise d'une pierre), en style classic, type basic.
|
||||
|
||||
<code><maxigos|style=tatami|type=tree|langue=zh|id_doc=XX></code> affichera un lecteur de style tatami, de type tree, en chinois, avec la partie ou le problème contenu dans un fichier .sgf d'id=XX.
|
||||
|
||||
L'appel du modèle peut se faire également sans paramètres de cette manière: <code><maxigos|></code> (sans oublier le | (pipe)). L'appel produit alors un éditeur basique de style classic et de type basic. Si on ajoute des paramètres de style, de type et/ou de langue, sans paramètres de fichier ni de contenu, l'appel produit alors également un éditeur basique, mais de style [style], de type [type] et/ou de langue [langue]
|
||||
|
||||
***Package***
|
||||
Le package comprend:
|
||||
- le modèle maxigos.html
|
||||
- le modèle autorise_sgf.html
|
||||
- un mode d'emploi README_maxigos.txt
|
||||
- le répertoire maxigos contenant une version de maxiGos v6.64 (lecteurs autonomes seulement + editeur + fichiers de langue)
|
||||
|
||||
***Evolution***
|
||||
V 1.3:
|
||||
- Remplacement du paramètre fichier (nom du fichier sgf) par id_doc (id du fichier sgf). Ca simplifie l'écriture.
|
||||
- Recherche du fichier via une boucle documents (ça permet de supprimer la constante CHEMIN_REPERTOIRE_SPIP).
|
||||
- modèle autorise_sgf.html qui crée l'extension sfg dans spip_types_documents.
|
||||
V 1.2:
|
||||
- Protection des variables php par préfixe unique (maxigos_).
|
||||
- Mise en minuscules automatique des noms de fichiers pour correspondre aux uploads spipiens.
|
||||
- Ajout des styles cameleon (multitypes) fm, kifu, tiger (monotypes) et du type lesson (monostyle).
|
||||
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
// This is a SPIP language file -- Ceci est un fichier langue de SPIP
|
||||
// Fichier source, a modifier dans svn://zone.spip.org/spip-zone/_plugins_/albums/trunk/lang/
|
||||
|
||||
$GLOBALS[$GLOBALS['idx_lang']] = array(
|
||||
|
||||
// A
|
||||
'maxigos_description' => 'Maxigos proposes a model for Spip which allows the implementation of the main functionalities of [maxiGos-> http://jeudego.org/maxiGos/], « a set of tools allowing to insert parts, problems and diagrams of Go saved in sgf format in a web page. »
|
||||
|
||||
The sgf content can be written as a model parameter or contained in a sgf file ([Smart Game Format-> https://en.wikipedia.org/wiki/Smart_Game_Format]).
|
||||
|
||||
The model has been tested under Spip 3.1, but there is not particular reason that it does not work also under Spip 3.0, or 2.1 and 2.0. In other words, you have to test. Feedback from users is welcome.',
|
||||
'maxigos_nom' => 'maxiGos integration',
|
||||
'maxigos_slogan' => 'Go diagrams with maxiGos V6.4.'
|
||||
|
||||
);
|
||||
?>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@
|
||||
// begin of localization
|
||||
if (typeof mxG=='undefined') mxG={};
|
||||
// end of localization
|
@ -0,0 +1,3 @@
|
||||
// begin of localization
|
||||
if (typeof mxG=='undefined') mxG={};
|
||||
// end of localization
|