19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: afficheur.php,v 1.13 2006-11-21 18:52:20 jp_milcent Exp $ |
// CVS : $Id: afficheur.php,v 1.14 2007-06-26 15:38:39 jp_milcent Exp $ |
/** |
* Application réalisant l'affichage du contenu stocké dans Papyrus. |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Alexandre GRANIER <alexandrel@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.13 $ $Date: 2006-11-21 18:52:20 $ |
*@version $Revision: 1.14 $ $Date: 2007-06-26 15:38:39 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
57,39 → 57,34 |
} |
|
function afficherContenuCorps() { |
$retour = ''; |
$db = $GLOBALS['_AFFICHEUR']['objet_pear_db']; |
$id_or = GEN_rechercheMenuCode($db, GEN_rechercheMenuIdentifiant($db, $GLOBALS['_AFFICHEUR']['menu_courant_id'])); |
|
|
$retour = ''; |
|
$db=$GLOBALS['_AFFICHEUR']['objet_pear_db']; |
|
$id_or=GEN_rechercheMenuCode($db,GEN_rechercheMenuIdentifiant($db,$GLOBALS['_AFFICHEUR']['menu_courant_id'])); |
|
$ligne_contenu=GEN_rechercheContenu($db,$id_or); |
$ligne_contenu = GEN_rechercheContenu($db, $id_or); |
|
$contenu = $ligne_contenu->gmc_contenu; |
|
// Inclusion de la bibliothèque Text_Wiki_Papyrus effectuées par Papyrus précédement |
// Les actions Text_Wiki_Papyrus sont gérées par Papyrus |
|
// Nous regardons si nous avons à faire à un texte sous format Wikini ou XHTML |
if (($ligne_contenu->gmc_ce_type_contenu == 1)||(substr($ligne_contenu->gmc_ce_type_contenu,-1)== 1)) { |
$retour = $contenu; |
} elseif (($ligne_contenu->gmc_ce_type_contenu == 2) || (substr($ligne_contenu->gmc_ce_type_contenu,-1)== 2)){ |
include_once AFFI_CHEMIN_BIBLIOTHEQUE_API.'text/wiki_wikini/Wikini.class.php'; |
// Création d'un objet Text_Wikini : |
$wikini =& new Text_Wikini(); |
// Pour éviter de remplacer les caractères spéciaux du XHTML: |
$wikini->setFormatConf('Xhtml', 'translate', false); |
// Configuration de la règle Freelink : |
$wikini->setRenderConf('Xhtml', 'freelink', 'pages', null); |
$wikini->setRenderConf('Xhtml', 'freelink', 'view_url', AFFI_URL_PAPYRUS); |
// Configuration de la règle Interwiki : |
$wikini->setRenderConf('Xhtml', 'interwiki', 'sites', $GLOBALS['_AFFICHEUR']['interwiki_sites']); |
// Application des règles de Wikini : |
$retour = $wikini->transform($contenu, 'Xhtml'); |
} |
|
// Inclusion de la bibliothèque Text_Wiki_Papyrus effectuées par Papyrus précédement |
// Les actions Text_Wiki_Papyrus sont gérées par Papyrus |
|
// Nous regardons si nous avons à faire à un texte sous format Wikini ou XHTML |
if (($ligne_contenu->gmc_ce_type_contenu == 1)||(substr($ligne_contenu->gmc_ce_type_contenu,-1)== 1)) { |
$retour = $contenu; |
} elseif (($ligne_contenu->gmc_ce_type_contenu == 2) || (substr($ligne_contenu->gmc_ce_type_contenu,-1)== 2)){ |
include_once AFFI_CHEMIN_BIBLIOTHEQUE_API.'text/wiki_wikini/Wikini.class.php'; |
// Création d'un objet Text_Wikini : |
$wikini =& new Text_Wikini(); |
// Pour éviter de remplacer les caractères spéciaux du XHTML: |
$wikini->setFormatConf('Xhtml', 'translate', false); |
// Configuration de la règle Freelink : |
$wikini->setRenderConf('Xhtml', 'freelink', 'pages', null); |
$wikini->setRenderConf('Xhtml', 'freelink', 'view_url', AFFI_URL_PAPYRUS); |
// Configuration de la règle Interwiki : |
$wikini->setRenderConf('Xhtml', 'interwiki', 'sites', $GLOBALS['_AFFICHEUR']['interwiki_sites']); |
// Application des règles de Wikini : |
$retour = $wikini->transform($contenu, 'Xhtml'); |
} |
|
//---------------------------------------------------------------------------- |
// Renvoie du contenu de la page |
328,6 → 323,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.13 2006-11-21 18:52:20 jp_milcent |
* Ajout de la possibilité de surligner des mots. |
* |
* Revision 1.12 2006/11/21 15:50:05 jp_milcent |
* Ajout du surlignage des mots passé dans la query string via la variable var_recherche. |
* |