From: Pierre Habouzit (MadCoder
Date: Thu, 27 Jan 2005 17:40:04 +0000 (+0000)
Subject: wiki2xhtml added
X-Git-Tag: xorg/old~360
X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=9d843a61036d392b46fd496ad9007a17644c702f;p=platal.git
wiki2xhtml added
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-398
---
diff --git a/AUTHORS b/AUTHORS
index a7c5077..f36eabc 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,12 +13,21 @@ Polytechnique.org TEAM :
Vincent Palatin
-XML-RPC stuff :
+
+XML-RPC stuff (public domain/GPL) :
Dan Libby http://xmlrpc-epi.sourceforge.net/
Marc Boeren http://fr2.php.net/xml-rpc
-Smarty Trimwhitespace prefilter :
+Smarty Trimwhitespace prefilter (public domain) :
Monte Ohrt http://smarty.incutio.com/?page=SmartyTips
-Some of the icons :
+Some of the icons (under LGPL) :
David Vignoni http://www.icon-king.com/
+
+Wiki2xhtml (under MPL) :
+ Olivier Meunier. http://www.neokraft.net/
+ Stephanie Booth
+ Mathieu Pillard
+ Christophe Bonijol
+ Jean-Charles Bagneris
+
diff --git a/include/acronyms.txt b/include/acronyms.txt
new file mode 100644
index 0000000..35b225d
--- /dev/null
+++ b/include/acronyms.txt
@@ -0,0 +1,46 @@
+(X)HTML : (eXtensible) HyperText Markup Language
+AFNOR : Association Française de NORmalisation
+ANSI : American National Standard Institute
+ASCII : American Standard Code for Information Interchange
+ASP : Active Server Pages
+CSS : Cascading Style Sheets
+DHTML : Dynamic HyperText Markup Language
+DOM : Document Object Model
+DTD : Document Type Definition
+ECMA : European Computer Manufacturer Association
+FAI : Fournisseur d'Acces à Internet
+FAQ : Foire Aux Questions
+FTP : File Transfer Protocol
+FIDEV : Formation et Insertion pour DEficients Visuels
+HTML : HyperText Markup Language
+HTTP : HyperText Transfer Protocol
+IP : Internet Protocol
+IRC : Internet Relay Chat
+ISO : International Standard Organization
+JS : JavaScript
+MIME : Multipurpose Internet Mail Extension
+P3P : Platform for Privacy Preferences Project
+PC : Personnal Computer
+PHP : PHP: Hypertext Preprocessor
+PICS : Platform for Internet Content Selection
+PNG : Portable Network Graphics
+RDF : Resource Description Framework
+RFC : Request For Comment
+RSS : RDF Site Summary
+SGML : Standard Generalized Markup Language
+SMIL : Synchronized Multimedia Integration Language
+SSII : Société de Service et d'Ingénierie Informatique
+SVG : Scalable Vector Graphics
+TAG : Technical Architecture Group
+TCP : Transmission Control Protocol
+URI : Universal Resource Identifier
+URL : Uniform Resource Locator
+URN : Universal Resource Name
+W3C : World Wide Web Consortium
+WAI : Web Accessibility Initiative
+WYSIWYG : What You See Is What You Get
+WWW : World Wide Web
+XHTML : eXtensible HyperText Markup Language
+XML : eXtensible Markup Language
+XSL : eXtensible Stylesheet Language
+XSLT : eXtensible Stylesheet Language Transformation
diff --git a/include/xorg.wiki2xhtml.php b/include/xorg.wiki2xhtml.php
new file mode 100644
index 0000000..b577ac2
--- /dev/null
+++ b/include/xorg.wiki2xhtml.php
@@ -0,0 +1,1085 @@
+ Bug du Call-time pass-by-reference
+#
+# 3.1
+# Olivier
+# => Ajout des macros «««..»»»
+# => Ajout des blocs vides øøø
+# => Ajout du niveau de titre paramétrable
+# => Option de blocage du parseur dans les
+# => Titres au format setext (experimental, désactivé)
+#
+# 3.0
+# Olivier => Récriture du parseur inline, plus d'erreur XHTML
+# => Ajout d'une vérification d'intégrité pour les listes
+# => Les acronymes sont maintenant dans un fichier texte
+# => Ajout d'un tag images ((..)), del --..-- et ins ++..++
+# => Plus possible de faire des liens JS [lien|javascript:...]
+# => Ajout des notes de bas de page §§...§§
+# => Ajout des mots wiki
+#
+# 2.5
+# Olivier => Récriture du code, plus besoin du saut de ligne entre blocs !=
+#
+# 2.0
+# Stephanie => correction des PCRE et ajout de fonctionnalités
+# Mathieu => ajout du strip-tags, implementation des options, reconnaissance automatique d'url, etc.
+# Olivier => chagement de active_link en active_urls
+# => ajout des options pour les blocs
+# => intégration de l'aide dans le code, avec les options
+# => début de quelque chose pour la reconnaissance auto d'url (avec Mat)
+
+# TODO :
+# Mathieu => active_wiki_urls (modifier wikiParseUrl ?)
+# => active_auto_urls
+#
+# * => ajouter des options.
+# => trouver un meilleur nom pour active_link ? (pour le jour ou ca sera tellement une usine
+# a gaz que on generera des tags :)
+#
+
+# Wiki2xhtml
+
+class wiki2xhtml
+{
+ var $__version__ = '3.1a';
+
+ var $T;
+ var $opt;
+ var $line;
+ var $foot_notes;
+
+ var $tags;
+ var $open_tags;
+ var $close_tags;
+ var $all_tags;
+ var $tag_pattern;
+ var $escape_table;
+ var $allowed_inline = array();
+
+ function wiki2xhtml()
+ {
+ # Mise en place des options
+ $this->setOpt('active_title',1); # Activation des titres !!!
+ $this->setOpt('active_setext_title',0); # Activation des titres setext (EXPERIMENTAL)
+ $this->setOpt('active_hr',1); # Activation des
+ $this->setOpt('active_lists',1); # Activation des listes
+ $this->setOpt('active_quote',1); # Activation du
+ $this->setOpt('active_pre',1); # Activation du
+ $this->setOpt('active_empty',0); # Activation du bloc vide øøø
+ $this->setOpt('active_auto_urls',0); # Activation de la reconnaissance d'url
+ $this->setOpt('active_urls',1); # Activation des liens []
+ $this->setOpt('active_auto_img',1); # Activation des images automatiques dans les liens []
+ $this->setOpt('active_img',1); # Activation des images (())
+ $this->setOpt('active_anchor',1); # Activation des ancres ~...~
+ $this->setOpt('active_em',1); # Activation du ''...''
+ $this->setOpt('active_strong',1); # Activation du __...__
+ $this->setOpt('active_br',1); # Activation du %%%
+ $this->setOpt('active_q',1); # Activation du {{...}}
+ $this->setOpt('active_code',1); # Activation du @@...@@
+ $this->setOpt('active_acronym',1); # Activation des acronymes
+ $this->setOpt('active_ins',1); # Activation des ins ++..++
+ $this->setOpt('active_del',1); # Activation des del --..--
+ $this->setOpt('active_footnotes',1); # Activation des notes de bas de page
+ $this->setOpt('active_wikiwords',0); # Activation des mots wiki
+ $this->setOpt('active_macros',0); # Activation des macros «««..»»»
+
+ $this->setOpt('parse_pre',1); # Parser l'intérieur de blocs
?
+
+ $this->setOpt('active_fix_word_entities',1); # Fixe les caractères MS
+ $this->setOpt('active_fr_syntax',1); # Corrections syntaxe FR
+
+ $this->setOpt('first_title_level',3); # Premier niveau de titre
+
+ $this->setOpt('note_prefix','wiki-footnote');
+ $this->setOpt('note_str','