[Résolu]Modification du plugin simple gallery d'image

Support et assistance pour développer des extensions ou pour modifier Joomla! 1.5.x

Moderators: Aidan38, sarki

Forum rules
Règles du forum
Locked
moraitoxico
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Sep 08, 2011 10:08 am

[Résolu]Modification du plugin simple gallery d'image

Post by moraitoxico » Thu Sep 08, 2011 10:11 am

Bonjours a tous,

Voila, j'essaye de modifier ce plugin : http://www.joomlaworks.gr/content/view/17/42/

donc, quand ont cliquent sur l'image, des informations s'affiche...
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 recherche j'ai trouver le fichier php qu'il faut modifier le voila :

Code: Select all

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>
les information pardefaut fourni avec le plugin s'affiche dans la variable $photoCaption, donc afin d'essayé d'atteindre mon but j'ai identifier chaque photo par : $gallery['array du .jpg']->filename, le problème c'est que j'ai pas réussi a faire rentrer les condition pour l'affichage des information de chaque photo, exemple :

Code: Select all

<?if ($gallery['1 .jpg']->filename == image1.jpg) ?>
title="<?php echo $Caption2; ?>" 
<?if ($gallery['2 .jpg']->filename == image2.jpg) ?>
title="<?php echo $Caption2; ?>"
donc voila je ne sais pas si je suis sur le bon chemin ou pas.. es ce que quelqu'un a une idée ??
merci !

Locked

Return to “1.5 - Développement”