Probably not a very commonly used situation, but I would love to be able to combine two different image fields for one slideshow in a ssp view. I tried adding both fields in my view, but right now it seems that the module just finds the first field and stops after that.

Comments

skov’s picture

subscribe

sparkymark’s picture

subscribe, i've been trying to work out how to do this too. kinda almost got it to work with nivo slideshow, but i get a javascript error in Internet Explorer

/jquery_update/replace/jquery.min.js?w

sansui’s picture

I had a very specific use case scenario so I did a bad thing and just hacked up the ssp_views.module directly for my specific fields :P

As you can see below, the slideshow shows my floorplans images first, then it shows my generic images field next. I don't know if this will help you or not, but it did what I needed in a pinch.


 $result = $views->result;
  $images = array();
  $nodes_seen = array();
  foreach($result as $node) { 
    $node = node_load($node->nid);
    if($node->field_listing_floorplans['0']) {
 
   foreach ($node->field_listing_floorplans as $image) {
        $src = $base_path.$image['filepath'];
        $description = $image['data']['description'];
        $desc_alt = $image['data']['title'];
        $title = $image['data']['alt'];
        $thumbnail = ssp_imagecache_generate('ssp_thumbnail', $image['filepath'], TRUE);
        $largepic = ssp_imagecache_generate('ssp_large', $image['filepath'], TRUE);
        $slidepic = ssp_imagecache_generate('ssp_medium', $image['filepath'], TRUE);
        if(is_array(file_validate_is_image($image))) {
            print '<img src="'. $slidepic .'" fs="'.$largepic. '" title="'. $title .'" caption="'. $desc_alt .'" link="" target="_blank" pause="" tn="'.$thumbnail .'" vidpreview="" />' . "\n";
        }      
    $nodes_seen[] = $node->nid;
    }
    }
    foreach ($node->field_cimages as $image) {
        $src = $base_path.$image['filepath'];
        $description = $image['data']['description'];
        $desc_alt = $image['data']['title'];
        $title = $image['data']['alt'];
        $thumbnail = ssp_imagecache_generate('ssp_thumbnail', $image['filepath'], TRUE);
        $largepic = ssp_imagecache_generate('ssp_large', $image['filepath'], TRUE);
        $slidepic = ssp_imagecache_generate('ssp_medium', $image['filepath'], TRUE);
        if(is_array(file_validate_is_image($image))) {
            print '<img src="'. $slidepic .'" fs="'.$largepic. '" title="'. $title .'" caption="'. $desc_alt .'" link="" target="_blank" pause="" tn="'.$thumbnail .'" vidpreview="" />' . "\n";

        }
     $nodes_seen[] = $node->nid;   
    }
kylebrowning’s picture

You shouldnt need to hack the ssp_views.module

You can override its theme function.

sansui’s picture

Yeah, good point. That function is easily overriden in template.php