Subversion Repositories Sites.tela-botanica.org

Rev

Rev 1015 | Rev 1029 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1015 Rev 1016
Line 51... Line 51...
51
							if (preg_match('/appli:cel-img:([0-9]+)[SML]\.jpg$/', 	$page['guid'], $match)) {
51
							if (preg_match('/appli:cel-img:([0-9]+)[SML]\.jpg$/', 	$page['guid'], $match)) {
52
  								$guid = (int) $match[1];
52
  								$guid = (int) $match[1];
53
							}
53
							}
54
						?>
54
						?>
55
    					<div class="actualites1">
55
    					<div class="actualites1">
56
    						<a href="<?=$page['description']?>" class="image-lien" title="<?=sprintf($tpl_url, L)?>" rel="galerie-princ">
56
    						<a href="<?=sprintf($tpl_url, L)?>" class="image-lien" 
-
 
57
    							title="<?=$titre_page?> - Publiée le <?=$page['date']?> - GUID : <?=$guid?>" 
-
 
58
    							rel="galerie-princ">
57
    							<img src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
59
    							<img src="<?=sprintf($tpl_url, S)?>" alt="<?=$titre_page?>"/>
58
    						</a>
60
    						</a>
Line 59... Line 61...
59
    						
61
    						
60
    						<div style="display: none;">
62
    						<div style="display: none;">
61
								<div id="cel-obs-<?=$guid?>" class="infos-annexe">
63
								<div id="cel-obs-<?=$guid?>" class="infos-annexe">
62
	    							<a href="<?=$page['description']?>">
64
	    							<strong>
63
	    								<span class="image-titre"><?=$titre_page?></span><br />
65
										<a class="image-titre" href="<?=$page['description']?>"
64
	    								<span class="image-date">Publiée le <?=$page['date']?></span><br />
66
											onclick="window.open(this.href);return false;"  
-
 
67
											title="Cliquez pour accéder à la fiche eFlore">
65
	    								Cliquez pour voir le détail
68
											<?=$titre_page?>
-
 
69
										</a>
-
 
70
									</strong><br />
66
	    							</a>
71
									<span class="image-date">Publiée le <?=$page['date']?></span>
67
	    						</div>
72
	    						</div>
68
    						</div>
73
    						</div>
69
						</div>
74
						</div>
-
 
75
    				<?php endforeach; ?>
70
    				<?php endforeach; ?>
76
    				
-
 
77
    				<!-- Image Extra en dessous des vignettes -->
71
    				<!-- img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$sites[0]['pages'][7]['guid']?>M" / -->
78
    				<? 
-
 
79
    					$page = $sites[0]['pages'][7];
-
 
80
						// Formatage date
-
 
81
						$timestamp = strtotime($page['date']);
-
 
82
						$page['date'] = strftime('%A %d %B %Y', $timestamp);
-
 
83
 
-
 
84
    					$titre_page = preg_replace('/^\d+-\d+&nbsp;:/', '', $page['titre']);
-
 
85
						$tpl_url = preg_replace('/[SML]\.jpg$/', '%s.jpg', $page['guid']);
-
 
86
						$guid = $page['guid'];
-
 
87
						if (preg_match('/appli:cel-img:([0-9]+)[SML]\.jpg$/', 	$page['guid'], $match)) {
-
 
88
  							$guid = (int) $match[1];
-
 
89
						}
72
    				<? $page = $sites[0]['pages'][7]; ?>
90
    				?>
73
    				<div class="actualites1">
91
    				<div class="actualites1">
-
 
92
   						<a href="<?=sprintf($tpl_url, L)?>" class="image-lien" 
-
 
93
   							title="<?=$titre_page?> - Publiée le <?=$page['date']?> - GUID : <?=$guid?>" 
74
   						<a href="<?=$page['description']?>" class="image-lien" title="<?=sprintf($tpl_url, L)?>" rel="galerie-princ">
94
   							rel="galerie-princ">
75
   							<img id="imgExtra" src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
95
   							<img id="imgExtra" src="<?=sprintf($tpl_url, M)?>" alt="<?=$titre_page?>"/>
76
   						</a>
-
 
77
   						<div style="display: none;">
-
 
78
							<div id="cel-obs-img-extra" class="infos-annexe">
-
 
79
    							<a href="<?=$page['description']?>">
-
 
80
    								<span class="image-titre"><?=$titre_page?></span><br />
-
 
81
    								<span class="image-date">Publiée le <?=$page['date']?></span><br />
-
 
82
    								Cliquez pour voir le détail
-
 
83
    							</a>
-
 
84
    						</div>
-
 
85
   						</div>
96
   						</a>
-
 
97
					</div>
86
					</div>
98
					
87
    				<script type="text/Javascript">
99
    				<script type="text/Javascript">
-
 
100
    					function formaterTitre(titre, currentArray, currentIndex, currentOpts) {
-
 
101
    						var motif = /GUID : ([0-9A-Z]+)$/;
-
 
102
    						motif.exec(titre);
-
 
103
    						var guid = RegExp.$1;
-
 
104
    						var info = $('#cel-obs-'+guid).clone().html();
-
 
105
    						var tpl = 
-
 
106
    							'<div id="cel-legende">'+
-
 
107
    							(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
-
 
108
    							'<\/div>';
-
 
109
    						return tpl;
-
 
110
    					}
88
    					//Remplacer le lien de chaque actualité par un #cel-obs-guid
111
    						
89
    					$(document).ready(function() {
112
    					$(document).ready(function() {
90
    						$('.actualites1').each(function () {
113
    						$('a.image-lien').attr('rel', 'galerie-princ').fancybox({
91
	    						var id = $(this).find('.infos-annexe').attr('id');
114
    							transitionIn:'elastic',
92
	    						var lien = $(this).find('.image-lien');
115
    							transitionOut:'elastic',
93
	    						lien.attr('href', '#' + id);
-
 
94
	    						
-
 
95
	    						$('#' + id).prepend('<img height="500px" src="' + lien.attr('title') + ' /> <br />');
116
    							speedIn	:600, 
96
	    						lien.fancybox({
117
    							speedOut:200,
97
	    							'titlePosition'	: 'inside',
118
    							overlayShow:true,
98
	    							'transitionIn'	: 'none',
119
    							titleShow:true,
99
	    							'transitionOut'	: 'none'
120
    							titlePosition:'inside',
100
	    							});
121
    							titleFormat:formaterTitre
101
    						});
122
    						});
102
    					});
123
    					});
103
    				</script>
124
    				</script>
104
    			</div>
125
    			</div>