Subversion Repositories Sites.tela-botanica.org

Rev

Rev 828 | Rev 922 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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"].'"' : ""; ?>>
33
    				<?php foreach ($site['pages'] as $page) : ?>
34
    					<?php
907 gduche 35
							//Traitement sp�cifique tela
36
							// La ligne ci-dessous sert � enlever les "align=left" dans les images g�n�r�es par spip
828 gduche 37
							// TODO : enlever du flux RSS
38
							$image = substr_replace($page['image'], ' ', strpos($page['image'], 'align='), 12);
39
						?>
40
    					<?php
41
							$date = strtotime($page['date']);
42
    						$titre_page = preg_replace('/^\d+-\d+&nbsp;:/', '', $page['titre']);
907 gduche 43
 
44
							/*Type d'item reçu
45
							<item>
46
		  						<guid>14148</guid>
47
		  						<title>Solanum bonariense L. [nn64856] par fried@...</title>
48
		  						<link>http://www.tela-botanica.org/sites/eflore/generique/images/projets/cel/000/014/S/000_014_148_S.jpg</link>
49
		  						<description>http://www.tela-botanica.org/eflore/BDNFF/4.02/nn/64856/cel</description>
50
		  						<category></category>
51
		  						<pubDate>Tue, 19 Oct 2010 17:50:48 +0200</pubDate>
52
							</item>
53
 
54
							*/
828 gduche 55
    					?>
56
    					<div class="actualites1">
907 gduche 57
    						<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>
58
 
59
    						<div style="display: none;">
60
								<div id="cel-obs-<?=$page['guid']?>" class="infos-annexe">
61
	    							<a href="<?=$page['description']?>"><span class="image-titre"><?=$titre_page?></span><br />
62
	    							<span class="image-date"> Observée le <?=$page['date']?></span><br />
63
	    							Cliquez pour voir le détail
64
	    							</a>
65
 
66
	    						</div>
67
    						</div>
828 gduche 68
						</div>
69
    				<?php endforeach; ?>
70
    				<img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$sites[0]['pages'][7]['guid']?>M" />
907 gduche 71
    				<?/*
72
    					$imgExtra = $sites[0]['pages'][7];
73
					?>
74
    				<div class="actualites1">
75
    						<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>
76
 
77
    						<div style="display: none;">
78
								<div id="cel-obs-<?=$imgExtra['guid']?>" class="infos-annexe">
79
	    							<a href="<?=$imgExtra['description']?>"><span class="image-titre"><?=$imgExtra['title']?></span><br />
80
	    							<span class="image-date"> Observée le <?=$imgExtra['date']?></span><br />
81
	    							Cliquez pour voir le détail
82
	    							</a>
83
 
84
	    						</div>
85
    						</div>
86
						</div>*/
87
 
88
						?>
828 gduche 89
 
907 gduche 90
    				<script type="text/Javascript">
91
    					//Remplacer le lien de chaque actualité par un #cel-obs-guid
92
    					$(document).ready(function() {
93
    						$('.actualites1').each(function () {
94
	    						var id = $(this).find('.infos-annexe').attr('id');
95
	    						var lien = $(this).find('.image-lien');
96
	    						lien.attr('href', '#' + id);
97
 
98
	    						$('#' + id).prepend('<img height="500px" src="' + lien.attr('title') + ' /> <br />');
99
 
100
 
101
 
102
	    						lien.fancybox({
103
	    							'titlePosition'		: 'inside',
104
	    							'transitionIn'		: 'none',
105
	    							'transitionOut'		: 'none'
106
	    							});
107
 
108
    						});
109
    					});
110
    				</script>
828 gduche 111
    				</div>
112
  				<?php endforeach; ?>
113
		<?php endif; ?>
114
	</div>
115
 
116
 
117
 
118
<!-- SYNDICATION - FIN -->