WordPress.org

Plugin Directory

Changeset 813340


Ignore:
Timestamp:
12/01/13 20:39:53 (4 years ago)
Author:
JonBishop
Message:

Removed Digg button
Fixed Pinterest button
Added rules to fix new Pinterest counter values
Added Bitcoin as a donation option
Added Pocket button
Make Socialize admin responsive

Location:
socialize
Files:
36 added
10 edited

Legend:

Unmodified
Added
Removed
  • socialize/trunk/admin/css/socialize-admin.css

    r583766 r813340  
    8282    background-position:-48px 0px; /* works */ 
    8383} 
    84 #socialize-settings-buttons-digg div.socialize-sm-icon, .socialize-settings-buttons-digg-icon{ 
     84#socialize-settings-buttons-pocket div.socialize-sm-icon, .socialize-settings-buttons-pocket-icon{  
    8585    width:16px; 
    8686    background-position:-16px 0px; /* works */ 
     
    119119    border-style: solid; 
    120120    padding: 10px; 
    121     margin-left: 20px; 
     121    display: block; 
     122    margin: 0; 
     123    margin-top: 20px; 
    122124} 
    123125.socialize-admin p label { 
     
    127129    margin-left: 10px; 
    128130} 
     131#socialize-donate .socialize-coinbase { 
     132    text-align: center; 
     133} 
     134#socialize-donate .inside ul { 
     135    text-align: center; 
     136} 
     137#socialize-donate .inside ul > li { 
     138    width: 100%; 
     139    padding: 10px; 
     140    display: inline; 
     141    line-height: 3em; 
     142} 
     143#dashboard-widgets #socialize-settings-container{ 
     144    width: 60%; 
     145} 
     146#dashboard-widgets #socialize-sidebar-container{ 
     147    width: 40%; 
     148} 
     149@media only screen and (max-device-width: 480px) { 
     150    #dashboard-widgets #socialize-settings-container, #dashboard-widgets #socialize-settings-container{ 
     151    width: 100%; 
     152} 
     153} 
  • socialize/trunk/admin/socialize-admin.php

    r665975 r813340  
    225225    function socialize_show_donate() { 
    226226        $content = '<p><strong>Looking for a karmic boost?</strong><br /> 
    227         If you like this plugin please consider donating a few bucks to support its development. If you can\'t spare any change you can also help by giving me a good rating on WordPress.org and tweeting this plugin to your followers. 
    228         <ul> 
    229             <li><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jonbish%40gmail%2ecom&lc=US&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">Donate With PayPal</a></li> 
    230             <li><a target="_blank" href="http://wordpress.org/extend/plugins/socialize/">Give Me A Good Rating</a></li> 
    231             <li><a target="_blank" href="http://twitter.com/?status=WordPress Plugin: Selectively Add Social Bookmarks to Your Posts http://bit.ly/IlCdN (via @jondbishop)">Share On Twitter</a></li> 
     227        If you like this plugin please consider donating a few bucks to support its development. If you can\'t spare any change you can also help by giving me a good rating on WordPress.org and tweeting this plugin to your followers.<br /> 
     228        <div class="socialize-coinbase"> 
     229            <a class="coinbase-button" data-code="a2304c60cbd20f5d872adb46a824e23b" data-button-style="donation_large" href="https://coinbase.com/checkouts/a2304c60cbd20f5d872adb46a824e23b">Donate Bitcoins</a><script src="https://coinbase.com/assets/button.js" type="text/javascript"></script> 
     230        </div> 
     231        <ul> 
     232            <li><a target="_blank" class="button-primary" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jonbish%40gmail%2ecom&lc=US&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">Donate With PayPal</a></li> 
     233            <li><a target="_blank" class="button-primary" href="http://wordpress.org/support/view/plugin-reviews/socialize#postform">Give Me A Good Rating</a></li> 
     234            <li><a target="_blank" class="button-primary" href="http://twitter.com/?status=WordPress Plugin: Selectively Add Social Bookmarks to Your Posts http://bit.ly/IlCdN (via @jondbishop)">Share On Twitter</a></li> 
    232235        </ul></p>'; 
    233236        return self::socialize_postbox('socialize-donate', 'Donate & Share', $content); 
     
    492495 
    493496        $wrapped_content = ""; 
    494         $digg_buttons_content = ""; 
    495497        $twiter_buttons_content = ""; 
    496498        $facebook_buttons_content = ""; 
     
    503505        $yahoo_buttons_content = ""; 
    504506        $linkedin_buttons_content = ""; 
     507        $pocket_buttons_content = ""; 
    505508 
    506509        if (function_exists('wp_nonce_field')) { 
     
    636639 
    637640        // Pinterest 
    638         $pinterest_buttons_content .= '<p>' . __("Choose which Pinterest button to display") . ':<br /> 
     641        $pinterest_buttons_content .= '<p>' . __("Choose where to show the Pin count") . ':<br /> 
    639642                    <select name="pinterest_counter">'; 
    640         foreach (array('vertical', 'horizontal', 'none') as $pinterest_counter) { 
    641             $pinterest_buttons_content .= '<option value="' . $pinterest_counter . '" ' . selected($socialize_settings['pinterest_counter'], $pinterest_counter, false) . '>' . $pinterest_counter . '</option>'; 
     643        foreach (array('Above the button'=>'above', 'Beside the button'=>'beside', 'Not shown'=>'none') as $pinterest_counter_key=>$pinterest_counter) { 
     644            $pinterest_buttons_content .= '<option value="' . $pinterest_counter . '" ' . selected($socialize_settings['pinterest_counter'], $pinterest_counter, false) . '>' . $pinterest_counter_key . '</option>'; 
    642645        } 
    643646        $pinterest_buttons_content .= '</select></p>'; 
    644647        $wrapped_content .= self::socialize_postbox('socialize-settings-buttons-pinterest', 'Pinterest Button Settings', $pinterest_buttons_content); 
     648 
     649        // Pinterest 
     650        $pocket_buttons_content .= '<p>' . __("Choose where to show the Pocket count") . ':<br /> 
     651                    <select name="pocket_counter">'; 
     652        foreach (array('Above the button'=>'vertical"', 'Beside the button'=>'horizontal', 'Not shown'=>'none') as $pocket_counter_key=>$pocket_counter) { 
     653            $pocket_buttons_content .= '<option value="' . $pocket_counter . '" ' . selected($socialize_settings['pocket_counter'], $pocket_counter, false) . '>' . $pocket_counter_key . '</option>'; 
     654        } 
     655        $pocket_buttons_content .= '</select></p>'; 
     656        $wrapped_content .= self::socialize_postbox('socialize-settings-buttons-pocket', 'Pocket Button Settings', $pocket_buttons_content); 
    645657         
    646658        // Buffer 
     
    654666         
    655667        // Google Plus 
    656         $google_plusone_buttons_content .= '<p>' . __("Choose which Google +1 button to display") . ':<br /> 
     668        $google_plusone_buttons_content .= '<p>' . __("Choose which size Google +1 button to display") . ':<br /> 
    657669                    <select name="plusone_style">'; 
    658670        foreach (array('small', 'medium', 'standard', 'tall') as $plusone_style) { 
    659671            $google_plusone_buttons_content .= '<option value="' . $plusone_style . '" ' . selected($socialize_settings['plusone_style'], $plusone_style, false) . '>' . $plusone_style . '</option>'; 
     672        } 
     673        $google_plusone_buttons_content .= '</select></p>'; 
     674        //plusone_annotation 
     675        $google_plusone_buttons_content .= '<p>' . __("Choose which Google +1 annotation type to display") . ':<br /> 
     676                    <select name="plusone_annotation">'; 
     677        foreach (array('inline'=>'inline', 'none'=>'', 'bubble'=>'bubble') as $plusone_annotation_key=>$plusone_annotation) { 
     678            $google_plusone_buttons_content .= '<option value="' . $plusone_annotation . '" ' . selected($socialize_settings['plusone_annotation'], $plusone_annotation, false) . '>' . $plusone_annotation_key . '</option>'; 
    660679        } 
    661680        $google_plusone_buttons_content .= '</select></p>'; 
     
    670689        $linkedin_buttons_content .= '</select></p>'; 
    671690        $wrapped_content .= self::socialize_postbox('socialize-settings-buttons-linkedin', 'LinkedIn Button Settings', $linkedin_buttons_content); 
    672          
    673         // Digg 
    674         $digg_buttons_content .= '<p>' . __("Choose which Digg button to display") . ':<br /> 
    675                     <select name="digg_size">'; 
    676         foreach (array('Wide' => 'DiggWide', 'Medium' => 'DiggMedium', 'Compact' => 'DiggCompact', 'Icon' => 'DiggIcon') as $digg_size => $digg_size_value) { 
    677             $digg_buttons_content .= '<option value="' . $digg_size_value . '" ' . selected($socialize_settings['digg_size'], $digg_size_value, false) . '>' . $digg_size . '</option>'; 
    678         } 
    679         $digg_buttons_content .= '</select></p>'; 
    680         $wrapped_content .= self::socialize_postbox('socialize-settings-buttons-digg', 'Digg Button Settings', $digg_buttons_content); 
    681691 
    682692        self::socialize_admin_wrap('Socialize: Button Settings', $wrapped_content); 
     
    772782                    $socialize_settings['plusone_style'] = $_POST['plusone_style']; 
    773783                } 
    774                 if (isset($_POST['digg_size'])) { 
    775                     $socialize_settings['digg_size'] = $_POST['digg_size']; 
    776                 } 
    777784                if (isset($_POST['yahoo_badgetype'])) { 
    778785                    $socialize_settings['yahoo_badgetype'] = $_POST['yahoo_badgetype']; 
     
    786793                if (isset($_POST['buffer_counter'])) { 
    787794                    $socialize_settings['buffer_counter'] = $_POST['buffer_counter']; 
     795                } 
     796                if (isset($_POST['pocket_counter'])) { 
     797                    $socialize_settings['pocket_counter'] = $_POST['pocket_counter']; 
    788798                } 
    789799 
     
    840850            <input type="submit" name="socialize_option_submitted" class="button-primary" value="Save Changes" /> 
    841851            <span class="socialize-warning"> 
     852                <strong>Warning!</strong> The following button will update all posts, new and old, with your new default button settings. Use the dropdown to just update buttons, call to action text or both.<br /> 
    842853                <select name="socialize_default_type">'; 
    843854        foreach (array('Buttons and Call to Action' => 'buttons/cta', 'Buttons' => 'buttons', 'Call to Action' => 'cta') as $socialize_default_name => $socialize_default_type) { 
     
    10251036                <form method="post" action=""> 
    10261037                    <div id="dashboard-widgets" class="metabox-holder"> 
    1027                         <div class="postbox-container" style="width:60%;"> 
     1038                        <div class="postbox-container" id="socialize-settings-container"> 
    10281039                            <div class="meta-box-sortables ui-sortable"> 
    10291040        <?php 
     
    10351046                            </div> 
    10361047                        </div> 
    1037                         <div class="postbox-container" style="width:40%;"> 
     1048                        <div class="postbox-container" id="socialize-sidebar-container"> 
    10381049                            <div class="meta-box-sortables ui-sortable"> 
    10391050        <?php 
  • socialize/trunk/frontend/css/socialize.css

    r583766 r813340  
    7171/*Delicious Code*/ 
    7272.delicious-button{ 
    73     margin: 0 !important; 
     73    margin: 0 auto !important; 
    7474    padding: 0 !important; 
    7575    height:60px; 
  • socialize/trunk/frontend/js/floating.js

    r583766 r813340  
    22jQuery(document).ready(function () { 
    33    var socialize_floating = jQuery('.socialize-floating'); 
    4     var iw = jQuery('body').innerWidth(); 
    5     if(iw>400){ 
    6         socialize_floating.css({ 
    7             'position' : 'absolute' 
    8         }).delay(1000).fadeIn(600); 
     4    if(socialize_floating.length>0){ 
     5        var iw = jQuery('body').innerWidth(); 
     6        if(iw>400){ 
     7            socialize_floating.css({ 
     8                'position' : 'absolute' 
     9            }).delay(1000).fadeIn(600); 
     10        } 
     11        jQuery.event.add(window, "resize", socialize_resize); 
     12        jQuery.event.add(window, "scroll", socialize_scroll); 
    913    } 
    10     jQuery.event.add(window, "resize", socialize_resize); 
    11     jQuery.event.add(window, "scroll", socialize_scroll); 
     14 
    1215    function socialize_scroll(){ 
    1316        var topPadding = 30; 
  • socialize/trunk/frontend/js/plusone.js

    r559210 r813340  
    11(function() { 
    2     var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; 
    3     po.src = 'https://apis.google.com/js/plusone.js'; 
     2    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; 
     3    po.src = 'https://apis.google.com/js/platform.js'; 
    44    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); 
    55})(); 
  • socialize/trunk/frontend/socialize-services.php

    r583767 r813340  
    140140                } 
    141141                $plusone_style = $socialize_settings['plusone_style']; 
     142                $plusone_annotation = $socialize_settings['plusone_annotation']; 
    142143                break; 
    143144            case "official": 
    144145                $plusone_style = $service_options['plusone_style']; 
     146                $plusone_annotation = $service_options['plusone_annotation']; 
    145147                break; 
    146148        } 
    147149 
    148150        self::enqueue_js('plus-one-button', SOCIALIZE_URL . "frontend/js/plusone.js", $socialize_settings); 
    149         $buttonCode = '<g:plusone size="' . $plusone_style . '" href="' . get_permalink() . '"></g:plusone>'; 
     151 
     152        $buttonCode = '<div class="g-plusone" data-size="' . $plusone_style . '" data-href="' . get_permalink() . '"'; 
     153        if(!empty($plusone_annotation)){ 
     154            $buttonCode .=' data-annotation="'.$plusone_annotation.'"'; 
     155        } 
     156        $buttonCode .='></div>'; 
     157 
    150158        $buttonCode = apply_filters('socialize-plusone', $buttonCode); 
    151         return $buttonCode; 
    152     } 
    153  
    154     // Create Digg Button 
    155     function createSocializeDigg($service = "", $service_options = array(), $socialize_settings = null) { 
    156         switch ($service) { 
    157             case "": 
    158                 if (!isset($socialize_settings)) { 
    159                     $socialize_settings = socializeWP::get_options(); 
    160                 } 
    161                 $digg_size = $socialize_settings['digg_size']; 
    162                 break; 
    163             case "official": 
    164                 $digg_size = $service_options['digg_size']; 
    165                 break; 
    166         } 
    167  
    168         $inlinescript = 
    169                 '<script type="text/javascript">'; 
    170         $inlinescript .= 
    171                 "<!--  
    172         (function() { 
    173         var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0]; 
    174         s.type = 'text/javascript'; 
    175         s.async = true; 
    176         s.src = 'http://widgets.digg.com/buttons.js'; 
    177         s1.parentNode.insertBefore(s, s1); 
    178         })(); 
    179         //--> 
    180         </script>"; 
    181         self::enqueue_script($inlinescript); 
    182         $buttonCode = 
    183                 '<a class="DiggThisButton ' . $digg_size . '" href="http://digg.com/submit?url=' . urlencode(get_permalink()) . '"></a>'; 
    184         $buttonCode = apply_filters('socialize-digg', $buttonCode); 
    185159        return $buttonCode; 
    186160    } 
     
    418392        } 
    419393        self::enqueue_script('<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>'); 
    420         //self::enqueue_js('pinterest-button', 'http://assets.pinterest.com/js/pinit.js', $socialize_settings); 
    421394 
    422395        $buttonCode = '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink()) . '&'; 
     
    427400        } 
    428401        $buttonCode .= '&description=' . urlencode(get_the_title()); 
    429         $buttonCode .= '" class="pin-it-button" count-layout="' . $pinterest_counter . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>'; 
     402        $buttonCode .= '" data-pin-do="buttonPin" data-pin-config="' . $pinterest_counter . '" data-pin-height="28"><img border="0" src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_28.png" title="Pin It" /></a>'; 
     403 
     404        if($pinterest_counter == "above"){ 
     405            $buttonCode = '<div style="margin-top:40px;">' . $buttonCode . '</div>'; 
     406        } 
    430407 
    431408        $buttonCode = apply_filters('socialize-pinterest', $buttonCode); 
     409        return $buttonCode; 
     410    } 
     411 
     412    // Create Pocket button 
     413    function createSocializePocket($service = "", $service_options = array(), $socialize_settings = null) { 
     414        if (!isset($socialize_settings)) { 
     415            $socialize_settings = socializeWP::get_options(); 
     416        } 
     417        global $post; 
     418        switch ($service) { 
     419            case "": 
     420                if (!isset($socialize_settings)) { 
     421                    $socialize_settings = socializeWP::get_options(); 
     422                } 
     423                $pocket_counter = $socialize_settings['pocket_counter']; 
     424                break; 
     425            case "official": 
     426                $pocket_counter = $service_options['pocket_counter']; 
     427                break; 
     428        } 
     429 
     430        $buttonCode = '<a data-pocket-label="pocket" data-pocket-count="' . $pocket_counter . '" data-save-url="' . urlencode(get_permalink()) .'" class="pocket-btn" data-lang="en"></a>'; 
     431        $buttonCode .= '<script type="text/javascript">!function(d,i){if(!d.getElementById(i)){var j=d.createElement("script");j.id=i;j.src="https://widgets.getpocket.com/v1/j/btn.js?v=1";var w=d.getElementById(i);d.body.appendChild(j);}}(document,"pocket-btn-js");</script>'; 
     432 
     433        $buttonCode = apply_filters('socialize-pocket', $buttonCode); 
    432434        return $buttonCode; 
    433435    } 
     
    500502                'callback' => array(__CLASS__, 'createSocializeFacebook') 
    501503            ), 
    502             'Digg' => array( 
    503                 'inline' => 3, 
    504                 'action' => 13,  
    505                 'callback' => array(__CLASS__, 'createSocializeDigg') 
    506             ), 
    507504            'Sphinn' => array( 
    508505                'inline' => 4, 
     
    549546                'action' => 19,  
    550547                'callback' => array(__CLASS__, 'createSocializeBuffer') 
     548            ), 
     549            'Pocket' => array( 
     550                'inline' => 28, 
     551                'action' => 29,  
     552                'callback' => array(__CLASS__, 'createSocializePocket') 
    551553            ) 
    552554        ); 
  • socialize/trunk/frontend/socialize-shortcodes.php

    r583766 r813340  
    1313                break; 
    1414            case 'digg': 
    15                 return SocializeServices::createSocializeDigg(); 
     15                return ''; /* Leaving for backward compat */ 
    1616                break; 
    1717            case 'sphinn': 
     
    4242                return SocializeServices::createSocializePinterest(); 
    4343                break; 
     44            case 'pocket': 
     45                return SocializeServices::createSocializePocket(); 
     46                break; 
    4447        } 
    4548} 
  • socialize/trunk/readme.txt

    r666054 r813340  
    22Contributors: JonBishop 
    33Donate link: http://www.jonbishop.com/donate/ 
    4 Tags:  socialize, bookmark, post, posts, admin, page, digg, facebook, twitter, pinterest, buffer, bufferapp, delicious, digg, seo, button, google, sharing, stumbleupon, posting, saving, sharethis, share, bookmarking, shareaholic, sharing buttons menu, social, social bookmarking, reddit, sexysharing buttons, mu, sphinn, dzone, meta, linkedin, + one, +1, plus 1, plus one, addthis, addtoany, google plus, buddypress 
     4Tags:  socialize, bookmark, post, posts, admin, page, digg, facebook, twitter, pinterest, buffer, bufferapp, delicious, digg, seo, button, google, sharing, stumbleupon, posting, saving, sharethis, share, bookmarking, shareaholic, sharing buttons menu, social, social bookmarking, reddit, sexysharing buttons, mu, sphinn, dzone, meta, linkedin, + one, +1, plus 1, plus one, addthis, addtoany, google plus, buddypress, pocket 
    55Requires at least: 2.7 
    6 Tested up to: 3.5.1 
    7 Stable tag: 2.2.3 
     6Tested up to: 3.8 
     7Stable tag: 2.3 
    88 
    99Provides an easy way to selectively add actionable social sharing buttons to your posts content or below the post in a 'Call To Action' box. 
     
    7979== Changelog == 
    8080 
    81 The current version is 2.2.3 (2013.02.09) 
     81The current version is 2.3 (2013.10.01) 
     82 
     83= 2.3 (2013.10.01) = 
     84* Removed Digg button 
     85* Fixed Pinterest button 
     86* Added rules to fix new Pinterest counter values 
     87* Added Bitcoin as a donation option 
     88* Added Pocket button 
     89* Make Socialize admin responsive 
    8290 
    8391= 2.2.3 (2013.02.09) = 
  • socialize/trunk/socialize.php

    r666054 r813340  
    44  Plugin URI: http://www.jonbishop.com/downloads/wordpress-plugins/socialize/ 
    55  Description: Adds actionable social sharing buttons to your site 
    6   Version: 2.2.3 
     6  Version: 2.3 
    77  Author: Jon Bishop 
    88  Author URI: http://www.jonbishop.com 
     
    7272            $tmp = array( 
    7373                "socialize_installed" => "on", 
    74                 "socialize_version" => "26", 
     74                "socialize_version" => "27", 
    7575                "socialize_alert_bg" => "#FFEAA8", 
    7676                "socialize_alert_border_size" => "2px", 
     
    114114                "su_type" => "5", 
    115115                "buzz_style" => "normal-count", 
     116                "plusone_annotation" => "", 
    116117                "plusone_style" => "tall", 
    117118                "digg_size" => "DiggMedium", 
     
    130131                "fb_sendbutton" => "false", 
    131132                "socialize_button_display"  => "in", 
    132                 "socialize_out_margin" => "-105" 
     133                "socialize_out_margin" => "-105", 
     134                "pocket_counter"=>"vertical" 
    133135            ); 
     136            update_option('socialize_settings10', $tmp); 
     137        } 
     138        // 2.3 update 
     139        if (in_array($tmp['pinterest_counter'], array('vertical', 'horizontal'))){ 
     140            if($tmp['pinterest_counter'] == 'horizontal'){ 
     141                $tmp['pinterest_counter'] = 'beside'; 
     142            } else { 
     143                $tmp['pinterest_counter'] = 'above'; 
     144            } 
     145            $tmp['plusone_annotation'] = ''; 
     146            $tmp['pocket_counter'] = 'vertical'; 
    134147            update_option('socialize_settings10', $tmp); 
    135148        } 
Note: See TracChangeset for help on using the changeset viewer.