My b2evolution Version: 3.3.3
Hello Everyone,
I've been trying to add the ShareThis buttons to my blog, and i've finally done it. I wanted to share the process with you and help somebody else that's been having this problem.
1 - Create an account with ShareThis.com.
2 - Follow all their regular steps for creating the buttons.
3 - Once you get the code, copy the javascript code to _html_header.inc.php inside the <head></head> tags
4 - Then you need to copy the button code and add 2 options to the span tags. I've added the st_title and st_url options. You need to add this two tags on the first span tag on EACH and EVERY single button you add.
st_url="<?php $Item->permanent_url( $mode = '', $blogurl='' ); ?>"
st_title="<?php $Item->title( array('link_type'=>'none',)); ?>"
My code looks like this (I selected a horizontal counter and four buttons)
<span class="st_twitter_hcount" displayText="Tweet"
st_url="<?php $Item->permanent_url( $mode = '', $blogurl='' ); ?>"
st_title="<?php $Item->title( array('link_type'=>'none',)); ?>"></span>
<span class="st_facebook_hcount" displayText="Share"
st_url="<?php $Item->permanent_url( $mode = '', $blogurl='' ); ?>"
st_title="<?php $Item->title( array('link_type'=>'none',)); ?>"></span>
<span class="st_email_hcount" displayText="Email"
st_url="<?php $Item->permanent_url( $mode = '', $blogurl='' ); ?>"
st_title="<?php $Item->title( array('link_type'=>'none',)); ?>"></span>
<span class="st_sharethis_hcount" displayText="Share"
st_url="<?php $Item->permanent_url( $mode = '', $blogurl='' ); ?>"
st_title="<?php $Item->title( array('link_type'=>'none',)); ?>"></span>
5 - Add this code to the following page templates:
_item_block.inc.php (will show up on your main blog page on every single post. I've placed it after the Post Content Include)
_single_main.php (will show up on an individual post. I've placed it after the Post Content Include)
I tested it on one of my blogs and it seems to work.[/quote]
Thanks for sharing the code. You should use the following format though.