Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2000
Posts: 5,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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
Offline
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,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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
S
Power User
Offline
Power User
S
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,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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
S
Power User
Offline
Power User
S
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,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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
S
Power User
Offline
Power User
S
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,808
Likes: 12
Gizmo Offline OP
UBB.Dev / UBB.Wiki Owner
Time Lord
OP Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,551
Posts293,823
Members13,839
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 267
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 2
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,808
Greg Hard 4,625
Top Posters(30 Days)
isaac 5
Top Likes Received
isaac 64
Gizmo 12
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 2
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.6
(Snapshot build 20201121.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.050s Queries: 37 (0.020s) Memory: 3.3578 MB (Peak: 3.6363 MB) Data Comp: Zlib Server Time: 2020-12-02 18:49:35 UTC
Valid HTML 5 and Valid CSS