Changeset 895383
- Timestamp:
- 04/17/2014 12:46:18 AM (12 years ago)
- Location:
- jquery-expandable-comments/trunk
- Files:
-
- 9 added
- 2 edited
-
bb-toggle-kids.js (added)
-
bb_expandable_comments_2010.css (added)
-
bb_expandable_comments_2011.css (added)
-
bb_expandable_comments_2012.css (added)
-
bb_expandable_comments_2013.css (added)
-
bb_expandable_comments_2014.css (added)
-
bb_jcr_languages-en.mo (added)
-
bb_jcr_languages-en.po (added)
-
jQuery-comments.php (modified) (18 diffs)
-
jquery-easing.1.3.js (added)
-
readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jquery-expandable-comments/trunk/jQuery-comments.php
r864147 r895383 5 5 Description: Make your multi-level comment replies show on demand with a slick jQuery slideToggle() action. 6 6 Author: Shelly Cole 7 Version: 1.2. 27 Version: 1.2.3 8 8 Author URI: http://brassblogs.com 9 9 … … 54 54 'toggle_up' => __('fast', 'bb_jcr_languages'), 55 55 'toggle_down' => __('slow', 'bb_jcr_languages'), 56 'easing' => 'linear' 56 'easing' => 'linear', 57 57 ); 58 58 59 59 add_option('bb_jcr_options', $array, 'yes'); // add the new option array 60 } 60 } 61 61 } 62 62 … … 70 70 * 71 71 * @since jQuery-comments 1.0 72 * @deprecated jQuery-Comments 1.2.3 72 73 */ 73 74 function bb_jcr_format_comment($comment, $args, $depth) { … … 135 136 wp_enqueue_script('bb_toggle_kids', plugins_url('js/bb-toggle-kids.js', __FILE__), array('jquery'), '', true); // actual show/hide script 136 137 wp_localize_script('bb_toggle_kids', 'bb_toggle_vars', bb_localize_vars()); // localize the script 138 } 139 140 141 /** 142 * Enqueue stylesheet 143 * 144 * @since jQuery-comments 1.2.3 145 */ 146 function bb_start_styles() { 147 //get whatever current theme is being used 148 $theme = get_option('current_theme'); 149 150 // add a list of all the default WordPress themes so we can pull in the matching stylesheet 151 $themes = array('Twenty Ten' => 'bb_expandable_comments_2010.css', 152 'Twenty Eleven' => 'bb_expandable_comments_2011.css', 153 'Twenty Twelve' => 'bb_expandable_comments_2012.css', 154 'Twenty Thirteen' => 'bb_expandable_comments_2013.css', 155 'Twenty Fourteen' => 'bb_expandable_comments_2014.css'); 156 wp_enqueue_style( 'bb_toggle_comments', plugins_url( 'css/' . $themes[$theme], __FILE__) ); 137 157 } 138 158 … … 184 204 $options = get_option('bb_jcr_options'); 185 205 186 echo '< span class="description" style="display:block;">' . __(sprintf("The chosen format for your comments display. Note that DIV is not an option, due to the way WordPress core functions work. %s Using DIV with this plugin, because of the addition of markup, will break your site's layout.", '<br />'), 'bb_jcr_languages') . '</span>';206 echo '<p class="description" style="display:block;">' . __(sprintf("The chosen format for your comments display. Note that DIV is not an option, due to the way WordPress core functions work. %s Using DIV with this plugin, because of the addition of markup, will break your site's layout.", '<br />'), 'bb_jcr_languages') . '</p>'; 187 207 188 208 echo '<input id="bb_jcr_style" name="bb_jcr_options[style]" size="40" type="radio" value="ul" ' . (isset($options["style"]) && $options["style"] == "ul" ? 'checked="checked" ' : '') . '/> ul<br />' . "\n"; … … 194 214 $options = get_option('bb_jcr_options'); 195 215 196 echo '< span class="description" style="display:block;">' . __('The type of comments to display. ("Ping" is trackbacks and pingbacks together.)', 'bb_jcr_languages') . '</span>';216 echo '<p class="description" style="display:block;">' . __('The type of comments to display. ("Ping" is trackbacks and pingbacks together.)', 'bb_jcr_languages') . '</p>'; 197 217 198 218 echo '<input id="bb_jcr_type" name="bb_jcr_options[type]" size="40" type="radio" value="all" ' . (isset($options["type"]) && $options["type"] == "all" ? 'checked="checked" ' : '') . '/> ' . __('All', 'bb_jcr_languages' ) . '<br />' . "\n"; … … 207 227 $options = get_option('bb_jcr_options'); 208 228 209 echo '< span class="description" style="display:block;">' . __('The desired avatar size, in pixels. Can be between 1 and 512. Use 0 to hide them. Default is 32.', 'bb_jcr_languages') . '</span>' . "\n\n";229 echo '<p class="description" style="display:block;">' . __('The desired avatar size, in pixels. Can be between 1 and 512. Use 0 to hide them. Default is 32.', 'bb_jcr_languages') . '</p>' . "\n\n"; 210 230 211 231 echo '<input id="bb_jcr_avatar_size" name="bb_jcr_options[avatar_size]" size="40" type="text" value="' . $options["avatar_size"] . '"/>' . "\n\n"; … … 216 236 $options = get_option('bb_jcr_options'); 217 237 218 echo '< span class="description" style="display:block;">' . __('Text to display for the "reply" link. Default is "Reply"', 'bb_jcr_languages') . '</span>' . "\n\n";238 echo '<p class="description" style="display:block;">' . __('Text to display for the "reply" link. Default is "Reply"', 'bb_jcr_languages') . '</p>' . "\n\n"; 219 239 220 240 echo '<input id="bb_jcr_reply_text" name="bb_jcr_options[reply_text]" size="40" type="text" value="' . $options["reply_text"] . '"/>' . "\n\n"; … … 225 245 $options = get_option('bb_jcr_options'); 226 246 227 echo '< span class="description" style="display:block;">' . __('Text to display for the "login" message. Default is "Log in to Reply"', 'bb_jcr_languages') . '</span>' . "\n\n";247 echo '<p class="description" style="display:block;">' . __('Text to display for the "login" message. Default is "Log in to Reply"', 'bb_jcr_languages') . '</p>' . "\n\n"; 228 248 229 249 echo '<input id="bb_jcr_login_text" name="bb_jcr_options[login_text]" size="40" type="text" value="' . $options["login_text"] . '"/>' . "\n\n"; … … 234 254 $options = get_option('bb_jcr_options'); 235 255 236 echo '< span class="description" style="display:block;">' . __(sprintf('Name of the custom function you want to use to edit the HTML display of your comments. This function must exist within %1$s your functions.php file, or within your own plugin. A custom callback function has been included with this plugin. You may %2$s choose to edit it, or use it as-is. Please see the readme.txt file for further information.', '<br />', '<br />'), 'bb_jcr_languages') . '</span>' . "\n";256 echo '<p class="description" style="display:block;">' . __(sprintf('Name of the custom function you want to use to edit the HTML display of your comments. This function must exist within %1$s your functions.php file, or within your own plugin. A custom callback function has been included with this plugin. You may %2$s choose to edit it, or use it as-is. Please see the readme.txt file for further information.', '<br />', '<br />'), 'bb_jcr_languages') . '</p>' . "\n"; 237 257 238 258 echo '<input id="bb_jcr_callback" name="bb_jcr_options[callback]" size="40" type="text" value="' . $options["callback"] . '"/>' . "\n\n"; … … 243 263 $options = get_option('bb_jcr_options'); 244 264 245 echo '< span class="description" style="display:block;">' . __('Text to display for the "Show Replies" link. Default is "Show Replies". Please see the readme.txt file for further information.', 'bb_jcr_languages') . '</span>' . "\n";265 echo '<p class="description" style="display:block;">' . __('Text to display for the "Show Replies" link. Default is "Show Replies". Please see the readme.txt file for further information.', 'bb_jcr_languages') . '</p>' . "\n"; 246 266 247 267 echo '<input id="bb_jcr_show_replies" name="bb_jcr_options[show_replies]" size="40" type="text" value="' . $options["show_replies"] . '"/>' . "\n\n"; … … 252 272 $options = get_option('bb_jcr_options'); 253 273 254 echo '< span class="description" style="display:block;">' . __('Text to display for the "Hide Replies" link. Default is "Hide Replies". Please see the readme.txt file for further information.', 'bb_jcr_languages') . '</span>' . "\n";274 echo '<p class="description" style="display:block;">' . __('Text to display for the "Hide Replies" link. Default is "Hide Replies". Please see the readme.txt file for further information.', 'bb_jcr_languages') . '</p>' . "\n"; 255 275 256 276 echo '<input id="bb_jcr_hide_replies" name="bb_jcr_options[hide_replies]" size="40" type="text" value="' . $options["hide_replies"] . '"/>' . "\n\n"; … … 261 281 $options = get_option('bb_jcr_options'); 262 282 263 echo '< span class="description" style="display:block;">' . __('Set to "Yes" to make this child comments show in reverse order (newest first).', 'bb_jcr_languages') . '</span>';283 echo '<p class="description" style="display:block;">' . __('Set to "Yes" to make this child comments show in reverse order (newest first).', 'bb_jcr_languages') . '</p>'; 264 284 265 285 echo '<input id="bb_jcr_reverse_children" name="bb_jcr_options[reverse_children]" size="40" type="radio" value="false" ' . (isset($options["reverse_children"]) && $options["reverse_children"] == "false" ? 'checked="checked" ' : '') . '/> No<br />' . "\n"; … … 271 291 $options = get_option('bb_jcr_options'); 272 292 273 echo '< span class="description" style="display:block;">' . __('Speed of slide when opening the replies. Default is "slow". You can use "fast" or the number of milliseconds you would like it to take.', 'bb_jcr_languages') . '</span>' . "\n\n";293 echo '<p class="description" style="display:block;">' . __('Speed of slide when opening the replies. Default is "slow". You can use "fast" or the number of milliseconds you would like it to take.', 'bb_jcr_languages') . '</p>' . "\n\n"; 274 294 275 295 echo '<input id="bb_jcr_toggle_down" name="bb_jcr_options[toggle_down]" size="40" type="text" value="' . $options["toggle_down"] . '"/>' . "\n\n"; … … 280 300 $options = get_option('bb_jcr_options'); 281 301 282 echo '< span class="description" style="display:block;">' . __('Speed of slide when closing the replies. Default is "fast". You can use "slow" or the number of milliseconds you would like it to take.', 'bb_jcr_languages') . '</span>' . "\n\n";302 echo '<p class="description" style="display:block;">' . __('Speed of slide when closing the replies. Default is "fast". You can use "slow" or the number of milliseconds you would like it to take.', 'bb_jcr_languages') . '</p>' . "\n\n"; 283 303 284 304 echo '<input id="bb_jcr_toggle_up" name="bb_jcr_options[toggle_up]" size="40" type="text" value="' . $options["toggle_up"] . '"/>' . "\n\n"; … … 289 309 $options = get_option('bb_jcr_options'); 290 310 291 echo '< span class="description" style="display:block;">' . __(sprintf('Type of easing you would like the slide to use. Default is "linear". You can see visual examples of other types you can use %1$s here %2$s.', '<a href="http://matthewlein.com/experiments/easing.html" target="_blank">', '</a>'), 'bb_jcr_languages') . '</span>' . "\n\n";311 echo '<p class="description" style="display:block;">' . __(sprintf('Type of easing you would like the slide to use. Default is "linear". You can see visual examples of other types you can use %1$s here %2$s.', '<a href="http://matthewlein.com/experiments/easing.html" target="_blank">', '</a>'), 'bb_jcr_languages') . '</p>' . "\n\n"; 292 312 293 313 // setup array … … 320 340 function bb_jcr_options_validate($input) { 321 341 isset($input['style']) ? $newinput['style'] = trim($input['style']) : $newinput['style'] = ''; 342 isset($input['css']) ? $newinput['css'] = trim($input['css']) : $newinput['css'] = ''; 322 343 isset($input['type']) ? $newinput['type'] = trim($input['type']) : $newinput['type'] = ''; 323 344 isset($input['avatar_size']) ? $newinput['avatar_size'] = trim($input['avatar_size']) : $newinput['avatar_size'] = ''; … … 342 363 add_action('admin_init', 'bb_add_jcr_options'); // options 343 364 add_action('init', 'bb_start_jquery'); // scripts 365 add_action('init', 'bb_start_styles'); // styles 344 366 add_action('admin_menu', 'bb_jquery_comment_replies'); // options page/settings 345 367 add_action('admin_init', 'bb_jcr_admin_init'); // option page/settings init -
jquery-expandable-comments/trunk/readme.txt
r864147 r895383 4 4 Tags: jQuery, comments, expand, replies 5 5 Requires at least: 3.0 6 Tested up to: 3. 8.17 Stable tag: 1.2. 26 Tested up to: 3.9 7 Stable tag: 1.2.3 8 8 License: GPLv2 or later 9 9 … … 27 27 2. Upload to your plugins directory. 28 28 3. Go to "Plugins" and activate. 29 4. Open your "comments.php" file (in your theme) and replace `wp_list_comments($args)` with `wp_list_comments( array( 'callback' => 'bb_jcr_format_comment' ) );`. Please note: if you do NOT replace the `wp_list_cmments()` call in your theme files, some of the settings in your options page will NOT be applied. You will have to manually add in the style, type, avatar size, reply text, and login text as directed "[here](http://codex.wordpress.org/Function_Reference/wp_list_comments)".30 5. if you'd like to use the stylesheet tha comes with this plugin, you'll need to add the following to your theme's functions.php file:31 `add_action('init', 'jcr_start_styles');32 function jcr_start_styles() {33 wp_enqueue_style('bb_toggle_comments', plugins_url('css/bb_expandable_comments.css', __FILE__));34 }`35 29 36 30 … … 38 32 The items you can mess with here will edit the arguments for wp_list_comments(), so you no longer need to add arguments to your call. In fact, if you have arguments in your bb_list_comments call, they will be ignored (but if they are there, it won't break anything). The only sections to comment on (because they are not a part of the Codex) are: 39 33 40 * Show Replies Text/Hide Replies Text. These items are the text you set for the show/hide links. If you want to use an image in place of (or with) the text, then use CSS to pull that off (this example has the image, named "sprite.png", uploaded to the theme's images directory). An example:34 * Show Replies Text/Hide Replies Text. These items are the text you set for the show/hide links. 41 35 42 `.replylink span { 43 display:inline-block; 44 background:url("images/sprite.png") no-repeat left top; 45 width:20px; 46 height:20px; 47 overflow:hidden; 48 line-height:50px; /* make text disappear */ 49 }` 36 * Stylesheets. The plugin will see what theme you are using. If you're using a default WordPress theme, then styles will be applied that match your active theme. Otherwise, no styles will be applied. You can go to the wp-content/plugins/jquery-expandable-comments/css folder and use any of these stylesheets as a reference to style it yourself in your own theme stylesheet. 50 37 51 38 * Slide Speed (both open and close). This is the speed of the animation for opening and closing the replies. You can use "fast" or "slow"; or set how long (in milliseconds) you want the animation to take. … … 60 47 == Frequently Asked Questions == 61 48 62 = No questions at this time. = 49 = How do I use an image for the Show/Hide Replies text? = 50 If you want to use an image in place of (or with) the text, then use CSS to pull that off (this example has the image, named "sprite.png", uploaded to the theme's images directory). An example: 51 52 `.replylink span { 53 display:inline-block; 54 background:url("images/sprite.png") no-repeat left top; 55 width:20px; 56 height:20px; 57 overflow:hidden; 58 line-height:50px; /* make text disappear */ 59 }` 60 61 = No other questions at this time. = 63 62 But if you have any, by all means, feel free to ask away. I'd also love input on features you'd like added or things you'd like to see to improve this plugin. See the "Other Notes" section on how to contact me. 64 63 … … 69 68 70 69 == Screenshots == 71 You can view the plugin in action on my website:[Blog | Shelly Cole](http://brassblogs.com/category/blog)72 70 73 71 1. Closed Replies (hidden) Example … … 76 74 77 75 == Changelog == 76 77 = 1.2.3 = 78 * further troubleshooting issues with bb-toggle-kids.js - issues repaired. 79 * tested in default WordPress themes from Twenty Ten to Twenty Fourteen. 80 * edited and streamlined options page a bit 81 * deprecated the "Callback" in the options page. You can still use it, but I'd move away from it - the next release will probably only have it as a reference and not use it at all. 78 82 79 83 = 1.2.2 = … … 118 122 == Upgrade Notice == 119 123 120 = 1.2. 2=121 ** IMPORTANT ** bb_list_comments() is now deprecated. You WILL need to switch back to wp_list_comments() in your theme files. This should fix the old conflict issue with Spam Free Word press.124 = 1.2.3 = 125 ** IMPORTANT ** bb_list_comments() is now deprecated. You WILL need to switch back to wp_list_comments() in your theme files. This should fix the old conflict issue with Spam Free WordPress. 122 126 123 I sincerely apologize for the issus with the plugin for the past few weeks. I've been working with the WP team to try and sort out why these issues continue to occur. Hopefully this release finally has everything repaired and things can go on as normal.127 I sincerely apologize for the issus with the plugin for the past couple of releases. I had a bit of trouble with the repository, and now all the issues have been resolved. 124 128 125 129
Note: See TracChangeset
for help on using the changeset viewer.