• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Social Buttons with Short Share URL

Admin

Well-Known Member
Staff member
Administrator
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/***x
  • using original social buttons code
  • only one template modification
  • supporting vb5 responsive style
  • supporting LTR and RTL style
  • supporting style variables



Screenshots:

jsdg.png

kvwj.png



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
    Code:
    [COLOR="red"]<vb:if condition="!empty($showSubscriberFilter)">[/COLOR]


  • Select the template named [conversation_toolbar]
  • Find the above line in the [conversation_toolbar] template code as shown bellow
    Code:
    ... ... ...
    ... ... ...
          </vb:if>
        </ul>
      </div>
    
      [COLOR="Red"]<vb:if condition="!empty($showSubscriberFilter)">[/COLOR]
        <vb:comment>
          This form will be hidden and will not be shown at all but this will be programmatically used for paginating and sorting the Subscriber header 'Last Activity' in Subscription widget.
        </vb:comment>
    ... ... ...
    ... ... ...


  • 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
    Code:
    <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://[B][COLOR="red"]EXAMPLE.COM[/COLOR][/B]/node/{vb:raw nodeid}&layout=button_count&action=like&show_faces=false&share=true&width=135&height=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://[B][COLOR="Red"]EXAMPLE.COM[/COLOR][/B]/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://[B][COLOR="red"]EXAMPLE.COM[/COLOR][/B]/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>
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin [XTR] Unlimited Social Sharing Buttons xenforo 2 Xenforo 2.x Premium 0
Admin PSD 3D buttons social - bộ button mạng xã hội Thiết kế đồ họa 0
Admin Social Media vBulletin 5 Add-ons 0
hunglata Xin code social bản chuẩn Johncms 2
Admin vBSocial.com Social Network -v.9.2 vB5 Mods (Ajax) Add-ons 0
Admin phpVibe 3.3 RC2 – Video sharing and Social videos (Nulled) Mã nguồn web 0
Admin Mutual Social Groups Add-ons 0
Admin [ozzy47] Social Media Icon Links In NavBar Add-ons 0
D Share phpDolphin v1.2.2 – Social Network Platform All Shared Scripts 0
Admin KeyCAPTCHA - Interactive CAPTCHA with Social Features Add-ons 0
Admin PunchTab Enabled Social Sharing on Post/Threads Add-ons 0
Kidblood Thảo luận Danh sách 35 trang Social Bookmarking PR cao Thảo luận SEO 0
Admin Social Badges For Vbb5 Add-ons 0
Admin Share code social network facebook t2viet.tk Mã nguồn web 1
Admin Postbit Social Network Icons Vbulletin 0
Admin High PageRank Social Bookmarking List Thảo luận SEO 0
Kidblood Share Bộ CSS Social Button All Shared Scripts 2
Admin Yilmaz - Buttons To Zoom In and Out (Compatible 5.6.x) Add-ons 0
Admin Real Buttons in XF 2.x colors and hoover Xenforo 0
Admin [OzzModz] Hide Quote Buttons In Last Post Add-ons 0
N Free Web Buttons PSD Thiết kế đồ họa 0
Admin Daily Short Term Banning by BOP5 (Ban users during part of the day or night) Add-ons 0
Admin Short.Url.Script.v2.1.PHP.NULL-DGT - Code rút gọn link Mã nguồn web 0

Similar threads

New posts New threads New resources

Back
Top