WordPress.org

Plugin Directory

Changeset 407314


Ignore:
Timestamp:
07/09/11 08:16:51 (3 years ago)
Author:
neoxx
Message:

1.30

  • adoption of JavaScript code for jQuery 1.6.1 (ships with WordPress 3.2 => increased minimum requirement to WordPress 3.2 for this and all upcoming releases)
  • small enhancements
Location:
featuring-countcomments/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • featuring-countcomments/trunk/featuring-countcomments.php

    r324358 r407314  
    66Description: Counts the number of comments for each user who has been logged in at the time of commenting. 
    77Author: Dr. Bernhard Riedl 
    8 Version: 1.20 
     8Version: 1.30 
    99Author URI: http://www.bernhard.riedl.name/ 
    1010*/ 
    1111 
    1212/* 
    13 Copyright 2006-2010 Dr. Bernhard Riedl 
    14  
    15 Inspirations & Proof-Reading 2007-2010 
     13Copyright 2006-2011 Dr. Bernhard Riedl 
     14 
     15Inspirations & Proof-Reading 2007-2011 
    1616by Veronika Grascher 
    1717original idea by Martijn van der Kwast 
     
    218218 
    219219    private function register_scripts() { 
    220         wp_register_script($this->get_prefix().'utils', $this->get_plugin_url().'js/utils.js', array('jquery'), '1.20'); 
    221  
    222         wp_register_script($this->get_prefix().'settings_page', $this->get_plugin_url().'js/settings_page.js', array('jquery', $this->get_prefix().'utils'), '1.20'); 
     220        wp_register_script($this->get_prefix().'utils', $this->get_plugin_url().'js/utils.js', array('jquery'), '1.30'); 
     221 
     222        wp_register_script($this->get_prefix().'settings_page', $this->get_plugin_url().'js/settings_page.js', array('jquery', $this->get_prefix().'utils'), '1.30'); 
    223223    } 
    224224 
     
    276276            add_filter('manage_users_columns', array(&$this, 'manage_users_columns')); 
    277277            add_filter('manage_users_custom_column', array(&$this, 'manage_users_custom_column'), 10, 3); 
    278  
    279             /* 
    280             add some styling 
    281             for comments column 
    282             of users page 
    283  
    284             we use the hook admin_head instead of 
    285             admin_print_style because otherwise 
    286             the style gets overwritten by WordPress 
    287             default settings 
    288             */ 
    289  
    290             global $wp_version; 
    291  
    292             if (version_compare($wp_version, '3.1', '>=')) 
    293                 add_action('admin_head-users.php', array(&$this, 'add_users_page_css')); 
    294278        } 
    295279 
     
    469453 
    470454        foreach ($check_fields as $check_field) { 
    471             $input[$check_field] = ($input[$check_field] == 1 ? true : false); 
     455            $input[$check_field] = (isset($input[$check_field]) && $input[$check_field] == 1 ? true : false); 
    472456        } 
    473457 
     
    502486 
    503487        foreach ($capability_fields as $capability_field) { 
    504             if (!in_array($input[$capability_field.'_capability'], $capabilities)) 
     488            if (isset($input[$capability_field.'_capability']) && !in_array($input[$capability_field.'_capability'], $capabilities)) 
    505489                unset($input[$capability_field.'_capability']); 
    506490        } 
     
    814798 
    815799    function head_meta() { 
    816         echo("<meta name=\"".$this->get_nicename()."\" content=\"1.20\" />\n"); 
     800        echo("<meta name=\"".$this->get_nicename()."\" content=\"1.30\" />\n"); 
    817801    } 
    818802 
     
    916900            global $wp_version; 
    917901 
    918             if (version_compare($wp_version, '3.1', '>=')) 
    919                 $query_arg['user_id']=$user_id; 
    920             else 
    921                 $query_arg['s']=urlencode($user_object->display_name); 
     902            $query_arg['user_id']=$user_id; 
    922903 
    923904            $ret_val='<div class="post-com-count-wrapper"><a class="post-com-count" href="'.add_query_arg($query_arg, admin_url('edit-comments.php')).'" title="'.htmlentities('Comments Search for "'.$user_object->display_name.'"', ENT_QUOTES, get_option('blog_charset'), false).'"><span class="comment-count">'.$count.'</span></a></div>'; 
     
    15391520        </ul></div> 
    15401521 
    1541         <div class="<?php echo($this->get_prefix()); ?>wrap"> 
     1522        <div id="<?php echo($this->get_prefix()); ?>content" class="<?php echo($this->get_prefix()); ?>wrap"> 
     1523 
     1524        <script type="text/javascript"> 
     1525 
     1526        /* <![CDATA[ */ 
     1527 
     1528        jQuery('#<?php echo($this->get_prefix()); ?>content').css('display', 'none'); 
     1529 
     1530        /* ]]> */ 
     1531 
     1532        </script> 
    15421533 
    15431534        <?php if ($is_wp_options) { ?> 
     
    16091600    ?>]; 
    16101601 
    1611     var section=jQuery('#<?php echo($this->get_prefix()); ?>section').attr('value'); 
     1602    var section=jQuery('#<?php echo($this->get_prefix()); ?>section').val(); 
    16121603    if (!section) 
    16131604        section=''; 
     
    16161607 
    16171608    /* 
    1618     display js-menu 
     1609    display js-menu and content-block 
    16191610    if js has been disabled, 
    16201611    the menu will not be visible 
     
    16221613 
    16231614    jQuery('#<?php echo($this->get_prefix()); ?>menu').css('display', 'block'); 
     1615 
     1616    jQuery('#<?php echo($this->get_prefix()); ?>content').css('display', 'block'); 
    16241617 
    16251618    /* ]]> */ 
     
    17371730    */ 
    17381731 
    1739     private function neotrinity_support() { ?> 
     1732    private function neotrinity_support() { 
     1733        global $user_identity; ?> 
    17401734        <h3>Support</h3> 
    1741         If you like to support the development of <?php echo($this->get_nicename()); ?>, you can invite me for a <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=bernhard%40riedl%2ename&amp;item_name=Donation%20for%20Featuring%20CountComments&amp;no_shipping=1&amp;no_note=1&amp;tax=0&amp;currency_code=EUR&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8">virtual pizza</a> for my work. <?php echo(convert_smilies(':)')); ?><br /><br /> 
     1735        <?php echo($user_identity); ?>, if you would like to support the development of <?php echo($this->get_nicename()); ?>, you can invite me for a <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=bernhard%40riedl%2ename&amp;item_name=Donation%20for%20Featuring%20CountComments&amp;no_shipping=1&amp;no_note=1&amp;tax=0&amp;currency_code=EUR&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8">virtual pizza</a> for my work. <?php echo(convert_smilies(':)')); ?><br /><br /> 
    17421736 
    17431737        <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="&#110;&#101;&#111;&#64;&#x6E;&#x65;&#x6F;&#x74;&#x72;&#105;&#110;&#x69;&#x74;&#x79;&#x2E;&#x61;t" /><input type="hidden" name="item_name" value="Donation for Featuring CountComments" /><input type="hidden" name="no_shipping" value="2" /><input type="hidden" name="no_note" value="1" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="tax" value="0" /><input type="hidden" name="bn" value="PP-DonationsBF" /><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" style="border:0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /><img alt="If you like to, you can support me." src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></form><br /> 
  • featuring-countcomments/trunk/js/settings_page.js

    r324358 r407314  
    55function featuring_countcomments_hide_sections() { 
    66    for (var i=0;i<featuring_countcomments_sections.length;i++) { 
    7             jQuery('#featuring_countcomments_'+featuring_countcomments_sections[i]+'_link').attr('className', ''); 
     7            jQuery('#featuring_countcomments_'+featuring_countcomments_sections[i]+'_link').attr('class', ''); 
    88    jQuery('#featuring_countcomments_'+featuring_countcomments_sections[i]).css('display', 'none'); 
    99    } 
     
    3232 
    3333    jQuery('#featuring_countcomments_'+my_section).css('display', 'block'); 
    34     jQuery('#featuring_countcomments_'+my_section+'_link').attr('className', 'current'); 
    35     jQuery('#featuring_countcomments_section').attr('value', my_section); 
     34    jQuery('#featuring_countcomments_'+my_section+'_link').attr('class', 'current'); 
     35    jQuery('#featuring_countcomments_section').val(my_section); 
    3636} 
  • featuring-countcomments/trunk/js/utils.js

    r324358 r407314  
    88    if (element.checked==checked) { 
    99        for (var i=0;i<fields.length;i++) { 
    10             jQuery('#featuring_countcomments_'+fields[i]).attr('disabled', ''); 
     10            jQuery('#featuring_countcomments_'+fields[i]).prop('disabled', false); 
    1111        } 
    1212    } 
     
    1414    else { 
    1515        for (var i=0;i<fields.length;i++) { 
    16             jQuery('#featuring_countcomments_'+fields[i]).attr('disabled', 'disabled'); 
     16            jQuery('#featuring_countcomments_'+fields[i]).prop('disabled', true); 
    1717        } 
    1818    } 
  • featuring-countcomments/trunk/readme.txt

    r324358 r407314  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=bernhard%40riedl%2ename&item_name=Donation%20for%20Featuring%20CountComments&no_shipping=1&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8 
    44Tags: count, comment, comments, author, authors, user, users, widget, dashboard, sidebar, shortcode, multisite, multi-site 
    5 Requires at least: 2.8 
    6 Tested up to: 3.2 
     5Requires at least: 3.2 
     6Tested up to: 3.3 
    77Stable tag: trunk 
    88 
     
    3131Please find the version for WordPress 
    3232 
    33 * 2.8 and higher [here](http://downloads.wordpress.org/plugin/featuring-countcomments.zip) 
     33* 3.2 and higher [here](http://downloads.wordpress.org/plugin/featuring-countcomments.zip) 
     34* 2.8 to 3.1 [here](http://downloads.wordpress.org/plugin/featuring-countcomments.wordpress2.8-3.1.zip) 
    3435* minor 2.8 [here](http://downloads.wordpress.org/plugin/featuring-countcomments.wordpressminor2.8.zip) 
    3536 
     
    235236== Upgrade Notice == 
    236237 
     238= 1.30 = 
     239 
     240The minimum requirement is now WordPress 3.2 
     241 
    237242= 1.00 = 
    238243 
     
    240245 
    241246== Changelog == 
     247 
     248= 1.30 = 
     249 
     250* adoption of JavaScript code for jQuery 1.6.1 (ships with WordPress 3.2 => increased minimum requirement to WordPress 3.2 for this and all upcoming releases) 
     251* small enhancements 
    242252 
    243253= 1.20 = 
Note: See TracChangeset for help on using the changeset viewer.