21,7 → 21,7 |
// | along with Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: Wikini.class.php,v 1.4 2004-12-07 12:17:41 jpm Exp $ |
// CVS : $Id: Wikini.class.php,v 1.5 2005-01-20 19:39:43 jpm Exp $ |
/** |
* Classe configurant le formatage pour Wikini. |
* |
36,7 → 36,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.4 $ $Date: 2004-12-07 12:17:41 $ |
*@version $Revision: 1.5 $ $Date: 2005-01-20 19:39:43 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
44,6 → 44,7 |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
74,6 → 75,7 |
'Table', // Tableaux |
'Code', // Inclusion de code avec coloration syntaxique |
'Emphasis', // Italique |
'Strong',// Gras |
'Freelink', // Nom de Page qui ne sont pas au format Wiki |
'Heading', // Titre |
'Horiz', // Ligne horizontale |
85,8 → 87,7 |
'Raw', // Inclusion de HTML et non traitement du contenu par les règles de formatage. Modifié par rapport à l'original de Text_Wiki |
'Revise', // Suppression de texte. Modifié par rapport à l'original de Text_Wiki |
'Tt', // Texte à espacement fixe |
'Url', // Inclusion d'url dont les url d'images |
'Strong'// Gras |
'Url' // Inclusion d'url dont les url d'images |
); |
/** |
* |
99,19 → 100,19 |
*/ |
var $delim = 12; |
|
function Text_Wikini() |
function Text_Wikini($rules = null) |
{ |
Text_Wiki::Text_Wiki(); |
|
$this->addPath( |
'parse', |
$this->fixPath(dirname(__FILE__)) . 'Parse/' |
); |
|
$this->addPath( |
'render', |
$this->fixPath(dirname(__FILE__)) . 'Render/' |
); |
//Text_Wiki::Text_Wiki(); |
if (is_array($rules)) { |
$this->rules = $rules; |
} |
// Nous devons sortir les fichiers de Text_Wiki du dépot Pear car la fonction file_exists de PHP utilisée dans |
// la méthode findfile de Text_Wiki renvoie false. |
$this->addPath('parse', $this->fixPath(dirname(__FILE__)) .'../../pear/Text/Wiki/Parse/'); |
$this->addPath('render', $this->fixPath(dirname(__FILE__)) .'../../pear/Text/Wiki/Render/'); |
// Pour les règles spécifiques à Wikini: |
$this->addPath('parse', $this->fixPath(dirname(__FILE__)) . 'Parse/'); |
$this->addPath('render', $this->fixPath(dirname(__FILE__)) . 'Render/'); |
} |
|
/** |
171,9 → 172,17 |
// yes, get the replacement text for the delimited |
// token number and unset the flag. |
$key = (int)$key; |
$rule = $this->tokens[$key][0]; |
$opts = $this->tokens[$key][1]; |
$output .= $this->renderObj[$rule]->token($opts); |
$rule = null; |
if (isset($this->tokens[$key][0])) { |
$rule = $this->tokens[$key][0]; |
} |
$opts = null; |
if (isset($this->tokens[$key][1])) { |
$opts = $this->tokens[$key][1]; |
} |
if (isset($this->renderObj[$rule]) && is_object($this->renderObj[$rule])) { |
$output .= $this->renderObj[$rule]->token($opts); |
} |
$in_delim = false; |
|
} else { |
270,6 → 279,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2004/12/07 12:17:41 jpm |
* Correction message d'erreur. |
* |
* Revision 1.3 2004/11/25 15:53:24 jpm |
* Suppression action inclure, migrer dans Papyrus. |
* |