• I know a lot of you have been stuck on this as have I. I finally got it to work today and wanted to post real instructions. I have created a gallery with captions, individual voting for each image. This is how it was done:

    1. You must know how to access your cPanel or FTP File Manager because you have to edit the actual code. This is easier than it sounds if you know where to put things.

    2. Once you have accessed the PHP files, for me this was in /public_html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules

    3. Now it is time to add the voting code <?php echo nggv_imageVoteForm($image->pid); ?>
    into the various files to enable voting.

    4.The FIRST file to add this to is: /public_html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/gallery.php If you do not add it here, it WILL NOT WORK placed in any of the gallery templates, even if added in the correct location!

    5. In the above PHP file – add the voting code here under Thumbnails: (I have copied from line 1 until where the inserted code ends…
    [excessive code removed – use a pastebin for that much code –
    https://codex.www.ads-software.com/Forum_Welcome#Posting_Code ]

    9. SAVE!

    10. Once you have added and saved the voting code to all the templates you will be using, return to WordPress and create a gallery with enabled voting.

    11. Navagate to the page where you would like the gallery to diplay. Click on the green button and add the gallery. In the pop up window select a template, under the “Customize the Display settings”. Choose the PHP that you added the voting code to!

    12. After this, it worked for me! – I hope it does for you!

    https://www.ads-software.com/plugins/nextgen-gallery-voting/

Viewing 4 replies - 1 through 4 (of 4 total)
  • This was very helpful. Thank you so much! Your code was removed from a moderator or something but I figured out where to put it. I put it right after the closing tag for the image thumbnail.

    Thread Starter starlinggirl

    (@starlinggirl)

    That’s great! I’m so glad this helped! I am bummed they removed the code. In step #5, the voting code goes at the end of the thumbnail sections last line which is:
    (<?php echo $image->thumbcode ?> >
    <?php if ( !$image->hidden ) { ?>
    <img title=”<?php echo esc_attr($image->alttext) ?>” alt=”<?php echo esc_attr($image->alttext) ?>” src=”<?php echo nextgen_esc_url($image->thumbnailURL) ?>” <?php echo $image->size ?> />
    <?php } ?>

    </div>)

    I’m glad you found it! The plugin works extremely well, once you get it to work!

    Hi starlinggirl,
    I don’t suppose you could post that code to https://pastebin.com/ or similar, & then provide that link in your reply?
    I seem to be having an issue with location, it’s displaying (stars) but only for the last thumbnail image in the gallery, not for each.
    Jason

    I may have just answered my own question with a little experimentation.
    In gallery.php I placed <?php echo nggv_imageVoteForm($image->pid); ?> on the line directly below <img title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> /> which for me was line 38.
    This gets the stars (in my case) displaying under each thumbnail.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SOLUTION: How to show voting’ is closed to new replies.