Tutorial

How to add Social Share Buttons to Articles.

Increase traffic to your website by adding a simple and convenient share button to your Articles.

One of the things you can do is add the ability for your guests and members to bookmark and share an article that has been posted to your site. This can help bring additional traffic to your site, and provide an additional useful service to anyone that happens to find your article interesting or useful. Social bookmarking and sharing is extremely popular why not integrated it into your Boonex Dolphin site.

They will have the ability to add it to a number of the more popular sites that they may already belong to with a simple click of their mouse.

There are several popular services out there that provide this free of charge. All you do is add a few simple lines of code to your page and you are good to go.

The one I am using at the moment is totally free and does not require registering if you don't want to track statistics. If you do want statistics of how these are being used on your site, then you can register for free. Simply go to http://addthis.com/ select your Service, Button Style, and get the code.

Another popular service is http://sharethis.com/ which is also a free service, but requires registration.


Here in this article:
How to generate and get traffic to your site - Intro

I have added "Share" by addthis.com

 

Share Dolphin Articles

 

 


When someone hovers their mouse over it they have a number of options from emailing it, to facebook, twitter, and a bunch more bookmarking sites.

For example I will choose "Delicious" since I have an account there and I am logged into Delicous anyway.

 

Share Dolphin Articles Delicious

 



A new window will open and connect to "Delicious". Once there since I am logged into Delicious it will have the URL and Title already filled out for me.

 

Bookmark at Delicious

 

 


All I need to do is add a little description in "Notes" and maybe some "Tags" and then simply save it.

 

Save Delicous Bookmark

 


It's hard to put a number on how many people use these services, but it's free and it could potentially bring you some additional traffic. So why not?

I have chosen to add the button under the date in my Dolphin articles and have some line breaks to separate it from the actual text and content of the article.

To add this feature get the code from addthis.com or any other service that you prefer.

For Dolphin 6.1x you need to add this code to:
/inc/classes/BxDolArticles.php

Be sure to backup the original file first so you can restore it if you have any problems.

After you have backed up the file: /inc/classes/BxDolArticles.php

Open the file and locate:
<div class="articleBlock">
    <div class="mainTitle">{$sTitle}</div>
    <div class="date">{$aArticle['Date']}</div>
    <div>{$sText}</div>
</div>
EOF;

 

You will need to insert your addthis.com code after the date like so:

<div class="articleBlock">
    <div class="mainTitle">{$sTitle}</div>
    <div class="date">{$aArticle['Date']}<br><!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://addthis.com/bookmark.php?v=250&amp;pub=xa-4XXXXXXXXXXXXXXXXXXXXXX"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=xa-4XXXXXXXXXXXXXXXXX"></script>
<!-- AddThis Button END --><br><br>
</div>
    <div>{$sText}</div>
</div>
EOF;

 

Save the changes back to your host, and simply refresh an article on your site and check. Verify the button works by clicking on one of the services, email, etc.

Any problems, restore the original backup /inc/classes/BxDolArticles.php and try again.

Additional:
Simply add more line breaks
if you wish to have more spacing before or after the addthis button.

If you use a different service other than addthis the code will be slightly different based on the company or site you are using. Simply place the code the particular site gives you in the same location for Dolphin 6.1x.

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend
Sponsored Links