Этот плагин не тестировался с последними 3 основными выпусками WordPress. Скорее всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

NextGEN Gallery Voting



  • Individually enable or disabled per image
  • Choose if registered and logged in users can vote
  • Allow a user to vote as often as they want, or just once per image
  • Show or hide the results from your users
  • Choose from 3 ratings types: 1-5 Stars, 1-10 Drop Down, or Like/Dislike

NGG Voting was inspired by a request from Troy Schlegel of Schlegel Photography. Please read the FAQ for more info on how it works.

If you want even more features and functionality, be sure to check out the Premium add-on.

Please read the FAQ, as you are required to add a tag to gallery templates for certain functionality to work!

No Longer Supported

Please note: Due to some personal life circumstances, I was unable to provide the support level I wanted and this plugin stopped being updated awhile ago.
Bringing this plugin up to date, and improving its usability are not feasible, so it will not be updated in the future.

New Replacement Plugin

I have released a replacement plugin that drastically simlifies the user experience, requiring no editing of templates, or code changes.
I will be updating the new ratings plugin with features, and providing active support. Please check it out here.


  • Main settings screen to control settings for any new Images or Galleries created
  • The image settings for an actual image in the NextGEN Gallery ‘Manage Gallery’ screen
  • Voting types available (more available in the Premium add-on!)
  • Voting results for an image
  • Top Voted screen showing you images and their votes
  • Images with voting enabled


  1. Unzip the plugin to your wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to ‘Manage Gallery’ in NextGEN, and select a gallery to see the new options
  4. Remember to add the tag to the gallery template for image voting to work (see the FAQ)!

Часто задаваемые вопросы

In a nutshell, what is this?

This plugin adds options that can allow your users to vote on (more like rate) your Galleries and Images. There are options to limit which
Gallery/Image to allow voting on, if the user needs to be registered and logged in, if they can vote more that once, and if they can see the
current results.

How do I show the voting form?

You need to add a small tag to the gallery display template.

For image voting:
For image voting, add the following tag: <?php echo nggv_imageVoteForm($image->pid); ?>, to the gallery display template.

For gallery voting:
For gallery voting, add the following tag: <?php echo nggv_galleryVoteForm($displayed_gallery, $gallery); ?>, to the gallery display template.

For NGG 1.x, you can find the gallery templates in the /plugins/nextgen-gallery/view/ directory. For the default shortcode, [nggallery id=x], you
add the tag to the gallery.php file. If you add the template attribute to your shortcode, you need to alter the appropriate template. eg:
If you use the [nggallery id=x template="caption"], you need to add the tag to the gallery-caption.php template.

For NGG version 2.x, you need to add the tag to the /nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/index.php
template. This will only work for galleries inserted WITHOUT selectiong a template from the gallery display options.
NGG v2.x templating system can be confusing for some users. Please see this page for more info on which templates are used.

Please be aware, for image voting, the form needs to be placed inside the foreach() loop in those templates, as that loop is outputting each image.
I find the best place to put the tag is AFTER the <div class="ngg-gallery-thumbnail"> is CLOSED.
For gallery voting, be sure to place the tag outside of the foreach, or it will show more than once on the page.

Can I style it?

Absolutely. This plugin intentionally adds very little styling to the voting forms, but it does provide plenty of ids and classes allowing you to style it to fit in with your site.

Where are the results

Under the Gallery or Image options, the current average vote show along with how many votes have been cast. Click on the number of votes cast to view more info on those votes.
You can also see more information on the voting results under the ‘Top Voted’ menu option.


No hassles and really the only solution that provides this kind of functionality. No other Opensource Gallery script could provide it with so much ease. I’m not a developer and really appreciate plugins like this that just work!
Exactly what I needed, great job. Maybe a bit slow, but I guess that’s more a NextGEN thing.
Посмотреть все 27 отзывов

Участники и разработчики

«NextGEN Gallery Voting» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:


Перевести «NextGEN Gallery Voting» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений


  • Security patch to stop unauthorized access to certain features


  • CSS fix for stopping numeric values of stars showing under certain conditions


  • Quick hack to invalidate the NGG template cache using the built in NGG functions.


  • Fixed voting options in «Manage Gallery» screen for NGG >= 2.0.57


  • Disabled NGG v2.x’s caching class entirely.


  • Patch to flush the NextGEN Gallery display template cache when vote is saved, so vote shows on next page refresh


  • Added code to fix NGG Publuc Uploader bug, allowing it to be used with NGG Voting.
  • Fixed gallery voting when using NGG v2.x.


  • Changed the way voting URLs are generated for better compatibility with sub directory installs
  • Tweak new image catch to work with NextGEN Gallery 2


  • Added hooks and filters for the premium add-on to use.


  • Fixed a bug that was stopping the voting showing with certain settings, for user’s without Premium installed


  • Fixed a bug stopping ‘thank you’ message showing if you don’t have the latest Premium add-on


  • Optimized ajax voting.
  • Optimized JavaScript inclusions to fix conflicts with other plugins.
  • Added date range to ‘Top Voted’ filter.
  • Added ability to see indvidual votes in ‘Top Voted’ filter.
  • Added hooks and filters for the premium add-on to use.


  • Fixed a bug introduced in 2.4, stopping the ‘drop down’ voting type registering votes.


  • Added database autoupdater if there are changes.
  • Added hooks and filters for the premium add-on to use.


  • Fixed a bug where new images weren’t taking on all the default settings correctly.


  • Fixed a table definition that was breaking completely fresh installs (thanks besso for the bug report).


  • Lots of hooks and filters added for premium add-on to use.
  • Added ‘gallery’ filter option to top voted search screen.


  • Allowed drop down rating message to be edited in premium add-on.


  • Changed some GET variables to work around a small bug with NGG. Voting will work with [nggtags] shortcode now, as well as with NGG option «The gallery will open the ImageBrowser instead the effect.» on.
  • Changed get_bloginfo('url') to get_admin_url() for URLs in the backend, to help with WordPress installs in sub directories.


  • Changed the AJAX JavaScript to play nicely with themes running WordPress’ auto formatting.
  • Fixed a bunch of PHP notices.


  • Rewrote voting functions to allow for better future compatibility.


  • Massive rewrite, with many under-the-hood changes, but very few visible. This rewrite is to make adding features easier in the future.
  • Update default options screen to use new WP styling.
  • Updated gallery voting options to not need javascript to load and save.
  • Changed order of voting options so star is out-the-box default (star, drop down, like/dislike).
  • Fixed bug including CSS more than once on occations.
  • Improved voting results in dashboard, to not always reflect out of 10.


  • Fixed a bug that saved a vote for all galleries on the page if there was more than one (thanks oxiw for the report and Torteg for the confirmation example)


  • Fixed admin viewing details of votes cast
  • Made drop down voting jump down to last image voted on (simple anchor).
  • Added ‘Clear Votes’ button to images.


  • Added honey pot spam protection for drop down voting. Not perfect, but it’s a start.


  • Changed the HTML comments used as markers for JS output when AJAX voting to not be so similar to Apache SSIs.


  • Fixed a bug that contiuned to show voting form even if option to not show results was selected (It didn’t reveal results, just was a confusing interaction, thanks to Iced_Plum for reporting it)


  • Added ability to allow only 1 image vote per gallery


  • Removed ‘Gallery’ filter from top images report as it was buggy


  • Made compatible with NGG 1.8.0 (Thanks to csillery for reporting the issue)


  • Fixed a bug stopping votes saving if MySQL was in STRICT MODE
  • Fixed a bug showing floating numbers for low rated images
  • Added report to list top images


  • Added ‘Voting Type’ default when creating a new gallery


  • Fixed a bug stopping voting working when including the gallery with the [nggtags] shortcode (Thanks migf1 for finding and reporting it)


  • Made ‘like/dislike’ and ‘star’ ratings use ajax to cast votes. But it will fall back if javascripti is not enabled


  • I screwed up the backwards compatibility, sorry. Use 1.5 for < NGG1.7


  • Made it backwards compatible with NGG 1.6.x and lower. Should have been done with the last update, but I was spaced on pain meds


  • Made this plugin compatibile with NextGEN Galley 1.7.x and greater, which breaks compatibility with lower versions of NGG


  • Added a new type of voting, the «Like / Dislike»


  • Added the ability to set default voting options for new Galleries and Images


  • Fixed a broken close label tag that caused some issues with the drop down voting (Thanks to Mae Paulino for pointing it out)


  • Fixed a bug that directed users to a 404 if using star ratings with pretty URLs enabled


  • Added the ability to choose to vote using 5 star rating
  • Removed hook that was creating a blank admin menu item in the WordPress backend


  • Added voting to images
  • Fixed bug that broke the admin layout in Internet Explorer


  • Initial Release