Plugin Directory

Changeset 514676


Ignore:
Timestamp:
03/05/2012 02:05:57 PM (14 years ago)
Author:
andykillen
Message:

release 1.80.1

Location:
share-and-follow
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • share-and-follow/tags/1.60.1/css/pinterest.css

    r514573 r514676  
    11.make-relative{position:relative}
    22.make-relative > img,.make-relative > a img ,.make-relative > a {float:none !important ;z-index: 100}
    3 a.pin-it-image-button {position: absolute;bottom:25px;right:25px;z-index:200}
     3a.pin-it-image-button {position: absolute;bottom:15px;right:15px;z-index:200;display:block; height:24px;width:24px; background:transparent url(../default/24/pinterest.png) no-repeat}
     4a.pin-it-image-button span {display:none}
  • share-and-follow/tags/1.60.1/js/add-pins-to-images.js

    r514571 r514676  
    1414                // $(this).addClass('make-relative');
    1515                thisurl =  window.location;
    16                 thisimageurl = $(this).attr('src');
    17                 attach_pin_to_image($(this), thisurl, thisimageurl );
     16                thisimageurl = jQuery(this).attr('src');
     17                attach_pin_to_image(jQuery(this), thisurl, thisimageurl );
    1818               
    1919             });
     
    2323                // $(this).addClass('make-relative');
    2424                thisurl =  window.location;
    25                 thisimageurl = $(this).attr('src');
    26                 attach_pin_to_image($(this), thisurl, thisimageurl );
     25                thisimageurl = jQuery(this).attr('src');
     26                attach_pin_to_image(jQuery(this), thisurl, thisimageurl );
    2727             });
    2828              break;
     
    3232
    3333function attach_pin_to_image(obj, pageurl, imageurl ){
    34                 pin = "<a href='http://pinterest.com/pin/create/button/?url=" + encodeURIComponent(pageurl) + "&media=" + encodeURIComponent(imageurl) + "' class='pin-it-image-button' >Pin It</a>";
     34                pin = "<a href='http://pinterest.com/pin/create/button/?url=" + encodeURIComponent(pageurl) + "&media=" + encodeURIComponent(imageurl) + "' target='_blank' class='pin-it-image-button' ><span>Pin It</span></a>";
    3535                var check_float = jQuery(obj).css('float');
    3636                floated = ' no-float';
  • share-and-follow/trunk/admin-interactive.php

    r514573 r514676  
    271271                  <table class="like">
    272272                    <tr>
    273                         <th><label for="googleplus_locations"><?php _e('Choose the locations where you want to show the pinterest button', 'share-and-follow') ?></label></th>
     273                        <th><label for="pinterest_locations"><?php _e('Choose the locations where you want to show the pinterest button', 'share-and-follow') ?></label></th>
    274274                        <td><?php $args =array('pinterest_topleft','pinterest_topright','pinterest_bottom'); ?>
    275275                            <?php foreach ($args as $locations) { ?>
     
    286286                           <select  name="pinterest_style" id="pinterest_style" style="width:200px">
    287287                            <?php $args =array('none' =>'no count', 'vertical'=>'vertical count', 'horizontal'=>'horizontal count'); ?>
    288                             <?php foreach ($args as $style => $value) { ?>
     288                            <?php foreach ($args as $value => $style) { ?>
    289289                                    <option value="<?php echo $value; ?>" <?php if ($value == $c->_options['pinterest_style']){echo 'selected="selected"';} ?>><?php echo $style; ?></option>
     290                            <?php } ?>
     291                            </select>
     292                        </td>
     293                    </tr>
     294
     295                      <tr>
     296                        <th><label for="pinterest_images"><?php _e('Show the pinterest icons on images for per image sharing', 'share-and-follow') ?></label><br /><small>Works automatically for all images added to the wordpress media library, or those given the class of .pin-it</small></th>
     297                        <td> <select  name="pinterest_images" id="pinterest_images" style="width:200px">
     298                            <?php $args =array('yes','no'); ?>
     299                            <?php foreach ($args as $value) { ?>
     300                                    <option value="<?php echo $value; ?>" <?php if ($value == $c->_options['pinterest_images']){echo 'selected="selected"';} ?>><?php echo $value; ?></option>
     301                            <?php } ?>
     302                            </select>
     303                        </td>
     304                    </tr>
     305
     306                                          <tr>
     307                        <th><label for="pins_to_add"><?php _e('Show on all images or those with the class of .pin-it only', 'share-and-follow') ?></label></th>
     308                        <td> <select  name="pins_to_add" id="pins_to_add" style="width:200px">
     309                            <?php $args =array('all','class'); ?>
     310                            <?php foreach ($args as $value) { ?>
     311                                    <option value="<?php echo $value; ?>" <?php if ($value == $c->_options['pins_to_add']){echo 'selected="selected"';} ?>><?php echo $value; ?></option>
    290312                            <?php } ?>
    291313                            </select>
  • share-and-follow/trunk/allsites.php

    r510851 r514676  
    627627     'pinterest' => array
    628628        (
    629             'service' => 'follow',
    630            
     629            'service' => 'share,follow',
     630            'share_url'=>'http://pinterest.com/pin/create/button/?url=URI&media=IMAGE',
    631631            'sprites' => array
    632632                (
  • share-and-follow/trunk/defaults.php

    r514573 r514676  
    3333                                'follow_dailymotion'=>'',               'follow_soundcloud'=>'',                 'follow_vimeo'=>'',                     'follow_coconex' => '',
    3434                                'follow_rss'=>'yes',                    'follow_youtube'=>'',                    'tab_size'=>'24',                       'css_images'=>'no',
    35                                
     35                                'pinterest'=>'',                        'pinterest_share_text'=>'Pin it on pinterest', 'pinterest_popup_text'=>'Pin this BLOG : TITLE on Pinterest',
    3636                                'wp_post'=>'yes',                       'wp_page'=>'yes',                        'wp_home'=>'yes',                       'wp_archive'=>'yes',
    3737                                'wp_author'=>'yes',                     'bit_ly'=>'',                            'bit_ly_code'=>'',                      'follow_foursquare'=>'',
     
    141141                                'yahoo_buzz_share_text'=>__('Buzz it up','share-and-follow'),
    142142                                // 'google_buzz_share_text'=>__('Buzz it up','share-and-follow'),
     143                                'google_buzz_link'=>__('Buzz it up','share-and-follow'),
    143144                                'yahoo_buzz_link_text'=>__('Follow me','share-and-follow'),
    144145                                'lastfm_link_text'=>__('Check my tunes','share-and-follow'),
     
    186187                               'googleplus_lang'=>'en-US', 'googleplus_style'=>'inline','googleplus_size'=>'tall','googleplus_topleft'=>'','googleplus_topright'=>'','googleplus_bottom'=>'','googleplus_wpsc_top_of_products_page'=>'', 'googleplus_wpsc_product_before_description'=>'', 'googleplus_wpsc_product_addon_after_descr'=>'',
    187188                               'pinterest_style'=>'vertical','pinterest_topleft'=>'','pinterest_topright'=>'','pinterest_bottom'=>'','pinterest_wpsc_top_of_products_page'=>'', 'pinterest_wpsc_product_before_description'=>'', 'pinterest_wpsc_product_addon_after_descr'=>'',
     189                               'pinterest_images'=>'no','pins_to_add'=>'all',
    188190
    189191
  • share-and-follow/trunk/readme.txt

    r510851 r514676  
    66Requires at least: 3.2
    77Tested up to: 3.3.1
    8 Stable tag: 1.70.3
     8Stable tag: 1.80.1
    99
    1010Add Share Icons, Follow Links, Facebook Like, Twitter Tweet and other buttons in the way you want. Simple & adaptable social networking.
     
    4646* Choice between CSS sprites for faster loading times, or CSS single images so you can have your own icon replacements
    4747* Optional subscription to different icon sets via a content delivery network (CDN), for choice of icon sets and improved website speed.  Currently 47 icon sets to choose from
     48* Can have Pinterest icon in bottom right of any image inserted into the content via the wordpress media library or ones with the class of "pin-it" so that individual image sharing is possible
    4849
    4950People time and again have said how much they enjoy using this plugin and how it does exactly what they want with the minimum of fuss or difficult configuration.  A very simple bookmarking solution that offers a discrete clean layout that does not brand your website in it's image.
     
    314315
    315316== Changelog ==
     317
     318= 1.80.1 =
     319Added Pinterest sharing via share button, interactive share and also via on image sharing.
    316320
    317321= 1.70.3 =
     
    872876
    873877== Upgrade Notice ==
     878= 1.80.1 =
     879Added Pinterest sharing via share button, interactive share and also via on image sharing.
    874880
    875881= 1.70.3 =
  • share-and-follow/trunk/share-and-follow.php

    r514573 r514676  
    33Plugin Name: Share and Follow
    44Plugin URI: http://share-and-follow.com/wordpress-plugin/
    5 Version: 1.70.3
     5Version: 1.80.1
    66Author: Andy Killen
    77Author URI: http://phat-reaction.com
     
    325325
    326326               function addHeaderCodeEndBlock () {
     327
    327328
    328329                    if (!empty ($this->_options['width_of_page_minimum'])){
     
    353354
    354355                function addHeaderCode() {
     356
     357                    if($this->_options['pinterest_images']=='yes'){
     358                           wp_enqueue_script('jquery');
     359                   }
     360
    355361                    if ($this->_options['bookmark']=="yes"){
    356362                        wp_enqueue_script('sf-bookmarks',  plugin_dir_url(__FILE__ ) . "js/browser-check-for-bookmarks.js", array(), 1, true);
     
    636642                }
    637643
    638                 function doPinterestScript($postid, $url = '', $style=''){
     644                function doPinterestScript($postid, $style=''){
    639645                    add_action('wp_footer', array( &$this, 'pinterest_footer_code'), 100);
    640646                    $page_url = urlencode(get_permalink($postid));
    641647                    $image_url = $this->getPostImage($postid);
    642                     if ($style==''){$style=$this->_options['pinterest_style'];}
    643                     return "<a href='http://pinterest.com/pin/create/button/?url=" . $page_url . "&media=" . $image_url . "' class='pin-it-button' count-layout='".$tyle."'>Pin It</a>";
     648                    if ($style==''){$style = $this->_options['pinterest_style'];}
     649                    return "<a href='http://pinterest.com/pin/create/button/?url=" . $page_url . "&media=" . $image_url . "' class='pin-it-button' count-layout='".$style."'>Pin It</a>";
    644650                }
    645651
     
    935941                // replace keywords in URL so that it shares properly, check for php4 as html_entity_decode is a bug on there.
    936942                //
    937                 function replaceKeyWordsInURL($share_url,$page_link, $page_title, $page_excerpt ){
     943                function replaceKeyWordsInURL($share_url,$page_link, $page_title, $page_excerpt, $id = '' ){
     944                        global $post;
    938945                        $share_url = str_replace('EXCERPT' ,urlencode($page_excerpt), $share_url );
    939946                        $share_url = str_replace('TITLE' ,urlencode(html_entity_decode(str_replace('&#038;','and',$page_title), ENT_QUOTES, 'UTF-8')), $share_url );
    940947                        $share_url = str_replace('URI' ,urlencode($page_link), $share_url );
     948                        $share_url = str_replace('IMAGE' ,urlencode($this->getPostImage($id)), $share_url );
    941949                    return $share_url;
    942950                }
     
    10611069                      case "no":
    10621070                        if ($css_images=="yes"){
    1063                             $attributes .= " href='".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt )."' ";
     1071                            $attributes .= " href='".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt, $page_id )."' ";
    10641072                            $attributes .= $this->doImageStyle($css_class, $size, $list_style);
    10651073                            $result = "<a ".$attributes ." ><span class=\"head\">".stripslashes  ($share_text)."</span></a>";
    10661074                            }
    10671075                        else{
    1068                             $attributes .= " href='".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt )."' ";
     1076                            $attributes .= " href='".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt, $page_id )."' ";
    10691077                            $result="<a ". $attributes ." >";
    10701078                             if ($this->_options['list_style']!='text_only'){
     
    10981106                         break;
    10991107                     case "clean":
    1100                          if ($css_images=="yes"){$result = "<a " . $attributes . "   ".$this->doImageStyle($css_class, $size, $list_style)." href='".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt )."' ><span class='head'>".stripslashes($share_text)."</span></a>";}
    1101                          else{$result.="<a " . $attributes . " href=\"".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt )."\"  ><img src=\"".WP_PLUGIN_URL."/share-and-follow/images/blank.gif\" style=\"background: transparent url(".$this->getIconSprites( $size).") no-repeat;padding:0;margin:0;height:".$size."px;width:".$size."px;background-position:".str_replace(" ", "px ",$sites[$css_class]['sprites'][$size])."px\" class=\"image-".$size."\" height=\"".$size."\"  width=\"".$size."\"  alt=\"".$image_name."\"/> <span class=\"head\">".stripslashes ($share_text)."</span></a>";}
     1108                         if ($css_images=="yes"){$result = "<a " . $attributes . "   ".$this->doImageStyle($css_class, $size, $list_style)." href='".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt, $page_id )."' ><span class='head'>".stripslashes($share_text)."</span></a>";}
     1109                         else{$result.="<a " . $attributes . " href=\"".$this->replaceKeyWordsInURL($sites[$css_class]['share_url'], $page_link, $page_title, $page_excerpt, $page_id )."\"  ><img src=\"".WP_PLUGIN_URL."/share-and-follow/images/blank.gif\" style=\"background: transparent url(".$this->getIconSprites( $size).") no-repeat;padding:0;margin:0;height:".$size."px;width:".$size."px;background-position:".str_replace(" ", "px ",$sites[$css_class]['sprites'][$size])."px\" class=\"image-".$size."\" height=\"".$size."\"  width=\"".$size."\"  alt=\"".$image_name."\"/> <span class=\"head\">".stripslashes ($share_text)."</span></a>";}
    11021110                         break;
    11031111                     case "bookmark":
     
    19141922
    19151923             function pin_it(){
     1924
     1925if($this->_options['pinterest_images']=='yes'){
    19161926                 echo "<script type='text/javascript' src='" .  WP_PLUGIN_URL ."/share-and-follow/js/add-pins-to-images.js'></script>";
    19171927                 ?>
    1918 <script type='text/javascript'>
    1919 
    1920         var headID = document.getElementsByTagName("head")[0];
    1921         var cssNode = document.createElement('link');
    1922         cssNode.type = 'text/css';
    1923         cssNode.rel = 'stylesheet';
    1924         cssNode.href = '<?php echo WP_PLUGIN_URL; ?>/share-and-follow/css/pinterest.css';
    1925         cssNode.media = 'screen';
    1926         headID.appendChild(cssNode);
    1927 
    1928   jQuery(document).ready(function() {
    1929      
    1930       add_pins();
    1931 });
    1932 </script>
     1928                <script type='text/javascript'>
     1929
     1930                        var headID = document.getElementsByTagName("head")[0];
     1931                        var cssNode = document.createElement('link');
     1932                        cssNode.type = 'text/css';
     1933                        cssNode.rel = 'stylesheet';
     1934                        cssNode.href = '<?php echo WP_PLUGIN_URL; ?>/share-and-follow/css/pinterest.css';
     1935                        cssNode.media = 'screen';
     1936                        headID.appendChild(cssNode);
     1937
     1938                  jQuery(document).ready(function() {
     1939
     1940<?php if($this->_options['pins_to_add']=='all'){ ?>
     1941              add_pins();
     1942<?php }else{ ?>
     1943              add_pins('class');
     1944<?php } ?>
     1945
     1946                });
     1947                </script>
    19331948 
    19341949
    19351950
    19361951                 <?php
    1937 
     1952                   }
    19381953             }
    19391954
Note: See TracChangeset for help on using the changeset viewer.