Hello,
Can you explain me how show the first image of the node in the gallery but all the images in the slideshow ?
Thank you from France...

Comments

himue’s picture

Assigned: Unassigned » himue
Status: Active » Postponed (maintainer needs more info)

Hello dreb,

you can't do this in himuesgallery, sorry.

I think the only way is to create an Image wich link to the gallery.

Or did i misunderstand you?

Greetings from,
Himue

dreb’s picture

Hello,

Create an image with a link is a good idea, but i don't know how ! I'm a beginner with Drupal.

I modified the .tpl file and it's not so bad. Now i want to make a bigger thumbnail for the first image and put it on the bottom of the node to have something like :

[ First big thumb  ]
[   Body           ]
[ Other thumbs     ]

I still haven't found how create the first thumb with differents parameters than the others and how to put it on the top. Looks difficult...

Best regards.

klazag’s picture

@dreb:

can you please show me how you've modified the .tpl-file?

himue’s picture

Title: Showing only first image » Showing only first teh "image

This can't be done by hmuesgalery automatically.
You can
- create your own thumbnail in any way (graphic programm, drupal plugin like IMCE, or so on),
- copy it anywhere in your drupal filespace - but not in the "thumbs"-directory under your gallery
- an insert your thumbnail as image in the "Info-text in top of the gallery"

Greetings from
Himue

dreb’s picture

Happy new year !

@Himue
Ok, I see.
But some users can forget to insert the first image.
So for the moment I've just put a "height=999" in the first image's css code. It's not great.

@Himue and @Klazag

.tpl :

<?php
/**
 * @file
 */

//variables:
// $node
// $picturelist
// $path
$prefix="";
if (module_exists("colorbox")) {
	drupal_add_js("jQuery(document).ready(function(){
			jQuery(\"a[rel='cb_lightshow[himuesGallery]']\").colorbox({ slideshow:true, slideshowAuto:false, loop:false, transition:'elastic', speed:500, slideshowSpeed:5000, height:'100%', current:'Image {current} sur {total}' }); 
			jQuery(\"a[rel='cb_lightbox[himuesGallery]']\").colorbox({ transition:'fade', speed:1000, slideshowSpeed:5000 }); 
			jQuery(\"a[rel='cb_lightbox[]']\").colorbox({ rel: 'nofollow' }); 
	});"
	, 'inline');
	$prefix="cb_";
}

//Workaround for Windows that uses "\" as path-separator
$path = str_replace('\\', '/', $path);

$NbrImages = sizeof($picturelist);   // Nombre d'images du diaporama
$Image = 0;                          // Rang de l'image en cours
?>

<div class="himuesgallery_outer">
<!-- Affichage du champ "Body" du node -->
<div class="himuesgallery_text"><?php /*print $node->body;*/ isset($node->body) ? $node->body : NULL; ?></div>
<!-- Première image du diaporama -->
<div class='himuesgallery_premiere_image'>
<a href="<?php $pic = drupal_encode_path($path . $node->gallery_path . "/" . $picturelist[$Image]['File']); $pic = str_replace('%252F', '', $pic); echo $pic; ?>"
   <?php
   switch ($node->showtype) {
     case 0:
       echo "rel='" . $prefix . "lightbox[]'";
       break;

     case 1:
       echo "rel='" . $prefix . "lightbox[himuesGallery]'";
       break;

     default:
       echo "rel='" . $prefix . "lightshow[himuesGallery]'";
   }
   ?>
   target="_blank">
   <img src="<?php $pic = drupal_encode_path($path . $node->gallery_path . "/" . $picturelist[$Image]['File']); $pic = str_replace('%252F', '', $pic); echo $pic; ?>">
</a>
</div> <!-- Fin de _premiere_image -->
<!-- Deuxième image et suivantes -->
<?php
for ($Image = 1; $Image < $NbrImages; $Image++) {
?>
  <div class='himuesgallery_picture'>
    <div class='himuesgallery_picture_image'>
      <a href="<?php $pic = drupal_encode_path($path . $node->gallery_path . "/" . $picturelist[$Image]['File']); $pic = str_replace('%252F', '', $pic); echo $pic; ?>"
        <?php
        switch ($node->showtype) {
          case 0:
            echo "rel='" . $prefix . "lightbox[]'";
            break;

          case 1:
            echo "rel='" . $prefix . "lightbox[himuesGallery]'";
            break;

          default:
            echo "rel='" . $prefix . "lightshow[himuesGallery]'";
        }
        ?>
        target="_blank">
        <img src="<?php $thumb = drupal_encode_path($path . $node->gallery_path . "/thumbs/thumb." . $picturelist[$Image]['File']); $thumb = str_replace('%252F', '', $thumb); echo $thumb; ?>">
      </a>
    </div> <!-- Fin de _picture_image -->
    <div class='himuesgallery_picture_description'></div>
  </div> <!-- Fin de _picture -->
<?php
} // -- Fin de "for"
?>
</div> <!-- Fin de _outer -->
<div class="content clearfix"></div>

.css :

/**
* @file
* Shows Gallery with 2 textlines under the picture
*/

.himuesgallery_outer,
.himuesgallery_text {
  clear: both;
  float: left;
  width: 100%;
}

.himuesgallery_text {
  border-bottom: 1px dotted black;
}

.himuesgallery_premiere_image {
  margin: 5pt;
  text-align: center;
  vertical-align: middle;
}

.himuesgallery_premiere_image img {
  height: 300px;
}

.himuesgallery_picture {
  float: left; 
  margin: 5pt;
  text-align: center;
  vertical-align: middle;
  width: 100px;
}

.himuesgallery_picture_image {
  height: 65px;    /* will be used in himuesgallery to create thumbnails */
  width: 100px;    /* h: 133   w: 200 */
}

.himuesgallery_picture_description {
  height: 15px;
 }

.clearer {
  clear: both;
}

Not the best but I'm a beginner ;-)

dreb

himue’s picture

Hello dreb,

sorry for long waiting time.

I understand what you have done, but why?
If you want a bigger picture in top off the gallery you can put it as picture in the body field of the gallery-node. Here you can use any picture with any size. Not only the pictures/thumbs from your gallery.

Greetings from
himue