M2vH / galleriffic

Automatically exported from code.google.com/p/galleriffic
0 stars 0 forks source link

I will llike to query a database and extract comments related to an image when it loads #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This really is not and issue but an enhancement.

I am working on a project where I want to dynamically(AJAX) query a 
database and extract comments related to an image but I am having 
difficulty extracting the unique 'optionalCustomIdentifier' attached to 
the links <a href="" name="optionalCustomIdentifier"><img ....></a>

My plan below

I attached a callback method here where gallery is initiallized.

.eq(nextIndex).fadeTo('fast', 1.0,alerting(optionalCustomIdentifier));

function alerting(unique_image_identifier){
    //alert(com);
//Using the 'unique_image_identifier', I can query the database and 
display the comments below image when it loads. 

}

So need help accessing the name attr optionalCustomIdentifier of the links.

Or is their a better way

Original issue reported on code.google.com by nanna...@gmail.com on 6 Apr 2010 at 2:23

GoogleCodeExporter commented 9 years ago
imageData.hash or imageData.name can be used to store the unique photo id
('unique_image_identifier') which can be passed to a javascript function that 
connects to the database and querys it.

All you need to do is put you function here. 
gotoImage: function(imageData){
..... myfunction(imageData.hash){}
}

Found out after looking properly at the galleriffic.js file properly.

Note: you must state name="" attribute or the hash values will be set to some 
default values.

Just want to say Galleriffic is indeed a great project. weldone.God bless

Original comment by nanna...@gmail.com on 7 Apr 2010 at 12:38

GoogleCodeExporter commented 9 years ago
Hi Nannabar,

I want to use my custom links instead of the flickr links.
I have all the image links in a array and the array size can be dynamic 
depending on
the image count.
As of now I have hard coded some 5 links in the array.
Can you please help me out.

Thanks,
Manoj

Original comment by agrawal....@gmail.com on 25 May 2010 at 9:27