• Welcome to Simple Machines Community Forum. Please login or sign up.
December 06, 2021, 11:28:02 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Add Facebook Like, Tweet, and Google +1

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

Previous topic - Next topic

Segnali

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

ouch...that sounds complicated :(

Is there any step by step guide for dummies?

Thank you

handy1

June 11, 2014, 01:20:09 AM #121 Last Edit: June 11, 2014, 02:14:23 AM by handy1
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.

Well, maybe someone could explain this to me too  8)

I should add

// 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>';


somewhere in index.template.php in my theme folder? What is the right place, I tried it above

"// Here comes the JavaScript bits!
   echo '"


But it gave an error (hole site went down).


Apllicmz

When update dont forget portuguese files

<file name="$languagedir/Modifications.english-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['socialization_onoff'] = 'Enable socialization button (Facebook, Twitter, and Google+)';
$txt['facebook_like'] = 'Show Facebook Like icon in the first post.';
$txt['twitter_tweet'] = 'Show Twitter Tweet icon in the first post.';
$txt['googleplus_plusone'] = 'Show Google +1 icon in the first post.';
]]></add>
        </operation>
    </file>

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['socialization_onoff'] = 'Activar bot&atilde;o socializa&ccedil;&atilde;o (Facebook, Twitter, and Google+)';
$txt['facebook_like'] = 'Mostrar &iacute;cone do Facebook Como no primeiro poste.';
$txt['twitter_tweet'] = 'Mostrar Twitter Tweet &iacute;cone Como no primeiro poste.';
$txt['googleplus_plusone'] = 'Mostrar &iacute;cone do Google +1 no primeiro poste.';
]]></add>
        </operation>
    </file>



Segnali

Quote from: Segnali di Trading .com on June 01, 2014, 04:52:08 AM
Quote from: Kindred 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.

ouch...that sounds complicated :(

Is there any step by step guide for dummies?

Thank you


I am still with the double icons issue :(

Can anyone help me please?

Kindred

go to http://custom.simplemachines.org/mods/index.php?mod=3559
click parse
look through each change ordered by the mod
undo the duplicate changes
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

HRM

Quote from: Segnali di Trading .com on December 06, 2014, 04:36:15 AM

I am still with the double icons issue :(

Can anyone help me please?

Follow Kindreds link or check in
./Themes/default/Display.template.php   for 

// Add Facebook Like, Tweet, and Google +1
if (!empty($modSettings['socialization_onoff'])) {
if ($message['id'] == $context['topic_first_message']) {
echo '
<br />
<div style="margin-left:auto;margin-right:auto;text-align:center;padding-left:12px">';

// Show Facebook Like icon in the first post
if (!empty($modSettings['facebook_like'])) {
echo '
<iframe src="http://www.facebook.com/plugins/like.php?href=', $scripturl, '?topic=', $context['current_topic'], '&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:20px;" allowTransparency="true"></iframe>';
}

// Show Twitter Tweet icon in the first post
if (!empty($modSettings['twitter_tweet'])) {
echo '
<a href="https://twitter.com/share" class="twitter-share-button" data-url="', $scripturl, '?topic=', $context['current_topic'], '" data-counturl="', $scripturl, '?topic=', $context['current_topic'], '"></a><script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
}

// Show Google +1 icon in the first post
if (!empty($modSettings['googleplus_plusone'])) {
echo '
<div class="g-plusone" data-size="medium"></div><script type="text/javascript">(function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();</script>';
}

echo '
</div>
<br />';
}
}



being twice in there or in:
./Sources/ManageSettings.php

array('check', 'socialization_onoff'),
array('check', 'facebook_like'),
array('check', 'twitter_tweet'),
array('check', 'googleplus_plusone'),


being double.


Also some themes have their own Display.template.php so you have to check that as well if needed.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Bob La Londe

So where exactly do the Facebook likes show up?  I installed this on two forums I manage, and the only place I could find the likes was on my history.  Not on my Facebook page or on my Home feed. 

baywatcharms

Can you explain exactly what this mod is suppose to do.  I am a little bit confused.  I installed the mod, it seems to be working, but not sure if it is working correctly.  The icons show up on the first post.  When I click like on the FB button, it changes to ! like.  If I click on the twitter, it pops up a share screen for twitter, if I share the tweet, it shows up on my twitter account.  But the number does not change from 0 to 1.  Another thing is that the FB like prompts me to login as me.  It won't let me use the page that I manage, and nothing seems to post to my FB.  Have I done something wrong?  Can you help?

baywatcharms

I have just read almost all the post regarding this mod.  I am kind of at a loss right now.  Wondering if I should uninstall, and and install again manually. 

0Connors

February 06, 2015, 09:12:10 AM #130 Last Edit: February 06, 2015, 09:47:22 AM by 0Connors
Hi,

Thank you for this mod, but the mod don't share the post on my facebook wall too, and  Twitter counter not work :( Can you fix it, please  ?!

Thank you,
Site : www.pafteam.com

Projet : www.pafteam.com/beta-test/maj-site/

Version SMF : 2.0.9

0Connors

Hi,

Finaly, the twitter's counter works fine ! But i still have the problem with facebook.

Thank you for your help in advance,
Site : www.pafteam.com

Projet : www.pafteam.com/beta-test/maj-site/

Version SMF : 2.0.9

Kindred

Correct, it does not share the page on your facebook wall... It just does facebook like...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

0Connors

Hi Kindred,

Oh it's too bad, but thank you for your quickly answer,

Have good day,
Site : www.pafteam.com

Projet : www.pafteam.com/beta-test/maj-site/

Version SMF : 2.0.9

Miker1029

I don't know what's up, If I'm doing something wrong or what,  But I don't have ANY Buttons and The FB Button Doesn't have a BOX to Check, No Buttons are showing in posts, Tried New Post to Test, Nothing is there, I've Installed Multiple Times and Even Did it Manually and still nothing, Not Even On the CORE theme....  Am I missing something here?? Permissions or Something??

SMF 2.0.9

Any Help Appreciated,

Mike


SomaliDoc

I have noticed  when I am using Facebook debug, it is showing me these warning messages:

Admins And App ID Missing fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high clickthrough rate.
Like Button Tag Missing og:title is missing. The og:title meta tag is necessary for Facebook to render a News Feed story that generates a high clickthrough rate.

Where can I place those "og tags"?

I hope someone understands what I am talking about...

Thanks

blackbear4110

I finally managed to get this package installed.  For some reason it didn't want to download from the url (wasn't extracting any files for some reason), so finally I downloaded the file to my pc and uploaded the package to the package manager that way.

Anyway, now that I have this mod installed, I checked all features to turn on.  But they are not showing up.  I can not see the FB icon, the Twitter icon, or the Google+ icon in any post.  It's as if I didn't install anything.
I'm using SMF 2.0.10 (and have also tried simulating to 2.0.9 in case that was a problem, but that didn't change anything).  And my default theme is Lucid Dreams. 

Not sure what other info you might need to help me figure out why this isn't working.

Thanks in advance~

SomaliDoc

Go to
Admin -> Configuration -> Modification settings -> Miscellaneous, then enable the icons from there.

Miker1029

AND if that doesn't work, use SA, I've tried this one awhile ago and it didn't work,  Only Drawback is SA Facebook is (was) broke....

Mike

blackbear4110

Quote from: SomaliDoc on June 26, 2015, 02:02:56 PM
Go to
Admin -> Configuration -> Modification settings -> Miscellaneous, then enable the icons from there.
I did that, but it wasn't working.  So I uninstalled the mod, and reinstalled it.  Now the icons show up, but I just tested it by tweeting a topic, and the counter is still showing 0 instead of 1.

I guess I'll go try SA.

Advertisement: