Author: Gizmo (James of
VNC Web Design)
Requirements:
Valid UBB.Threads 7.5.6 install (though this could be adapted relatively easily for previous releases) and license as well as a
Shareaholic account as you'll need to setup your site for use with their bar.
About:
I rather detest the built in Facebook/Twitter "like" buttons, so I poked around for a replacement and stumbled on
Shareaholic which is a service which lets you display a listing of "share" buttons for content (which you can see running here above the "Quick Reply" box and on
A Gardeners Forum).
Note: The "Thread View" portion of this modification is in the stock version of UBB.Threads 7.5.8 (13 days as a mod before being put in the stock product lol). If you're looking for the version for expanding v7.5.8 look
here.
In the Control Panel (CP -> Display Options -> General -> HTML Includes Tab -> Header Insert) add:
Your "Shareaholic" setup code for your site.
To add a Shareaholic Bar to the "Forum Index" page:
In templates/default/cfrm.tpl:
Find:
{include file="forum.tpl" type="cfrm" catrow=$catrow forum=$forum}
Add After (replace "YourKey" with your key from your channel setup):
<br />
<div style="margin-bottom: 4px">
<div class="shareaholic-canvas" data-app="share_buttons" data-app-id="YourKey"></div>
</div>
To add a Shareaholic Bar to the "Viewing Forum" page:
In templates/default/postlist.tpl:
Find:
<br />
{if $modlist}{$lang.USER_MOD}: {$modlist}{/if}
Add Before (replace "YourKey" with your key from your channel setup):
<br />
<div style="margin-bottom: 4px">
<div class="shareaholic-canvas" data-link="{make_ubb_url("ubb=postlist&Board=$Board&page=1", $forum_title, false)}" data-app="share_buttons" data-app-id="YourKey"></div>
</div>
To add a Shareaholic Bar to the "Viewing Thread" page:
In templates/default/showflat.tpl:
Find:
{if $facebook || $twitter}
Add Above (replace "YourKey" with your key from your channel setup):
<br />
<div style="margin-bottom: 4px">
<div class="shareaholic-canvas" data-link="{$facebookURL}" data-app="share_buttons" data-app-id="YourKey"></div>
</div>
Other Pages:
This code can also be appended to other various pages:
Active Topics (activetopics.tpl)
Portal Page (portal.tpl)
As
<br />
<div style="margin-bottom: 4px">
<div class="shareaholic-canvas" data-app="share_buttons" data-app-id="YourKey"></div>
</div>
Please leave your thanks below so we can know that we've helped you!