Plugin Directory

Changeset 895383


Ignore:
Timestamp:
04/17/2014 12:46:18 AM (12 years ago)
Author:
doodlebee
Message:

Adding version 1.2.3 for WP 3.9/ Fixes script issue (hopefully for the last time), adds CSS files for all default WP themes.

Location:
jquery-expandable-comments/trunk
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • jquery-expandable-comments/trunk/jQuery-comments.php

    r864147 r895383  
    55Description: Make your multi-level comment replies show on demand with a slick jQuery slideToggle() action.
    66Author: Shelly Cole
    7 Version: 1.2.2
     7Version: 1.2.3
    88Author URI: http://brassblogs.com
    99
     
    5454                       'toggle_up'          => __('fast', 'bb_jcr_languages'),
    5555                       'toggle_down'        => __('slow', 'bb_jcr_languages'),
    56                        'easing'             => 'linear'
     56                       'easing'             => 'linear',
    5757                       );
    5858
    5959        add_option('bb_jcr_options', $array, 'yes');                // add the new option array
    60     }
     60    } 
    6161}
    6262
     
    7070 *
    7171 * @since jQuery-comments 1.0
     72 * @deprecated jQuery-Comments 1.2.3
    7273 */
    7374function bb_jcr_format_comment($comment, $args, $depth) {
     
    135136    wp_enqueue_script('bb_toggle_kids', plugins_url('js/bb-toggle-kids.js', __FILE__),  array('jquery'), '', true); // actual show/hide script
    136137    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 */
     146function 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__) );
    137157}
    138158
     
    184204    $options = get_option('bb_jcr_options');
    185205
    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>';
    187207   
    188208    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";
     
    194214    $options = get_option('bb_jcr_options');
    195215
    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>';
    197217   
    198218    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";
     
    207227    $options = get_option('bb_jcr_options');
    208228   
    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";
    210230   
    211231    echo '<input id="bb_jcr_avatar_size" name="bb_jcr_options[avatar_size]" size="40" type="text" value="' . $options["avatar_size"] . '"/>' . "\n\n"; 
     
    216236    $options = get_option('bb_jcr_options');
    217237   
    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";
    219239
    220240    echo '<input id="bb_jcr_reply_text" name="bb_jcr_options[reply_text]" size="40" type="text" value="' . $options["reply_text"] . '"/>' . "\n\n";
     
    225245    $options = get_option('bb_jcr_options');
    226246   
    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";
    228248
    229249    echo '<input id="bb_jcr_login_text" name="bb_jcr_options[login_text]" size="40" type="text" value="' . $options["login_text"] . '"/>' . "\n\n";
     
    234254    $options = get_option('bb_jcr_options');
    235255   
    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";
    237257
    238258    echo '<input id="bb_jcr_callback" name="bb_jcr_options[callback]" size="40" type="text" value="' . $options["callback"] . '"/>' . "\n\n";
     
    243263    $options = get_option('bb_jcr_options');
    244264   
    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";
    246266
    247267    echo '<input id="bb_jcr_show_replies"       name="bb_jcr_options[show_replies]"       size="40" type="text"     value="'        . $options["show_replies"] . '"/>' . "\n\n";
     
    252272    $options = get_option('bb_jcr_options');
    253273   
    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";
    255275
    256276    echo '<input id="bb_jcr_hide_replies"       name="bb_jcr_options[hide_replies]"       size="40" type="text"     value="'        . $options["hide_replies"] . '"/>' . "\n\n";
     
    261281    $options = get_option('bb_jcr_options');
    262282
    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>';
    264284   
    265285    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";
     
    271291    $options = get_option('bb_jcr_options');
    272292   
    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";
    274294
    275295    echo '<input id="bb_jcr_toggle_down" name="bb_jcr_options[toggle_down]" size="40" type="text" value="' . $options["toggle_down"] . '"/>' . "\n\n";
     
    280300    $options = get_option('bb_jcr_options');
    281301   
    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";
    283303
    284304    echo '<input id="bb_jcr_toggle_up" name="bb_jcr_options[toggle_up]" size="40" type="text" value="' . $options["toggle_up"] . '"/>' . "\n\n";
     
    289309    $options = get_option('bb_jcr_options');
    290310   
    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";
    292312
    293313    // setup array
     
    320340function bb_jcr_options_validate($input) {
    321341    isset($input['style'])                  ? $newinput['style']                = trim($input['style'])                 : $newinput['style']                = '';
     342    isset($input['css'])                    ? $newinput['css']              = trim($input['css'])                   : $newinput['css']              = '';
    322343    isset($input['type'])                   ? $newinput['type']                 = trim($input['type'])                  : $newinput['type']                 = '';
    323344    isset($input['avatar_size'])            ? $newinput['avatar_size']          = trim($input['avatar_size'])           : $newinput['avatar_size']          = '';
     
    342363add_action('admin_init',     'bb_add_jcr_options');         // options
    343364add_action('init',           'bb_start_jquery');            // scripts
     365add_action('init',           'bb_start_styles');            // styles
    344366add_action('admin_menu',     'bb_jquery_comment_replies');  // options page/settings
    345367add_action('admin_init',     'bb_jcr_admin_init');          // option page/settings init
  • jquery-expandable-comments/trunk/readme.txt

    r864147 r895383  
    44Tags: jQuery, comments, expand, replies
    55Requires at least: 3.0
    6 Tested up to: 3.8.1
    7 Stable tag: 1.2.2
     6Tested up to: 3.9
     7Stable tag: 1.2.3
    88License: GPLv2 or later
    99
     
    27272. Upload to your plugins directory.
    28283. 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 }`
    3529
    3630
     
    3832The 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:
    3933
    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. 
    4135
    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.
    5037
    5138* 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.
     
    6047== Frequently Asked Questions == 
    6148
    62 = No questions at this time. =
     49= How do I use an image for the Show/Hide Replies text? =
     50If 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. =
    6362But 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.
    6463
     
    6968
    7069== Screenshots ==
    71 You can view the plugin in action on my website:[Blog | Shelly Cole](http://brassblogs.com/category/blog)
    7270
    73711. Closed Replies (hidden) Example
     
    7674
    7775== 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.
    7882
    7983= 1.2.2 =
     
    118122== Upgrade Notice ==
    119123
    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 Wordpress.
     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.
    122126
    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.
     127I 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.
    124128
    125129
Note: See TracChangeset for help on using the changeset viewer.