Advertisement:

Author Topic: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts  (Read 111233 times)

Offline alchimia

  • Jr. Member
  • **
  • Posts: 125
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #40 on: May 28, 2012, 03:09:09 PM »
Nice tip, but i have one OT question. What's the name of this theme (from screenshot from first post) ?
It's a modified version of Dziner's Inferno theme.
Can we have this modified version?

Offline simon36

  • Jr. Member
  • **
  • Posts: 111
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #41 on: June 06, 2012, 06:01:59 PM »
Does anyone have the code all together to add facebook, twitter and g+1 on to the last post?

Thanks in advance.

Offline 6Scylla

  • Semi-Newbie
  • *
  • Posts: 35
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #42 on: June 07, 2012, 07:03:48 AM »
Awesome trick, Thanks abunch!

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,154
  • Gender: Male
    • @fragicide on Twitter
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #43 on: June 10, 2012, 01:39:12 AM »
Updated to include Google Plus, as well as neatening up and clarified a few things.

Offline graaywolf

  • Semi-Newbie
  • *
  • Posts: 52
  • Gender: Male
  • Webslave!
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #44 on: June 11, 2012, 02:06:07 PM »
J...

GraayWolf here

added your edits and it works fine except the facebook share window is half hidden... you have to guess that what your typing is not a typo lol....

no attachments option I guess so I can't give you a screenshot... come into my stickam chat and i'll show ya what's happening....

I'm trying...

-=(GW)=-

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,154
  • Gender: Male
    • @fragicide on Twitter
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #45 on: June 12, 2012, 09:28:33 AM »
J...

GraayWolf here

added your edits and it works fine except the facebook share window is half hidden... you have to guess that what your typing is not a typo lol....

no attachments option I guess so I can't give you a screenshot... come into my stickam chat and i'll show ya what's happening....

That's because the share window is bigger than the containing div. If it were made any bigger, it would throw off the layout and make things looks like hell. There' no real way to fix it that I can think of.

Offline kimjhamilton

  • Newbie
  • *
  • Posts: 5
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #46 on: January 15, 2013, 06:34:47 PM »
Don't suppose you have the coding to share to Tumblr as well, cause that would be awesome.

Offline GraphicJunki

  • Semi-Newbie
  • *
  • Posts: 31
    • @Graphicjunki on Twitter
    • GraphicJunki
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #47 on: April 01, 2013, 03:10:20 PM »
This worked for me on most of my themes.  Great tip  thanks. :)

Offline labyo

  • Newbie
  • *
  • Posts: 4
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #48 on: April 07, 2013, 02:19:08 AM »
Thanks  :D

Offline Nickyy

  • Newbie
  • *
  • Posts: 6
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #49 on: November 08, 2013, 05:04:09 AM »
Thank you JBlaze for the tip/trick :)
I have
SMF Package       SMF 1.1.19
Sources                    2.0    1.1.19
Default Templates    2.0    1.1.12
Language Files    2.0    1.1.18
Current Templates    2.0    1.1

The result from adding the code is only a hyperlink to twitter with the word 'Tweet'. Screenshot:


Offline LePhuongBao

  • Semi-Newbie
  • *
  • Posts: 11
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #50 on: December 06, 2013, 01:59:11 AM »
Thank you so much tutorial posts

Offline eric1234

  • Full Member
  • ***
  • Posts: 683
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #51 on: February 26, 2014, 03:37:50 PM »
For some reason it work well in Firefox but in Google Chrome it seem to be malfunction.  :(

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #52 on: March 06, 2015, 09:06:47 AM »
Ok, here's a question: if you want to put a facebook/google+/twitter share link to a POST (not a whole topic or topic page) how to do it?

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #53 on: March 06, 2015, 04:10:23 PM »
Ok, I can answer myself to this one... ;D

In the end I could achieve a working link for each post by using:
Code: [Select]
', $scripturl, '?topic=', $context['current_topic'], '.msg' . $message['id'] . '%23msg' . $message['id'] . '
That code is to be put right after the desired facebook/twitter/google+/etc link, for example:
Code: [Select]
https://www.facebook.com/sharer/sharer.php?u=', $scripturl, '?topic=', $context['current_topic'], '.msg' . $message['id'] . '%23msg' . $message['id'] . '"
You can check it out how it works live here: http://www.forumscp.com/index.php?topic=64983.20 (notice the share icon on top right-corner of each post)

Offline Johnson12

  • Newbie
  • *
  • Posts: 1
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #54 on: April 28, 2015, 08:53:03 PM »
Thank you for your tips adding share button :)

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #55 on: June 10, 2015, 03:57:44 PM »
Thank you JBlaze for the tip/trick :)
I have
SMF Package       SMF 1.1.19
Sources                    2.0    1.1.19
Default Templates    2.0    1.1.12
Language Files    2.0    1.1.18
Current Templates    2.0    1.1

The result from adding the code is only a hyperlink to twitter with the word 'Tweet'. Screenshot:

Any help on this? I have the same problem. I added this today on the "Flatline" theme. I edited the default "display.template.php" file because my theme doesn't have one. Then I edited my themes "index.template.php" file, as the OP instructs to do so.

The result....Just the text "Tweet", that's it.

Any help is greatly appreciated.

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #56 on: June 10, 2015, 06:34:41 PM »
Thank you JBlaze for the tip/trick :)
I have
SMF Package       SMF 1.1.19
Sources                    2.0    1.1.19
Default Templates    2.0    1.1.12
Language Files    2.0    1.1.18
Current Templates    2.0    1.1

The result from adding the code is only a hyperlink to twitter with the word 'Tweet'. Screenshot:

Any help on this? I have the same problem. I added this today on the "Flatline" theme. I edited the default "display.template.php" file because my theme doesn't have one. Then I edited my themes "index.template.php" file, as the OP instructs to do so.

The result....Just the text "Tweet", that's it.

Any help is greatly appreciated.

Turns out, my company is blocking twitter and fb. I got home and both show in the post, but no G+

Offline gusu

  • Newbie
  • *
  • Posts: 7
Re: [TIP/TRICK] Adding Twitter and Facebook "Share/Like" Button To Posts
« Reply #57 on: September 30, 2018, 01:58:59 PM »
I'm using the Avada theme. Can I implement this technique safely on it?