Subversion Repositories Applications.papyrus

Rev

Rev 1062 | Rev 2002 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1062 Rev 1498
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: afficheur.php,v 1.13 2006-11-21 18:52:20 jp_milcent Exp $
22
// CVS : $Id: afficheur.php,v 1.14 2007-06-26 15:38:39 jp_milcent Exp $
23
/**
23
/**
24
* Application réalisant l'affichage du contenu stocké dans Papyrus.
24
* Application réalisant l'affichage du contenu stocké dans Papyrus.
25
*
25
*
26
* Récupère le dernier contenu lié à un menu et le retourne.
26
* Récupère le dernier contenu lié à un menu et le retourne.
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Alexandre GRANIER <alexandrel@tela-botanica.org>
32
*@author        Alexandre GRANIER <alexandrel@tela-botanica.org>
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.13 $ $Date: 2006-11-21 18:52:20 $
34
*@version       $Revision: 1.14 $ $Date: 2007-06-26 15:38:39 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 55... Line 55...
55
{
55
{
56
    return '';
56
    return '';
57
}
57
}
Line 58... Line 58...
58
 
58
 
-
 
59
function afficherContenuCorps() {
-
 
60
	$retour = '';
-
 
61
    $db = $GLOBALS['_AFFICHEUR']['objet_pear_db'];
Line 59... Line -...
59
function afficherContenuCorps() {
-
 
60
 
-
 
61
 
-
 
62
    $retour = '';
-
 
63
    
-
 
64
    $db=$GLOBALS['_AFFICHEUR']['objet_pear_db'];
-
 
65
 
-
 
66
	$id_or=GEN_rechercheMenuCode($db,GEN_rechercheMenuIdentifiant($db,$GLOBALS['_AFFICHEUR']['menu_courant_id']));
62
	$id_or = GEN_rechercheMenuCode($db, GEN_rechercheMenuIdentifiant($db, $GLOBALS['_AFFICHEUR']['menu_courant_id']));
Line 67... Line 63...
67
 
63
 
Line 68... Line 64...
68
    $ligne_contenu=GEN_rechercheContenu($db,$id_or);
64
    $ligne_contenu = GEN_rechercheContenu($db, $id_or);
69
	        
65
	        
70
	$contenu = $ligne_contenu->gmc_contenu;
66
	$contenu = $ligne_contenu->gmc_contenu;
71
	
67
	
72
	    // Inclusion de la bibliothèque Text_Wiki_Papyrus effectuées par Papyrus précédement
68
	// Inclusion de la bibliothèque Text_Wiki_Papyrus effectuées par Papyrus précédement
73
	    // Les actions Text_Wiki_Papyrus sont gérées par Papyrus
69
	// Les actions Text_Wiki_Papyrus sont gérées par Papyrus
74
	    
70
	
75
	    // Nous regardons si nous avons à faire à un texte sous format Wikini ou XHTML
71
	// Nous regardons si nous avons à faire à un texte sous format Wikini ou XHTML
76
	    if (($ligne_contenu->gmc_ce_type_contenu == 1)||(substr($ligne_contenu->gmc_ce_type_contenu,-1)== 1)) {
72
	if (($ligne_contenu->gmc_ce_type_contenu == 1)||(substr($ligne_contenu->gmc_ce_type_contenu,-1)== 1)) {
77
	        $retour = $contenu;
73
	    $retour = $contenu;
78
	    } elseif (($ligne_contenu->gmc_ce_type_contenu == 2) || (substr($ligne_contenu->gmc_ce_type_contenu,-1)== 2)){
74
	} elseif (($ligne_contenu->gmc_ce_type_contenu == 2) || (substr($ligne_contenu->gmc_ce_type_contenu,-1)== 2)){
79
	        include_once AFFI_CHEMIN_BIBLIOTHEQUE_API.'text/wiki_wikini/Wikini.class.php';
75
	    include_once AFFI_CHEMIN_BIBLIOTHEQUE_API.'text/wiki_wikini/Wikini.class.php';
80
	        // Création d'un objet Text_Wikini :
76
	    // Création d'un objet Text_Wikini :
81
	        $wikini =& new Text_Wikini();
77
	    $wikini =& new Text_Wikini();
82
	        // Pour éviter de remplacer les caractères spéciaux du XHTML:
78
	    // Pour éviter de remplacer les caractères spéciaux du XHTML:
83
	        $wikini->setFormatConf('Xhtml', 'translate', false);
79
	    $wikini->setFormatConf('Xhtml', 'translate', false);
84
	        // Configuration de la règle Freelink :
80
	    // Configuration de la règle Freelink :
85
	        $wikini->setRenderConf('Xhtml', 'freelink', 'pages', null);
81
	    $wikini->setRenderConf('Xhtml', 'freelink', 'pages', null);
86
	        $wikini->setRenderConf('Xhtml', 'freelink', 'view_url', AFFI_URL_PAPYRUS);
82
	    $wikini->setRenderConf('Xhtml', 'freelink', 'view_url', AFFI_URL_PAPYRUS);
87
	        // Configuration de la règle Interwiki :
-
 
88
	        $wikini->setRenderConf('Xhtml', 'interwiki', 'sites', $GLOBALS['_AFFICHEUR']['interwiki_sites']);
83
	    // Configuration de la règle Interwiki :
Line 89... Line 84...
89
	        // Application des règles de Wikini :
84
	    $wikini->setRenderConf('Xhtml', 'interwiki', 'sites', $GLOBALS['_AFFICHEUR']['interwiki_sites']);
90
	        $retour = $wikini->transform($contenu, 'Xhtml');
85
	    // Application des règles de Wikini :
91
	    }
86
	    $retour = $wikini->transform($contenu, 'Xhtml');
92
 
87
	}
Line 326... Line 321...
326
 
321
 
327
 
322
 
328
/* +--Fin du code ----------------------------------------------------------------------------------------+
323
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
324
*
-
 
325
* $Log: not supported by cvs2svn $
-
 
326
* Revision 1.13  2006-11-21 18:52:20  jp_milcent
329
*
327
* Ajout de la possibilité de surligner des mots.
330
* $Log: not supported by cvs2svn $
328
*
331
* Revision 1.12  2006/11/21 15:50:05  jp_milcent
329
* Revision 1.12  2006/11/21 15:50:05  jp_milcent
332
* Ajout du surlignage des mots passé dans la query string via la variable var_recherche.
330
* Ajout du surlignage des mots passé dans la query string via la variable var_recherche.
333
*
331
*