Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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:
Code
{include file="forum.tpl" type="cfrm" catrow=$catrow forum=$forum}

Add After (replace "YourKey" with your key from your channel setup):
Code

<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:
Code
<br />

{if $modlist}{$lang.USER_MOD}: {$modlist}{/if}

Add Before (replace "YourKey" with your key from your channel setup):
Code

<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:
Code

{if $facebook || $twitter}

Add Above (replace "YourKey" with your key from your channel setup):
Code

<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
Code

<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!


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
Joined: Jun 2000
Posts: 190
Enthusiast
Enthusiast
Joined: Jun 2000
Posts: 190
Call me ignorant, and I am in regard to social networking sites, but what exactly does this "Shareholic" thing do; how does it work???


Artificial Intelligence is no match for natural stupidity!
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
It lets people share a thread on Twitter, Facebook, Google+, EMail, etc; free advertising basically. Ultimately it's what I envisioned the Facebook/Twitter "like" buttons that we've had in 7.5 being when I approached Rick about it several years ago.

When a user "shares" the link (just by clicking the button) it shares it on the social networking site and adds +1 to the tally on the counter for each service (I clicked the Facebook one, see how it shows a number next to it? If you click it then it'll increase accordingly).

How does it work, well, you slap their code into your forum as per the directions above; how does it work on their end, I have no clue.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
I have an update planned when I get a little more time that will force all URLs in a thread to have the parent post (initial post) as the ID; this will make all pages that a share is clicked on to record to the same parent.

Example; I click "share" on page 5 of a thread, someone clicks share on page 2, someone else clicks it on page 1; all are regarded as different pages. The planned update will have all posted to the primary page. I just need to figure out the logic for each page I've recommended this to be installed on (above).


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Ok, as of the current posted script (now above) the mod will always link to page 1 of a thread or a forum.

Code for the Thread view hijacked from the Facebook like button, code for the forum view hijacked from the breadcrumb bar.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Please type slow when responding... smile

When I went to register for Shareaholic it seems like they want to install something in my browser, am I doing this correct? I thought this was for my forum... and it really looks classy...

Thanks

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
They have a browser bar and a utility for your site; both are independent.

What you're looking for is in their "Publisher Tools" section of their site.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Quote
Other Pages:
This code can also be appended to other various pages:
Active Topics (activetopics.tpl)
Portal Page (portal.tpl)

After which line?

AND thanks this is working so far smile

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Originally Posted by StanCA
After which line?

AND thanks this is working so far smile
Wherever you want it to display; likely just toss it at the bottom with the same code from the cfrm step.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
thanks,, wondering if others are seeing a slow load? I have one on top and it loads after the rest of the forum is loaded.

???

Sponsored Links
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
If properly coded all javascript should load after the page content; otherwise if it would hang your site wouldn't load until the javascript finished...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)