Plugin Directory

Changeset 657585


Ignore:
Timestamp:
01/23/2013 09:23:01 PM (12 years ago)
Author:
sudiptomahato
Message:

Added option to display on Homepage

Location:
scrolling-social-sharebar
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • scrolling-social-sharebar/trunk/readme.txt

    r653428 r657585  
    44Tags: Simple social share, social share, Facebook, Like, google, google +1, google plusone, twitter, tweet, facebook share, plusone, linkedin, stumbleupon
    55Requires at least: 3.0
    6 Tested up to: 3.2.1
    7 Stable tag: 1.5.1
     6Tested up to: 3.5
     7Stable tag: 1.6
    88
    99A 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  
    44Plugin URI: http://techxt.com/scrolling-social-sharebar-plugin/
    55Description: Scrolling Social Sharebar (Twitter Like Google +1 Linkedin and Stumbleupon)
    6 Version: 1.5.1
     6Version: 1.6
    77Author: Sudipto Pratap Mahato
    88Author URI: http://techxt.com
    99*/
    1010
    11 
     11$dispssbar = FALSE;
    1212
    1313function disp_ssharebar($content) {
    14 
     14global $dispssbar;
    1515global $post;
    1616$plink = get_permalink($post->ID);
     
    3939    }
    4040}
    41 
     41if(is_home() && $dispssbar==FALSE && get_option('ssbar_dhome','checked')=='checked')
     42{
     43    $sharelinks=disp_ssharebar_func();
     44    $content=$sharelinks.$content;
     45    $dispssbar=TRUE;
     46}
    4247if((is_single()&&get_option('ssbar_dpost','checked')=='checked')||(is_page()&&get_option('ssbar_dpage','checked')=='checked')){
    4348    $sharelinks=disp_ssharebar_func();
    4449    $content=$sharelinks.$content;
     50    $dispssbar=TRUE;
    4551}
    4652
     
    5056
    5157function ssharebar_css() {
    52 if(!is_single()&&!is_page())return;
     58//if(!is_single()&&!is_page())return;
    5359$leftpad=get_option('ssbar_leftpadding','-80px');
    5460$toppad=get_option('ssbar_toppadding','20');
     
    179185    <p><input type="checkbox" name="ssbar_dpost" value="checked" <?php echo get_option('ssbar_dpost','checked'); ?> />Dispaly on Post</p>
    180186    <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>
    181188   
    182189    <h3 style="color: #cc0000;">Select Icons to display</h3>
     
    220227   
    221228    <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" />
    223230    <p class="submit">
    224231        <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
     
    249256add_action('wp_head', 'ssharebar_css');
    250257add_filter('the_content', 'disp_ssharebar',1);
     258add_filter('the_excerpt', 'disp_ssharebar',1);
     259add_filter('get_the_excerpt', 'disp_ssharebar',1);
    251260
    252261function ssharebar_get_feed() {
     
    271280{
    272281global $post;
    273 $plink = get_permalink($post->ID);
     282if(is_home()||is_archive())
     283{
     284    $plink=get_home_url();
     285    $ptitle = get_bloginfo('name').' - '.get_bloginfo ( 'description' );
     286}
     287else
     288{
     289    $plink = get_permalink($post->ID);
     290    $ptitle = get_the_title($post->ID);
     291}
    274292$eplink = urlencode($plink);
    275 $ptitle = get_the_title($post->ID);
    276293$eptitle=str_replace(array(">","<"),"",$ptitle);
    277294$twsc='';$flsc='';$gpsc='';$fssc='';
     
    297314if(get_option('ssbar_fbshare',false)==true)
    298315$sharelinks.= '<tr><td align="center" ><div style="position: relative; height: 60px;width:45px;"><iframe src="//www.facebook.com/plugins/like.php?href='.$eplink.'&amp;send=false&amp;layout=box_count&amp;width=450&amp;show_faces=false&amp;font=arial&amp;colorscheme=light&amp;action=like&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:45px; height:41px;" allowTransparency="true"></iframe>
    299 <div style="background: url(&quot;http://lh3.googleusercontent.com/-TuITveepO2g/UOvRrWHqsaI/AAAAAAAAAnw/VrVfnRoLfio/s45/fbshare.jpg&quot;) repeat scroll 0px 0px transparent; width: 45px; height: 18px; position: absolute; bottom: 1px; cursor: pointer;"  onclick="window.open(&#39;https://www.facebook.com/sharer/sharer.php?u='.$eplink.'&#39;,&#39;popUpWindow&#39;,&#39;height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=yes&#39;);"></div></div></td></tr>';
     316<div style="background: url(&quot;http://lh3.googleusercontent.com/-TuITveepO2g/UOvRrWHqsaI/AAAAAAAAAnw/VrVfnRoLfio/s45/fbshare.jpg&quot;) repeat scroll 0px 0px transparent; width: 45px; height: 18px; position: absolute; bottom: 1px; cursor: pointer;"  onclick="window.open(&#39;https://www.facebook.com/sharer/sharer.php?u='.$eplink.'&#39;,&#39;popUpWindow&#39;,&#39;height=500,width=600,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=yes&#39;);"></div></div></td></tr>';
    300317
    301318
    302319
    303320if(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>';
    305322
    306323if(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>';
    308325
    309326$sharelinks.= '</table></div>';
Note: See TracChangeset for help on using the changeset viewer.