![]() |
Add Tweet, Google+ FB like/Share buttons in your threads
1 Attachment(s)
Im basically adding this Template modification for safe keeping if thats ok by the staff.
This is pretty simply and does what i need it to do for my forums. As the title kinda stats, you can add "Tweet, Google+ FB like/Share" share buttons under the post title of your threads and, or above signature. These 2 places i find looks neater and kinda more effective. You can chose to place your code anywhere in post_bit that fits your needs. FYI: This only shares the URL of the Thread. Ok lets get to it. In your Header Template, add this Code to the very Top: Code:
<div id="fb-root"></div> In Your Additional CSS Add the following: Code:
.social-buttons { Now its time to place your Share Buttons into your Threads. You have 1 of 3 Options on where you would like to add your Share Buttons. 1. Below Post Title 2. Above Signature 3. Next To Edit Buttons. Option 1. How to add Share Buttons Below Post Title: Find in Template postbit_legacy: Code:
<!-- / icon and title --> Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))"> Option 2. How to add Share Buttons above your Signature: In postbit_legacy Template, Search for: Code:
<if condition="$post['signature']"> Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))"> This is only if you have modified Signature Coding in your postbit. Try searching in postbit_legacy Template for: Code:
$ad_location[ad_showthread_firstpost_sig] Option 3. How to add Share Buttons below next to the Edit, Quote Buttons etc: Find in your postbit_legacy Template: Code:
<!-- controls --> Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))"> Hide Share Buttons in certain Forums: You would simply use these lines around the Code above and change x to Forums ID: Code:
<if condition="!in_array($GLOBALS[forumid], array(x,x,x))"> For Example, if i wanted to hide the Share Buttons in my Staff Forums, i would place in the Forums ID 43 and 44. My code would look like this: Code:
<if condition="!in_array($GLOBALS[forumid], array(43,44))"> Haven't tried this on normal post bit template but pretty sure it will work. You can add extra buttons to this code for your site, like Pin It etc. And hope this works for anyone that actually uses it. Thanks for marking Installed! Screenshots added of All Placements added to this post. Demo Test Site: DEMO. Also don't forget to add your own Twitter name "YOUR-TWITTER-NAME" to whatever yours is! Updated: 30/06/2014. Fixed the following issues: validator.w3.org was picking on an small error in the facebook header code - Fixed. There was an issue with the Like Button, every time you clicked Like, a box would appear. No more Box! - Fixed. The <br's were in the wrong spot in the codes effecting 2nd, 3rd, 4th posts etc - Fixed. When someone clicked the FB Like Button, the line of text would increase in character and cause 2 lines - Fixed. Aware of a small issue sometime a small with line appears behine the FB Like Button when Clicking Like. Works fine and isn't a real issue, but will try to find a fix anyways. |
any one have tried?
|
Quote:
you can see on blind eddies site, he is running just the like and share button from this mod, but without css edit. thanks for like @ blind-eddie ;) EDIT: added a 3rd site screenshot demo, and screenshots of this working on twitter, google, facebook. |
Quote:
|
Quote:
|
Actually, the fb like/share is fb code, I did not add this to my test site, I added this to another site of mine.
It is a work in progress. For some reason the Google button will not show in other styles. I only edit the default style, all other styles are child styles. I had to add the additional css to each style. Each style is the default style edited. So, with that said, any clues as to why the Google button will only show in the default style? Code:
Site can also be reached at nacc.club or nacc.biz |
seems like maybe you need to add the header code for google+ to show. thats just my first thought as usually its the only reason google+ does not show.
going by your source code, i only see the i.e. javascript for google+ in your default style. |
That's odd.... I did have to add header edit to each style.
Its working now, Thanks Shawn. |
why its does not auto post in wall when you click like button ?
|
Quote:
|
All times are GMT. The time now is 04:17 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|