Plugin Directory

Changeset 535438


Ignore:
Timestamp:
04/24/2012 02:15:06 PM (14 years ago)
Author:
niccolo_tapparo
Message:

version 1.1.4 - pin it & preview

Location:
wordpress-social-ring
Files:
22 added
4 edited

Legend:

Unmodified
Added
Removed
  • wordpress-social-ring/trunk/admin/admin.php

    r476387 r535438  
    99        <h2><?php _e('WordPress Social Ring Settings',WP_SOCIAL_RING); ?></h2>
    1010        <div id="wp-social-ring">
    11             <div class="postbox-container" style="width:70%;margin-right:8px;">
     11            <div class="postbox-container" style="width:70%;">
    1212                <form action="options.php" method="post">
    1313               
     
    4242                </form>
    4343            </div>
    44             <div class="postbox-container">
     44            <div class="postbox-container" style="margin-left:15px;">
    4545                <div>
    4646                    <a target="_blank" href="<?php _e('http://en.altervista.org/create-free-blog.html?ref=socialring',WP_SOCIAL_RING); ?>">
     
    6464}
    6565
    66 add_action('admin_print_styles', 'add_wp_social_ring_css');
    67 function add_wp_social_ring_css() {
     66
     67function add_wp_social_ring_css_js() {
     68   
    6869    wp_enqueue_style( WP_SOCIAL_RING.'-style', WP_SOCIAL_RING_URL.'admin/css/style.css');
     70    wp_enqueue_script( WP_SOCIAL_RING.'_facebook_js', 'http://connect.facebook.net/'.__('en_US', WP_SOCIAL_RING).'/all.js#xfbml=1', array(), false, true);
     71    wp_enqueue_script( WP_SOCIAL_RING.'_gplus_js', 'https://apis.google.com/js/plusone.js', array(), false, true);
     72    wp_enqueue_script( WP_SOCIAL_RING.'_twitter_js', 'http://platform.twitter.com/widgets.js', array(), false, true);
     73    wp_enqueue_script( WP_SOCIAL_RING.'_pin_it_js', 'http://assets.pinterest.com/js/pinit.js', array(), false, true);
    6974}
    7075
     
    142147    // echo the field
    143148    ?>
    144 
    145149        <ul>
    146             <li>
    147                 <span><input id='social_facebook_like_button' name='wp_social_ring_options[social_facebook_like_button]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_facebook_like_button'] == 1) echo "checked"; ?> /></span>
    148                 <span><?php _e('Facebook Like',WP_SOCIAL_RING) ?></span>
    149             </li>
    150             <li>
    151                 <span><input id='social_facebook_send_button' name='wp_social_ring_options[social_facebook_send_button]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_facebook_send_button'] == 1) echo "checked"; ?> /></span>
    152                 <span><?php _e('Facebook Send',WP_SOCIAL_RING) ?></span>
    153             </li>
    154             <li>
    155                 <span><input id='social_facebook_share_button' name='wp_social_ring_options[social_facebook_share_button]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_facebook_share_button'] == 1) echo "checked"; ?> /></span>
    156                 <span><?php _e('Facebook Share',WP_SOCIAL_RING) ?></span>
    157             </li>
    158             <li>
    159                 <span><input id='social_twitter_button' name='wp_social_ring_options[social_twitter_button]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_twitter_button'] == 1) echo "checked"; ?> /></span>
    160                 <span><?php _e('Twitter',WP_SOCIAL_RING) ?></span>
    161             </li>
    162             <li>
    163                 <span><input id='social_google_button' name='wp_social_ring_options[social_google_button]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_google_button'] == 1) echo "checked"; ?> /></span>
    164                 <span><?php _e('Google +1',WP_SOCIAL_RING) ?></span>
     150            <li style="clear:both;">
     151                <div style="float:left;"><input id='social_facebook_like_button' name='wp_social_ring_options[social_facebook_like_button]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_facebook_like_button'], 1); ?> /></div>
     152                <div style="float:left;margin-left:20px;width:150px;"><?php _e('Facebook Like',AVOPT) ?></div>
     153                <div style="float:left;margin-left:20px;"><fb:like href="http://www.facebook.com/pages/DrWordPress/166397626712895" send="false" showfaces="false" width="108" layout="button_count" action="like"/></fb:like></div>
     154            </li>
     155            <li style="clear:both;padding-top:10px;">
     156                <div style="float:left;"><input id='social_facebook_send_button' name='wp_social_ring_options[social_facebook_send_button]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_facebook_send_button'], 1); ?> /></div>
     157                <div style="float:left;margin-left:20px;width:150px;"><?php _e('Facebook Send',AVOPT) ?></div>
     158                <div style="float:left;margin-left:20px;"><fb:like href="http://www.facebook.com/pages/DrWordPress/166397626712895" send="true" showfaces="false" width="164" layout="button_count" action="like"/></fb:like></div>
     159                <div id="fb-root"></div>
     160            </li>
     161            <li style="clear:both;padding-top:10px;">
     162                <div style="float:left;"><input id='social_facebook_share_button' name='wp_social_ring_options[social_facebook_share_button]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_facebook_share_button'], 1); ?> /></div>
     163                <div style="float:left;margin-left:20px;width:150px;"><?php _e('Facebook Share',AVOPT) ?></div>
     164                <div style="float:left;margin-left:20px;"><iframe allowtransparency="true" frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="width: 58px; height: 21px; position: static; left: 0px; top: 0px; visibility: visible; " tabindex="-1" vspace="0" width="100%" src="<?php echo AVOPT_URL; ?>/scripts/share.php?url=<?php echo urlencode('http://wordpress.altervista.org/'); ?>"></iframe></div>
     165            </li>
     166            <li style="clear:both;padding-top:10px;">
     167                <div style="float:left;"><input id='social_twitter_button' name='wp_social_ring_options[social_twitter_button]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_twitter_button'], 1); ?> /></div>
     168                <div style="float:left;margin-left:20px;width:150px;"><?php _e('Twitter',AVOPT) ?></div>
     169                <div style="float:left;margin-left:20px;"><a href="http://twitter.com/share" data-url="<?php echo site_url(); ?>" data-text="<?php _e('I use WordPress Social Ring on my blog', AVOPT); ?>" data-via="dottorwordpress" data-count="horizontal" class="sr-twitter-button twitter-share-button"></a></div>
     170            </li>
     171            <li style="clear:both;padding-top:10px;">
     172                <div style="float:left;"><input id='social_google_button' name='wp_social_ring_options[social_google_button]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_google_button'], 1); ?> /></div>
     173                <div style="float:left;margin-left:20px;width:150px;"><?php _e('Google +1',AVOPT) ?></div>
     174                <div style="float:left;margin-left:20px;"><g:plusone href="<?php _e('http://wordpress.altervista.org/', AVOPT); ?>" size="medium" callback="plusone_vote"></g:plusone></div>
     175            </li>
     176            <li style="clear:both;padding-top:10px;">
     177                <div style="float:left;"><input id='social_pin_it_button' name='wp_social_ring_options[social_pin_it_button]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_pin_it_button'], 1); ?> /></div>
     178                <div style="float:left;margin-left:20px;width:150px;"><?php _e('Pin it',AVOPT) ?></div>
     179                <div style="float:left;margin-left:20px;"><a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(__('http://wordpress.altervista.org/', AVOPT)); ?>&media=<?php echo urlencode('http://wordpress.altervista.org/logo.jpg'); ?>&description=<?php echo urlencode(__('WordPress tutorials, plugin and themes.', AVOPT)." ".site_url()); ?>" class="pin-it-button" count-layout="horizontal"></a></div>
    165180            </li>
    166181        </ul>
    167 
    168182    <?php
    169183}
     
    178192        <ul>
    179193            <li>
    180                 <span><input id='social_on_home' name='wp_social_ring_options[social_on_home]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_on_home'] == 1) echo "checked"; ?> /></span>
     194                <span><input id='social_on_home' name='wp_social_ring_options[social_on_home]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_on_home'], 1); ?> /></span>
    181195                <span><?php _e('Home',WP_SOCIAL_RING) ?></span>
    182196            </li>
    183197            <li>
    184                 <span><input id='social_on_pages' name='wp_social_ring_options[social_on_pages]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_on_pages'] == 1) echo "checked"; ?> /></span>
     198                <span><input id='social_on_pages' name='wp_social_ring_options[social_on_pages]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_on_pages'], 1); ?> /></span>
    185199                <span><?php _e('Pages',WP_SOCIAL_RING) ?></span>
    186200            </li>
    187201            <li>
    188                 <span><input id='social_on_posts' name='wp_social_ring_options[social_on_posts]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_on_posts'] == 1) echo "checked"; ?> /></span>
     202                <span><input id='social_on_posts' name='wp_social_ring_options[social_on_posts]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_on_posts'], 1); ?> /></span>
    189203                <span><?php _e('Posts',WP_SOCIAL_RING) ?></span>
    190204            </li>
    191205            <li>
    192                 <span><input id='social_on_category' name='wp_social_ring_options[social_on_category]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_on_category'] == 1) echo "checked"; ?> /></span>
     206                <span><input id='social_on_category' name='wp_social_ring_options[social_on_category]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_on_category'], 1); ?> /></span>
    193207                <span><?php _e('Categories',WP_SOCIAL_RING) ?></span>
    194208            </li>
    195209            <li>
    196                 <span><input id='social_on_archive' name='wp_social_ring_options[social_on_archive]' type='checkbox' value="1" <?php if($wp_social_ring_options['social_on_archive'] == 1) echo "checked"; ?> /></span>
     210                <span><input id='social_on_archive' name='wp_social_ring_options[social_on_archive]' type='checkbox' value="1" <?php checked($wp_social_ring_options['social_on_archive'], 1); ?> /></span>
    197211                <span><?php _e('Archive',WP_SOCIAL_RING) ?></span>
    198212            </li>
     
    217231    $valid['social_twitter_button'] = (isset( $input['social_twitter_button'])) ? 1 : 0;
    218232    $valid['social_google_button'] = (isset( $input['social_google_button'])) ? 1 : 0;
     233    $valid['social_pin_it_button'] = (isset( $input['social_pin_it_button'])) ? 1 : 0;
    219234    $valid['social_on_home'] = (isset( $input['social_on_home'])) ? 1 : 0;
    220235    $valid['social_on_pages'] = (isset( $input['social_on_pages'])) ? 1 : 0;
     
    231246function register_social_ring_admin_menu() {
    232247
    233     add_menu_page(__('Social Ring settings',WP_SOCIAL_RING),__('Social Ring',WP_SOCIAL_RING),'manage_options',WP_SOCIAL_RING,WP_SOCIAL_RING.'_setting_page',plugins_url('/images/av-16x16.png',__FILE__));
     248    $page = add_menu_page(__('Social Ring settings',WP_SOCIAL_RING),__('Social Ring',WP_SOCIAL_RING),'manage_options',WP_SOCIAL_RING,WP_SOCIAL_RING.'_setting_page',plugins_url('/images/av-16x16.png',__FILE__));
     249    add_action('admin_print_styles-' . $page, 'add_wp_social_ring_css_js');
    234250
    235251}
  • wordpress-social-ring/trunk/includes/library.php

    r471656 r535438  
    140140                $width = 140;
    141141            }
    142             $html .= '<div class="social-ring-button"><fb:like href="'.$url.'" send="'.$send.'" showfaces="false" width="'.$width.'" layout="button_count" action="like"/></fb:like></div>';
     142            $html .= '<div class="social-ring-button"><fb:like href="'.$url.'" width="'.$width.'" send="'.$send.'" showfaces="false" layout="button_count" action="like"/></fb:like></div>';
    143143        } else {
    144144            $html .= '<div class="social-ring-button"><iframe src="http://www.facebook.com/plugins/like.php?app_id=131347983616840&amp;href='.urlencode($url).'&amp;send=false&amp;layout=button_count&amp;width=75&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px;" allowTransparency="true"></iframe></div>';
    145145        }
     146    }
     147   
     148
     149    if($wp_social_ring_options['social_pin_it_button'] == 1) {
     150        $html .= '<div class="social-ring-button"><a href="http://pinterest.com/pin/create/button/?url='.urlencode($url);
     151        $image = social_ring_get_first_image();
     152        if($image > '') {
     153            $html .= '&media='.urlencode($image);
     154        }
     155        $html .= '&description='.urlencode(esc_attr( strip_tags( stripslashes($title)))).'" class="pin-it-button" count-layout="horizontal"></a></div>';
    146156    }
    147157
     
    176186    ?>
    177187        <!-- Social Ring JS Start -->
    178 
    179 <div id="fb-root"></div><script src="http://connect.facebook.net/<?php _e('en_US'); ?>/all.js#xfbml=1"></script>
    180 <script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script>
    181 <script type='text/javascript' src='http://platform.twitter.com/widgets.js'></script>
     188    <div id="fb-root"></div><script src="http://connect.facebook.net/<?php _e('en_US', WP_SOCIAL_RING); ?>/all.js#xfbml=1"></script>
     189    <script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script>
     190    <script type='text/javascript' src='http://platform.twitter.com/widgets.js'></script>
     191        <script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
    182192        <!-- Social Ring JS End -->
    183193<?php
  • wordpress-social-ring/trunk/readme.txt

    r476326 r535438  
    44Tags: Google +1, Facebook, Facebook Like, Facebook Share, Open Graph Meta Tag, Twitter, Retweet, Google+, Social Network
    55Requires at least: 3.0
    6 Tested up to: 3.3
    7 Version: 1.1.3
    8 Stable tag: 1.1.3
     6Tested up to: 3.3.2
     7Version: 1.1.4
     8Stable tag: 1.1.4
    99
    1010WordPress Social Ring adds sharing buttons for Facebook, Twitter and Google+.
     
    3535
    3636== Changelog ==
     37
     38= 1.1.4 =
     39
     40* Added Pin It button
     41* Added button preview on admin page
    3742
    3843= 1.1.3 =
  • wordpress-social-ring/trunk/wp-social-ring.php

    r476320 r535438  
    44Description: Let visitors share posts/pages on Facebook, Twitter and Google+. From admin page you can choose which button display: Facebook Like, Facebook Send, Facebook Share, Google +1 and Twitter.
    55Author: Niccol&ograve; Tapparo
    6 Version: 1.1.3
     6Version: 1.1.4
    77Author URI: http://wordpress.altervista.org/
    88Plugin URI: http://wordpress.altervista.org/en/tag/wordpress-social-ring-en/
     
    1414
    1515register_activation_hook(__FILE__,'social_ring_install');
    16 register_deactivation_hook(__FILE__,'social_ring_uninstall');
    1716
    1817load_plugin_textdomain(WP_SOCIAL_RING, false, dirname(plugin_basename(__FILE__)).'/langs/');
     
    4645            'social_twitter_button' => 0,
    4746            'social_google_button' => 0,
     47            'social_pin_it_button' => 0,
    4848            'social_on_home' => 0,
    4949            'social_on_pages' => 0,
     
    6060}
    6161
    62 function social_ring_uninstall() {
    63 
    64     delete_option(WP_SOCIAL_RING.'_options');
    65 
    66 }
    6762
    6863?>
Note: See TracChangeset for help on using the changeset viewer.