828 |
gduche |
1 |
<!-- SYNDICATION - DEBUT -->
|
907 |
gduche |
2 |
<!--
|
|
|
3 |
|
|
|
4 |
Penser aux inclusions ci dessous :
|
|
|
5 |
<script type="text/javascript" src="/commun/jquery/1.4.2/jquery-1.4.2.min.js"></script>
|
|
|
6 |
<script type="text/javascript" src="/commun/jquery/fancybox/jquery.fancybox-1.3.2.js"></script>
|
|
|
7 |
<link rel="stylesheet" type="text/css" href="/commun/jquery/fancybox/jquery.fancybox-1.3.2.css" media="screen" /> /-->
|
828 |
gduche |
8 |
<div class="flux_RSS">
|
|
|
9 |
<?php if ($erreurs || $informations) : ?>
|
|
|
10 |
<h1>Erreur</h1>
|
|
|
11 |
<div class="contenu_RSS">
|
|
|
12 |
<b>Impossible d'afficher le flux.</b><br />
|
|
|
13 |
|
|
|
14 |
<!-- Affichage des erreurs et messages d'information : -->
|
|
|
15 |
<?php if ($erreurs) : ?>
|
|
|
16 |
<?php foreach ($erreurs as $erreur) : ?>
|
|
|
17 |
<p class="pap_erreur"><?=$erreur;?></p>
|
|
|
18 |
<?php endforeach; ?>
|
|
|
19 |
<?php endif; ?>
|
|
|
20 |
|
|
|
21 |
<?php if ($informations) : ?>
|
|
|
22 |
<?php foreach ($informations as $information) : ?>
|
|
|
23 |
<p class="pap_info"><?=$information;?></p>
|
|
|
24 |
<?php endforeach; ?>
|
|
|
25 |
<?php endif; ?>
|
|
|
26 |
</div>
|
|
|
27 |
<?php else : ?>
|
|
|
28 |
<!-- Affichage du flux RSS -->
|
|
|
29 |
<?php $flux = array(); ?>
|
|
|
30 |
<?php foreach ($sites as $site) : ?>
|
|
|
31 |
<h1><?=$site['titre']?></h1>
|
|
|
32 |
<div class="contenu_RSS" <?=($site['id']!="") ? 'id="'.$site["id"].'"' : ""; ?>>
|
922 |
gduche |
33 |
<a href="http://www.tela-botanica.org/eflore/cel2/jrest/CelSyndicationImage/Simple/rss2/S" id="suivre-observations" title="Suivre les observations" target="_blank">Suivre les observations</a>
|
828 |
gduche |
34 |
<?php foreach ($site['pages'] as $page) : ?>
|
|
|
35 |
<?php
|
907 |
gduche |
36 |
//Traitement sp�cifique tela
|
|
|
37 |
// La ligne ci-dessous sert � enlever les "align=left" dans les images g�n�r�es par spip
|
828 |
gduche |
38 |
// TODO : enlever du flux RSS
|
|
|
39 |
$image = substr_replace($page['image'], ' ', strpos($page['image'], 'align='), 12);
|
|
|
40 |
?>
|
|
|
41 |
<?php
|
|
|
42 |
$date = strtotime($page['date']);
|
|
|
43 |
$titre_page = preg_replace('/^\d+-\d+ :/', '', $page['titre']);
|
907 |
gduche |
44 |
|
|
|
45 |
/*Type d'item reçu
|
|
|
46 |
<item>
|
|
|
47 |
<guid>14148</guid>
|
|
|
48 |
<title>Solanum bonariense L. [nn64856] par fried@...</title>
|
|
|
49 |
<link>http://www.tela-botanica.org/sites/eflore/generique/images/projets/cel/000/014/S/000_014_148_S.jpg</link>
|
|
|
50 |
<description>http://www.tela-botanica.org/eflore/BDNFF/4.02/nn/64856/cel</description>
|
|
|
51 |
<category></category>
|
|
|
52 |
<pubDate>Tue, 19 Oct 2010 17:50:48 +0200</pubDate>
|
|
|
53 |
</item>
|
|
|
54 |
|
|
|
55 |
*/
|
828 |
gduche |
56 |
?>
|
|
|
57 |
<div class="actualites1">
|
907 |
gduche |
58 |
<a href="<?=$page['description']?>" class="image-lien" title="http://www.tela-botanica.org/appli:cel-img:0000<?=$page['guid']?>L"><img src="http://www.tela-botanica.org/appli:cel-img:0000<?=$page['guid']?>M" alt="<?=$titre_page?>"/></a>
|
|
|
59 |
|
|
|
60 |
<div style="display: none;">
|
|
|
61 |
<div id="cel-obs-<?=$page['guid']?>" class="infos-annexe">
|
|
|
62 |
<a href="<?=$page['description']?>"><span class="image-titre"><?=$titre_page?></span><br />
|
|
|
63 |
<span class="image-date"> Observée le <?=$page['date']?></span><br />
|
|
|
64 |
Cliquez pour voir le détail
|
|
|
65 |
</a>
|
|
|
66 |
|
|
|
67 |
</div>
|
|
|
68 |
</div>
|
828 |
gduche |
69 |
</div>
|
|
|
70 |
<?php endforeach; ?>
|
|
|
71 |
<img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$sites[0]['pages'][7]['guid']?>M" />
|
922 |
gduche |
72 |
|
907 |
gduche |
73 |
<?/*
|
|
|
74 |
$imgExtra = $sites[0]['pages'][7];
|
|
|
75 |
?>
|
|
|
76 |
<div class="actualites1">
|
|
|
77 |
<a href="<?=$imgExtra['description']?>" class="image-lien" title="http://www.tela-botanica.org/appli:cel-img:0000<?=$imgExtra['guid']?>L"><img src="http://www.tela-botanica.org/appli:cel-img:0000<?=$imgExtra['guid']?>M" alt="<?=$imgExtra['title']?>"/></a>
|
|
|
78 |
|
|
|
79 |
<div style="display: none;">
|
|
|
80 |
<div id="cel-obs-<?=$imgExtra['guid']?>" class="infos-annexe">
|
|
|
81 |
<a href="<?=$imgExtra['description']?>"><span class="image-titre"><?=$imgExtra['title']?></span><br />
|
|
|
82 |
<span class="image-date"> Observée le <?=$imgExtra['date']?></span><br />
|
|
|
83 |
Cliquez pour voir le détail
|
|
|
84 |
</a>
|
|
|
85 |
|
|
|
86 |
</div>
|
|
|
87 |
</div>
|
|
|
88 |
</div>*/
|
|
|
89 |
|
|
|
90 |
?>
|
828 |
gduche |
91 |
|
907 |
gduche |
92 |
<script type="text/Javascript">
|
|
|
93 |
//Remplacer le lien de chaque actualité par un #cel-obs-guid
|
|
|
94 |
$(document).ready(function() {
|
|
|
95 |
$('.actualites1').each(function () {
|
|
|
96 |
var id = $(this).find('.infos-annexe').attr('id');
|
|
|
97 |
var lien = $(this).find('.image-lien');
|
|
|
98 |
lien.attr('href', '#' + id);
|
|
|
99 |
|
|
|
100 |
$('#' + id).prepend('<img height="500px" src="' + lien.attr('title') + ' /> <br />');
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
lien.fancybox({
|
|
|
105 |
'titlePosition' : 'inside',
|
|
|
106 |
'transitionIn' : 'none',
|
|
|
107 |
'transitionOut' : 'none'
|
|
|
108 |
});
|
|
|
109 |
|
|
|
110 |
});
|
|
|
111 |
});
|
|
|
112 |
</script>
|
828 |
gduche |
113 |
</div>
|
|
|
114 |
<?php endforeach; ?>
|
|
|
115 |
<?php endif; ?>
|
922 |
gduche |
116 |
|
828 |
gduche |
117 |
</div>
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
<!-- SYNDICATION - FIN -->
|