Plugin Directory

Changeset 1038437


Ignore:
Timestamp:
12/04/2014 09:14:47 PM (11 years ago)
Author:
tjsantilo
Message:

bug fixes. character count added

Location:
because/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • because/trunk/README.txt

    r1037006 r1038437  
    77Tested up to: 4.0
    88<<<<<<< .mine
    9 Stable tag: 1.5.1
     9Stable tag: 1.5.2
    1010=======
    11 Stable tag: 1.5.1
     11Stable tag: 1.5.2
    1212>>>>>>> .r969865
    1313License: GPLv2 or later
     
    2222A more engaged community. More traffic. Better page rank. Audience insight. By better serving users, Because can better serve sites. Think of it as a new wave comment section.
    2323
    24 [youtube http://www.youtube.com/watch?v=t_3Lc1CvmiQ]
     24[youtube https://www.youtube.com/watch?v=HuuabAzUpAQ]
    2525
    2626== Installation ==
  • because/trunk/public/assets/css/public.css

    r1037006 r1038437  
    518518}
    519519
     520<<<<<<< .mine
    520521#commentform .comment-form-comment label{
    521522    margin: 0 0 10px 0;
     
    530531    border-radius: 3px;
    531532    border: 1px solid #cccccc!important;
     533}
     534
     535#respond .comment-characters-remaining{
     536    font-size: 14px;
    532537}
    533538
     
    586591
    587592
     593=======
     594#commentform .comment-form-comment label{
     595    margin: 0 0 10px 0;
     596    float: none!important;
     597}
     598
     599
     600#respond textarea{
     601    width: 100%!important;
     602    height: auto!important;
     603    padding: 3px!important;
     604    border-radius: 3px;
     605    border: 1px solid #cccccc!important;
     606}
     607
     608
     609
     610/*.joindiscussion,
     611.comment-form #submit{
     612    background-color:#499bea;
     613    margin:auto;
     614    display:block;
     615    font-size: 2em;
     616    font-weight: 100;
     617    width:90%;
     618    letter-spacing: -0.04em;
     619    color:#ffffff;
     620    text-shadow: 1px 1px #666;
     621    min-height:2em;
     622}*/
     623
     624.joindiscussion, .comment-form #submit{
     625    color: white!important;
     626    background: #bcbcbc!important;
     627    padding: 4px 8px 4px 8px!important;
     628    display: inline-block!important;
     629    border-radius: 3px!important;
     630    border: 0!important;
     631    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif !important;
     632    font-weight: 200!important;
     633    line-height: 1.5!important;
     634    width: 80%!important;
     635    font-size: 1.4em!important;
     636    text-transform: initial!important;
     637    display: block!important;
     638    margin: 0 auto!important;
     639    margin-bottom: 10px !important;
     640    box-shadow: none!important;
     641    text-shadow:none!important;
     642    background-image: none!important;
     643    float: none!important;
     644    height: auto!important;
     645    text-indent: 0!important;
     646}
     647
     648#respond .form-submit{
     649    margin: 10px 0 20px 0;
     650}
     651
     652#submit:HOVER
     653{
     654    background-color:#9F9F9F!important;
     655}
     656.form-allowed-tags{
     657    display: none!important;
     658
     659}
     660
     661
     662>>>>>>> .r1038433
    588663/*
    589664//----------------------------
  • because/trunk/public/assets/js/public.js

    r1037006 r1038437  
    117117            success:function(data){
    118118
    119     var answer_1 = data.social_poll_answer_1;
    120 
    121 var answer_2 = data.social_poll_answer_2;
    122 
    123 
    124 var answer_1_votes = data.social_poll_answer_1.total_votes;
    125 
    126 var answer_2_votes = data.social_poll_answer_2.total_votes;
    127 var answer_1_percent = (answer_1_votes/(answer_1_votes+answer_2_votes)*100).toFixed(2);
    128 var answer_2_percent = (answer_2_votes/(answer_1_votes+answer_2_votes)*100).toFixed(2);
    129 
    130 var answer_1_text = data.social_poll_answer_1.answer_text;
    131 
    132 var answer_2_text = data.social_poll_answer_2.answer_text;
    133 
    134 
    135 
    136 var $results_html = '<div class="one_result_box" id="results_box_'+$post_id+'"><p><span class="results_answer_text">'+answer_1_text+'</span> :<span class="results_answer_value">'+answer_1_percent+'</span></p>'
    137 
    138 +'<p><span class="results_answer_text">'+answer_2_text+'</span> :<span class="results_answer_value">'+answer_2_percent+'</div></p></div>';
    139 
    140 //$('#social_polling_see_results_wrapper').html($results_html);
    141 
    142 
    143 
    144 //var $answer1_html = answer_1_text+' '+answer_1_votes;
    145 
    146 //var $answer2_html = answer_2_text+' '+answer_2_votes;
    147 
    148 
    149 var $answer1_html = '<h1>'+answer_1_percent+'%</h1>';
    150 
    151 var $answer2_html = '<h1>'+answer_2_percent+'%</h1>';   
    152 
    153 
    154 
    155 $('#answer_1_wrapper .poll_results').html($answer1_html);
    156 
    157 $('#answer_2_wrapper .poll_results').html($answer2_html);
    158 
    159 
    160         setTimeout(function() {
    161             var $comment_box_offset = $('#respond').offset().top + 'px';
    162   $("html, body").animate({ scrollTop: $comment_box_offset  }, 450);
    163 }, 2000);
    164 
    165 //$('#social_polling_see_results_wrapper').html('You Already Voted');
    166                
    167 
    168                
    169 
    170                
    171 
    172                
    173 
    174                
    175 
    176                
    177 
    178                
    179 
     119                var answer_1 = data.social_poll_answer_1;
     120
     121                var answer_2 = data.social_poll_answer_2;
     122
     123
     124                var answer_1_votes = data.social_poll_answer_1.total_votes;
     125
     126                var answer_2_votes = data.social_poll_answer_2.total_votes;
     127                var answer_1_percent = (answer_1_votes/(answer_1_votes+answer_2_votes)*100).toFixed(2);
     128                var answer_2_percent = (answer_2_votes/(answer_1_votes+answer_2_votes)*100).toFixed(2);
     129
     130                var answer_1_text = data.social_poll_answer_1.answer_text;
     131
     132                var answer_2_text = data.social_poll_answer_2.answer_text;
     133
     134
     135
     136                var $results_html = '<div class="one_result_box" id="results_box_'+$post_id+'"><p><span class="results_answer_text">'+answer_1_text+'</span> :<span class="results_answer_value">'+answer_1_percent+'</span></p>'
     137
     138                +'<p><span class="results_answer_text">'+answer_2_text+'</span> :<span class="results_answer_value">'+answer_2_percent+'</div></p></div>';
     139
     140               
     141                var $answer1_html = '<h1>'+answer_1_percent+'%</h1>';
     142                var $answer2_html = '<h1>'+answer_2_percent+'%</h1>';   
     143
     144
     145
     146                $('#answer_1_wrapper .poll_results').html($answer1_html);
     147                $('#answer_2_wrapper .poll_results').html($answer2_html);
     148
     149
     150                setTimeout(function() {
     151                    var $comment_box_offset = $('#respond').offset().top + 'px';
     152                    $("html, body").animate({ scrollTop: $comment_box_offset  }, 450);
     153                }, 1000);
     154
     155                // var $comment_box_offset = $('#respond').offset().top + 'px';
     156                // $("html, body").animate({ scrollTop: $comment_box_offset  }, 450);
     157   
    180158            }//success
    181 
    182        
    183 
    184         });//$.ajax({
    185 
    186        
     159       
     160        });//$.ajax({       
    187161
    188162    }//show_results
    189163
    190    
    191 
    192    
     164    $(window).bind('mousewheel DOMMouseScroll', function(event){
     165        $("html, body").stop();
     166    });
     167
    193168
    194169   
     
    354329               
    355330
    356                 //alert(data);
    357 
    358                 //show_results($post_id);
    359 
    360                
    361 
    362                
    363 
    364                 //console.log(data+ajaxurl);
    365 
    366                
    367 
    368331            }//success
    369332
     
    432395               
    433396
    434                 //alert(data);
    435 
    436                 //show_results($post_id);
    437 
    438                
    439 
    440                
    441 
    442                 //console.log(data+ajaxurl);
    443 
    444397               
    445398
     
    482435    //Character limit
    483436
    484     jQuery('#commentform textarea#comment').keypress(function(e) {
     437    $('#commentform textarea#comment').keyup(function(e) {
    485438
    486439           
    487440
    488         jQuery('#commentform textarea#comment').attr('maxlength', 280);
    489 
    490            
    491 
    492           var tval = jQuery('#commentform textarea#comment').val(),
    493 
    494               tlength = tval.length,
    495 
    496               set = 280,
    497 
    498               remain = parseInt(set - tlength);
    499 
    500               jQuery('#charcters_left').html(remain);
    501 
    502     if (remain <= 0 && e.which !== 0 && e.charCode !== 0) {
    503 
    504         jQuery('#commentform textarea').val((tval).substring(0, tlength - 1))
    505 
    506     }
     441        $('#commentform textarea#comment').attr('maxlength', 280); 
     442
     443        var tval = jQuery('#commentform textarea#comment').val(),
     444            tlength = tval.length,
     445            set = 280,
     446            remain = parseInt(set - tlength);
     447
     448        $('#commentform .comment-characters-remaining span').text(remain);
     449
     450        if (remain <= 0 && e.which !== 0 && e.charCode !== 0) {
     451
     452            jQuery('#commentform textarea').val((tval).substring(0, tlength - 1))
     453
     454        }
    507455
    508456    })//jQuery('#commentform textarea#comment').keypress(function(e) {
     
    554502    })
    555503
     504<<<<<<< .mine
     505    $('.reply-vote-share-container').mouseover(function(){
     506        clearTimeout($(this).data('timeout'));     
     507    });
     508=======
    556509    $('.reply-vote-share-container').mouseover(function(){
    557510        clearTimeout(fadeOut);     
    558511    });
    559 
     512>>>>>>> .r1038433
     513
     514<<<<<<< .mine
     515    $('.reply-vote-share-container').mouseleave(function(){
     516            if($(this).children('.comment-social-share').css('opacity') === '1'){
     517                $(this).children('.comment-social-share').stop();
     518                var tempDiv = $(this);
     519                fadeOut = setTimeout(function(){
     520                    tempDiv.children('.comment-social-share').animate({
     521                        opacity: 0
     522                    },300, function(){
     523                        $(this).css('display','none');
     524                    });
     525                },1000)
     526                $(this).data('timeout', fadeOut);
     527            }
     528=======
    560529    $('.reply-vote-share-container').mouseleave(function(){
    561530            if($(this).children('.comment-social-share').css('opacity') === '1'){
     
    571540                   
    572541            }
     542>>>>>>> .r1038433
    573543
    574544           
  • because/trunk/public/class-social-polling.php

    r1032678 r1038437  
    9292        add_action( 'output_social_poll_action', array( $this, 'output_social_poll' ));
    9393       
    94         add_filter('wp_insert_comment', array( $this, 'message_reply_email'),  2, 2 );
     94        // add_filter('wp_insert_comment', array( $this, 'message_reply_email'),  2, 2 );
     95        // add_filter('wp_insert_comment', array( $this, 'message_reply_email'),  2, 2 );
     96
    9597        // do_action( 'wp_insert_comment', $id, $comment );
    9698         
  • because/trunk/public/includes/class-sp_comments.php

    r1037006 r1038437  
    15431543}//CLASS spComments
    15441544
    1545 add_filter('comment_text', 'comment_vote_choice');
    1546 
    1547 function comment_vote_choice( $comment_text){
    1548 
    1549         $comment_ID = get_comment_ID();
     1545// add_filter('comment_text', 'comment_vote_choice');
     1546
     1547// function comment_vote_choice( $comment_text){
     1548
     1549//         $comment_ID = get_comment_ID();
    15501550   
    1551         $retVal = "<p";
     1551//         $retVal = "<span";
    15521552       
    1553         $test = get_comment_meta($comment_ID,"vote_choice",true);
    1554 
    1555         if ($test == "one"){
    1556             $retVal = $retVal . " class='comment_voted_a'";
    1557         }
    1558         elseif ($test == "two") {
    1559             $retVal = $retVal . " class='comment_voted_b'";
    1560         }
     1553//         $test = get_comment_meta($comment_ID,"vote_choice",true);
     1554
     1555//         if ($test == "one"){
     1556//             $retVal = $retVal . " class='comment_voted_a'";
     1557//         }
     1558//         elseif ($test == "two") {
     1559//          $retVal = $retVal . " class='comment_voted_b'";
     1560//         }
    15611561       
    1562         $retVal = $retVal . ">$comment_text</p>";
    1563 
    1564         return $retVal;
     1562//         $retVal = $retVal . ">$comment_text</span>";
     1563
     1564//         return $retVal;
     1565// }
     1566
     1567function comment_vote_choice($comment){
     1568    $vote_choice = get_comment_meta($comment->comment_ID,"vote_choice",true);
     1569    if ($vote_choice == "one"){
     1570        return "comment_voted_a";
     1571    }
     1572    elseif ($vote_choice == "two") {
     1573        return "comment_voted_b";
     1574    }
     1575    else{
     1576        return "";
     1577    }   
    15651578}
    15661579
     
    16611674  <div class="comment-collapse">
    16621675
     1676<<<<<<< .mine
     1677
     1678  <span class="<?php echo comment_vote_choice($comment); ?>">
    16631679  <?php comment_text() ?>
     1680  </span>
    16641681
    16651682 
    16661683
    16671684 
     1685=======
     1686  <?php comment_text() ?>
     1687
     1688 
     1689
     1690 
     1691>>>>>>> .r1038433
    16681692<?php   //Upvote DownVote Actions
    16691693
  • because/trunk/public/includes/templates/sp_comments.php

    r1023962 r1038437  
    9090if ($active){
    9191$args = array(
    92 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" value="abcdefghj">Thanks for your vote! Want to expand on that opinion? We want to know what you think!</textarea></p>'
     92'comment_field' => '<label class="comment-characters-remaining" for"comment"><span id="characters_left">280</span> Characters Left</label>
     93<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" value="abcdefghj">
     94Thanks for your vote! Want to expand on that opinion? We want to know what you think!
     95</textarea></p>'
    9396);
    9497comment_form($args);
  • because/trunk/social-polling.php

    r1037006 r1038437  
    3434
    3535<<<<<<< .mine
    36  * Version:           1.5.1
     36 * Version:           1.5.2
    3737=======
    38  * Version:           1.5.1
     38 * Version:           1.5.2
    3939>>>>>>> .r969865
    4040
Note: See TracChangeset for help on using the changeset viewer.