Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1369 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1369 Rev 1371
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Mon exemple d'application.
4
 * Mon exemple d'application.
5
 * Fichier contenant les fonctions nécessaire pour l'insertion de l'application dans Papyrus.
5
 * Fichier contenant les fonctions nécessaire pour l'insertion de l'application dans Papyrus.
6
 * 
6
 * 
7
 * @category	PHP 5.2
7
 * @category	PHP 5.2
8
 * @package		eflore-consultation
8
 * @package		eflore-consultation
9
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
10
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
11
 * @copyright	2011 Tela-Botanica
11
 * @copyright	2011 Tela-Botanica
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
13
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
14
 * @version		$Id$
14
 * @version		$Id$
15
 */
15
 */
16
 
16
 
17
// Gestion des paramêtres passés par Papyrus
17
// Gestion des paramêtres passés par Papyrus
18
if (isset($GLOBALS['_GEN_commun']['info_application']->referentiel)) {
18
if (isset($GLOBALS['_GEN_commun']['info_application']->referentiel)) {
19
	$_GET['referentiel'] = $GLOBALS['_GEN_commun']['info_application']->referentiel;
19
	$_GET['referentiel'] = $GLOBALS['_GEN_commun']['info_application']->referentiel;
20
}
20
}
21
 
21
 
22
if (isset($GLOBALS['_GEN_commun']['info_application']->module) && !isset($_GET['module'])) {
22
if (isset($GLOBALS['_GEN_commun']['info_application']->module) && !isset($_GET['module'])) {
23
		$_GET['module'] = $GLOBALS['_GEN_commun']['info_application']->module;
23
		$_GET['module'] = $GLOBALS['_GEN_commun']['info_application']->module;
24
}
24
}
25
 
25
 
26
/** Inclusion du fichier principal de l'application*/
26
/** Inclusion du fichier principal de l'application*/
27
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'eflore.php';
27
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'eflore.php';
28
 
28
 
29
$chemin = '/eflore/consultation/';
29
$chemin = '/eflore/consultation/';
30
$chemin_commun = 'http://www.tela-botanica.org/commun/';
30
$chemin_commun = 'http://www.tela-botanica.org/commun/';
31
// Définition des feuilles de style de l'application pour Papyrus
31
// Définition des feuilles de style de l'application pour Papyrus
32
// TODO: il y a surement mieux à faire pour obtenir l'url des fichiers
32
// TODO: il y a surement mieux à faire pour obtenir l'url des fichiers
33
GEN_stockerStyleExterne('jquery-ui', $chemin_commun.'jquery/jquery-ui/1.10.2/css/ui-lightness/jquery-ui-1.10.2.custom.css');
33
GEN_stockerStyleExterne('jquery-ui', $chemin_commun.'jquery/jquery-ui/1.10.2/css/ui-lightness/jquery-ui-1.10.2.custom.css');
34
GEN_stockerStyleExterne('fancybox', $chemin_commun.'jquery/fancybox/1.3.4/jquery.fancybox-1.3.4.css');
34
GEN_stockerStyleExterne('fancybox', $chemin_commun.'jquery/fancybox/1.3.4/jquery.fancybox-1.3.4.css');
35
GEN_stockerStyleExterne('eflore', $chemin.'/presentations/styles/eflore.css');
35
GEN_stockerStyleExterne('eflore', $chemin.'/presentations/styles/eflore.css');
36
 
36
 
37
// OpenSearch dynamique
37
// OpenSearch dynamique
38
$referentiel = 'bdtfx';
38
$referentiel = 'bdtfx';
39
if (isset($_GET['referentiel'])) $referentiel = $_GET['referentiel'];
39
if (isset($_GET['referentiel'])) $referentiel = $_GET['referentiel'];
40
$titreOpenSearch = 'eFlore ' . strtoupper($referentiel) . ' : noms scientifiques';
40
$titreOpenSearch = 'eFlore ' . strtoupper($referentiel) . ' : noms scientifiques';
41
$cheminOpenSearch = Config::get('base_url_application') . 'configurations/RechercheOpenSearch/OpenSearch' . ucfirst($referentiel) . '.xml';
41
$cheminOpenSearch = Config::get('base_url_application') . 'configurations/RechercheOpenSearch/OpenSearch' . ucfirst($referentiel) . '.xml';
42
GEN_stockerStyleExterne('opensearch-description', $cheminOpenSearch, $titreOpenSearch, 'search', 'application/opensearchdescription+xml', '');
42
GEN_stockerStyleExterne('opensearch-description', $cheminOpenSearch, $titreOpenSearch, 'search', 'application/opensearchdescription+xml', '');
43
 
43
 
44
// Définition des fichiers JS de l'application pour Papyrus
44
// Définition des fichiers JS de l'application pour Papyrus
45
GEN_stockerFichierScript('jquery-1.7', $chemin_commun.'jquery/1.7.1'.DS.'jquery-1.7.1.js');
45
GEN_stockerFichierScript('jquery-1.7', $chemin_commun.'jquery/1.7.1'.DS.'jquery-1.7.1.js');
46
GEN_stockerFichierScript('jquery-ui-1.10.2', $chemin_commun.'jquery/jquery-ui/1.10.2/js'.DS.'jquery-ui-1.10.2.custom.min.js');
46
GEN_stockerFichierScript('jquery-ui-1.10.2', $chemin_commun.'jquery/jquery-ui/1.10.2/js'.DS.'jquery-ui-1.10.2.custom.min.js');
47
GEN_stockerFichierScript('fancybox', $chemin_commun.'/jquery/fancybox/1.3.4'.DS.'jquery.fancybox-1.3.4.pack.js');
47
GEN_stockerFichierScript('fancybox', $chemin_commun.'/jquery/fancybox/1.3.4'.DS.'jquery.fancybox-1.3.4.pack.js');
48
GEN_stockerFichierScript('cookie', $chemin_commun.'jquery/cookie/1.0/jquery.cookie.min.js');
48
GEN_stockerFichierScript('cookie', $chemin_commun.'jquery/cookie/1.0/jquery.cookie.min.js');
49
GEN_stockerFichierScript('eflore-general', $chemin.'presentations/scripts'.DS.'eflore.js');
49
GEN_stockerFichierScript('eflore-general', $chemin.'presentations/scripts'.DS.'eflore.js');
50
GEN_stockerFichierScript('autocompletion', $chemin.'presentations/scripts'.DS.'recherche.js');
50
GEN_stockerFichierScript('autocompletion', $chemin.'presentations/scripts'.DS.'recherche.js');
51
GEN_stockerFichierScript('eflore-synthese', $chemin.'presentations/scripts'.DS.'fiche-synthese.js');
51
GEN_stockerFichierScript('eflore-synthese', $chemin.'presentations/scripts'.DS.'fiche-synthese.js');
52
 
52
 
53
// +--------------------------------------------------------------------------------------------------+
53
// +--------------------------------------------------------------------------------------------------+
54
// Remplacement de méta tags fournit par Papyrus par ceux créés dans l'appli
54
// Remplacement de méta tags fournit par Papyrus par ceux créés dans l'appli
55
if (AppControleur::getMetaTitre() != '') {
55
if (AppControleur::getMetaTitre() != '') {
56
	$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = AppControleur::getMetaTitre();
56
	$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = AppControleur::getMetaTitre();
57
}
57
}
58
if (AppControleur::getMetaDescription() != '') {
58
if (AppControleur::getMetaDescription() != '') {
59
	GEN_modifierMetaName('description', AppControleur::getMetaDescription());
59
	GEN_modifierMetaName('description', AppControleur::getMetaDescription());
60
}
60
}
61
if (AppControleur::getMetaTags() != '') {
61
if (AppControleur::getMetaTags() != '') {
62
	GEN_modifierMetaName('keywords', AppControleur::getMetaTags());
62
	GEN_modifierMetaName('keywords', AppControleur::getMetaTags());
63
}
63
}
64
 
64
 
65
// Meta OpenGraph pour les réseaux sociaux
65
// Meta OpenGraph pour les réseaux sociaux
66
GEN_stockerMetaProperty('og:type', 'website');
-
 
67
GEN_stockerMetaProperty('og:title', 'eFlore');
66
GEN_modifierMetaProperty('og:title', 'eFlore');
68
GEN_stockerMetaProperty('og:site_name', 'Tela Botanica');
-
 
69
GEN_stockerMetaProperty('og:description', 'eFlore, la flore &eacute;lectronique collaborative en ligne');
67
GEN_modifierMetaProperty('og:description', 'eFlore, la flore &eacute;lectronique collaborative en ligne');
70
GEN_stockerMetaProperty('og:image', 'http://resources.tela-botanica.org/tb/img/256x256/carre_englobant.png');
-
 
71
GEN_stockerMetaProperty('og:image:type', 'image/png');
-
 
72
GEN_stockerMetaProperty('og:image:width', '256');
-
 
73
GEN_stockerMetaProperty('og:image:height', '256');
-
 
74
GEN_stockerMetaProperty('og:locale', 'fr_FR');
-
 
75
 
68
 
76
// +--------------------------------------------------------------------------------------------------+
69
// +--------------------------------------------------------------------------------------------------+
77
// Fonctions d'affichage dans Papyrus
70
// Fonctions d'affichage dans Papyrus
78
/**
71
/**
79
 * Fonction d'affichage de Papyrus, pour le corps de page.
72
 * Fonction d'affichage de Papyrus, pour le corps de page.
80
 */
73
 */
81
function afficherContenuCorps() {
74
function afficherContenuCorps() {
82
	return AppControleur::getContenuCorps();
75
	return AppControleur::getContenuCorps();
83
}
76
}
84
 
77
 
85
function afficherContenuTete() {
78
function afficherContenuTete() {
86
	return AppControleur::getContenuTete();
79
	return AppControleur::getContenuTete();
87
}
80
}
88
 
81
 
89
function afficherContenuPied() {
82
function afficherContenuPied() {
90
	return AppControleur::getContenuPied();
83
	return AppControleur::getContenuPied();
91
}
84
}
92
 
85
 
93
function afficherContenuNavigation() {
86
function afficherContenuNavigation() {
94
	return AppControleur::getContenuNavigation();
87
	return AppControleur::getContenuNavigation();
95
}
88
}
96
 
89
 
97
function afficherContenuMenu() {
90
function afficherContenuMenu() {
98
	//Retour du menu vide dans le cas de l'affichage dans Papyrus
91
	//Retour du menu vide dans le cas de l'affichage dans Papyrus
99
	// AppControleur::getContenuMenu()
92
	// AppControleur::getContenuMenu()
100
	return '';
93
	return '';
101
}
94
}
102
?>
95
?>