828 |
gduche |
1 |
<!-- SYNDICATION - DEBUT -->
|
966 |
jpm |
2 |
<!-- Penser aux inclusions ci dessous :
|
907 |
gduche |
3 |
<script type="text/javascript" src="/commun/jquery/1.4.2/jquery-1.4.2.min.js"></script>
|
|
|
4 |
<script type="text/javascript" src="/commun/jquery/fancybox/jquery.fancybox-1.3.2.js"></script>
|
|
|
5 |
<link rel="stylesheet" type="text/css" href="/commun/jquery/fancybox/jquery.fancybox-1.3.2.css" media="screen" /> /-->
|
966 |
jpm |
6 |
<div class="flux_RSS">
|
|
|
7 |
<?php if ($erreurs || $informations) : ?>
|
|
|
8 |
<h1>Erreur</h1>
|
828 |
gduche |
9 |
<div class="contenu_RSS">
|
|
|
10 |
<b>Impossible d'afficher le flux.</b><br />
|
|
|
11 |
|
|
|
12 |
<!-- Affichage des erreurs et messages d'information : -->
|
|
|
13 |
<?php if ($erreurs) : ?>
|
|
|
14 |
<?php foreach ($erreurs as $erreur) : ?>
|
|
|
15 |
<p class="pap_erreur"><?=$erreur;?></p>
|
|
|
16 |
<?php endforeach; ?>
|
|
|
17 |
<?php endif; ?>
|
|
|
18 |
|
|
|
19 |
<?php if ($informations) : ?>
|
|
|
20 |
<?php foreach ($informations as $information) : ?>
|
|
|
21 |
<p class="pap_info"><?=$information;?></p>
|
|
|
22 |
<?php endforeach; ?>
|
|
|
23 |
<?php endif; ?>
|
|
|
24 |
</div>
|
|
|
25 |
<?php else : ?>
|
|
|
26 |
<!-- Affichage du flux RSS -->
|
|
|
27 |
<?php $flux = array(); ?>
|
|
|
28 |
<?php foreach ($sites as $site) : ?>
|
|
|
29 |
<h1><?=$site['titre']?></h1>
|
|
|
30 |
<div class="contenu_RSS" <?=($site['id']!="") ? 'id="'.$site["id"].'"' : ""; ?>>
|
995 |
jpm |
31 |
<a href="http://www.tela-botanica.org/eflore/cel2/jrest/CelSyndicationImage/complet/atom" class="suivre-observations" title="Suivre les images" onclick="window.open(this.href);return false;">Suivre les images</a>
|
828 |
gduche |
32 |
<?php foreach ($site['pages'] as $page) : ?>
|
|
|
33 |
<?php
|
928 |
gduche |
34 |
//Traitement spécifique tela
|
|
|
35 |
// La ligne ci-dessous sert à enlever les "align=left" dans les images génériques par spip
|
828 |
gduche |
36 |
// TODO : enlever du flux RSS
|
|
|
37 |
$image = substr_replace($page['image'], ' ', strpos($page['image'], 'align='), 12);
|
996 |
jpm |
38 |
|
828 |
gduche |
39 |
$date = strtotime($page['date']);
|
995 |
jpm |
40 |
$titre_page = preg_replace('/^\d+-\d+ :/', '', $page['titre']);
|
|
|
41 |
$tpl_url = preg_replace('/[SML]\.jpg$/', '%s.jpg', $page['guid']);
|
|
|
42 |
$guid = $page['guid'];
|
|
|
43 |
if (preg_match('/appli:cel-img:([0-9]+)[SML]\.jpg$/', $page['guid'], $match)) {
|
|
|
44 |
$guid = (int) $match[1];
|
|
|
45 |
}
|
928 |
gduche |
46 |
?>
|
828 |
gduche |
47 |
<div class="actualites1">
|
995 |
jpm |
48 |
<a href="<?=$page['description']?>" class="image-lien" title="<?=sprintf($tpl_url, L)?>" rel="galerie-princ">
|
|
|
49 |
<img src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
|
|
|
50 |
</a>
|
907 |
gduche |
51 |
|
|
|
52 |
<div style="display: none;">
|
995 |
jpm |
53 |
<div id="cel-obs-<?=$guid?>" class="infos-annexe">
|
907 |
gduche |
54 |
<a href="<?=$page['description']?>"><span class="image-titre"><?=$titre_page?></span><br />
|
995 |
jpm |
55 |
<span class="image-date">Publiée le <?=$page['date']?></span><br />
|
|
|
56 |
Cliquez pour voir le détail
|
907 |
gduche |
57 |
</a>
|
|
|
58 |
</div>
|
|
|
59 |
</div>
|
828 |
gduche |
60 |
</div>
|
|
|
61 |
<?php endforeach; ?>
|
929 |
gduche |
62 |
<!-- img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$sites[0]['pages'][7]['guid']?>M" / -->
|
966 |
jpm |
63 |
<? $page = $sites[0]['pages'][7]; ?>
|
907 |
gduche |
64 |
<div class="actualites1">
|
995 |
jpm |
65 |
<a href="<?=$page['description']?>" class="image-lien" title="<?=sprintf($tpl_url, L)?>" rel="galerie-princ">
|
|
|
66 |
<img id="imgExtra" src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
|
966 |
jpm |
67 |
</a>
|
929 |
gduche |
68 |
<div style="display: none;">
|
|
|
69 |
<div id="cel-obs-img-extra" class="infos-annexe">
|
966 |
jpm |
70 |
<a href="<?=$page['description']?>">
|
|
|
71 |
<span class="image-titre"><?=$titre_page?></span><br />
|
|
|
72 |
<span class="image-date">Publiée le <?=$page['date']?></span><br />
|
|
|
73 |
Cliquez pour voir le détail
|
929 |
gduche |
74 |
</a>
|
907 |
gduche |
75 |
</div>
|
929 |
gduche |
76 |
</div>
|
|
|
77 |
</div>
|
907 |
gduche |
78 |
<script type="text/Javascript">
|
928 |
gduche |
79 |
//Remplacer le lien de chaque actualité par un #cel-obs-guid
|
907 |
gduche |
80 |
$(document).ready(function() {
|
|
|
81 |
$('.actualites1').each(function () {
|
|
|
82 |
var id = $(this).find('.infos-annexe').attr('id');
|
|
|
83 |
var lien = $(this).find('.image-lien');
|
|
|
84 |
lien.attr('href', '#' + id);
|
|
|
85 |
|
|
|
86 |
$('#' + id).prepend('<img height="500px" src="' + lien.attr('title') + ' /> <br />');
|
|
|
87 |
lien.fancybox({
|
966 |
jpm |
88 |
'titlePosition' : 'inside',
|
|
|
89 |
'transitionIn' : 'none',
|
|
|
90 |
'transitionOut' : 'none'
|
907 |
gduche |
91 |
});
|
|
|
92 |
});
|
|
|
93 |
});
|
|
|
94 |
</script>
|
995 |
jpm |
95 |
</div>
|
828 |
gduche |
96 |
<?php endforeach; ?>
|
|
|
97 |
<?php endif; ?>
|
|
|
98 |
</div>
|
966 |
jpm |
99 |
<!-- SYNDICATION - FIN -->
|