|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 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: {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!
|
|
|
|
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,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 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.
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 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).
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 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.
|
|
|
|
Joined: Jul 2002
Posts: 79
Power User
|
Power User
Joined: Jul 2002
Posts: 79 |
Please type slow when responding...  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,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 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.
|
|
|
|
Joined: Jul 2002
Posts: 79
Power User
|
Power User
Joined: Jul 2002
Posts: 79 |
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 
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
After which line? AND thanks this is working so far  Wherever you want it to display; likely just toss it at the bottom with the same code from the cfrm step.
|
|
|
|
Joined: Jul 2002
Posts: 79
Power User
|
Power User
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.
???
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 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...
|
|
|
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.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|