Plugin Directory

Changeset 1037006


Ignore:
Timestamp:
12/02/2014 09:09:22 PM (11 years ago)
Author:
tjsantilo
Message:

added social sharing to comments

Location:
because/trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • because/trunk/README.txt

    r1032795 r1037006  
    77Tested up to: 4.0
    88<<<<<<< .mine
    9 Stable tag: 1.5.0
     9Stable tag: 1.5.1
    1010=======
    11 Stable tag: 1.5.0
     11Stable tag: 1.5.1
    1212>>>>>>> .r969865
    1313License: GPLv2 or later
  • because/trunk/public/assets/css/public.css

    r1032802 r1037006  
    456456}
    457457
     458.comment-social-share{
     459    display: inline-block;
     460    opacity: 0;
     461}
     462
     463.comment-body a img.social-share-button{
     464    height: 13px;
     465    margin: 0 0 3px 10px;
     466}
     467
    458468/*comment body text*/
    459469.comment-awaiting-moderation{
     
    465475    margin: 5px 0 !important;
    466476    text-align: left;
    467    
    468     /*word-wrap:break-word;*/
    469477}
    470478
    471479.odd, .even{
    472480    background: none!important;
    473 }
    474 
    475 .comment-social-share{
    476     display: inline-block;
    477     opacity: 0;
    478481}
    479482
  • because/trunk/public/assets/js/public.js

    r1032795 r1037006  
    534534    })
    535535
    536    
    537 
    538    
    539 
    540    
    541 
    542    
    543 
    544    
    545 
    546    
    547 
    548    
     536    // Comment sharing javascript
     537
     538    var fadeOut = "";
     539
     540    $('.share-anchor').mouseover(function(){
     541        $(this).siblings('.comment-social-share').stop();
     542        $(this).siblings('.comment-social-share').css('display','inline-block').animate({
     543            opacity: 1
     544        }, 300);
     545    })
     546
     547    $('.share-anchor').click(function(){
     548        clearTimeout(fadeOut);
     549
     550        $(this).siblings('.comment-social-share').stop();
     551        $(this).siblings('.comment-social-share').css('display','inline-block').animate({
     552            opacity: 1
     553        }, 300);
     554    })
     555
     556    $('.reply-vote-share-container').mouseover(function(){
     557        clearTimeout(fadeOut);     
     558    });
     559
     560    $('.reply-vote-share-container').mouseleave(function(){
     561            if($(this).children('.comment-social-share').css('opacity') === '1'){
     562                $(this).children('.comment-social-share').stop();
     563                var tempDiv = $(this);
     564                fadeOut = setTimeout(function(){
     565                    tempDiv.children('.comment-social-share').animate({
     566                        opacity: 0
     567                    },300, function(){
     568                        $(this).css('display','none');
     569                    });
     570                },700)
     571                   
     572            }
     573
     574           
     575    })
    549576
    550577       
  • because/trunk/public/includes/class-sp_comments.php

    r1032795 r1037006  
    17221722
    17231723     
    1724       <!-- <span class="comment-pipe">|</span>
    1725       <a href="#">Share</a>
    1726       <div class="comment-social-share">aaa</div> -->
     1724        <span class="comment-pipe">|</span>
     1725        <a href="#" class="share-anchor" onclick="return false;">Share</a>
     1726        <div class="comment-social-share">
     1727                <a href="<?php
     1728                    echo 'https://www.facebook.com/sharer/sharer.php?app_id=113869198637480&sdk=joey&u=' . urlencode(htmlspecialchars( get_comment_link( $comment->comment_ID ) )) . '&display=popup&ref=plugin';
     1729
     1730                ?>" target="_blank">
     1731                    <?php
     1732                        echo '<img src="' . plugins_url('../../assets/fb.png', __FILE__) . '" class="social-share-button">'
     1733
     1734                    ?>
     1735                </a>
     1736                <a href="<?php
     1737                    echo 'https://twitter.com/intent/tweet?text=' . urlencode(htmlspecialchars( get_comment_link( $comment->comment_ID ) )) . urlencode(' I just commented on "' . get_the_title() . '"');
     1738                ?>" target="_blank">
     1739                    <?php
     1740                        echo '<img src="' . plugins_url('../../assets/twit.png', __FILE__) . '" class="social-share-button">'
     1741                ?>
     1742                </a>
     1743            <a href="https://plus.google.com/share?url=<?php echo urlencode(htmlspecialchars( get_comment_link( $comment->comment_ID ) )) ?>" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
     1744                    <?php
     1745                        echo '<img src="' . plugins_url('../../assets/gplus.png', __FILE__) . '" class="social-share-button">'
     1746                ?>
     1747                </a>
     1748        </div>
    17271749
    17281750  </div>
  • because/trunk/social-polling.php

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