Bonjours a tous,
Voila, j'essayé de modifier ce plugin : http://www.joomlaworks.gr/content/view/17/42/
donc, quand on clique sur l'image, des informations s'affichent...
dans mon exemple, je veux afficher des informations différentes pour chaque photo, exemple quand je clique sur photo1.jpg sa m'affiche l'information photo1 et quand je clique sur photo2.jpg elle m'affiche photo2 comme information, apres quelques recherches j'ai trouvé le fichier php qu'il faut modifier le voila :
les informations par défaut fournies avec le plugin s'affiche dans la variable $photoCaption, donc afin d'essayer d'atteindre mon but j'ai identifié chaque photo par : $gallery['array du .jpg']->filename, le problème c'est que j'ai pas réussi a faire rentrer les conditions pour l'affichage des informations de chaque photo, exemple :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 defined('_JEXEC') or die('Restricted access'); // We set the caption output here so the HTML structure below is a "bit" cleaner :) $photoCaption = htmlentities(JText::_('<b>Navigation tip:</b> Hover mouse on top of the right or left side of the image to see the next or previous image respectively.<br /><br />You are browsing images from the article:').' <b>'.$row->title.'</b><br /><br />', ENT_QUOTES, 'utf-8'); $Caption1 = 'ma première photo'; $Caption2 = 'ma deuxieme photo'; ?> <ul id="sig<?php echo $galleryID; ?>" class="sig-container"> <?php foreach($gallery as $photo): ?> <li class="sig-block"> <span class="sig-link-wrapper"> <span class="sig-link-innerwrapper"> <a href="<?php echo $photo->sourceImageFilePath; ?>" class="sig-link" style="width:<?php echo $thb_width; ?>px;height:<?php echo $thb_height; ?>px;" rel="lightbox[gallery<?php echo $galleryID; ?>]" title="<?php echo $photoCaption; ?>" target="_blank"> <img class="sig-image" src="<?php echo $transparent; ?>" alt="<?php echo JText::_('Click to enlarge').' '.$photo->filename; ?>" title="<?php echo JText::_('Click to enlarge').' '.$photo->filename; ?>" style="width:<?php echo $thb_width; ?>px;height:<?php echo $thb_height; ?>px;background-image:url(<?php echo $photo->thumbImageFilePath; ?>);" /> <?php if($galleryMessages): ?> <span class="sig-pseudo-caption"><b><?php echo JText::_('Click to enlarge'); ?></b></span> <span class="sig-caption"><?php echo JText::_('Click to enlarge'); ?></span> <?php endif; ?> </a> </span> </span> </li> <?php endforeach; ?> <li class="sig-clr"></li> </ul>
donc voila je ne sais pas si je suis sur le bon chemin ou pas.. est ce que quelqu'un a une idée ??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <?if ($gallery['1 .jpg']->filename == image1.jpg) ?> title="<?php echo $Caption2; ?>" <?if ($gallery['2 .jpg']->filename == image2.jpg) ?> title="<?php echo $Caption2; ?>"
merci !
Partager