{"id":31020,"date":"2014-08-08T01:00:02","date_gmt":"2014-08-08T01:00:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/comment-popularity\/"},"modified":"2018-02-07T10:33:49","modified_gmt":"2018-02-07T10:33:49","slug":"comment-popularity","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/comment-popularity\/","author":3252437,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.5","stable_tag":"1.5","tested":"4.9.29","requires":"4.9","requires_php":"5.3.2","requires_plugins":"","header_name":"Comment Popularity","header_author":"Human Made Limited","header_description":"","assets_banners_color":"f8f8f8","last_updated":"2018-02-07 10:33:49","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/humanmade\/comment-popularity","header_author_uri":"http:\/\/humanmade.co.uk","rating":4.2,"author_block_rating":0,"active_installs":30,"downloads":11204,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.3.0":"<ul>\n<li>Guest visitors can now vote ( requires setting a flag )<\/li>\n<li>Negative comment weight is now possible ( requires setting a flag )<\/li>\n<li>Fixes a few bugs ( user karma settings )<\/li>\n<\/ul>","1.2.1":"<ul>\n<li>Fixes a fatal error on uninstall<\/li>\n<\/ul>","1.2.0":"<ul>\n<li>Adds a new Experts widget.<\/li>\n<li>Fixes misc bugs.<\/li>\n<\/ul>","1.1.2":"<ul>\n<li>Fixes a bug which prevented the user karma to appear in the single comment template.<\/li>\n<\/ul>"},"ratings":{"1":"2","2":0,"3":0,"4":0,"5":"8"},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"967070","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.2.0","1.2.1","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.4.0","1.4.1","1.4.2","1.4.3","1.4.3.1","1.4.3.2","1.4.3.3","1.5"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"967070","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"967070","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"967070","resolution":"3","location":"assets"}},"screenshots":{"1":"Set the default karma value for expert users.","2":"Set the user's karma and expert label.","3":"The comment voting controls, and the user's karma on the public facing site."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[107,14689,19025,9827,162],"plugin_category":[43,44,53],"plugin_contributors":[85714,77786,77791,77789],"plugin_business_model":[],"class_list":["post-31020","plugin","type-plugin","status-closed","hentry","plugin_tags-comments","plugin_tags-karma","plugin_tags-upvote","plugin_tags-vote","plugin_tags-widget","plugin_category-customization","plugin_category-discussion-and-community","plugin_category-ratings-and-reviews","plugin_contributors-cfo-publishing","plugin_contributors-humanmade","plugin_contributors-mattheu","plugin_contributors-pauldewouters","plugin_committers-pauldewouters"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/comment-popularity_f8f8f8.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/comment-popularity\/assets\/screenshot-1.png?rev=967070","caption":"Set the default karma value for expert users."},{"src":"https:\/\/ps.w.org\/comment-popularity\/assets\/screenshot-2.png?rev=967070","caption":"Set the user's karma and expert label."},{"src":"https:\/\/ps.w.org\/comment-popularity\/assets\/screenshot-3.png?rev=967070","caption":"The comment voting controls, and the user's karma on the public facing site."}],"raw_content":"<!--section=description-->\n<p>With this plugin, members of your site will be able to vote comments up or down. Think Reddit comments.<\/p>\n\n<p>After activating the plugin, there will be up\/down arrows next to each comment and the total weight of the comment.\nComments are sorted by weight in a descending order.<\/p>\n\n<p>Each commenter is allocated karma each time that one of their comments are upvoted.<\/p>\n\n<p>Admin users can give users the \"expert\" label which will attribute more weight to their comments.<\/p>\n\n<p>You'll find an option under discussion for the default expert karma and it can also be changed on the user's profile.<\/p>\n\n<p>Follow development of this plugin on <a href=\"https:\/\/github.com\/humanmade\/comment-popularity\/\">Github<\/a><\/p>\n\n<p>Requires PHP <code>5.3.2<\/code> or newer.<\/p>\n\n<!--section=installation-->\n<h4>Using The WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Search for 'plugin-name'<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin on the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Uploading in WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Navigate to the 'Upload' area<\/li>\n<li>Select <code>plugin-name.zip<\/code> from your computer<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Using FTP<\/h4>\n\n<ol>\n<li>Download <code>plugin-name.zip<\/code><\/li>\n<li>Extract the <code>plugin-name<\/code> directory to your computer<\/li>\n<li>Upload the <code>plugin-name<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><h4>Using The WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Search for 'plugin-name'<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin on the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Uploading in WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Navigate to the 'Upload' area<\/li>\n<li>Select <code>plugin-name.zip<\/code> from your computer<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Using FTP<\/h4>\n\n<ol>\n<li>Download <code>plugin-name.zip<\/code><\/li>\n<li>Extract the <code>plugin-name<\/code> directory to your computer<\/li>\n<li>Upload the <code>plugin-name<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol><\/dd>\n<dt>Can anonymous visitors vote on comments?<\/dt>\n<dd><p>Yes, you can enable guest voting by adding this snippet to a mu-plugin:\n    add_filter( 'hmn_cp_allow_guest_voting', '__return_true' );<\/p>\n\n<p>Please note that it uses cookies and IP addresses to identify a visitor. This is not as reliable as\nrequiring a user to create an account. Cookies can be deleted, and IP addresses can be shared.<\/p><\/dd>\n<dt>Can comment weight be negative?<\/dt>\n<dd><p>Yes, you can enable negative weight by adding this snippet to a mu-plugin:\n    add_filter( 'hmn_cp_allow_negative_comment_weight', '__return_true' );<\/p><\/dd>\n<dt>Can I disable the sorting by comment weight?<\/dt>\n<dd><p>Yes, add this snippet to your functions.php file or mu plugin:\n    add_filter( 'hmn_cp_sort_comments_by_weight', '__return_false' );<\/p><\/dd>\n<dt>Where do I find the plugin settings?<\/dt>\n<dd><p>Under Settings &gt; Discussion, and Users &gt; Profile<\/p><\/dd>\n<dt>Advanced Usage<\/dt>\n<dd><p><strong>I want to use this with a custom comment template.<\/strong><\/p>\n\n<p>First thing - you need to remove the default comments template added by the plugin.<\/p>\n\n<pre><code>add_action( 'plugins_loaded', function() {\n    remove_filter( 'comments_template', array( 'HMN_Comment_Popularity', 'custom_comments_template' ) );\n}, 100 );\n<\/code><\/pre>\n\n<p>Secondly, you need to add replace the <code>wp_list_comments<\/code> call with the following code:<\/p>\n\n<pre><code>if ( function_exists( 'hmn_cp_the_sorted_comments' ) ) {\n    hmn_cp_the_sorted_comments( $args );\n} else {\n    wp_list_comments();\n}\n<\/code><\/pre>\n\n<p>Finally, you need to add the following function to your custom comment template where you would like to output the voting icons.<\/p>\n\n<pre><code>hmn_cp_the_comment_upvote_form();\n<\/code><\/pre>\n\n<p>To display the comment author karma:<\/p>\n\n<pre><code>hmn_cp_the_comment_author_karma();\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.5<\/h4>\n\n<ul>\n<li>Fix a number of PHP warnings.<\/li>\n<li>Change path to CSS\/JS assets.<\/li>\n<\/ul>\n\n<h4>1.4.3.3<\/h4>\n\n<ul>\n<li>Fix another PHP compatibility issue that caused a fatal error on versions that don't support short array syntax.<\/li>\n<\/ul>\n\n<h4>1.4.3.2<\/h4>\n\n<ul>\n<li>Fix a PHP compatibility issue that caused a fatal error on versions that don't support short array syntax.<\/li>\n<\/ul>\n\n<h4>1.4.3.1<\/h4>\n\n<ul>\n<li>Fix path to minified JS file.<\/li>\n<\/ul>\n\n<h4>1.4.3<\/h4>\n\n<ul>\n<li>Fix bug caused by deploy script which moved the assets folder out of plugin path.<\/li>\n<\/ul>\n\n<h4>1.4.2<\/h4>\n\n<ul>\n<li>Fix a bug in voting logic to prevent voting more than once.<\/li>\n<li>Fix a bug in voting to prevent logging a downvote on a comment with no karma<\/li>\n<li>Fix upgrade routine, which could cause memory error when large number of users.<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Fix a PHP notice<\/li>\n<\/ul>\n\n<p>= 1.4.0 \/ 2016-04-15<\/p>\n\n<ul>\n<li>Clicking the up or down arrow now cancels your vote if you had already voted the same way.<\/li>\n<li>Add JS throttling to prevent too many ajax requests.<\/li>\n<\/ul>\n\n<h4>1.3.5 \/ 2016-03-16<\/h4>\n\n<ul>\n<li>Fix a bug which updated all comment columns with karma value.<\/li>\n<li>Now visually shows upvotes\/downvotes<\/li>\n<li>Global plugin variable<\/li>\n<\/ul>\n\n<h4>1.3.4 \/ 2015-02-12<\/h4>\n\n<ul>\n<li>Only add capabilities on activation<\/li>\n<li>Display user first and last names in widget if available<\/li>\n<\/ul>\n\n<h4>1.3.3 \/ 2014-10-25<\/h4>\n\n<ul>\n<li>Fix fatal error on uninstall<\/li>\n<\/ul>\n\n<h4>1.3.2 \/ 2014-10-10<\/h4>\n\n<ul>\n<li>Init plugin earlier<\/li>\n<\/ul>\n\n<h4>1.3.1 \/ 2014-09-11<\/h4>\n\n<ul>\n<li>Load on init and fix namespacing issue<\/li>\n<li>Fix function prefix<\/li>\n<li>Adjustments to readme<\/li>\n<li>Fix readme markdown<\/li>\n<\/ul>\n\n<h4>1.3.0 \/ 2014-09-01<\/h4>\n\n<ul>\n<li>namespaces<\/li>\n<li>Fix insert comment hook<\/li>\n<li>add expert status method<\/li>\n<li>remove non visitor specific function<\/li>\n<li>Delete option on uninstall<\/li>\n<li>child class can define type<\/li>\n<li>add filter for negative comment weight<\/li>\n<li>only set visitor object if it doesn't exist<\/li>\n<li>check permissions before deactivating plugin<\/li>\n<li>Delete version DB option on uninstall<\/li>\n<li>Use get_user_option instead of get_author_meta<\/li>\n<li>Fix a bug in class name<\/li>\n<li>only proceed if user is logged in<\/li>\n<li>Guest voting works<\/li>\n<li>Refactor: introduce visitor classes<\/li>\n<li>Begin allowing guest voting<\/li>\n<li>Add namespace<\/li>\n<li>Add instructions for disabling custom sorting to the readme FAQ<\/li>\n<li>Allow user to disable sorting by weight<\/li>\n<li>Change tested up to version to 4.0<\/li>\n<li>Add database prefix to meta key in user query.<\/li>\n<\/ul>\n\n<h4>1.2.1 \/ 2014-08-27<\/h4>\n\n<ul>\n<li>Load main plugin class to fix uninstall fatal error.<\/li>\n<li>Use the *user_option functions<\/li>\n<li>Add some assertions<\/li>\n<li>Rename user meta<\/li>\n<li>Update uninstall routine<\/li>\n<li>We're deleting a global option<\/li>\n<li>Update the option to match current plugin version after upgrade<\/li>\n<li>Add an upgrade routine<\/li>\n<li>More exclude rules for build process<\/li>\n<li>Version 1.2.0<\/li>\n<li>Update CONTRIBUTING.md<\/li>\n<li>Delete user voting history<\/li>\n<li>Update user meta key<\/li>\n<li>Prefix user meta key<\/li>\n<\/ul>\n\n<h4>1.2.0 \/ 2014-08-24<\/h4>\n\n<ul>\n<li>the user_can_vote function is triggered by a vote action. therefore we cannot use it to determines if a comment can be voted on on page load. we can just check if current user has sufficient permissions. unless we persist a user\/comment relationship.<\/li>\n<li>Refactor get comments by weight function<\/li>\n<li>Use exising function instead of another comment query<\/li>\n<li>USe the refactored function parameters<\/li>\n<li>Just add a newline<\/li>\n<li>clean up<\/li>\n<li>display gravatar<\/li>\n<li>adds an experts widget<\/li>\n<li>update translation files<\/li>\n<li>Limit number of comments by user widget setting<\/li>\n<li>Add context info for translators<\/li>\n<li>Make more strings translatable<\/li>\n<li>Recreate tests from WP CLI<\/li>\n<li>Update tested up to field<\/li>\n<\/ul>\n\n<h4>1.1.5 \/ 2014-08-19<\/h4>\n\n<ul>\n<li>Update tests to reflect refactoring<\/li>\n<li>Change how comment weight is calculated<\/li>\n<li>Use a multisite compatible function for user meta<\/li>\n<li>Fix up tests config<\/li>\n<li>Use appropriate WordPress functions<\/li>\n<li>Remove debugging function<\/li>\n<li>Make debugging easier<\/li>\n<\/ul>\n\n<h4>1.1.4 \/ 2014-08-18<\/h4>\n\n<ul>\n<li>Check PHP version before evaluating any code<\/li>\n<li>Include and register widgets from main plugin class<\/li>\n<li>Add a tag<\/li>\n<li>Use function instead of constant<\/li>\n<li>Composer udpates<\/li>\n<li>Use 5.2 compatible code here<\/li>\n<li>Update minified script<\/li>\n<li>Throttle clicking events<\/li>\n<li>Add a tag<\/li>\n<li>Use function instead of constant<\/li>\n<li>Composer udpates<\/li>\n<li>Use 5.2 compatible code here<\/li>\n<li>Update CONTRIBUTING.md<\/li>\n<\/ul>\n\n<h4>1.1.3 \/ 2014-08-16<\/h4>\n\n<ul>\n<li>Add dotorg banners<\/li>\n<li>Bump version to 1.1.3<\/li>\n<li>Fix PHP error<\/li>\n<li>Switch statement order<\/li>\n<li>Add min PHP version<\/li>\n<li>Use html entities<\/li>\n<li>Ignore non build files<\/li>\n<li>Igonre contributing.md from build<\/li>\n<li>Remove some unused code<\/li>\n<li>Fix a PHP notice<\/li>\n<li>Update readme and changelog<\/li>\n<\/ul>\n\n<h4>1.1.2 \/ 2014-08-15<\/h4>\n\n<ul>\n<li>Bump version<\/li>\n<li>Pass user ID as param instead of email<\/li>\n<li>Add RTD config<\/li>\n<li>fix to readme<\/li>\n<\/ul>\n\n<h4>1.1.1 \/ 2014-08-13<\/h4>\n\n<ul>\n<li>Bump to version 1.1.1<\/li>\n<li>Fix a PHP notice<\/li>\n<\/ul>\n\n<h4>1.1.0 \/ 2014-08-13<\/h4>\n\n<ul>\n<li>Bump to version 1.1.0<\/li>\n<li>Make the paths filterable<\/li>\n<li>Fix how we call comments template<\/li>\n<li>Add a comment template file<\/li>\n<li>Move comments to own file<\/li>\n<li>Fix a PHP notice<\/li>\n<li>Regenerate readme<\/li>\n<li>Add link to github<\/li>\n<li>Fix some spacing and formatting<\/li>\n<li>Update CONTRIBUTING.md<\/li>\n<li>Fix composer.json<\/li>\n<li>Regenerate readme.md<\/li>\n<li>Fix Readme file and add contributors<\/li>\n<li>Prevent users from upvoting their comments<\/li>\n<li>No need to check if user can vote<\/li>\n<li>Register widget<\/li>\n<li>Add a most voted comments widget<\/li>\n<li>Update min WordPress version in readme<\/li>\n<li>Add Matt as contributor<\/li>\n<li>Add sortable karma column to users view<\/li>\n<li>Return just the values<\/li>\n<li>Add task to update class plugin version<\/li>\n<li>Update version<\/li>\n<li>Add some actions<\/li>\n<li>Update function desc<\/li>\n<li>Use prefixed constant VERSION<\/li>\n<li>Improve activation checks<\/li>\n<li>Change required WP Version<\/li>\n<li>Prefix filters<\/li>\n<li>Rename constants<\/li>\n<li>Add Travis badge<\/li>\n<li>Update tests to account for downvoting a comment with no karma<\/li>\n<li>Rename function<\/li>\n<li>Return comment weight<\/li>\n<li>Rename callback<\/li>\n<li>Return as integer<\/li>\n<li>Bump version<\/li>\n<li>First version of instructions<\/li>\n<li>Add contributing.md file<\/li>\n<\/ul>\n\n<h4>1.0.2 \/ 2014-08-08<\/h4>\n\n<ul>\n<li>Add tests for comment weight update<\/li>\n<li>disallow negative karma<\/li>\n<li>Fix code after refactor method<\/li>\n<li>Return the database value<\/li>\n<li>Fix issue where we were adding downvotes<\/li>\n<li>Subtract karma if comment is downvoted<\/li>\n<li>Add tests for commenter karma update<\/li>\n<li>Update tests<\/li>\n<li>Allow overriding vote value<\/li>\n<li>Use the literal vote values<\/li>\n<li>Minified CSS<\/li>\n<li>remove build<\/li>\n<li>Merge pull request #44 from humanmade\/build-tasks<\/li>\n<li>Add minified scripts<\/li>\n<li>JSHint config<\/li>\n<li>Ignore build dir<\/li>\n<li>Merge branch 'master' into build-tasks<\/li>\n<li>add comments<\/li>\n<li>Changelog file<\/li>\n<li>Add build tasks<\/li>\n<li>Add task plugins<\/li>\n<li>Use minified scripts and styles<\/li>\n<li>add comments<\/li>\n<li>Merge pull request #45 from humanmade\/docs<\/li>\n<li>Merge branch 'master' into docs<\/li>\n<li>Update readme<\/li>\n<li>Add readme to markdown task<\/li>\n<li>Documentation for how to remove the built in comment template<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fix contributors<\/li>\n<li>Remove unneeded files<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Comment Popularity adds the ability for visitors to vote on comments.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/31020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=31020"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pauldewouters"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=31020"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=31020"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=31020"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=31020"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=31020"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=31020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}