Update: I found the icon under Edit Page, top right corner of the kitchen sink, which says NextGEN Gallery – Attach to Post. I was able to add a gallery to a page, and it displays. I also added the code
<?php echo nggv_imageVoteForm($image->pid); ?>
to the template on the backend on the FTP site.
I made sure NOT to select a specific gallery template to display the images. However, the voting under each photo does not display. With any suggestions, I would be so thankful! I really want to get image voting going on this website.
Here is the code, with the suggested code added at the bottom:
<div class=”ngg-gallery-thumbnail”>
get_image_url($image, ‘full’, TRUE))?>”
title=”<?php echo esc_attr($image->description)?>”
data-src=”<?php echo esc_attr($storage->get_image_url($image)); ?>”
data-thumbnail=”<?php echo esc_attr($storage->get_image_url($image, ‘thumb’)); ?>”
data-image-id=”<?php echo esc_attr($image->{$image->id_field}); ?>”
data-title=”<?php echo esc_attr($image->alttext); ?>”
data-description=”<?php echo esc_attr(stripslashes($image->description)); ?>”
<?php echo $effect_code ?>>
<img
title=”<?php echo esc_attr($image->alttext)?>”
alt=”<?php echo esc_attr($image->alttext)?>”
src=”<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name, TRUE))?>”
width=”<?php echo esc_attr($thumb_size[‘width’])?>”
height=”<?php echo esc_attr($thumb_size[‘height’])?>”
style=”max-width:none;”
/>
</div>
<?php
$this->end_element();
?>
</div>
<?php echo nggv_imageVoteForm($image->pid); ?>
<?php
$this->end_element();
?>
What am I doing wrong?
Plugin Author
shauno
(@shauno)
Be sure you have added the voting tag to the correct template. Have a look at this page to help find that template.
The, make sure you have actually enabled voting on the images you want, from the NGG ‘Manage gallery’ screen.
Also be sure to clear the NGG cache
Shauno, did I put the code in the correct location within the code, as shown above? I’m thinking I might want to add this code to every single template to make sure it’s there, as long as I’m putting it in the right place.
Also, how does one clear the NGG cache? It sure would be great if that was all it took!
Plugin Author
shauno
(@shauno)
Under the NGG menu->Other Options->Miscellaneous, there is a ‘Clear image cache’ button
This post was helpful. I had to make sure I had the right file. it helped to have the code shown above. I placed the “vote” code as shown and the voting started working. in order to change settings like the Stars to the Like/Unlike I had to use the ‘Clear image cache’ as described by shauno.
THANKS!
Just to be sure:
Then, make sure you have actually enabled voting on the images you want, from the NGG ‘Manage gallery’ screen.
As for NGG 2.0.5.9 there is no such place on that screen – so where can I enable voting except by altering the “default” setting under NGG Voting > Settings ?
Something I’ve overlooked?
Thanks,
(Running NGG Voting 2.7.2 + …Premium 1.6 + WP 3.8.1)
Plugin Author
shauno
(@shauno)
Hi kjetilgf
The latest version of NGG removed a hook I was using to show the options, so they have disappeared.
I was away the last few weeks, but I will have a fix out in the next few days for this.