Before you ask please READ THIS

How to add links to album images?

edited January 2013 in Spaceship Posts: 4
Hi there
From my understanding, you are using supersized,js to generate the album post.i downloaded supersized.js and looked at the demos.
i saw that there is an option to pass a url link for each image like this demo

slides : [ // Slideshow Images
{image : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.2/slides/kazvan-1.jpg',
title : 'Image Credit: Maria Kazvan', thumb : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.2/thumbs/kazvan-1.jpg',
url : 'http://www.nonsensesociety.com/2011/04/maria-kazvan/'
},

it seems that you disabled this url attribute.can you please help me to enable it in some way (for example, setting the url link in the description column and using it when generating the slide section?)

my intention is to show an album, on when click on an image, to redirect the user to a specific page

please help me. i have a customer waiting and i am stuck

thanks
Yoav

Comments

  • just a comment:
    i saw this topic:http://support.apollo13.eu/discussion/483/add-line-break-to-photo-description-in-album#Item_7
    i am not interested in presenting the description at all. i am interested in display the album and when click on the image to be redirected (just like supersized demo):

    http://buildinternet.com/project/supersized/slideshow/3.2/demo.html

    in this demo, each click on different image redirect the user to a different site,that my intention.
  • AirAir
    Posts: 10,970
    Hi yoavadler

    Yes we use supersized, but
    1. We extended it with support for Youtube, Vimeo, and HTML 5 Video support.
    2. We already take all clicks in album to do play/pause aalbum events.

    But lets try it:
    For start You could add in advance/meta.php in 473 line this

    array(
    'name' => __be( 'URL' ),
    'desc' => '',
    'id' => 'post_image_url',
    'default' => '',
    'switch' => 'post_image',
    'type' => 'input
    ),
    Now you have place to put urls for each photo. Now we need to use it - advance/cpt_album.php in this array(line 276)

    $slides[] = array(
    'type' => $type,
    'image' => $media,
    'thumb' => $thumb,
    'title' => $caption,
    'desc' => $desc,
    'bg_color' => $bg_color,
    'font_color' => $font_color,
    'text_bg_color' => $text_bg_color,
    'pattern' => $pattern,
    'pattern_opacity' => $pattern_opacity,
    'album_name' => $album_name
    );
    add
    'url' => trim( get_post_meta($ID, '_post_image_url_' . $i, true) );,

    If I am not mistaken now you will send urls to supersized script. As I see support for links is not stripped by me from main supersized script, however if needed you will have to disable click events on album in supersized.apollo.js

    If you need further help in it I will try to help.

    With regards.
  • edited January 2013 Posts: 4
    Hi Air

    Thanks for the quick reply.i did the changes and indeed it added the link.but it still not redirect . the <a> is initialized from the url box value but click on the image wont do anything(except show "play" icon).

    you mentioned i need to disable click event in the supersized,apollo.js so i went to that file
    i remarked this section:

    /*
    api.$el.on('click', 'li',{}, function(e){
    //do nothing if clicked photo description
    if($(e.target).parents('#slide-text').length){}
    else{
    e.preventDefault();
    api.playToggle();
    }
    });
    */
    and it did worked.i was able to click on an image that url attribute had a value, and other albums(youtube for example) were not effected

    pls tell me if there is another impact i am not aware of.
    thanks for the help

    Yoav
    Post edited by Air on
  • AirAir
    Posts: 10,970
    Great you did it :-)
    yoavadler said: pls tell me if there is another impact i am not aware of.
    Not any I am aware of. Click was only for pausing slideshow, so I think you are safe.

    With regards.

  • Posts: 12
    Hello!
    Can I use this for Hypershot theme?
  • AirAir
    Posts: 10,970
    Rather not, Hypershot has rewritten from scratch supersized script and it don't support links.

    With regards.
  • Posts: 12
    ok thank you
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!