Plugin Directory

Changeset 456574


Ignore:
Timestamp:
10/28/2011 06:52:06 AM (13 years ago)
Author:
TacoCode
Message:

Bugfixes, added developer option to admin

Location:
ptm-ajax-comments/trunk
Files:
1 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • ptm-ajax-comments/trunk/includes/admin-options-general.php

    r325581 r456574  
    55        <tr>
    66            <th><label for="callback_name">Callback function name:</label></th>
    7             <td><input type="text" name="callback_name" id="callback_name" value="<?php echo $settings['callback_name'] ?>" class="regular-text code" />&nbsp;<span class="description">wp_list_comments('type=comment&callback=<span class="highlight">fd_comment</span>')</span></td>
     7            <td><input type="text" name="callback_name" id="callback_name" value="<?php echo $settings['callback_name'] ?>" class="regular-text code" />&nbsp;<span class="description">wp_list_comments('type=comment&amp;callback=<span class="highlight">twentyeleven_comment</span>) &rarr; see your theme's comments.php file</span></td>
    88        </tr>
    99    </table>
  • ptm-ajax-comments/trunk/includes/admin-options-nav.php

    r325581 r456574  
    77                <li><a href="#styling" class="button-secondary">Styling / CSS</a></li>
    88                <li><a href="#messages" class="button-secondary">Output Messages</a></li>
    9                 <li><a href="#about" class="button-secondary">About</a></li>
     9                <li><a href="#support" class="button-secondary">Support</a></li>
    1010            </ul>
    1111        </td>
  • ptm-ajax-comments/trunk/js/ptm-ajax-comments-admin.js

    r325581 r456574  
    1919            jQuery('#ptm-submit-line').show()
    2020            var _clicked = jQuery(this).attr('href');
    21             if(_clicked == '#about' || _clicked == '#support')
     21            if(_clicked == '#support')
    2222            {
    23                 jQuery('#ptm-admin-options-reset').hide()
    24                 jQuery('#ptm-submit-line').hide()
     23                // jQuery('#ptm-admin-options-reset').hide()
     24                // jQuery('#ptm-submit-line').hide()
    2525            }
    2626            jQuery('div.optionsTabs ul.optionsTabsNav a').removeClass('selected');
  • ptm-ajax-comments/trunk/js/ptm-ajax-comments.dev.js

    r322979 r456574  
    11//          File : ptm-ajax-comments.js
    22//   Description : JavaScript library for 'PTM AJAX Comments'
    3 //       Version : 1.0.0
     3//       Version : 1.0.3
    44//  Requirements : jQuery, http://jquery.com
    55//        Author : Peter 'Toxane' Michael
    6 //    Author URI : http://www.flowdrops.com
     6//    Author URI : http://tacocode.com
    77
    88jQuery.noConflict();
     
    1010var PTM_AJAX_Comments =
    1111{   
    12     init: function()
    13     {
     12    init: function() {
    1413        PTM_AJAX_Comments.assignVars();
    1514    },
    1615   
    17     assignVars: function()
    18     {
     16    assignVars: function() {
    1917        var data = ptm_ajax_comments_defaults;
    2018        btSubmit = jQuery('#submit').attr('value');
     
    3937    },
    4038                   
    41     setColors: function()
    42     {
     39    setColors: function() {
    4340        jQuery('#author').focus(function(){jQuery(this).css('background', '#'+activeColor);}).blur(function(){jQuery(this).css('background', '#'+inactiveColor);});
    4441        jQuery('#email').focus(function(){jQuery(this).css('background', '#'+activeColor);}).blur(function(){jQuery(this).css('background', '#'+inactiveColor);});
     
    4744    },
    4845   
    49     bindForm: function()
    50     {
    51         jQuery('#submit').one("click", function()
    52         {
     46    bindForm: function() {
     47        jQuery('#submit').one("click", function() {
    5348            jQuery('#'+css_commentform).after('<div id="ptm-ac-response" style="display:none;"></div>');
    5449            jQuery(this).after('<div id="ptm-ac-loader" style="display:none;"><img src="'+activityImage+'" alt="'+textAddingComment+'" /></div>');
    5550        });
    5651
    57         jQuery('#'+css_commentform).bind("submit", function()
    58         {
    59             try
    60             {
     52        jQuery('#'+css_commentform).bind("submit", function() {
     53            try {
    6154                // reset message
    6255                jQuery('#ptm-ac-response').removeClass('ptm-ac-error ptm-ac-success').html('').hide();
    6356               
    6457                // Antispam Bee Plugin compatibility
    65                 if(compatAntispamBee == 'checked')
    66                 {
     58                if(compatAntispamBee == 'checked') {
    6759                    var comment_md5 = jQuery.md5(blog_url).substr(0, 5);
    6860                    var comment_field = jQuery( "textarea[name='"+css_comment+"-"+comment_md5+"']" );
    69                     if(comment_field.val() === '' || comment_field.val() == this.comment.title)
    70                     {
     61                    if(comment_field.val() === '' || comment_field.val() == this.comment.title) {
    7162                        jQuery('#ptm-ac-response').addClass('ptm-ac-error').html('<span>'+textNoComment+'</span>').show();
    7263                        comment_field.focus();
    7364                        return false;
    7465                    }
    75                 }
    76                 else
    77                 {
    78                     if(this.comment.value === '' || this.comment.value == this.comment.title)
    79                     {
     66                } else {
     67                    if(this.comment.value === '' || this.comment.value == this.comment.title) {
    8068                        jQuery('#ptm-ac-response').addClass('ptm-ac-error').html('<span>'+textNoComment+'</span>').show();
    8169                        this.comment.focus();
     
    9583                return false;
    9684            }
    97             catch(e)
    98             {
     85            catch(e) {
    9986                // do a normal postback in case of an unexpected error
    100                 // console.log(e);
     87                console.log(e);
    10188                return true;   
    10289            }
     
    10491    },
    10592   
    106     ajaxError: function(XMLHttpRequest, textStatus, errorThrown)
    107     {
     93    ajaxError: function(XMLHttpRequest, textStatus, errorThrown) {
    10894        PTM_AJAX_Comments.removeActivity();
    10995        var _wpResponse,  _wpBody, _error;
    11096        // check for wp_die
    111         if(XMLHttpRequest.status == 500)
    112         {
     97        if(XMLHttpRequest.status == 500) {
    11398            _wpResponse = XMLHttpRequest.responseText;
    11499            _wpBody = jQuery(_wpResponse).contents().filter(function(){return this.nodeType != 1;});
    115100            _error = _wpBody[1].wholeText;
    116         }
    117         else
    118         {
     101        } else {
    119102            _error = 'An unknown error occured. Please try again.';
    120103        }
     
    123106    },
    124107   
    125     preSubmit: function(formData, jqForm, ptm_ajax_options)
    126     {
     108    preSubmit: function(formData, jqForm, ptm_ajax_options) {
    127109        PTM_AJAX_Comments.addActivity();
    128110    },
    129111   
    130     postSubmit: function(responseText, statusText, xhr, $form)
    131     {
     112    postSubmit: function(responseText, statusText, xhr, $form) {
     113        /*
     114        console.log(responseText);
     115        console.log(statusText);
     116        console.log(xhr);
     117        console.log($form);
     118        */
    132119        PTM_AJAX_Comments.removeActivity();
    133120        // check for errors
     
    135122        is_error = errordata[0]; // If WP returned an error, the value of is_error is now 'error'
    136123       
    137         if(is_error == 'error')
    138         {
     124        if(is_error == 'error') {
    139125            PTM_AJAX_Comments.throwError(errordata[1]);
    140126            return;
    141         }
    142         else
    143         {
     127        } else if(responseText == -1) { // likely not all fields filled
     128            PTM_AJAX_Comments.throwError('Please fill in all required fields');
     129        } else {
    144130            PTM_AJAX_Comments.processComment(responseText);
    145131            PTM_AJAX_Comments.clearInputs();
     
    147133    },
    148134   
    149     processComment: function(data)
    150     {
     135    processComment: function(data) {
    151136        tmpComment = data;
    152         if(jQuery('.'+css_commentlist).length > 0)
    153         {
     137        if(jQuery('.'+css_commentlist).length > 0) {
    154138            // The commentlist exists i.e. this is not the first comment
    155139            // Another ugliest hack that did ever hack ?
     140            console.log(jQuery('#'+css_respond).parent().attr('class'));
    156141            var the_parent_class = jQuery('#'+css_respond).parent().attr('class');
    157             if(the_parent_class.search(/depth-/i) != -1)
    158             {
     142            if(typeof the_parent_class != "undefined" && the_parent_class.search(/depth-/i) != -1) {
    159143                // Check if there are already replies, if not, add <ul class="children">
    160                 if(jQuery('#'+css_respond).parent().children('.children').length)
    161                 {
     144                if(jQuery('#'+css_respond).parent().children('.children').length) {
    162145                    // There are replies, add comment to the end of the list
    163146                    jQuery('#'+css_respond).parent().children('.children').append(tmpComment);
    164                 }
    165                 else
    166                 {
     147                } else {
    167148                    // First reply
    168149                    tmpComment = '<ul class="children">'+tmpComment+'</ul>';
    169150                    jQuery('#'+css_respond).parent().append(tmpComment);
    170151                }
    171             }
    172             else
    173             {
     152            } else {
    174153                // Normal comment
    175                 if(commentPosition == 'bottom')
    176                 {
     154                if(commentPosition == 'bottom') {
     155                    jQuery('.'+css_commentlist).append(tmpComment);
     156                } else if(commentPosition == 'top') {
     157                    jQuery('.'+css_commentlist).prepend(tmpComment);
     158                } else {
    177159                    jQuery('.'+css_commentlist).append(tmpComment);
    178160                }
    179                 else if(commentPosition == 'top')
    180                 {
    181                     jQuery('.'+css_commentlist).prepend(tmpComment);
    182                 }
    183                 else
    184                 {
    185                     jQuery('.'+css_commentlist).append(tmpComment);
    186                 }
    187             }
    188         }
    189         else
    190         {
     161            }
     162        } else {
    191163            // The commentlist doesn't exist, this is the first comment
    192164           
    193165            // Do we need to support the 'Content Press' Theme?
    194             if(compatContentPress == 'checked')
    195             {
     166            if(compatContentPress == 'checked') {
    196167                jQuery('div.postbox').before(jQuery(tmpComment).find('div.boxcomments'));
    197             }
    198             else
    199             {
     168            } else {
    200169                tmpComment = '<ol class="'+css_commentlist+'">'+tmpComment+'</ol>';
    201170                jQuery('#'+css_respond).before(jQuery(tmpComment));
     
    207176       
    208177        // 'Ajax Edit Comments' plugin compatibility
    209         if (window.AjaxEditComments)
    210         {
     178        if (window.AjaxEditComments) {
    211179            AjaxEditComments.init();
    212180        }
     
    214182    },
    215183       
    216     addActivity: function()
    217     {
     184    addActivity: function() {
    218185        jQuery('#ptm-ac-response').removeClass('ptm-ac-error').html('<span>'+textAddingComment+'</span>').show();
    219186        jQuery('#ptm-ac-loader').show();
    220         if (disableForm == 'checked')
    221         {   
     187        if (disableForm == 'checked') {
    222188            jQuery('#'+css_commentform+' *').attr("disabled","disabled");
    223         }
    224         else
    225         {
     189        } else {
    226190            jQuery('#'+css_commentform).fadeOut();
    227191        }
    228192    },
    229193   
    230     removeActivity: function()
    231     {
     194    removeActivity: function() {
    232195        jQuery('#ptm-ac-response').removeClass('ptm-ac-error').html('').hide();
    233196        jQuery('#ptm-ac-loader').hide();
    234         if(showForm == 'checked')
    235         {
     197        if(showForm == 'checked') {
    236198            jQuery('#'+css_commentform).fadeIn();
    237199        }
     
    239201    },
    240202   
    241     clearInputs: function()
    242     {
     203    clearInputs: function() {
    243204        jQuery('#comment').val('');
    244205    },
    245206   
    246     throwError: function(message)
    247     {
     207    throwError: function(message) {
    248208        PTM_AJAX_Comments.removeActivity();
    249209        jQuery('#'+css_commentform).fadeIn();
  • ptm-ajax-comments/trunk/js/ptm-ajax-comments.js

    r322979 r456574  
    11//          File : ptm-ajax-comments.js
    22//   Description : JavaScript library for 'PTM AJAX Comments'
    3 //       Version : 1.0.0
     3//       Version : 1.0.3
    44//  Requirements : jQuery, http://jquery.com
    55//        Author : Peter 'Toxane' Michael
    6 //    Author URI : http://www.flowdrops.com
     6//    Author URI : http://tacocode.com
    77
    88jQuery.noConflict();
    9 eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h 8={L:3(){8.18()},18:3(){h 4=1z;1A=2(\'#M\').N(\'O\');x=4.x;P=4.P;Q=4.Q;x=4.1B;r=4.r;s=4.s;y=4.y;f=4.f;m=4.m;n=4.n;z=4.z;A=4.A;R=4.R;S=4.S;T=4.T;B=4.B;8.19();8.1a()},19:3(){2(\'#1C\').t(3(){2(9).j(\'k\',\'#\'+r)}).C(3(){2(9).j(\'k\',\'#\'+s)});2(\'#1D\').t(3(){2(9).j(\'k\',\'#\'+r)}).C(3(){2(9).j(\'k\',\'#\'+s)});2(\'#1E\').t(3(){2(9).j(\'k\',\'#\'+r)}).C(3(){2(9).j(\'k\',\'#\'+s)});2(\'#\'+y).t(3(){2(9).j(\'k\',\'#\'+r)}).C(3(){2(9).j(\'k\',\'#\'+s)})},1a:3(){2(\'#M\').1F("1b",3(){2(\'#\'+f).1c(\'<u 1d="6-7-l" 1e="1f:1g;"></u>\');2(9).1c(\'<u 1d="6-7-U" 1e="1f:1g;"><1G 1H="\'+x+\'" 1I="\'+A+\'" /></u>\')});2(\'#\'+f).1J("M",3(){1h{2(\'#6-7-l\').V(\'6-7-g 6-7-W\').o(\'\').X();a(T==\'D\'){h 1i=2.1K(1L).1M(0,5);h E=2("1N[1O=\'"+y+"-"+1i+"\']");a(E.Y()===\'\'||E.Y()==9.p.1j){2(\'#6-7-l\').F(\'6-7-g\').o(\'<c>\'+z+\'</c>\').v();E.t();q Z}}d{a(9.p.O===\'\'||9.p.O==9.p.1j){2(\'#6-7-l\').F(\'6-7-g\').o(\'<c>\'+z+\'</c>\').v();9.p.t();q Z}}h 10={1P:8.1k,W:8.1l,g:8.1m,1Q:\'1R\'};2(9).1S(10);q Z}1T(e){q 1U}})},1m:3(11,1V,1W){8.G();h 12,13,H;a(11.1X==1Y){12=11.I;13=2(12).1Z().20(3(){q 9.21!=1});H=13[1].22}d{H=\'23 24 g 25. 26 1h 27.\'}8.14(H);q},1k:3(28,29,10){8.1n()},1l:3(I,2a,2b,$2c){8.G();h 15=I.2d("|");1o=15[0];a(1o==\'g\'){8.14(15[1]);q}d{8.1p(I);8.1q()}},1p:3(4){b=4;a(2(\'.\'+m).1r>0){h 1s=2(\'#\'+n).J().N(\'16\');a(1s.2e(/2f-/i)!=-1){a(2(\'#\'+n).J().w(\'.w\').1r){2(\'#\'+n).J().w(\'.w\').K(b)}d{b=\'<1t 16="w">\'+b+\'</1t>\';2(\'#\'+n).J().K(b)}}d{a(B==\'2g\'){2(\'.\'+m).K(b)}d a(B==\'2h\'){2(\'.\'+m).2i(b)}d{2(\'.\'+m).K(b)}}}d{a(S==\'D\'){2(\'u.2j\').1u(2(b).2k(\'u.2l\'))}d{b=\'<1v 16="\'+m+\'">\'+b+\'</1v>\';2(\'#\'+n).1u(2(b))}}2(\'#2m-p-2n-2o\').1b();a(2p.1w){1w.L()}2(\'#6-7-l\').F(\'6-7-W\').o(\'<c>\'+R+\'</c>\').v()},1n:3(){2(\'#6-7-l\').V(\'6-7-g\').o(\'<c>\'+A+\'</c>\').v();2(\'#6-7-U\').v();a(Q==\'D\'){2(\'#\'+f+\' *\').N("17","17")}d{2(\'#\'+f).2q()}},G:3(){2(\'#6-7-l\').V(\'6-7-g\').o(\'\').X();2(\'#6-7-U\').X();a(P==\'D\'){2(\'#\'+f).1x()}2(\'#\'+f+\' *\').2r("17")},1q:3(){2(\'#p\').Y(\'\')},14:3(1y){8.G();2(\'#\'+f).1x();2(\'#6-7-l\').F(\'6-7-g\').o(\'<c>\'+1y+\'</c>\').v()}};2(2s).2t(8.L);',62,154,'||jQuery|function|data||ptm|ac|PTM_AJAX_Comments|this|if|tmpComment|span|else||css_commentform|error|var||css|background|response|css_commentlist|css_respond|html|comment|return|activeColor|inactiveColor|focus|div|show|children|activityImage|css_comment|textNoComment|textAddingComment|commentPosition|blur|checked|comment_field|addClass|removeActivity|_error|responseText|parent|append|init|submit|attr|value|showForm|disableForm|textCommentAdded|compatContentPress|compatAntispamBee|loader|removeClass|success|hide|val|false|ptm_ajax_options|XMLHttpRequest|_wpResponse|_wpBody|throwError|errordata|class|disabled|assignVars|setColors|bindForm|click|after|id|style|display|none|try|comment_md5|title|preSubmit|postSubmit|ajaxError|addActivity|is_error|processComment|clearInputs|length|the_parent_class|ul|before|ol|AjaxEditComments|fadeIn|message|ptm_ajax_comments_defaults|btSubmit|activityImagePath|author|email|url|one|img|src|alt|bind|md5|blog_url|substr|textarea|name|beforeSubmit|type|post|ajaxSubmit|catch|true|textStatus|errorThrown|status|500|contents|filter|nodeType|wholeText|An|unknown|occured|Please|again|formData|jqForm|statusText|xhr|form|split|search|depth|bottom|top|prepend|postbox|find|boxcomments|cancel|reply|link|window|fadeOut|removeAttr|document|ready'.split('|'),0,{}))
     9eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.27();l 8={10:3(){8.1o()},1o:3(){l 7=1D;1S=2(\'#15\').D(\'U\');G=7.G;T=7.T;W=7.W;G=7.1V;t=7.t;u=7.u;C=7.C;g=7.g;q=7.q;j=7.j;J=7.J;L=7.L;Y=7.Y;Z=7.Z;11=7.11;E=7.E;8.1i();8.1g()},1i:3(){2(\'#1E\').s(3(){2(9).k(\'m\',\'#\'+t)}).N(3(){2(9).k(\'m\',\'#\'+u)});2(\'#1H\').s(3(){2(9).k(\'m\',\'#\'+t)}).N(3(){2(9).k(\'m\',\'#\'+u)});2(\'#1L\').s(3(){2(9).k(\'m\',\'#\'+t)}).N(3(){2(9).k(\'m\',\'#\'+u)});2(\'#\'+C).s(3(){2(9).k(\'m\',\'#\'+t)}).N(3(){2(9).k(\'m\',\'#\'+u)})},1g:3(){2(\'#15\').1Q("1e",3(){2(\'#\'+g).1b(\'<v 1k="6-4-h" 1q="1r:1t;"></v>\');2(9).1b(\'<v 1k="6-4-S" 1q="1r:1t;"><21 2j="\'+G+\'" 2o="\'+L+\'" /></v>\')});2(\'#\'+g).1C("15",3(){1z{2(\'#6-4-h\').17(\'6-4-f 6-4-P\').n(\'\').Q();a(11==\'K\'){l 1u=2.28(29).2a(0,5);l z=2("2w[2B=\'"+C+"-"+1u+"\']");a(z.V()===\'\'||z.V()==9.o.1s){2(\'#6-4-h\').I(\'6-4-f\').n(\'<d>\'+J+\'</d>\').r();z.s();p 12}}c{a(9.o.U===\'\'||9.o.U==9.o.1s){2(\'#6-4-h\').I(\'6-4-f\').n(\'<d>\'+J+\'</d>\').r();9.o.s();p 12}}l 14={2D:8.1f,P:8.1d,f:8.1c,2b:\'2c\'};2(9).2d(14);p 12}2i(e){1a.1n(e);p 2r}})},1c:3(18,2x,2z){8.B();l O,16,A;a(18.1F==1G){O=18.w;16=2(O).1I().1J(3(){p 9.1K!=1});A=16[1].1M}c{A=\'1N 1O f 1P. 1h 1z 1R.\'}8.F(A);p},1f:3(1T,1U,14){8.1j()},1d:3(w,1W,1X,$1Y){8.B();l 13=w.20("|");1l=13[0];a(1l==\'f\'){8.F(13[1]);p}c a(w==-1){8.F(\'1h 22 23 24 25 26\');}c{8.1m(w);8.19()}},1m:3(7){b=7;a(2(\'.\'+q).1p>0){1a.1n(2(\'#\'+j).x().D(\'M\'));l X=2(\'#\'+j).x().D(\'M\');a(2e X!="2f"&&X.2g(/2h-/i)!=-1){a(2(\'#\'+j).x().y(\'.y\').1p){2(\'#\'+j).x().y(\'.y\').H(b)}c{b=\'<1v M="y">\'+b+\'</1v>\';2(\'#\'+j).x().H(b)}}c{a(E==\'2k\'){2(\'.\'+q).H(b)}c a(E==\'2l\'){2(\'.\'+q).2m(b)}c{2(\'.\'+q).H(b)}}}c{a(Z==\'K\'){2(\'v.2n\').1w(2(b).2p(\'v.2q\'))}c{b=\'<1x M="\'+q+\'">\'+b+\'</1x>\';2(\'#\'+j).1w(2(b))}}2(\'#2s-o-2t-2u\').1e();a(2v.1y){1y.10()}2(\'#6-4-h\').I(\'6-4-P\').n(\'<d>\'+Y+\'</d>\').r()},1j:3(){2(\'#6-4-h\').17(\'6-4-f\').n(\'<d>\'+L+\'</d>\').r();2(\'#6-4-S\').r();a(W==\'K\'){2(\'#\'+g+\' *\').D("R","R")}c{2(\'#\'+g).2y()}},B:3(){2(\'#6-4-h\').17(\'6-4-f\').n(\'\').Q();2(\'#6-4-S\').Q();a(T==\'K\'){2(\'#\'+g).1A()}2(\'#\'+g+\' *\').2A("R")},19:3(){2(\'#o\').V(\'\')},F:3(1B){8.B();2(\'#\'+g).1A();2(\'#6-4-h\').I(\'6-4-f\').n(\'<d>\'+1B+\'</d>\').r()}};2(2C).1Z(8.10);',62,164,'||jQuery|function|ac||ptm|data|PTM_AJAX_Comments|this|if|tmpComment|else|span||error|css_commentform|response||css_respond|css|var|background|html|comment|return|css_commentlist|show|focus|activeColor|inactiveColor|div|responseText|parent|children|comment_field|_error|removeActivity|css_comment|attr|commentPosition|throwError|activityImage|append|addClass|textNoComment|checked|textAddingComment|class|blur|_wpResponse|success|hide|disabled|loader|showForm|value|val|disableForm|the_parent_class|textCommentAdded|compatContentPress|init|compatAntispamBee|false|errordata|ptm_ajax_options|submit|_wpBody|removeClass|XMLHttpRequest|clearInputs|console|after|ajaxError|postSubmit|click|preSubmit|bindForm|Please|setColors|addActivity|id|is_error|processComment|log|assignVars|length|style|display|title|none|comment_md5|ul|before|ol|AjaxEditComments|try|fadeIn|message|bind|ptm_ajax_comments_defaults|author|status|500|email|contents|filter|nodeType|url|wholeText|An|unknown|occured|one|again|btSubmit|formData|jqForm|activityImagePath|statusText|xhr|form|ready|split|img|fill|in|all|required|fields|noConflict|md5|blog_url|substr|type|post|ajaxSubmit|typeof|undefined|search|depth|catch|src|bottom|top|prepend|postbox|alt|find|boxcomments|true|cancel|reply|link|window|textarea|textStatus|fadeOut|errorThrown|removeAttr|name|document|beforeSubmit'.split('|'),0,{}))
  • ptm-ajax-comments/trunk/lib/Class.PTM_AJAXComments.php

    r325581 r456574  
    44 *     Version : 1.0.0
    55 *      Author : Peter 'Toxane' Michael
    6  *  Author URI : http://www.flowdrops.com/
     6 *  Author URI : http://tacocode.com/
    77 *
    88 */
     
    6868    {
    6969        $_POST = $this->_stripslashes_deep($_POST);
    70         $showForm = $_POST['showForm'];
     70        $showForm = isset($_POST['showForm']) ? $_POST['showForm'] : '';
    7171        $disableForm = $_POST['disableForm'];
    72         $compatContentPress = $_POST['compatContentPress'];
    73         $compatAntispamBee = $_POST['compatAntispamBee'];
     72        $compatContentPress = isset($_POST['compatContentPress']) ? $_POST['compatContentPress'] : '';
     73        $compatAntispamBee = isset($_POST['compatAntispamBee']) ? $_POST['compatAntispamBee'] : '';
    7474        $activity_image = $this->_selectActivityImage($_POST['custom_activity_image'], $_POST['activity_image']);
    7575        $activeColor = $_POST['activeColor'];
     
    8585        $callback_name = $_POST['callback_name'];
    8686        $commentPosition = $_POST['commentPosition'];
     87        $js_dev_enabled = isset($_POST['js_dev_enabled']) ? $_POST['js_dev_enabled'] : 0;
    8788       
    8889        $settings = array
     
    105106            'textCommentAdded' => $textCommentAdded,
    106107            'callback_name' => $callback_name,
    107             'commentPosition' => $commentPosition
     108            'commentPosition' => $commentPosition,
     109            'js_dev_enabled' => $js_dev_enabled
    108110        );
    109111        return update_option('ptm-ajax-comments-settings', $settings);
     
    131133            'textCommentAdded' => 'Your comment has been added, thank you!',
    132134            'callback_name' => '',
    133             'commentPosition' => 'bottom'
     135            'commentPosition' => 'bottom',
     136            'js_dev_enabled' => 0
    134137        );
    135138        return $settings_default;
  • ptm-ajax-comments/trunk/lib/Class.PTM_AJAXCommentsAdmin.php

    r325581 r456574  
    3737    function _addAdminPage()
    3838    {
    39         add_comments_page( 'PTM AJAX Comments', 'AJAX Comments', 10, 'ptm-ajax-comments', array( $this, '_displayAdminPage' ) );
     39        add_comments_page( 'PTM AJAX Comments', 'AJAX Comments', 'administrator', 'ptm-ajax-comments', array( $this, '_displayAdminPage' ) );
    4040    }
    4141   
     
    8383                <?php require_once( PTM_AJAX_COMMENTS_PLUGINPATH.'/includes/admin-options-styling.php' ); ?>
    8484                <?php require_once( PTM_AJAX_COMMENTS_PLUGINPATH.'/includes/admin-options-messages.php' ); ?>
    85                 <?php require_once( PTM_AJAX_COMMENTS_PLUGINPATH.'/includes/admin-options-about.php' ); ?>
     85                <?php require_once( PTM_AJAX_COMMENTS_PLUGINPATH.'/includes/admin-options-support.php' ); ?>
    8686                   
    8787                <div class="divider">&nbsp;</div>
  • ptm-ajax-comments/trunk/lib/Class.PTM_AJAXCommentsFront.php

    r322979 r456574  
    44 *     Version : 1.0.0
    55 *      Author : Peter 'Toxane' Michael
    6  *  Author URI : http://www.flowdrops.com/
     6 *  Author URI : http://tacocode.com/
    77 *
    88 */
     
    3939            if(isset($currentSettings['compatAntispamBee']) && $currentSettings['compatAntispamBee'] == 'checked')
    4040            {
    41                 wp_enqueue_script('jquery_md5', PTM_AJAX_COMMENTS_PLUGINURL.'js/jquery.md5.js', array('jquery'), '1.0' );
     41                wp_enqueue_script('jquery_md5', PTM_AJAX_COMMENTS_PLUGINURL.'js/jquery.md5.js', array('jquery'), '1.0', true );
    4242            }
    43             wp_enqueue_script('ptm-ajax-comments', PTM_AJAX_COMMENTS_PLUGINURL.'js/ptm-ajax-comments.js', array('jquery', 'jquery-form'), '1.0.0' );
     43            $js_file = $currentSettings['js_dev_enabled'] == 0 ? 'ptm-ajax-comments.js' : 'ptm-ajax-comments.dev.js';
     44            wp_enqueue_script('ptm-ajax-comments', PTM_AJAX_COMMENTS_PLUGINURL.'js/'.$js_file, array('jquery', 'jquery-form'), '1.0.0', true );
    4445        }
    4546    }
  • ptm-ajax-comments/trunk/ptm-ajax-comments.php

    r371541 r456574  
    66Author: Peter 'Toxane' Michael
    77Author URI: http://tacocode.com/
    8 Version: 1.0.2
     8Version: 1.0.3
    99License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    1010Text Domain: ptm-ajax-comments
     
    3838
    3939# Define constants
    40 define( 'PTM_AJAX_COMMENTS_VERSION', '1.0.2' );
     40define( 'PTM_AJAX_COMMENTS_VERSION', '1.0.3' );
    4141define( 'PTM_AJAX_COMMENTS_ABSPATH', $ptm_ajax_comments_abspath );
    4242define( 'PTM_AJAX_COMMENTS_PLUGINPATH', str_replace("\\","/",dirname( __FILE__)) );
  • ptm-ajax-comments/trunk/readme.txt

    r371541 r456574  
    44Tags: jquery, ajax, comments
    55Requires at least: 3.0.1
    6 Tested up to: 3.0.3
     6Tested up to: 3.2.1
    77Stable tag: trunk
    88
     
    3434
    3535Do you have other plugins activated? Try to deactivate another plugin, and run the test again. If my plugin works after deactivating a certain plugin,
    36 you have just found an incompatability between my plugin and the one you deactivated. Please [inform me about this](http://www.flowdrops.com/contact/ "Contact"), thanks!
     36you have just found an incompatability between my plugin and the one you deactivated. Please [inform me about this](http://tacocode.com/contact/ "Contact"), thanks!
    3737
    3838= Tried with the 'twentyten' theme and deactivated all other plugins. Still doesn't work. =
     
    4343= Where can I get more information? =
    4444
    45 Please visit [the official website](http://www.flowdrops.com/code/wordpress/plugin/ptm-ajax-comments/ "PTM AJAX Comments") for the latest information on this plugin.
     45Please visit [the official website](http://www.swisswp.com/code/wordpress/plugin/ptm-ajax-comments/ "PTM AJAX Comments") for the latest information on this plugin.
    4646
    4747== Known Issues ==
     
    5050
    5151== Changelog ==
     52= Version 1.0.3 - October 28, 2011 =
     53* Small bug fixes
     54* Added developer option to admin
    5255
    5356= Version 1.0.2 - April 11, 2011 =
Note: See TracChangeset for help on using the changeset viewer.