|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I'm now on 7.5.8. One of the changes I have to make with each upgrade is to add in the social networking functionality. I know you have a basic like and Twitter entry on the entire thread, but people often like a single entry in a thread of 200 posts. So linking to the entire thread doesn't help much. Also, there's no google+ or the many other options. You can see what I add in on this post - http://www.wineintro.com/forum/ubbthreads.php/topics/427627#Post427627Here's my code for doing this: SOCIAL NETWORKING BUTTONS BELOW EACH FORUM POST
========================================================================
INITIALIZE GOOGLE +1 CODE ONCE
in /templates/default/header.tpl
line 43
just before </head>, add:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
This initializes the Google +1 button code.
========================================================================
SET VARIABLE FOR USE IN SOCIAL SCRIPTS
in /scripts/showflat.inc.php
line 870
look for:
$postrow[$i]['Subject'] = $results[$i]['POST_SUBJECT'];
add in after that:
// LISA ADDED FOR SOCIAL NETWORKING
$postrow[$i]['SubjectSocial'] = $results[$i]['POST_SUBJECT'];
========================================================================
DRAW THE VISIBLE BUTTONS ON EACH INDIVIDUAL POST
in /templates/default/post_side.tpl
Starting at line 100 it says:
<td class="post_top_link" valign="bottom">
<a href="#top">{$lang.TOP}</a>
</td>
<td class="post-options" valign="bottom" align="right">
replace those four lines with the entire block below between the squiggles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<!-- LISA CODE FOR SOCIAL NETWORKING START -->
<td class="post_top_link" valign="bottom">
<a href="#top">{$lang.TOP}</a>
</td>
<td valign="bottom">
<table border=0 cellspacing="0" cellpadding="0" width=100%><TR><TD class="post-options" valign="bottom" align="left">
<g:plusone size="small" annotation="inline" width="150"></g:plusone>
<BR>
<a rel="nofollow" href="http://twitter.com/home?status={$postrow[post].SubjectSocial}%20{$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}" title="Post {$postrow[post].SubjectSocial} to Twitter" target="_blank"><img src="{$config.FULL_URL}/images/social/twitter.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Twitter" title="Add {$postrow[post].SubjectSocial} to Twitter " /></a>
<a rel="nofollow" href="http://www.facebook.com/sharer.php?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Facebook" target="_blank"><img src="{$config.FULL_URL}/images/social/facebook.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Facebook" title="Add {$postrow[post].SubjectSocial} to Facebook " /></a>
<a rel="nofollow" href="http://www.myspace.com/Modules/PostTo/Pages/?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to MySpace" target="_blank"><img src="{$config.FULL_URL}/images/social/myspace.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to MySpace" title="Add {$postrow[post].SubjectSocial} to MySpace " /></a>
<a rel="nofollow" href="http://del.icio.us/post?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Add {$postrow[post].SubjectSocial} to del.icio.us" target="_blank"><img src="{$config.FULL_URL}/images/social/delicious.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Del.icio.us" title="Post {$postrow[post].SubjectSocial} to Del.icio.us" /></a>
<a rel="nofollow" href="http://digg.com/submit?phase=2&url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Digg {$postrow[post].SubjectSocial}" target="_blank"><img src="{$config.FULL_URL}/images/social/digg.gif" border="0" alt="Digg {$postrow[post].SubjectSocial}" title="Digg {$postrow[post].SubjectSocial}" /></a>
<a rel="nofollow" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Yahoo My Web" target="_blank"><img src="{$config.FULL_URL}/images/social/yahoomyweb.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Yahoo My Web" title="Add {$postrow[post].SubjectSocial} to Yahoo My Web" /></a>
<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&bkmk={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Google Bookmarks" target="_blank"><img src="{$config.FULL_URL}/images/social/googlebookmarks.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Google Bookmarks" title="Add {$postrow[post].SubjectSocial} to Google Bookmarks" /></a>
<a rel="nofollow" href="http://www.stumbleupon.com/submit?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Stumbleupon" target="_blank"><img src="{$config.FULL_URL}/images/social/stumbleupon.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Stumbleupon" title="Add {$postrow[post].SubjectSocial} to Stumbleupon" /></a>
<a rel="nofollow" href="http://reddit.com/submit?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Reddit" target="_blank"><img src="{$config.FULL_URL}/images/social/reddit.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Reddit" title="Add {$postrow[post].SubjectSocial} to Reddit" /></a>
</TD><td bgcolor="#F9F9F5" valign="bottom" align="right" class="post-options" >
<!-- LISA CODE FOR SOCIAL NETWORKING END -->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Then down near line 150
{if $postrow[post].mailpostlink}
<span class="post-buttons"><a href="{$postrow[post].mailpostlink}" rel="nofollow"><img src="{$config.BASE_URL}/images/{$style_array.general}/email.gif" alt="" /> {$lang.EMAIL_POST}</a></span>
{/if}
</td>
</tr>
Change that to
{if $postrow[post].mailpostlink}
<span class="post-buttons"><a href="{$postrow[post].mailpostlink}" rel="nofollow"><img src="{$config.BASE_URL}/images/{$style_array.general}/email.gif" alt="" /> {$lang.EMAIL_POST}</a></span>
{/if}
</td>
</tr>
</table>
</TD></TR>
========================================================================
GOOGLE PLUS LOAD POST-PAGE-DRAW FOR SPEED
needs to go after all +1 buttons, so put in footer. Note you have to escape the } and { with literal so they're not processed
in /templates/default/footer.tpl
around line 47, before div id=footer
<!-- LISA CODE TO LOAD GOOGLE +1 BUTTON AFTER PAGE LOAD -->
<script type="text/javascript">
(function() {literal}{{/literal}
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
{literal}}{/literal})();
</script>
<!-- END CODE -->
========================================================================
DRAW VISIBLE BUTTONS AT BOTTOM OF PAGE THAT LISTS ALL THREADS IN A GIVEN TOPIC
/templates/default/postlist.tpl
line 316 - bottom - after $ishopto section
<!-- LISA CODE FOR SOCIAL NETWORKING -->
<table border=0 cellspacing="0" cellpadding="0" width=100%><TR><TD class="post-options" valign="bottom" align="left">
<g:plusone size="small" annotation="inline" width="150"></g:plusone>
<BR>
<a rel="nofollow" href="http://twitter.com/home?status={$postrow[post].SubjectSocial}%20{$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}" title="Post {$postrow[post].SubjectSocial} to Twitter" target="_blank"><img src="{$config.FULL_URL}/images/social/twitter.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Twitter" title="Add {$postrow[post].SubjectSocial} to Twitter " /></a>
<a rel="nofollow" href="http://www.facebook.com/sharer.php?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Facebook" target="_blank"><img src="{$config.FULL_URL}/images/social/facebook.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Facebook" title="Add {$postrow[post].SubjectSocial} to Facebook " /></a>
<a rel="nofollow" href="http://www.myspace.com/Modules/PostTo/Pages/?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to MySpace" target="_blank"><img src="{$config.FULL_URL}/images/social/myspace.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to MySpace" title="Add {$postrow[post].SubjectSocial} to MySpace " /></a>
<a rel="nofollow" href="http://del.icio.us/post?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Add {$postrow[post].SubjectSocial} to del.icio.us" target="_blank"><img src="{$config.FULL_URL}/images/social/delicious.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Del.icio.us" title="Post {$postrow[post].SubjectSocial} to Del.icio.us" /></a>
<a rel="nofollow" href="http://digg.com/submit?phase=2&url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Digg {$postrow[post].SubjectSocial}" target="_blank"><img src="{$config.FULL_URL}/images/social/digg.gif" border="0" alt="Digg {$postrow[post].SubjectSocial}" title="Digg {$postrow[post].SubjectSocial}" /></a>
<a rel="nofollow" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Yahoo My Web" target="_blank"><img src="{$config.FULL_URL}/images/social/yahoomyweb.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Yahoo My Web" title="Add {$postrow[post].SubjectSocial} to Yahoo My Web" /></a>
<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&bkmk={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Google Bookmarks" target="_blank"><img src="{$config.FULL_URL}/images/social/googlebookmarks.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Google Bookmarks" title="Add {$postrow[post].SubjectSocial} to Google Bookmarks" /></a>
<a rel="nofollow" href="http://www.stumbleupon.com/submit?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Stumbleupon" target="_blank"><img src="{$config.FULL_URL}/images/social/stumbleupon.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Stumbleupon" title="Add {$postrow[post].SubjectSocial} to Stumbleupon" /></a>
<a rel="nofollow" href="http://reddit.com/submit?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Reddit" target="_blank"><img src="{$config.FULL_URL}/images/social/reddit.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Reddit" title="Add {$postrow[post].SubjectSocial} to Reddit" /></a>
</TD></TR></TABLE>
<!-- END LISA CODE -->
========================================================================
DRAW VISIBLE BUTTONS AT BOTTOM OF MAIN FORUM PAGE THAT LISTS CATEGORY AREAS
/templates/default/forum.tpl
line 114 - bottom - after $tbclose and /section
<!-- LISA CODE FOR SOCIAL NETWORKING -->
<table border=0 cellspacing="0" cellpadding="0" width=100%><TR><TD class="post-options" valign="bottom" align="left">
<g:plusone size="small" annotation="inline" width="150"></g:plusone>
<BR>
<a rel="nofollow" href="http://twitter.com/home?status={$postrow[post].SubjectSocial}%20{$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}" title="Post {$postrow[post].SubjectSocial} to Twitter" target="_blank"><img src="{$config.FULL_URL}/images/social/twitter.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Twitter" title="Add {$postrow[post].SubjectSocial} to Twitter " /></a>
<a rel="nofollow" href="http://www.facebook.com/sharer.php?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Facebook" target="_blank"><img src="{$config.FULL_URL}/images/social/facebook.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Facebook" title="Add {$postrow[post].SubjectSocial} to Facebook " /></a>
<a rel="nofollow" href="http://www.myspace.com/Modules/PostTo/Pages/?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to MySpace" target="_blank"><img src="{$config.FULL_URL}/images/social/myspace.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to MySpace" title="Add {$postrow[post].SubjectSocial} to MySpace " /></a>
<a rel="nofollow" href="http://del.icio.us/post?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Add {$postrow[post].SubjectSocial} to del.icio.us" target="_blank"><img src="{$config.FULL_URL}/images/social/delicious.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Del.icio.us" title="Post {$postrow[post].SubjectSocial} to Del.icio.us" /></a>
<a rel="nofollow" href="http://digg.com/submit?phase=2&url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Digg {$postrow[post].SubjectSocial}" target="_blank"><img src="{$config.FULL_URL}/images/social/digg.gif" border="0" alt="Digg {$postrow[post].SubjectSocial}" title="Digg {$postrow[post].SubjectSocial}" /></a>
<a rel="nofollow" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&t={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Yahoo My Web" target="_blank"><img src="{$config.FULL_URL}/images/social/yahoomyweb.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Yahoo My Web" title="Add {$postrow[post].SubjectSocial} to Yahoo My Web" /></a>
<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&bkmk={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Google Bookmarks" target="_blank"><img src="{$config.FULL_URL}/images/social/googlebookmarks.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Google Bookmarks" title="Add {$postrow[post].SubjectSocial} to Google Bookmarks" /></a>
<a rel="nofollow" href="http://www.stumbleupon.com/submit?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Stumbleupon" target="_blank"><img src="{$config.FULL_URL}/images/social/stumbleupon.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Stumbleupon" title="Add {$postrow[post].SubjectSocial} to Stumbleupon" /></a>
<a rel="nofollow" href="http://reddit.com/submit?url={$config.FULL_URL}/ubbthreads.php{$var_start}ubb{$var_eq}showflat{$var_sep}Number{$var_eq}{$postrow[post].Number}%2F%23Post{$postrow[post].Number}&title={$postrow[post].SubjectSocial}" title="Post {$postrow[post].SubjectSocial} to Reddit" target="_blank"><img src="{$config.FULL_URL}/images/social/reddit.gif" border="0" alt="Add {$postrow[post].SubjectSocial} to Reddit" title="Add {$postrow[post].SubjectSocial} to Reddit" /></a>
</TD></TR></TABLE>
<!-- END LISA CODE -->
========================================================================
ACTUAL IMAGES
if needed move in all /images/social/ from backup (should still be there from before)
Could this be an option that we could turn on / off, for those who enjoy having that more robust set of social networking?
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I'll note that I tried the Shareaholic option and it's not showing up anywhere for me. I created the row of buttons, got the ID number, and entered that into the UBB system.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
The shareaholic bar is stock as of the 7.5.8 refresh; you just have to be sure to enter their syndication code into the appropriate box on your site and turn it on and it should "just work" to show the buttons on pots that are not in private forums.
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
Gizmo -
I do have the syndication code in the spot in the admin area. I'm not sure what you mean by "turn it on" though. I have the checks by the Facebook and Twitter boxes above that ID area but I don't see another area to turn on the Shareaholic bar ...?
Lisa
|
|
|
|
Joined: Dec 2003
Posts: 6,566 Likes: 78
|
Joined: Dec 2003
Posts: 6,566 Likes: 78 |
Okay maybe you made the entry incorrect in ubb. For example at my site. The shareaholic code provided is: <div class='shareaholic-canvas' data-app='share_buttons' data-app-id='4859084'></div> But the entry in ubb should be: If you posted the full code it will not display You just enter the id number. Also you only make the entry in one field Control Panel » Display Options-Topic Display Options Your Shareaholic ID PS you know what I completely forgot about this part 2 Stupid me. Goto cp>General-Html includes tab At the botom is : Shareaholic 'Setup Code': You can get the code from Sharaholic get setup code button.
Last edited by Ruben; 02/26/2014 5:37 PM. Reason: Changed message
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jun 2006
Posts: 626
Addict
|
Addict
Joined: Jun 2006
Posts: 626 |
What does the set up code look like?
|
|
|
|
Joined: Jun 2006
Posts: 626
Addict
|
Addict
Joined: Jun 2006
Posts: 626 |
Also, what should the actual URL contain?
For example, is it only ubbcentral.com or is it ubbcentral.com/forums/ubbthreads.php ???
|
|
|
|
Joined: Dec 2003
Posts: 6,566 Likes: 78
|
Joined: Dec 2003
Posts: 6,566 Likes: 78 |
the setupcode for mysite is: <script type="text/javascript">
//<![CDATA[
(function() {
var shr = document.createElement('script');
shr.setAttribute('data-cfasync', 'false');
shr.src = '//dsms0rr1bbhn4.cloudfront.net/assets/pub/shareaholic.js';
shr.type = 'text/javascript'; shr.async = 'true';
shr.onload = shr.onreadystatechange = function() {
var rs = this.readyState;
if (rs && rs != 'complete' && rs != 'loaded') return;
var site_id = '256ae0dda0e8433a0b2bd7b9b28';
try { Shareaholic.init(site_id); } catch (e) {}
};
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(shr, s);
})();
//]]>
</script>
As far as a url to use. Since the buttons can be added anywhere on the site, using your example: ubbcentral.com At least that is the way I set it up. You can add as many sites as you wish,as well as different buttons and locations.
Last edited by Ruben; 03/10/2014 11:51 AM.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
The shareaholic bar is stock as of the 7.5.8 refresh; you just have to be sure to enter their syndication code into the appropriate box on your site and turn it on and it should "just work" to show the buttons on pots that are not in private forums. I couldn't get mine to just work. I added the setup code to the text entryfield. Shareaholic 'Setup Code': This is the setup code from Shareaholic that is supposed to be inserted before the </head> section. You also need to configure your Share ID in 'Topic Display Options' for this to work properly ...but no amount of refreshing would make it show up when viewing the source code. So I added it to this section. Header Insert (common to all): Use for meta tags, etc. and will always be inserted in the <head> section. It now shows up - but the icons/ graphics from shareaholic don't. So I had to manually insert their snippet code in the default footer area. However I don't like that location as I suspect many people will miss it. Have I missed something? (Well I'm sure I have, but I would be grateful if someone could point it out to me. )
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Just discovered that the icons will show (without their code snippet in the footer) if I select 'Floated Share Buttons'.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Well, the only page it's supposed to show on via stock 7.5.8/9, as SD set it, is the topic display (no forum or thread listing pages, since he didn't see a reason to show them elsewhere. there should be a mod at UBBDev for extending it). Are you testing on just the thread display?
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
It doesn't show on any page unless I use the "Floated Share Buttons" option.
Something is wrong though, if I can't see the code when it's added to the Shareaholic 'Setup Code' area.
|
|
|
|
Joined: Dec 2015
Posts: 1
stranger
|
stranger
Joined: Dec 2015
Posts: 1 |
I tried this code but it doesn't work can any one help? thanks
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
side note : The buttons don't show if its not public forum.
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
side note : The buttons don't show if its not public forum. Expected behavior; it was designed to only show on forums that guests have access to.
|
|
|
|
Joined: Dec 2003
Posts: 6,566 Likes: 78
|
Joined: Dec 2003
Posts: 6,566 Likes: 78 |
What good would it do to have social media links with a private forum?
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
What good would it do to have social media links with a private forum? +1
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
I've no doubt Mark was just pointing out a potential cause for errors. In any case, mine are public and it still doesn't work. Anyway, it's New Year's Eve and we're off to the pub! All the very best to you all.
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
I've no doubt Mark was just pointing out a potential cause for errors My Hero. . I was testing the arrangement of the icons in a private forum, and for a short time didn't realise. So just pointing out a possible got yu. Is it the sharaholic where you also have to paste into your root there key? My forum is not the root directory so had to quickly drop my normal index.html for the sharaholic file to become authenticated. And the switch back. Those were my qwerks when seting up and customising. All the best. . +2 lol
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
You have to have their setup code on the index document of your site to validate your site; I'm not sure what validation really does though, since I have several sites running without issue without being "validated". I even brought this up to their development team that they needed an additional way of validating things, such as a crecord or html file like everyone else validates ownership, but nothing came of that request.
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Even using my limited "Floated Share Buttons" option, it wouldn't work without validation. Is it the sharaholic where you also have to paste into your root there key? My forum is not the root directory so had to quickly drop my normal index.html for the sharaholic file to become authenticated. And the switch back. I use Joomla, so I had to insert a module with the code into my template.
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
I did find the Sharaholic website confusing. To eventually select the correct button setup, even if i go back to edit my selection it takes a far few clicks to get to the correct place.
Im not at my pc right now, so its just me remembering Sharaholic website wasn't as straightforward as i thought it would or could be.
That was my experience. So its possible that the setup via Sharaholic could be causing the strange behaviour??
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
I'm not sure if the setup could be causing the behavior, unless you have the wrong key installed or something was wrong with the setup code.
BTW, UBBWiki isn't a validated site at shareaholic and it has share buttons working without any problems (it's SSL only and their check evidently doesn't like that).
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Well, as I've mentioned previously, it works after a fashion.
As long as the setup code is in the header and not in the UBB suggested area, it will work - as long as I place the display code in the footer.
|
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
0 members (),
802
guests, and
186
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|