Like I said for some reason the: $picturelist = nggdb::get_gallery($image->gid); in functions:
ipHasVotedOnGalleryImage(),
userHasVotedOnGalleryImage()
was returning empty array(), so:
WHERE pid IN (“.implode(‘, ‘, $inPid).”)
generate SQL syntax error.
Because I don’t known code of your plugin, I go around with the images IDs.
I get the IDs from NextGen gallery plugin, just before displaing images from gallery ( adding a second loop ), something like:
<?php $imagesIds = array(); ?>
<?php
for ($i=0; $i<count($images); $i++){
$image = $images[$i];
$imagesIds[] = esc_attr($image->{$image->id_field});
}
?>
and then pass the ids throu the, voting form initializer:
<?php echo nggv_imageVoteForm($image->pid, 0, $imagesIds); ?>
then in voting plugin I added:
if(empty($inPid))
$inPid = $imagesIds
And now it works. But it’s a way around, you probably fix it better.