Changeset 1298069
- Timestamp:
- 12/01/2015 08:00:10 AM (10 years ago)
- Location:
- rating-system
- Files:
-
- 87 added
- 7 edited
-
tags/2.7.3 (added)
-
tags/2.7.3/Changelog.md (added)
-
tags/2.7.3/LICENSE (added)
-
tags/2.7.3/README.md (added)
-
tags/2.7.3/activation.php (added)
-
tags/2.7.3/admin (added)
-
tags/2.7.3/admin/images (added)
-
tags/2.7.3/admin/images/1.png (added)
-
tags/2.7.3/admin/images/10.png (added)
-
tags/2.7.3/admin/images/11.png (added)
-
tags/2.7.3/admin/images/12.png (added)
-
tags/2.7.3/admin/images/13.png (added)
-
tags/2.7.3/admin/images/14.png (added)
-
tags/2.7.3/admin/images/2.png (added)
-
tags/2.7.3/admin/images/3.png (added)
-
tags/2.7.3/admin/images/4.png (added)
-
tags/2.7.3/admin/images/5.png (added)
-
tags/2.7.3/admin/images/6.png (added)
-
tags/2.7.3/admin/images/7.png (added)
-
tags/2.7.3/admin/images/8.png (added)
-
tags/2.7.3/admin/images/9.png (added)
-
tags/2.7.3/admin/images/index.php (added)
-
tags/2.7.3/admin/index.php (added)
-
tags/2.7.3/admin/vortexlikedislike.php (added)
-
tags/2.7.3/assets (added)
-
tags/2.7.3/assets/css (added)
-
tags/2.7.3/assets/css/index.php (added)
-
tags/2.7.3/assets/css/style.css (added)
-
tags/2.7.3/assets/font (added)
-
tags/2.7.3/assets/font/fontello.eot (added)
-
tags/2.7.3/assets/font/fontello.svg (added)
-
tags/2.7.3/assets/font/fontello.ttf (added)
-
tags/2.7.3/assets/font/fontello.woff (added)
-
tags/2.7.3/assets/font/index.php (added)
-
tags/2.7.3/assets/icon-128x128.png (added)
-
tags/2.7.3/assets/index.php (added)
-
tags/2.7.3/assets/js (added)
-
tags/2.7.3/assets/js/index.php (added)
-
tags/2.7.3/assets/js/like-or-dislike-comments.js (added)
-
tags/2.7.3/assets/js/like-or-dislike.js (added)
-
tags/2.7.3/assets/js/no-dislike-comments.js (added)
-
tags/2.7.3/assets/js/no-dislike.js (added)
-
tags/2.7.3/assets/js/toucheventsdetect.js (added)
-
tags/2.7.3/assets/screenshot-1.png (added)
-
tags/2.7.3/assets/screenshot-10.png (added)
-
tags/2.7.3/assets/screenshot-11.png (added)
-
tags/2.7.3/assets/screenshot-12.png (added)
-
tags/2.7.3/assets/screenshot-2.png (added)
-
tags/2.7.3/assets/screenshot-3.png (added)
-
tags/2.7.3/assets/screenshot-4.png (added)
-
tags/2.7.3/assets/screenshot-5.png (added)
-
tags/2.7.3/assets/screenshot-6.png (added)
-
tags/2.7.3/assets/screenshot-7.png (added)
-
tags/2.7.3/assets/screenshot-8.png (added)
-
tags/2.7.3/assets/screenshot-9.png (added)
-
tags/2.7.3/buddypress.php (added)
-
tags/2.7.3/comments.php (added)
-
tags/2.7.3/epoch.php (added)
-
tags/2.7.3/index.php (added)
-
tags/2.7.3/languages (added)
-
tags/2.7.3/languages/index.php (added)
-
tags/2.7.3/languages/vortex_system_ld-ar.mo (added)
-
tags/2.7.3/languages/vortex_system_ld-ar.po (added)
-
tags/2.7.3/languages/vortex_system_ld.pot (added)
-
tags/2.7.3/mycredcomments.php (added)
-
tags/2.7.3/mycredposts.php (added)
-
tags/2.7.3/posts-pages.php (added)
-
tags/2.7.3/rating-system.php (added)
-
tags/2.7.3/readme.txt (added)
-
tags/2.7.3/tgmpa (added)
-
tags/2.7.3/tgmpa/CHANGELOG.md (added)
-
tags/2.7.3/tgmpa/LICENSE.md (added)
-
tags/2.7.3/tgmpa/class-tgm-plugin-activation.php (added)
-
tags/2.7.3/tgmpa/index.php (added)
-
tags/2.7.3/tgmpa/languages (added)
-
tags/2.7.3/tgmpa/languages/tgmpa-fr_FR.mo (added)
-
tags/2.7.3/tgmpa/languages/tgmpa-fr_FR.po (added)
-
tags/2.7.3/tgmpa/languages/tgmpa-pt_BR.mo (added)
-
tags/2.7.3/tgmpa/languages/tgmpa-pt_BR.po (added)
-
tags/2.7.3/tgmpa/languages/tgmpa.pot (added)
-
tags/2.7.3/tgmpa/plugins (added)
-
tags/2.7.3/widget (added)
-
tags/2.7.3/widget/dashboard-widget.php (added)
-
tags/2.7.3/widget/index.php (added)
-
tags/2.7.3/widget/widget.php (added)
-
trunk/Changelog.md (modified) (1 diff)
-
trunk/admin/vortexlikedislike.php (modified) (1 diff)
-
trunk/comments.php (modified) (3 diffs)
-
trunk/languages/vortex_system_ld-ar.mo (added)
-
trunk/languages/vortex_system_ld-ar.po (added)
-
trunk/languages/vortex_system_ld.pot (modified) (3 diffs)
-
trunk/posts-pages.php (modified) (2 diffs)
-
trunk/rating-system.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rating-system/trunk/Changelog.md
r1277182 r1298069 1 ## [2.7.3] 2 ### Fixed Custom text being displayed when cancelling vote. 3 ### Fixed [rating-system-posts] shortcode only showing the like button. 4 ### Fixed [rating-system-comments] shortcode only showing the like button. 5 ### Added [rating-system-posts-disable-dislike] to show only the like button. 6 ### Added [rating-system-comments-disable-dislike] to show only the like button for comments. 7 ### Added [rating-system-top-posts]. 8 ### Added Arabic translation provided by [dev-ide.net](https://www.dev-ide.net/wordpress/plugins/plugin-rating-system-for-wordpress.html) 1 9 ## [2.7.2] 2 10 ### Fixed fatal error on PHP 5.2.4. -
rating-system/trunk/admin/vortexlikedislike.php
r1277182 r1298069 17 17 'display_name' => 'Rating System', 18 18 // Name that appears at the top of your panel 19 'display_version' => '2.7. 2',19 'display_version' => '2.7.3', 20 20 // Version that appears at the top of your panel 21 21 'menu_type' => 'menu', -
rating-system/trunk/comments.php
r1277182 r1298069 93 93 update_comment_meta($post_id,$user_key,$user_data); 94 94 do_action("vortex_com_dislike",'-likes','nothing',$current_user_id,$post_id); 95 if ($vortex_like_dislike['v_custom_text_com']){96 $current_likes = $vortex_like_dislike['v_custom_text_com_like'];97 };98 95 99 96 $response = array( … … 212 209 update_comment_meta($post_id,$user_key,$user_data); 213 210 do_action("vortex_com_dislike",'nothing','-dislikes',$current_user_id,$post_id); 214 if ($vortex_like_dislike['v_custom_text_com']){ 215 $current_dislikes = $vortex_like_dislike['v_custom_text_com_dislike']; 216 } 211 217 212 $response = array( 218 213 'dislikes' => $current_dislikes, … … 421 416 } 422 417 423 function vortex_render_for_comments( ){418 function vortex_render_for_comments($dislike = true){ 424 419 425 420 global $vortex_like_dislike; 426 421 427 if(!$vortex_like_dislike['v-switch-dislike-comment'] ){422 if(!$vortex_like_dislike['v-switch-dislike-comment'] && $dislike){ 428 423 //leave it inline because wordpress will add <p> tags creating a space I don't know why 429 424 $buttons = '<div class="vortex-container-vote-comment '.vortex_button_align_comment().'"><div class="vortex-container-like-comment"><input type="hidden" value="'.get_comment_ID().'" ></input><div class="vortex-p-like-comment '.get_comment_ID().' '.vortex_system_add_like_class_comment().' '.vortex_system_get_like_icon_comment().'">'.vortex_system_like_counter_comment().'</div></div>'.vortex_system_render_dislike_button_comment().'</div>'; -
rating-system/trunk/languages/vortex_system_ld.pot
r1277182 r1298069 9 9 "Project-Id-Version: PACKAGE VERSION\n" 10 10 "Report-Msgid-Bugs-To: \n" 11 "POT-Creation-Date: 2015-1 1-01 14:26+0200\n"11 "POT-Creation-Date: 2015-12-01 09:33+0200\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 18 18 "Content-Transfer-Encoding: 8bit\n" 19 19 20 #: comments.php:7 50 posts-pages.php:63320 #: comments.php:745 posts-pages.php:626 21 21 msgid "Likes" 22 22 msgstr "" 23 23 24 #: comments.php:7 53 posts-pages.php:63624 #: comments.php:748 posts-pages.php:629 25 25 msgid "Dislikes" 26 26 msgstr "" … … 71 71 msgstr "" 72 72 73 #: rating-system.php:131 74 msgid "Receive like for posts(content author)" 75 msgstr "" 76 73 77 #: rating-system.php:132 74 msgid "Receive like for posts( contentauthor)"78 msgid "Receive like for posts(like author)" 75 79 msgstr "" 76 80 77 81 #: rating-system.php:133 78 msgid "Receive like for posts(likeauthor)"82 msgid "Receive like for comments(content author)" 79 83 msgstr "" 80 84 81 85 #: rating-system.php:134 82 msgid "Receive like for comments(content author)"83 msgstr ""84 85 #: rating-system.php:13586 86 msgid "Receive like for comments(like author)" 87 87 msgstr "" -
rating-system/trunk/posts-pages.php
r1271191 r1298069 142 142 update_post_meta($post_id,$user_key,$user_data); 143 143 do_action("vortex_post_dislike",'-likes','nothing',$current_user_id,$post_id); 144 global $vortex_like_dislike; 145 if ($vortex_like_dislike['v_custom_text']){ 146 $current_likes = $vortex_like_dislike['v_custom_text_post_like']; 147 }; 144 148 145 $response = array( 149 146 'likes' => $current_likes, … … 314 311 do_action("vortex_post_dislike",'nothing','-dislikes',$current_user_id,$post_id); 315 312 update_post_meta($post_id,$user_key,$user_data); 316 317 if ($vortex_like_dislike['v_custom_text']){318 $current_dislikes = $vortex_like_dislike['v_custom_text_post_dislike'];319 }320 313 321 314 $response = array( -
rating-system/trunk/rating-system.php
r1277182 r1298069 4 4 * Plugin URI: http://github.com/VortexThemes/rating-system 5 5 * Description: The simple way to add like or dislike buttons. 6 * Version: 2.7. 26 * Version: 2.7.3 7 7 * Author: VortexThemes 8 8 * Author URI: https://github.com/VortexThemes … … 21 21 include(plugin_dir_path( __FILE__).'tgmpa/class-tgm-plugin-activation.php'); 22 22 add_action( 'tgmpa_register', 'vortex_register_plugin' ); 23 23 24 function vortex_register_plugin() { 24 25 … … 226 227 //add shortcode 227 228 function vortex_rating_system_register_shortcodes(){ 228 add_shortcode('rating-system-posts', 'vortex_render_for_posts'); 229 add_shortcode('rating-system-comments', 'vortex_render_for_comments'); 229 230 function vortex_shortcode_render_posts(){ 231 return vortex_render_for_posts(); 232 } 233 234 function vortex_shortcode_render_posts_disable_dislike(){ 235 return vortex_render_for_posts(false); 236 } 237 238 function vortex_shortcode_render_comments(){ 239 return vortex_render_for_comments(); 240 } 241 242 function vortex_shortcode_render_comments_disable_dislike(){ 243 return vortex_render_for_comments(false); 244 } 245 246 function vortex_shortcode_render_top_posts($atts){ 247 248 extract( shortcode_atts( array( 249 'number' => '5', 250 'display_counter' => 'yes', 251 'display_content' => 'no', 252 'link_to_post' => 'yes', 253 'category_slugs' => '', 254 ), $atts ) ); 255 256 $args = array( 257 'orderby' => 'meta_value_num', 258 'meta_key' => 'vortex_system_likes', 259 'post_type' => 'post', 260 'post_status' => 'publish', 261 'posts_per_page' => $number, 262 'category_name' => $category_slugs 263 264 ); 265 // The Query 266 $query = new WP_Query( $args ); 267 // The Loop 268 if ( $query->have_posts() ) { 269 270 echo '<ul>'; 271 while ( $query->have_posts() ) { 272 $query->the_post(); 273 $current_likes = get_post_meta(get_the_ID(),'vortex_system_likes',true); 274 echo '<li class="top-posts '.get_the_ID().' ">'; 275 echo '<div class="top-posts-title '.get_the_ID().'">'; 276 if($link_to_post == "yes"){ 277 echo '<a class="top-posts-link '.get_the_ID().'" href="'.get_the_permalink().'">'.get_the_title().'</a>'; 278 } else { 279 the_title(); 280 } 281 282 if($display_counter == 'yes'){ 283 echo ' '.$current_likes.' likes'; 284 } 285 echo '</div>'; 286 287 if($display_content == 'yes'){ 288 echo '<div class="top-posts-content '.get_the_ID().'">'; 289 echo get_the_content(); 290 echo '</div>'; 291 } 292 293 echo '</li>'; 294 } 295 echo '</ul>'; 296 } else { 297 echo 'No posts found.'; 298 } 299 // Restore original Post Data 300 wp_reset_postdata(); 301 302 } 303 304 add_shortcode('rating-system-top-posts', 'vortex_shortcode_render_top_posts'); 305 306 add_shortcode('rating-system-posts', 'vortex_shortcode_render_posts'); 307 add_shortcode('rating-system-posts-disable-dislike', 'vortex_shortcode_render_posts_disable_dislike'); 308 309 add_shortcode('rating-system-comments', 'vortex_shortcode_render_comments'); 310 add_shortcode('rating-system-comments-disable-dislike', 'vortex_shortcode_render_comments_disable_dislike'); 230 311 } 231 312 add_action( 'init', 'vortex_rating_system_register_shortcodes'); -
rating-system/trunk/readme.txt
r1277182 r1298069 5 5 Requires at least: 4.1 6 6 Tested up to: 4.3.1 7 Stable tag: 2.7. 27 Stable tag: 2.7.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 * Free WordPress Dashboard widget. ✔ 28 28 * Shortcode [rating-system-posts](You must have turned on like or dislike for posts and pages and if you want you can disable display buttons on). ✔ 29 * Shortcode [rating-system- comments]. ✔29 * Shortcode [rating-system-posts-disable-dislike](Displays only the like button, the above also applies here). ✔ 30 30 * Sort comments by likes. ✔ 31 31 * Check the screenshots tab we have a lot of cool features. … … 34 34 * [Facebook](https://www.facebook.com/VortexThemes) [Twitter](https://twitter.com/VortexThemes) [Github](https://github.com/VortexThemes/rating-system) 35 35 36 > **How to use** 37 38 * Use [rating-system-posts] to show like & dislike for a page, post,bbPress,buddyPress etc (DO NOT USE FOR COMMENTS). 39 * Use [rating-system-posts-disable-dislike] to show only the like button for a page, post,bbPress,buddyPress etc (DO NOT USE FOR COMMENTS). 40 * Use [rating-system-comments] to show like & dislike for comments (USE ONLY FOR STANDARD WORDPRESS COMMENTS). 41 * Use [rating-system-comments-disable-dislike] to show only the like button for commens (USE ONLY FOR STANDARD WORDPRESS COMMENTS). 42 * Use [rating-system-top-posts] to display all posts ordered by their likes. 43 * Shortcode parameters: 44 * number = the number of posts to be dislayed (type a number here)(default 5) 45 * display_counter = display the number of likes after the title (type yes or no)(default yes) 46 * display_content = display the content for each post (type yes or no)(default no) 47 * link_to_post = make the title of the post a link to original post (type yes or no)(default yes) 48 * category_slugs = only display posts from certain categories (type categories slugs here)(default empty) 49 * Example: 50 * Display top 5 posts: [rating-system-top-posts number="5"] 51 * Display top 5 posts without link to original post: [rating-system-top-posts number="5" link_to_post="no"] 52 * Display top 5 posts from category with slug cats: [rating-system-top-posts number="5" category_slugs="cats"] 53 * Display top 10 posts from multiple categories: [rating-system-top-posts number="10" category_slugs="cats,dogs,planes"] 54 * Display top 10 posts from multiple categories with content and no counter: [rating-system-top-posts display_counter="no" display_content="yes" number="10" category_slugs="cats,dogs,planes"] 55 56 > **Translation** 57 58 * Avaible in Arabic.Translation provided by [dev-ide.net](https://www.dev-ide.net/wordpress/plugins/plugin-rating-system-for-wordpress.html) 36 59 == Installation == 37 You can use this code to generate the like button inside the loop 38 <?php if(function_exists('vortex_render_for_posts')){ 39 echo vortex_render_for_posts(false); 40 } 41 ?> 42 If you want to generate both(like and dislike) use this code 43 <?php if(function_exists('vortex_render_for_posts')){ 44 echo vortex_render_for_posts(); 45 } 46 ?> 60 47 61 1. After you download the plugin go to Plugins -> Add New -> Upload Plugin 48 62 2. Choose the zip and upload … … 63 77 12. WooCommerce support 64 78 65 == Upgrade Notice ==66 67 notices68 69 79 == Frequently Asked Questions == 70 80 > **Question: Does this plugin support bbPress?** 71 81 > 72 > **Answer:** Yes.You will have to turn on bbPress support from the plugin option panel (check the screenshots tab to see our plugin in action).82 > **Answer:** Yes.You will have to turn on bbPress support from the plugin option panel and on Display buttons on: check Custom post type single.(check the screenshots tab to see our plugin in action). 73 83 > 74 84 > **Question: Can I add like or dislike to WooCommerce products?** … … 80 90 > **Answer:** Yes. 81 91 > 92 > **For WordPress post, pages, bbPress and buddyPress use [rating-system-posts] or [rating-system-posts-disable-dislike].** 93 > 82 94 83 95 == Changelog == 96 = 2.7.3 = 97 * Fixed Custom text being displayed when cancelling vote. 98 * Fixed [rating-system-posts] shortcode only showing the like button. 99 * Fixed [rating-system-comments] shortcode only showing the like button. 100 * Added [rating-system-posts-disable-dislike] to show only the like button. 101 * Added [rating-system-comments-disable-dislike] to show only the like button for comments. 102 * Added [rating-system-top-posts]. 103 * Added Arabic translation provided by [dev-ide.net](https://www.dev-ide.net/wordpress/plugins/plugin-rating-system-for-wordpress.html) 84 104 = 2.7.2 = 85 105 * Fixed fatal error on PHP 5.2.4.
Note: See TracChangeset
for help on using the changeset viewer.