modifier le plugin de gallery d'image

Réduire
X
 
  • Filtrer
  • Heure
  • Afficher
Tout effacer
nouveaux messages

  • modifier le plugin de gallery d'image

    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 PHP:
    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 PHP:
    <?if ($gallery['1 .jpg']->filename == image1.jpg) ?>
    title="<?php echo $Caption2?>
    <?if ($gallery['2 .jpg']->filename == image2.jpg) ?>
    title="<?php echo $Caption2?>"
    Dernière édition par moraitoxico à 08/09/2011, 21h13

Annonce

Réduire
Aucune annonce pour le moment.

Partenaire de l'association

Réduire

Hébergeur Web PlanetHoster
Travaille ...
X