News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Add Facebook Like, Tweet, and Google +1

Started by PokémonS, January 02, 2013, 01:42:20 PM

Previous topic - Next topic

trollkin

Quote from: HRM on December 29, 2013, 05:24:28 AM
Quote from: NightzKung on February 16, 2013, 04:42:21 AM
add Facebook Like+share

// 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
// Here comes the JavaScript bits!
echo '


add after
<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!

HRM

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

sorularbiz

Hi, this plugin is compatible with recent sur? Is there only one language? Can we just put pictures to share it?

HRM

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

HRM

Quote from: sorularbiz on January 12, 2014, 07:02:11 AM
Is there only one language? Can we just put pictures to share it?

In case of FB language is in the url like:
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

TeeJay

#105
Quote from: trollkin on January 12, 2014, 03:31:34 AM
Quote from: HRM on December 29, 2013, 05:24:28 AM
Quote from: NightzKung on February 16, 2013, 04:42:21 AM
add Facebook Like+share

// 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
// Here comes the JavaScript bits!
echo '


add after
<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

TeeJay

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

Juan Carlos

Same for me.

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

WCFA



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.









HRM

Quote from: WCFA on February 07, 2014, 04:40:37 PM
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

forum12

Awesome mod is there a way to make it show up on every post?

Segnali

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

Arantor

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...

Segnali

Quote from: Arantor 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...

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.

Arantor

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/

Segnali

Quote from: Arantor 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/

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:


Segnali

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

Segnali


Arantor

All of the different like schemes are really designed for entire pages, not really individual posts.

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: