Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Social Buttons with Short Share URL Details »
Social Buttons with Short Share URL
Mod Version: 1.00, by iBinJubair (Member) iBinJubair is offline
Developer Last Online: May 2015 I like it Show Printable Version Email this Page

vB Version: 5.0.1 Rating: (9 votes - 4.44 average) Installs: 37
Released: 01 Feb 2014 Last Update: Never Downloads: 16
Not Supported Template Edits Re-usable Code Translations  

Description:
This Modification will help you to add social buttons in thread conversation toolbar
  • using your site short urls e.g. http://example.com/node/xxxx
  • using original social buttons code
  • only one template modification
  • supporting vb5 responsive style
  • supporting LTR and RTL style
  • supporting style variables



Screenshots:







Instructions:
  • Open your site [Admin CP]
  • Go to [Styles & Templates] > [Search Templates]
  • Select your style from [Search in Style]. Put the following code in [Search for Text] and press [Find] button

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.


  • Select the template named [conversation_toolbar]
  • Find the above line in the [conversation_toolbar] template code as shown bellow

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.


  • Add the the following code above the red line
  • Note 1: You must replace "EXAMPLE.COM" with your website naked domain. There are 3 links.
  • Note 2: If your vBulletin files installed inside a folder, add the folder. e.g. example.com/vb

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.



Tags: Social, Share, button, buttons, Facebook, Twitter, Google+, Google Plus, Thread, Short, URL, Link

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	1.png
Views:	1813
Size:	40.2 KB
ID:	148043   Click image for larger version

Name:	2.png
Views:	1714
Size:	33.1 KB
ID:	148044  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 02 Feb 2014, 12:43
GamerUnguided GamerUnguided is offline
 
Join Date: Dec 2012
Sweet just what i was looking for, thanks for this .... guaranteed that this is installed
Reply With Quote
  #3  
Old 03 Feb 2014, 10:52
heredia21 heredia21 is offline
 
Join Date: May 2013
Perfect! Thanks for sharing, works well on mobile devices as well.
__________________
BlackBerry Empire #1 BlackBerry news site and BlackBerry forum.
Reply With Quote
  #4  
Old 25 Feb 2014, 13:57
crystalduna crystalduna is offline
 
Join Date: Feb 2014
When I click conversion_toolbar it wont let me customize it
Reply With Quote
  #5  
Old 07 Mar 2014, 19:02
bxb bxb is offline
 
Join Date: Jan 2013
Works, thanks a bunch! VB5.0.5
Reply With Quote
  #6  
Old 17 Mar 2014, 11:43
ecihanuysal's Avatar
ecihanuysal ecihanuysal is offline
 
Join Date: Apr 2008
works, thank you so mch
__________________
AdliVaka
Reply With Quote
  #7  
Old 28 Apr 2014, 02:45
Macgiber's Avatar
Macgiber Macgiber is offline
 
Join Date: Apr 2009
Real name: Omar
thanks
__________________
vb4
vb5

I invite you want to know.
Reply With Quote
  #8  
Old 21 May 2014, 16:51
fionix fionix is offline
 
Join Date: Apr 2007
Any udate for the latest version 5.1.1 ? it seems this line we have to find isn't there any longer.

Thanks.
__________________
Cyprus Company Formation | Cyprus Bank Account - We also provide our company formation service in many other offshore jurisdictions.
Reply With Quote
  #9  
Old 21 May 2014, 22:18
Daryn Daryn is offline
 
Join Date: Nov 2008
Tested and works on 5.1.1.

It seems like though it sends the right URL's to Facebook, the title it sends out as a share is pretty generic. Will fiddle some more with that.
Reply With Quote
  #10  
Old 24 Jun 2014, 08:27
Razgritz Razgritz is offline
 
Join Date: Mar 2013
This work.

Last edited by Razgritz; 24 Jun 2014 at 08:39.
Reply With Quote
  #11  
Old 21 Jul 2014, 14:45
DisasterDotCom DisasterDotCom is offline
 
Join Date: Feb 2013
Works in 5.1.2 (and the line is there). Thanks!
Reply With Quote
  #12  
Old 26 Jul 2014, 20:04
badawidollah badawidollah is offline
 
Join Date: Nov 2008
<vb:comment>START of Social Buttons Code</vb:comment>
<vb:if condition="$page['view'] == 'thread'">
<style>
.share-buttons { float:{vb:stylevar left}; position:relative; padding:8px 10px; height:20px; margin-top:-37px; }
.share-buttons.withRB { margin-{vb:stylevar left}:150px; }
.share-buttons iframe { float:{vb:stylevar left}; border:none; height:20px; }
.share-buttons .facebook { width:135px; }
.share-buttons .twitter { width:90px; }
.share-buttons #___plusone_0 { width:72px !important; float:{vb:stylevar left} !important; }
@media only screen and (max-width:767px) { .share-buttons.withRB { margin-{vb:stylevar left}: 100px; } }
@media only screen and (max-width:636px) { .share-buttons { float: none; border: {vb:stylevar toolbar_border}; background:{vb:stylevar toolbar_background}; margin: 0; } .share-buttons.withRB { margin: 0; } }
</style>
<div class="share-buttons<vb:if condition="(isset($showReplyBtn) AND $showReplyBtn) OR (isset($showAll) AND $showAll) OR $showVmBtn"> withRB</vb:if>">
{vb:set starterRoute, {vb:raw conversation.starterroute}}
{vb:set starterPost.nodeid, {vb:raw conversation.starter}}
{vb:set threadurl, {vb:url {vb:raw starterRoute}, {vb:raw starterPost}}}
<iframe class="facebook" src="//www.facebook.com/plugins/like.php?href=http://www.xxx.org/node/{vb:raw nodeid}&layout=button_count&action=like&show_faces=false&share=true&width=135&he ight=20" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
<iframe class="twitter" src="//platform.twitter.com/widgets/tweet_button.html?text={vb:raw conversation.title}%0A&url=http://www.xxx.org/node/{vb:raw nodeid}&counturl={vb:raw threadurl}" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
<div class="g-plusone" data-size="medium" data-width="68" data-href="http://www.xxx.org/node/{vb:raw nodeid}"></div>
<script type="text/javascript">(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = '//apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();</script>
</div>
</vb:if>
<vb:comment>END of Social Buttons Code</vb:comment>
Reply With Quote
  #13  
Old 30 Jul 2014, 09:18
kehindelawal kehindelawal is offline
 
Join Date: Apr 2014
Originally Posted by badawidollah View Post
<vb:comment>START of Social Buttons Code</vb:comment>
<vb:if condition="$page['view'] == 'thread'">
<style>
.share-buttons { float:{vb:stylevar left}; position:relative; padding:8px 10px; height:20px; margin-top:-37px; }
.share-buttons.withRB { margin-{vb:stylevar left}:150px; }
.share-buttons iframe { float:{vb:stylevar left}; border:none; height:20px; }
.share-buttons .facebook { width:135px; }
.share-buttons .twitter { width:90px; }
.share-buttons #___plusone_0 { width:72px !important; float:{vb:stylevar left} !important; }
@media only screen and (max-width:767px) { .share-buttons.withRB { margin-{vb:stylevar left}: 100px; } }
@media only screen and (max-width:636px) { .share-buttons { float: none; border: {vb:stylevar toolbar_border}; background:{vb:stylevar toolbar_background}; margin: 0; } .share-buttons.withRB { margin: 0; } }
</style>
<div class="share-buttons<vb:if condition="(isset($showReplyBtn) AND $showReplyBtn) OR (isset($showAll) AND $showAll) OR $showVmBtn"> withRB</vb:if>">
{vb:set starterRoute, {vb:raw conversation.starterroute}}
{vb:set starterPost.nodeid, {vb:raw conversation.starter}}
{vb:set threadurl, {vb:url {vb:raw starterRoute}, {vb:raw starterPost}}}
<iframe class="facebook" src="//www.facebook.com/plugins/like.php?href=http://www.xxx.org/node/{vb:raw nodeid}&layout=button_count&action=like&show_faces=false&share=true&width=135&he ight=20" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
<iframe class="twitter" src="//platform.twitter.com/widgets/tweet_button.html?text={vb:raw conversation.title}%0A&url=http://www.xxx.org/node/{vb:raw nodeid}&counturl={vb:raw threadurl}" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
<div class="g-plusone" data-size="medium" data-width="68" data-href="http://www.xxx.org/node/{vb:raw nodeid}"></div>
<script type="text/javascript">(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = '//apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();</script>
</div>
</vb:if>
<vb:comment>END of Social Buttons Code</vb:comment>
i made a mistake! Maybe i didnt. leaving the bolded did not work for my site(G+). however if i change the bolded to platform.js everything works fine. am not sure which .js google want people to use. in the snippet it was platform.js however in their documentation it is plusone.js.

any way if gplus one does not work for you just substitute the .js and see if it will work.

Last edited by kehindelawal; 30 Jul 2014 at 09:30.
Reply With Quote
  #14  
Old 06 Nov 2014, 20:32
Jean Pierre Jean Pierre is offline
 
Join Date: Jul 2014
It works for 5.1.4 thanks
Reply With Quote
  #15  
Old 23 Nov 2014, 12:39
gfran5's Avatar
gfran5 gfran5 is offline
 
Join Date: Nov 2014
Real name: Glenn
Works great in 5.1.1
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 07:54.

Layout Options | Width: Wide Color: