Previous Thread
Next Thread
Print Thread
Rate Thread
[7.5.6] Shareaholic Bar v0.2 (2013.11.27) #319145
11/24/2013 7:19 AM
11/24/2013 7:19 AM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell
Sponsored Links
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319147
11/26/2013 1:54 PM
11/26/2013 1:54 PM
Joined: Jun 2000
Posts: 345
NH, USA
Pilgrim Offline
Enthusiast
Pilgrim  Offline
Enthusiast

Joined: Jun 2000
Posts: 345
NH, USA
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!
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319148
11/26/2013 7:50 PM
11/26/2013 7:50 PM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319149
11/27/2013 7:39 PM
11/27/2013 7:39 PM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319150
11/28/2013 5:01 AM
11/28/2013 5:01 AM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell
Sponsored Links
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319154
12/01/2013 3:24 AM
12/01/2013 3:24 AM
Joined: Jul 2002
Posts: 81
S
StanCA Offline
Power User
StanCA  Offline
Power User
S

Joined: Jul 2002
Posts: 81
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

Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319155
12/01/2013 3:29 AM
12/01/2013 3:29 AM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319156
12/01/2013 4:44 AM
12/01/2013 4:44 AM
Joined: Jul 2002
Posts: 81
S
StanCA Offline
Power User
StanCA  Offline
Power User
S

Joined: Jul 2002
Posts: 81
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

Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: StanCA] #319157
12/01/2013 8:24 AM
12/01/2013 8:24 AM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319162
12/05/2013 11:46 AM
12/05/2013 11:46 AM
Joined: Jul 2002
Posts: 81
S
StanCA Offline
Power User
StanCA  Offline
Power User
S

Joined: Jul 2002
Posts: 81
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
Re: [7.5.6] Shareaholic Bar v0.2 (2013.11.27) [Re: Gizmo] #319163
12/05/2013 7:40 PM
12/05/2013 7:40 PM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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, UBB.SitemapsJames Corthell

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
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,467
Posts293,523
Members13,802
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,947
Greg Hard 5,533
Top Posters(30 Days)
isaac 1
Today's Statistics
Currently Online 745
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 15
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.0
(Snapshot build 20181115.dev)
PHP: 5.4.45 Page Time: 0.038s Queries: 15 (0.010s) Memory: 3.2517 MB (Peak: 3.4494 MB) Data Comp: Zlib Server Time: 2018-12-16 13:08:48 UTC