Problem with Photo Rating Script in social_tools
  • Hello,

    i use a carousel from http://caroufredsel.frebsite.nl/ with prettyPhoto and want to include a Rating Script for each Photo
    in the social_tools. Everything works fine and looks good. But:

    How can i get the Picture-ID from the link into the social_tools?

    I really tried many, many things but cant get it work...

    I have links like this:

    ...1927619487.jpg?id1=123&id2=456


    And Script like this:

    ...
    $(document).ready(function(){
    var imageID='test';
    $("#foo2 a").prettyPhoto({
    changepicturecallback: function($pp_pic_holder){ imageID=$pp_pic_holder.find('img').attr('src'); alert(imageID);
    }, social_tools: '...< div class="srtgs" id="rt_'+imageID+'" >...'
    });
    });
    ...

    In this case i get the whole link in the "alert" and not the ID (better than nothing), but its the right link for every picture.
    But in the social_tools its always "test", so for all pictures in the carousel its the same rating for the ID "test"...
    I read and tried many things with "global variables" but nothing work for me.



    I also tried something like this:


    ...
    $(document).ready(function(){
    $("#foo2 a").prettyPhoto({
    changepicturecallback: function($pp_pic_holder){ $('#Variable').attr('value', $('#fullResImage').attr('src'));
    }, social_tools: '< div class="rating" >< input id="Variable" type="text" value="" />'
    });
    });
    ...

    In this case i get the whole link in the social_tools (the right link for every picture), but in a input field. This dont really help me...


    So how can i get "id1" / "id2" from the links to include it somwhere in the social_tools like < div class="srtgs" id="rt_'+id1+'" >?

    I have no more ideas so i would be very happy for any help.
    Thank you very much!

    onkelfritz

Howdy, Stranger!

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

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter