MyBB Community Forums

Full Version: Put a Twitter/FaceBook/Google+ share buttons on each post!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
One major flaw with the method, it shows the twitter button on the private messages as wll.
(2014-10-27, 06:06 AM)Michael2014 Wrote: [ -> ]One major flaw with the method, it shows the twitter button on the private messages as wll.

You can use template conditionals to disable it in pms/previews. Just add this code to postbit/postbit_classic instead:
<if $post_type != 1 && $post_type != 2 then>
... button code here ...
</if>
(2014-10-27, 03:53 PM)Destroy666 Wrote: [ -> ]
(2014-10-27, 06:06 AM)Michael2014 Wrote: [ -> ]One major flaw with the method, it shows the twitter button on the private messages as wll.

You can use template conditionals to disable it in pms/previews. Just add this code to postbit/postbit_classic instead:

<if $post_type != 1 && $post_type != 2 then>
... button code here ...
</if>

Hi destroyer, I can't thank you enough, your bits of knowledge saves people like me hours and even days worth of time, thank you for clarifying this issue and the extra tidbits of advide, you are the code king!
Cool Stay awesome my friend!
Sorry guys I am struggling here.

I have gone to facebook and got the code (url http://www.massdebate.club/{$post['postlink']} ) and button

I put the code in forum display right after the body tag like it said in the FB instructions then the button code in postbit_classic as described above but nothing showed.

I re read the thread and saw something about "headerinclude" - but I cannot find a template called header include (using 1.8 default templates).

I did do this once years ago on a 1.6 installation and it took me ages then. I do struggle with coding. I know it is a pain but can someone walk me through it with exact templates and code locations - and if I even got the url right.

Thank you in advance

OK I have found header includes and followed everything and got the button etc - my only problem is that the button links to the thread not the post and the link just shows the title of the thread not not actual post.

Any ideas on what I am doing wrong?
Pages: 1 2