Changeset 657585
- Timestamp:
- 01/23/2013 09:23:01 PM (12 years ago)
- Location:
- scrolling-social-sharebar
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
scrolling-social-sharebar/trunk/readme.txt
r653428 r657585 4 4 Tags: Simple social share, social share, Facebook, Like, google, google +1, google plusone, twitter, tweet, facebook share, plusone, linkedin, stumbleupon 5 5 Requires at least: 3.0 6 Tested up to: 3. 2.17 Stable tag: 1. 5.16 Tested up to: 3.5 7 Stable tag: 1.6 8 8 9 9 A scrolling social sharebar scrolling plugin with just 7 social icons (Twitter, FB Like, Google +1, Linkedin, FB Share, Stumbleupon and Addthis). -
scrolling-social-sharebar/trunk/scroll-sharebar.php
r653428 r657585 4 4 Plugin URI: http://techxt.com/scrolling-social-sharebar-plugin/ 5 5 Description: Scrolling Social Sharebar (Twitter Like Google +1 Linkedin and Stumbleupon) 6 Version: 1. 5.16 Version: 1.6 7 7 Author: Sudipto Pratap Mahato 8 8 Author URI: http://techxt.com 9 9 */ 10 10 11 11 $dispssbar = FALSE; 12 12 13 13 function disp_ssharebar($content) { 14 14 global $dispssbar; 15 15 global $post; 16 16 $plink = get_permalink($post->ID); … … 39 39 } 40 40 } 41 41 if(is_home() && $dispssbar==FALSE && get_option('ssbar_dhome','checked')=='checked') 42 { 43 $sharelinks=disp_ssharebar_func(); 44 $content=$sharelinks.$content; 45 $dispssbar=TRUE; 46 } 42 47 if((is_single()&&get_option('ssbar_dpost','checked')=='checked')||(is_page()&&get_option('ssbar_dpage','checked')=='checked')){ 43 48 $sharelinks=disp_ssharebar_func(); 44 49 $content=$sharelinks.$content; 50 $dispssbar=TRUE; 45 51 } 46 52 … … 50 56 51 57 function ssharebar_css() { 52 if(!is_single()&&!is_page())return;58 //if(!is_single()&&!is_page())return; 53 59 $leftpad=get_option('ssbar_leftpadding','-80px'); 54 60 $toppad=get_option('ssbar_toppadding','20'); … … 179 185 <p><input type="checkbox" name="ssbar_dpost" value="checked" <?php echo get_option('ssbar_dpost','checked'); ?> />Dispaly on Post</p> 180 186 <p><input type="checkbox" name="ssbar_dpage" value="checked" <?php echo get_option('ssbar_dpage','checked'); ?> />Dispaly on Page</p> 187 <p><input type="checkbox" name="ssbar_dhome" value="checked" <?php echo get_option('ssbar_dhome','checked'); ?> />Dispaly on HomePage</p> 181 188 182 189 <h3 style="color: #cc0000;">Select Icons to display</h3> … … 220 227 221 228 <input type="hidden" name="action" value="update" /> 222 <input type="hidden" name="page_options" value="ssbar_leftpadding,ssbar_toppadding,ssbar_dpost,ssbar_dpage,ssbar_fblike,ssbar_twitter,ssbar_plusone,ssbar_linkedin,ssbar_stumble,ssbar_fbshare,ssbar_addthis,ssbar_barbackground,ssbar_barborder,ssbar_barpadding,ssbar_barshadow,ssbar_barradius,ssbar_defthumb,ssbar_atype,ssbar_bottompadding,ssbar_excludecat,ssbar_excludeid,ssbar_buttonpadding,ssbar_twittervia,ssbar_addog,ssbar_addcredit " />229 <input type="hidden" name="page_options" value="ssbar_leftpadding,ssbar_toppadding,ssbar_dpost,ssbar_dpage,ssbar_fblike,ssbar_twitter,ssbar_plusone,ssbar_linkedin,ssbar_stumble,ssbar_fbshare,ssbar_addthis,ssbar_barbackground,ssbar_barborder,ssbar_barpadding,ssbar_barshadow,ssbar_barradius,ssbar_defthumb,ssbar_atype,ssbar_bottompadding,ssbar_excludecat,ssbar_excludeid,ssbar_buttonpadding,ssbar_twittervia,ssbar_addog,ssbar_addcredit,ssbar_dhome" /> 223 230 <p class="submit"> 224 231 <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> … … 249 256 add_action('wp_head', 'ssharebar_css'); 250 257 add_filter('the_content', 'disp_ssharebar',1); 258 add_filter('the_excerpt', 'disp_ssharebar',1); 259 add_filter('get_the_excerpt', 'disp_ssharebar',1); 251 260 252 261 function ssharebar_get_feed() { … … 271 280 { 272 281 global $post; 273 $plink = get_permalink($post->ID); 282 if(is_home()||is_archive()) 283 { 284 $plink=get_home_url(); 285 $ptitle = get_bloginfo('name').' - '.get_bloginfo ( 'description' ); 286 } 287 else 288 { 289 $plink = get_permalink($post->ID); 290 $ptitle = get_the_title($post->ID); 291 } 274 292 $eplink = urlencode($plink); 275 $ptitle = get_the_title($post->ID);276 293 $eptitle=str_replace(array(">","<"),"",$ptitle); 277 294 $twsc='';$flsc='';$gpsc='';$fssc=''; … … 297 314 if(get_option('ssbar_fbshare',false)==true) 298 315 $sharelinks.= '<tr><td align="center" ><div style="position: relative; height: 60px;width:45px;"><iframe src="//www.facebook.com/plugins/like.php?href='.$eplink.'&send=false&layout=box_count&width=450&show_faces=false&font=arial&colorscheme=light&action=like&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:45px; height:41px;" allowTransparency="true"></iframe> 299 <div style="background: url("http://lh3.googleusercontent.com/-TuITveepO2g/UOvRrWHqsaI/AAAAAAAAAnw/VrVfnRoLfio/s45/fbshare.jpg") repeat scroll 0px 0px transparent; width: 45px; height: 18px; position: absolute; bottom: 1px; cursor: pointer;" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='.$eplink.'','popUpWindow','height=500,width= 400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=yes');"></div></div></td></tr>';316 <div style="background: url("http://lh3.googleusercontent.com/-TuITveepO2g/UOvRrWHqsaI/AAAAAAAAAnw/VrVfnRoLfio/s45/fbshare.jpg") repeat scroll 0px 0px transparent; width: 45px; height: 18px; position: absolute; bottom: 1px; cursor: pointer;" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='.$eplink.'','popUpWindow','height=500,width=600,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=yes');"></div></div></td></tr>'; 300 317 301 318 302 319 303 320 if(get_option('ssbar_addthis',true)==true) 304 $sharelinks.='<tr><td align="center" ><div class="addthis_toolbox addthis_default_style " style="width: 50px; padding-top: 5px;"><a class="addthis_counter"></a><script type="text/javascript" src=" http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e3d994a059e1110"></script></div></td></tr>';321 $sharelinks.='<tr><td align="center" ><div class="addthis_toolbox addthis_default_style " style="width: 50px; padding-top: 5px;"><a class="addthis_counter"></a><script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4ed3df145c76db9e"></script></div></td></tr>'; 305 322 306 323 if(get_option('ssbar_addcredit',true)==true) 307 $sharelinks.='<tr><td align="center" >< small><a href="http://techxt.com/?" target="_blank" style="color:#888;">share</a></small></td></tr>';324 $sharelinks.='<tr><td align="center" ><center><small><a href="http://techxt.com/?" target="_blank" style="color:#aaa;font: 10px arial;">share</a></small></center></td></tr>'; 308 325 309 326 $sharelinks.= '</table></div>';
Note: See TracChangeset
for help on using the changeset viewer.