Advertisement:

Author Topic: Add Facebook Like, Tweet, and Google +1  (Read 82959 times)

Offline trollkin

  • Newbie
  • *
  • Posts: 1
Re: Add Facebook Like, Tweet, and Google +1
« Reply #100 on: January 12, 2014, 03:31:34 AM »
add Facebook Like+share

Code: [Select]
// Show Facebook Like icon in the first post
if (!empty($modSettings['facebook_like'])) {
echo '
<div id="fb-root"></div>
<div style="margin-left:auto;margin-right:2em;text-align:center;padding-right:12px" class="fb-like" data-href="', $scripturl, '?topic=', $context['current_topic'], '" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="verdana"></div>';

../../index.template.php
find
Code: [Select]
// Here comes the JavaScript bits!
echo '

add after
Code: [Select]
<script type="text/javascript" src="https://connect.facebook.net/en_US/all.js#xfbml=1"></script>

Thanks a lot for this addition !
Right what I was lookin for. Now it has the share/like thingy from Fb, like the twitter and google button. This makes this mod almost perfect! . :D
I'd like to advise to Pokemons to add this one to next time.


I've installed the mod in my forum (2.06) and Twitter and Google+ buttons works fine. Fb button has no effect and I want to add the code above. I am newbie and I have no idea where and how to add the code.

Can anybody help me?

Thank you!

Offline HRM

  • Jr. Member
  • **
  • Posts: 333
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Add Facebook Like, Tweet, and Google +1
« Reply #101 on: January 12, 2014, 06:57:40 AM »
You have to paste into the code of the index.template.php file of the Themes you want it to show. The default theme to start with.
In fact your FB button does work, only does not show what you expect. With above edits it will show what you expect, the share screen where you can type a message and show on your wall.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Offline sorularbiz

  • Newbie
  • *
  • Posts: 6
Re: Add Facebook Like, Tweet, and Google +1
« Reply #102 on: January 12, 2014, 07:02:11 AM »
Hi, this plugin is compatible with recent sur? Is there only one language? Can we just put pictures to share it?

Offline HRM

  • Jr. Member
  • **
  • Posts: 333
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Add Facebook Like, Tweet, and Google +1
« Reply #103 on: January 12, 2014, 08:49:46 AM »
Dont know about package manager but I did the manual installation and it works.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Offline HRM

  • Jr. Member
  • **
  • Posts: 333
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Add Facebook Like, Tweet, and Google +1
« Reply #104 on: January 15, 2014, 08:16:16 AM »
Is there only one language? Can we just put pictures to share it?

In case of FB language is in the url like:
Code: [Select]
https://connect.facebook.net/en_US/all.js#xfbml=1
If you change en_US into your preferred country/language code it will show the sharescreen/button in your language
In my case nl_NL which shows the FB share screen  in Dutch from the netherlands.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Offline TeeJay

  • Semi-Newbie
  • *
  • Posts: 67
Re: Add Facebook Like, Tweet, and Google +1
« Reply #105 on: January 18, 2014, 07:01:34 AM »
add Facebook Like+share

Code: [Select]
// Show Facebook Like icon in the first post
if (!empty($modSettings['facebook_like'])) {
echo '
<div id="fb-root"></div>
<div style="margin-left:auto;margin-right:2em;text-align:center;padding-right:12px" class="fb-like" data-href="', $scripturl, '?topic=', $context['current_topic'], '" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="verdana"></div>';

../../index.template.php
find
Code: [Select]
// Here comes the JavaScript bits!
echo '

add after
Code: [Select]
<script type="text/javascript" src="https://connect.facebook.net/en_US/all.js#xfbml=1"></script>

Thanks a lot for this addition !
Right what I was lookin for. Now it has the share/like thingy from Fb, like the twitter and google button. This makes this mod almost perfect! . :D
I'd like to advise to Pokemons to add this one to next time.


I've installed the mod in my forum (2.06) and Twitter and Google+ buttons works fine. Fb button has no effect and I want to add the code above. I am newbie and I have no idea where and how to add the code.

Can anybody help me?

Thank you!

Same problem for me no Facebook function and I have no idea what that code is or where to put it if indeed I need to ?

SMF 2.06
www.vdsr.co.uk
« Last Edit: January 18, 2014, 07:21:46 AM by TeeJay »

Offline TeeJay

  • Semi-Newbie
  • *
  • Posts: 67
Re: Add Facebook Like, Tweet, and Google +1
« Reply #106 on: January 18, 2014, 07:35:50 AM »
Never mind, I've removed the mod, as good as it is I can't be doing with modifying scripts, it all gets too messed up when it's time for upgrades etc, rather have something that can be installed and uninstalled without manual script mods

Thanks though

Offline Juan Carlos

  • Jr. Member
  • **
  • Posts: 244
  • Gender: Male
Re: Add Facebook Like, Tweet, and Google +1
« Reply #107 on: January 25, 2014, 09:43:07 PM »
Same for me.

nothing happens with fb. I already make the page 2 instructions
smf 2.0.7
Juan Carlos

Offline WCFA

  • Semi-Newbie
  • *
  • Posts: 22
Re: Add Facebook Like, Tweet, and Google +1
« Reply #108 on: February 07, 2014, 04:40:37 PM »


Newbie question here.

I have 2.0.7 on a new forum with a theme other then stock.
Id like to install this into my forum, but it appear because I am not using stock I will need to do so manually.
Is there a manual version to install via non default theme.

2nd newbie question, are there ever any mods that work with a non default theme? I find they all fail even if made
for 2.0.07

Thanks for the help.









Offline HRM

  • Jr. Member
  • **
  • Posts: 333
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Add Facebook Like, Tweet, and Google +1
« Reply #109 on: February 08, 2014, 03:34:57 AM »
Is there a manual version to install via non default theme.

2nd newbie question, are there ever any mods that work with a non default theme? I find they all fail even if made
for 2.0.07

Thanks for the help.


Sure... use parse function at right side of the mod page, will give you:  http://custom.simplemachines.org/mods/index.php?action=parse;mod=3559;attach=214901;smf_version=2.0.7

works with all themes.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Offline forum12

  • Newbie
  • *
  • Posts: 1
Re: Add Facebook Like, Tweet, and Google +1
« Reply #110 on: April 21, 2014, 12:57:10 AM »
Awesome mod is there a way to make it show up on every post?

Offline Segnali

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #111 on: May 14, 2014, 12:00:13 PM »
hello, does it work on SMF 2.0.2 ?

For some reasons I cannot upgrade to newer version otherwise I lose some mods my webmaster made...thanks

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,630
    • StoryBB/StoryBB on GitHub
Re: Add Facebook Like, Tweet, and Google +1
« Reply #112 on: May 14, 2014, 12:09:54 PM »
So you'd rather be insecure than 'lose mods' despite the fact that you can install each version beyond 2.0.2 as a mod...

Offline Segnali

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #113 on: May 14, 2014, 12:23:40 PM »
So you'd rather be insecure than 'lose mods' despite the fact that you can install each version beyond 2.0.2 as a mod...

well I backup once a week...the mods he did are not something I can find anywhere else: he edited the code so that no member can PM anybody else...I need that but no one here was able to do it.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,630
    • StoryBB/StoryBB on GitHub
Re: Add Facebook Like, Tweet, and Google +1
« Reply #114 on: May 14, 2014, 12:33:21 PM »
I still don't see why you can't just install the mod packages for 2.0.2 -> 2.0.3, 2.0.3 -> 2.0.4 etc. as per http://custom.simplemachines.org/upgrades/

Offline Segnali

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #115 on: May 15, 2014, 04:04:48 PM »
I still don't see why you can't just install the mod packages for 2.0.2 -> 2.0.3, 2.0.3 -> 2.0.4 etc. as per http://custom.simplemachines.org/upgrades/

alright I got up to 2.05 then I got an error which I have to check, however I installed this mod too but I am getting double icons:


Offline Segnali

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #116 on: May 15, 2014, 04:05:46 PM »
also, did not notice this mod only was for first post of each topic, is there any other similar mod for each post/reply?

Thanks

Offline Segnali

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #117 on: May 25, 2014, 02:55:41 AM »
 :'(

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,630
    • StoryBB/StoryBB on GitHub
Re: Add Facebook Like, Tweet, and Google +1
« Reply #118 on: May 25, 2014, 11:16:53 AM »
All of the different like schemes are really designed for entire pages, not really individual posts.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,298
  • Gender: Male
    • Kindred-999 on GitHub
Re: Add Facebook Like, Tweet, and Google +1
« Reply #119 on: May 25, 2014, 10:20:00 PM »
1- you got double icons because you installed the mod twice.
Now you are going to have to manually go through the code and remove the duplicated portions.

2- it's the way things are.  Facebooks, google, etc do not "like" a single post. They "like" the page/url.   That's how they are designed.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.