-----Message d'origine-----
De : Cédric Despres
Envoyé : vendredi 9 février 2007 12:17
À : cedric.morin@yterium.com
Objet : RE: [Spip-zone-commit] r9547 - in /_plugins_/_test_/tinymce_1_9_1:
./ config/ files/ includes/ includes/zip/ tiny_mce/
En fait, la librairie CURL était nécessaire uniquement pour télécharger
l'archives contenant les fichiers de langues. Ceux-ci sont générés
dynamiquement par le site de TinyMCE à partir d'un formulaire, donc je suis
obligé de faire un POST sur le site en spécifiant les langues souhaitées
pour récupérer le zip de langues.
On pourrait passer outre (en recodant ce que fait la librairie CURL en PHP
(header, socket, ...)), mais j'ai été au plus rapide devant les
protestations sur la taille du plugin.
J'ai regardé la fonction recuperer_page. Apparemment, elle est capable de
faire un POST, donc ça devrait fonctionner. Merci pour l'information. Je
testerais.
Cédric D.
-----Message d'origine-----
De : cedric.morin@yterium.com [mailto:cedric.morin@yterium.com]
Envoyé : vendredi 9 février 2007 11:58
À : spip-zone@rezo.net
Cc : cdespres69@free.fr
Objet : Re: [Spip-zone-commit] r9547 - in /_plugins_/_test_/tinymce_1_9_1:
./ config/ files/ includes/ includes/zip/ tiny_mce/
Pour l'installation du plugin et le telechargement de tiny, il y a une
API en 1.9.2 qui peut suffire.
CURL est-il vraiment indispensable ?
j'ai pas regardé le code, mais dans spip on a recuperer_page pour recup
des fichiers distants.
Cedric
cdespres69@free.fr a écrit :
Author: cdespres69@free.fr
Date: Fri Feb 9 11:48:02 2007
New Revision: 9547Log:
Les fichiers de TinyMCE ont ete supprimes afin d'alleger le plugin (et la
SVN).
Ils sont automatiquement telecharges au premier chargement du plugin
(fichiers TinyMCE + packs de langues).
Added:
_plugins_/_test_/tinymce_1_9_1/files/
_plugins_/_test_/tinymce_1_9_1/files/filemanager.zip (with props)
_plugins_/_test_/tinymce_1_9_1/files/ibrowser.zip (with props)
_plugins_/_test_/tinymce_1_9_1/includes/
_plugins_/_test_/tinymce_1_9_1/includes/cls_curl.php
_plugins_/_test_/tinymce_1_9_1/includes/zip/
_plugins_/_test_/tinymce_1_9_1/includes/zip/dUnzip2.inc.php
_plugins_/_test_/tinymce_1_9_1/includes/zip/documentation.txt
Removed:
_plugins_/_test_/tinymce_1_9_1/tiny_mce/
Modified:
_plugins_/_test_/tinymce_1_9_1/changelog.txt
_plugins_/_test_/tinymce_1_9_1/config/tiny_mce_config.js
_plugins_/_test_/tinymce_1_9_1/plugin.xml
_plugins_/_test_/tinymce_1_9_1/tinymce_acti_header_prive.php
_plugins_/_test_/tinymce_1_9_1/tinymce_acti_options.phpModified: _plugins_/_test_/tinymce_1_9_1/changelog.txt
============================================================================
--- _plugins_/_test_/tinymce_1_9_1/changelog.txt (original)
+++ _plugins_/_test_/tinymce_1_9_1/changelog.txt Fri Feb 9 11:48:02 2007
@@ -1,15 +1,20 @@
-v 0.1 : 07/02/2007 : Cedric Despres
+TODO :
+ - ajout de configuration du plugin pour permettre de choisir les zones
sur lesquelles ont souhaite le mini-word (descriptif article, texte article,
ps article, texte brève, ...)
+ - passage de ibrowser et filemanager en plugin TinyMCE complet (ajout de
tous les paramètres de configuration possibles)
+
+
+
+v 0.2 : 09/02/2007 : Cédric Despres
+ - Les fichiers de TinyMCE ont été supprimés afin d'alléger le plugin (et
la SVN). Ils sont automatiquement téléchargés au premier chargement du
plugin (fichiers TinyMCE + packs de langues).
+ Le téléchargement du pack de langue nécessite la librairie CURL. A
défaut, on essaie de l'activer via PHP.
+ En cas de nouvelle version de TinyMCE ou de pack de langues souhaités
autres que Anglais, il faut changer deux constantes dans le fichier
tinymce_acti_options.php.
+
+
+v 0.1 : 06/02/2007 : Cedric Despres
- Création du plugin intégrant TinyMCE dans Spip
- intégration de ibrowser dans TinyMCE sous forme de plugin (ajout
de variable dans la configuration de TinyMCE)
- intégration de filemanager dans TinyMCE sous forme de plugin
(ajout de variable dans la configuration de TinyMCE)
- - les raccourcis typographiques de Spip sont toujours utilisables
dans tinyMCE. On peut également mettre les images de Spip sous la forme
<img25|...>, les <doc>, et même les <forms> (pour le plugin forms ou
forms_et_tables).
-
-
Le plugin nécessite la modification de deux fichiers Spip pour
fonctionner (la modification sera sans doute intégrer à la prochaine version
de Spip)
Le plugin activé intègre le mini-word dans la page de modification
d'article et de breves
Le plugin activé permet le rendu de l'article/brêve avec les styles du
site
-TODO :
-- ajout de configuration du plugin pour permettre de choisir directement
dans l'espace privé de Spip les zones sur lesquelles ont souhaite le
mini-word (descriptif article, texte article, ps article, texte brève, ...),
ainsi que la configuration complète de tinymce
-- passage de ibrowser et filemanager en plugin TinyMCE complet (ajout de
tous les paramètres de configuration possibles)
-- Pour ce qui est de la mise à jour de la version de TinyMCE, j'ai
construis le plugin afin qu'on puisse remplacer le répertoire concerné par
la nouvelle version, tout simplement; sans plus de modification. Il faudrait
prévoir un bouton "installation" ou "mise à jour de TinyMCE" dans l'espace
privé, et que cela télécharge et installe automatiquement la dernière
version.
\ No newline at end of file
Modified: _plugins_/_test_/tinymce_1_9_1/config/tiny_mce_config.js
============================================================================
--- _plugins_/_test_/tinymce_1_9_1/config/tiny_mce_config.js (original)
+++ _plugins_/_test_/tinymce_1_9_1/config/tiny_mce_config.js Fri Feb 9
11:48:02 2007
@@ -4,7 +4,7 @@
filemanager_docs_relative_path : '/documents', //par défaut
'/documents'
filemanager_base_url : '/',
//par défaut '/'
- filemanager_base_path : 'C:/Spip-zone/mydev/', //par défaut
'../../../../../../' soit la racine du site
+ //filemanager_base_path : 'C:/Spip-zone/mydev/',
//par défaut '../../../../../../../../' soit la racine du site
ibrowser_library : '/images/librairie/',
//par défaut "/images/librairie/"
mode : "specific_textareas",Added: _plugins_/_test_/tinymce_1_9_1/files/filemanager.zip
============================================================================
Binary file - no diff available.
Propchange: _plugins_/_test_/tinymce_1_9_1/files/filemanager.zip
----------------------------------------------------------------------------
--
svn:mime-type = application/octet-stream
Added: _plugins_/_test_/tinymce_1_9_1/files/ibrowser.zip
============================================================================
Binary file - no diff available.
Propchange: _plugins_/_test_/tinymce_1_9_1/files/ibrowser.zip
----------------------------------------------------------------------------
--
svn:mime-type = application/octet-stream
Added: _plugins_/_test_/tinymce_1_9_1/includes/cls_curl.php
============================================================================
--- _plugins_/_test_/tinymce_1_9_1/includes/cls_curl.php (added)
+++ _plugins_/_test_/tinymce_1_9_1/includes/cls_curl.php Fri Feb 9
11:48:02 2007
@@ -0,0 +1,468 @@
+<?php
+/**
+ * @author Dick Munroe (munroe@csworks.com)
+ * @copyright copyright @ 2004-2006, Dick Munroe, released under the GPL.
+ * @license csworks.com - Ce site web est à vendre ! - Ressources et information concernant csworks Resources and Information.
+ * @version 1.1.3
+ * @package cURL
+ *
+ * The cURL class is a thin wrapper around the procedural interface
+ * to cURL provided by PHP. I use it mostly as a base class for
+ * web services whose low level interface is, literally, web pages.
+ *
+ * There are a few differences (value added, I guess) between the
interface
+ * provided by this class and the procedural cURL interface. Most
+ * noticable are:
+ *
+ * 1. The curl::exec function (when returning data to the caller rather
+ * than simply outputing it) always parses the HTTP header and
returns
+ * only the body portion of the reqeust. The header is available via
+ * the curl::getHeader method.
+ * 2. The status of the last curl::exec is always maintained. It is
+ * available via the curl::getStatus method. In addition to the
information
+ * returned by curl_getinfo, that of curl_error and curl_errno is
folded
+ * in as well.
+ *
+ * @example ./example.class.curl.php
+ */
+
+//
+// Edit History:
+//
+// Dick Munroe munroe@csworks.com 30-Nov-2004
+// Initial Version Created.
+//
+// Dick Munroe munroe@csworks.com 01-Dec-2004
+// Forgot to check for cURL actually being in this instance of PHP.
+//
+// Dick Munroe (munroe@csworks.com) 07-Apr-2006
+// Fix tab characters.
+// Add utility function to return post string.
+//
+// Richard W. Schlatter (richard@rth10260.info) 27-Apr-2006
+// Extend processing for headers when CURLOPT_FOLLOWLOCATION is also
set.
+// Only the headers of the final page will be used to return parsed
headers.
+// Add utility function to return array of all collected headers.
+//
+// Dick Munroe (munroe@csworks.com) 01-May-2006
+// asPostString doesn't need to be an object specific method.
+//
+// Dick Munroe (munroe@csworks.com) 02-May-2006
+// Not all versions of PHP allow returning of a reference to the
result
+// of a function.
+//
+// Richard W. Schlatter (richard@rth10260.info) 03-May-2006
+// For consistency, return an empty array if there aren't any
headers
+// to be parsed.
+//
+// Richard W. Schlatter (richard@rth10260.info) 05-Jun-2006
+// Don't parse headers in the event of an error when executing a
cURL request.
+//
+// Cédric Despres 14-Sept-2006
+// Add a function to do a POST easily (function post())
+// Set the CURLOPT_FOLLOWLOCATION at True by default
+// automatically set CURLOPT_USERAGENT to the client's
user-agent
+
+
+class cls_curl
+{
+ /**
+ * The mapping to caseless header names.
+ *
+ * @access private
+ * @var array
+ */
+
+ var $m_caseless;
+
+ /**
+ * The handle for the current curl session.
+ *
+ * @access private
+ * @var resource
+ */
+
+ var $m_handle;
+
+ /**
+ * The parsed contents of the HTTP header if one happened in the
+ * message. All repeated elements appear as arrays.
+ *
+ * The headers are stored as an associative array, the key of which
+ * is the name of the header, e.g., Set-Cookie, and the values of
which
+ * are the bodies of the header in the order in which they occurred.
+ *
+ * Some headers can be repeated in a single header, e.g., Set-Cookie
and
+ * pragma, so each type of header has an array containing one or more
+ * headers of the same type.
+ *
+ * The names of the headers can, potentially, vary in spelling from
+ * server to server and client to client. No attempt to
regulate this
+ * is made, i.e., the curl class does not force all headers to lower
+ * or upper class, but it DOES collect all headers of the same type
+ * under the spelling of the type of header used by the FIRST header
+ * of that type.
+ *
+ * For example, two headers:
+ *
+ * 1. Set-Cookie: ...
+ * 2. set-cookie: ...
+ *
+ * Would appear as $this->m_header['Set-Cookie'][0] and ...[1]
+ *
+ * @access private
+ * @var mixed
+ */
+
+ var $m_header;
+
+ /**[... 1149 lines stripped ...]
_______________________________________________
Spip-zone-commit@rezo.net -
http://listes.rezo.net/mailman/listinfo/spip-zone-commit