Changeset 514676
- Timestamp:
- 03/05/2012 02:05:57 PM (14 years ago)
- Location:
- share-and-follow
- Files:
-
- 7 edited
-
tags/1.60.1/css/pinterest.css (modified) (1 diff)
-
tags/1.60.1/js/add-pins-to-images.js (modified) (3 diffs)
-
trunk/admin-interactive.php (modified) (2 diffs)
-
trunk/allsites.php (modified) (1 diff)
-
trunk/defaults.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/share-and-follow.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
share-and-follow/tags/1.60.1/css/pinterest.css
r514573 r514676 1 1 .make-relative{position:relative} 2 2 .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} 3 a.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} 4 a.pin-it-image-button span {display:none} -
share-and-follow/tags/1.60.1/js/add-pins-to-images.js
r514571 r514676 14 14 // $(this).addClass('make-relative'); 15 15 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 ); 18 18 19 19 }); … … 23 23 // $(this).addClass('make-relative'); 24 24 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 ); 27 27 }); 28 28 break; … … 32 32 33 33 function 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>"; 35 35 var check_float = jQuery(obj).css('float'); 36 36 floated = ' no-float'; -
share-and-follow/trunk/admin-interactive.php
r514573 r514676 271 271 <table class="like"> 272 272 <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> 274 274 <td><?php $args =array('pinterest_topleft','pinterest_topright','pinterest_bottom'); ?> 275 275 <?php foreach ($args as $locations) { ?> … … 286 286 <select name="pinterest_style" id="pinterest_style" style="width:200px"> 287 287 <?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) { ?> 289 289 <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> 290 312 <?php } ?> 291 313 </select> -
share-and-follow/trunk/allsites.php
r510851 r514676 627 627 'pinterest' => array 628 628 ( 629 'service' => ' follow',630 629 'service' => 'share,follow', 630 'share_url'=>'http://pinterest.com/pin/create/button/?url=URI&media=IMAGE', 631 631 'sprites' => array 632 632 ( -
share-and-follow/trunk/defaults.php
r514573 r514676 33 33 'follow_dailymotion'=>'', 'follow_soundcloud'=>'', 'follow_vimeo'=>'', 'follow_coconex' => '', 34 34 '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', 36 36 'wp_post'=>'yes', 'wp_page'=>'yes', 'wp_home'=>'yes', 'wp_archive'=>'yes', 37 37 'wp_author'=>'yes', 'bit_ly'=>'', 'bit_ly_code'=>'', 'follow_foursquare'=>'', … … 141 141 'yahoo_buzz_share_text'=>__('Buzz it up','share-and-follow'), 142 142 // 'google_buzz_share_text'=>__('Buzz it up','share-and-follow'), 143 'google_buzz_link'=>__('Buzz it up','share-and-follow'), 143 144 'yahoo_buzz_link_text'=>__('Follow me','share-and-follow'), 144 145 'lastfm_link_text'=>__('Check my tunes','share-and-follow'), … … 186 187 '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'=>'', 187 188 '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', 188 190 189 191 -
share-and-follow/trunk/readme.txt
r510851 r514676 6 6 Requires at least: 3.2 7 7 Tested up to: 3.3.1 8 Stable tag: 1. 70.38 Stable tag: 1.80.1 9 9 10 10 Add Share Icons, Follow Links, Facebook Like, Twitter Tweet and other buttons in the way you want. Simple & adaptable social networking. … … 46 46 * Choice between CSS sprites for faster loading times, or CSS single images so you can have your own icon replacements 47 47 * 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 48 49 49 50 People 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. … … 314 315 315 316 == Changelog == 317 318 = 1.80.1 = 319 Added Pinterest sharing via share button, interactive share and also via on image sharing. 316 320 317 321 = 1.70.3 = … … 872 876 873 877 == Upgrade Notice == 878 = 1.80.1 = 879 Added Pinterest sharing via share button, interactive share and also via on image sharing. 874 880 875 881 = 1.70.3 = -
share-and-follow/trunk/share-and-follow.php
r514573 r514676 3 3 Plugin Name: Share and Follow 4 4 Plugin URI: http://share-and-follow.com/wordpress-plugin/ 5 Version: 1. 70.35 Version: 1.80.1 6 6 Author: Andy Killen 7 7 Author URI: http://phat-reaction.com … … 325 325 326 326 function addHeaderCodeEndBlock () { 327 327 328 328 329 if (!empty ($this->_options['width_of_page_minimum'])){ … … 353 354 354 355 function addHeaderCode() { 356 357 if($this->_options['pinterest_images']=='yes'){ 358 wp_enqueue_script('jquery'); 359 } 360 355 361 if ($this->_options['bookmark']=="yes"){ 356 362 wp_enqueue_script('sf-bookmarks', plugin_dir_url(__FILE__ ) . "js/browser-check-for-bookmarks.js", array(), 1, true); … … 636 642 } 637 643 638 function doPinterestScript($postid, $ url = '', $style=''){644 function doPinterestScript($postid, $style=''){ 639 645 add_action('wp_footer', array( &$this, 'pinterest_footer_code'), 100); 640 646 $page_url = urlencode(get_permalink($postid)); 641 647 $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>"; 644 650 } 645 651 … … 935 941 // replace keywords in URL so that it shares properly, check for php4 as html_entity_decode is a bug on there. 936 942 // 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; 938 945 $share_url = str_replace('EXCERPT' ,urlencode($page_excerpt), $share_url ); 939 946 $share_url = str_replace('TITLE' ,urlencode(html_entity_decode(str_replace('&','and',$page_title), ENT_QUOTES, 'UTF-8')), $share_url ); 940 947 $share_url = str_replace('URI' ,urlencode($page_link), $share_url ); 948 $share_url = str_replace('IMAGE' ,urlencode($this->getPostImage($id)), $share_url ); 941 949 return $share_url; 942 950 } … … 1061 1069 case "no": 1062 1070 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 )."' "; 1064 1072 $attributes .= $this->doImageStyle($css_class, $size, $list_style); 1065 1073 $result = "<a ".$attributes ." ><span class=\"head\">".stripslashes ($share_text)."</span></a>"; 1066 1074 } 1067 1075 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 )."' "; 1069 1077 $result="<a ". $attributes ." >"; 1070 1078 if ($this->_options['list_style']!='text_only'){ … … 1098 1106 break; 1099 1107 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>";} 1102 1110 break; 1103 1111 case "bookmark": … … 1914 1922 1915 1923 function pin_it(){ 1924 1925 if($this->_options['pinterest_images']=='yes'){ 1916 1926 echo "<script type='text/javascript' src='" . WP_PLUGIN_URL ."/share-and-follow/js/add-pins-to-images.js'></script>"; 1917 1927 ?> 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> 1933 1948 1934 1949 1935 1950 1936 1951 <?php 1937 1952 } 1938 1953 } 1939 1954
Note: See TracChangeset
for help on using the changeset viewer.