Subversion Repositories Sites.tela-botanica.org

Compare Revisions

Ignore whitespace Rev 1090 → Rev 1091

/branches/actu_spip_2.1.2/plugins/config.inc.php
New file
0,0 → 1,4
<?php
 
$chemin_papyrus = '/home/plantnet/www/plantnet/';
?>
/branches/actu_spip_2.1.2/plugins/analyseur.php
New file
0,0 → 1,78
<?php
function pap_analyseur_analyser($texte) {
/*
* Attention : ne fonctionne pas avec les balises meta
*/
global $chemin_papyrus;
define(GEN_CHEMIN_APPLETTE, $chemin_papyrus.'papyrus/applettes/');
//Inclusions des fichier de configuration de papyrus
include_once $chemin_papyrus.'papyrus/configuration/pap_config.inc.php' ;
include_once $chemin_papyrus.'papyrus/configuration/pap_config_avancee.inc.php' ;
get_include_path().PATH_SEPARATOR;
set_include_path($_SERVER['DOCUMENT_ROOT'].PATH_SEPARATOR.PAP_CHEMIN_API_PEAR.PATH_SEPARATOR.
get_include_path().PATH_SEPARATOR);
$GLOBALS['_GEN_commun']['info_site']->gs_fichier_squelette ="D:/greg/workspace/papyrus/actu/plugins/analyseur_papyrus/squelette.html";
$GLOBALS['_GEN_commun']['info_site']->gs_ce_auth = 1;
 
global $db, $_GEN_commun;
//Inclusions des fichiers papyrus
include_once $chemin_papyrus.'papyrus/pap_connecte_bdd.inc.php';
include_once $chemin_papyrus.'papyrus/pap_initialise_auth.inc.php';
include_once $chemin_papyrus.'papyrus/pap_initialise_info.inc.php';
include_once $chemin_papyrus.'papyrus/bibliotheque/classes/pap_rendu.class.php';
include_once $chemin_papyrus.'papyrus/bibliotheque/fonctions/pap_script.fonct.php';
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'] = $texte;
//Informations du site
//Récupéré depuis pap_rendu.inc.php
$id_langue = $GLOBALS['_GEN_commun']['i18n'];
$langue_test = (isset($id_langue) && $id_langue!='') ? $id_langue : GEN_I18N_ID_DEFAUT;
$requete = 'SELECT * '.
'FROM gen_site '.
'WHERE gs_ce_i18n = "'.$langue_test.'" '.
'AND gs_code_num = "'.$GLOBALS['_GEN_commun']['info_site']->gs_code_num.'"';
$resultat = $db->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
 
$type_site = isset($GLOBALS['_GEN_commun']['traduction_info_site']) ? 'traduction_info_site' : 'info_site';
$type_menu = isset($GLOBALS['_GEN_commun']['traduction_info_menu']) ? 'traduction_info_menu' : $type_menu='info_menu';
 
// Construction des infos sur le site
$GLOBALS['_PAPYRUS_']['page']['nom_site'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_nom);
$GLOBALS['_PAPYRUS_']['rendu']['SITE_NOM'] = $GLOBALS['_PAPYRUS_']['page']['nom_site'];
$GLOBALS['_PAPYRUS_']['page']['langue_site'] = htmlentities($GLOBALS['_GEN_commun']['i18n']);
$GLOBALS['_PAPYRUS_']['rendu']['SITE_LANGUE'] = $GLOBALS['_PAPYRUS_']['page']['langue_site'];
$GLOBALS['_PAPYRUS_']['page']['code_alpha_site'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_code_alpha);
$GLOBALS['_PAPYRUS_']['rendu']['SITE_CODE_ALPHA'] = $GLOBALS['_PAPYRUS_']['page']['code_alpha_site'];
 
// Construction des infos sur le menu pour générer les balises
$GLOBALS['_PAPYRUS_']['rendu']['INFO_MENU_ID'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_id_menu);
$GLOBALS['_PAPYRUS_']['rendu']['INFO_MENU_CODE_ALPHA'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_code_alpha);
$GLOBALS['_PAPYRUS_']['rendu']['INFO_MENU_CODE_NUM'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_code_num);
//Préfixe
$GLOBALS['_GEN_commun']['balise_prefixe'] = 'PAPYRUS_';
foreach ($GLOBALS['_PAPYRUS_']['rendu'] as $GLOBALS['_PAPYRUS_']['tmp']['cle'] => $GLOBALS['_PAPYRUS_']['tmp']['val']) {
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'] =
str_replace( '<!-- '.$_GEN_commun['balise_prefixe'].$GLOBALS['_PAPYRUS_']['tmp']['cle'].' -->',
$GLOBALS['_PAPYRUS_']['tmp']['val'],
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette']);
}
$pap_rendu = new Pap_Rendu();
$pap_rendu->parserBaliseApplette($texte, true);
if ($pap_rendu->getBoolBaliseAppli()) {
$pap_rendu->remplacerBaliseApplette();
}
return $GLOBALS['_PAPYRUS_']['general']['contenu_squelette'];
}
?>
/branches/actu_spip_2.1.2/plugins/plugin.xml
New file
0,0 → 1,15
<plugin>
<nom>Analyseur Papyrus</nom>
<auteur>Greg - Tela Botanica 2010</auteur>
<version>1.0.1</version>
<etat>dev</etat>
<description>Utiliser papyrus pour anaylser et interpreter les applettes papyrus</description>
<prefix>pap_analyseur</prefix>
<options>config.inc.php</options>
<pipeline>
<nom>affichage_final</nom>
<action>analyser</action>
<inclure>analyseur.php</inclure>
</pipeline>
</plugin>
 
/branches/actu_spip_2.1.2/plugins/squelette.html
New file
0,0 → 1,0
aa
/branches/actu_spip_2.1.2/.project
New file
0,0 → 1,28
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>spip</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
/branches/actu_spip_2.1.2/.buildpath
New file
0,0 → 1,5
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
/branches/actu_spip_2.1.2/.settings/org.eclipse.php.core.prefs
New file
0,0 → 1,2
eclipse.preferences.version=1
include_path=0;/spip
/branches/actu_spip_2.1.2/.settings/org.eclipse.wst.common.project.facet.core.xml
New file
0,0 → 1,7
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="php.component"/>
<fixed facet="php.core.component"/>
<installed facet="php.core.component" version="1"/>
<installed facet="php.component" version="5.4"/>
</faceted-project>