Advertisement:

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

Offline Segnali

  • Jr. Member
  • **
  • Posts: 159
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #120 on: June 01, 2014, 04:52:08 AM »
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

Offline handy1

  • Semi-Newbie
  • *
  • Posts: 41
Re: Add Facebook Like, Tweet, and Google +1
« Reply #121 on: June 11, 2014, 01:20:09 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.

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

I should add

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

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).
« Last Edit: June 11, 2014, 02:14:23 AM by handy1 »

Offline webpermoter2014

  • Newbie
  • *
  • Posts: 1
Re: Add Facebook Like, Tweet, and Google +1
« Reply #122 on: June 11, 2014, 05:15:28 AM »
that looks great, what i was looking for.

That's cool..

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,635
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Add Facebook Like, Tweet, and Google +1
« Reply #123 on: October 18, 2014, 12:21:41 PM »
When update dont forget portuguese files

Code: [Select]
<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>



Offline Segnali

  • Jr. Member
  • **
  • Posts: 159
  • Gender: Male
    • Investire in Azioni
Re: Add Facebook Like, Tweet, and Google +1
« Reply #124 on: December 06, 2014, 04:36:15 AM »
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?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,974
  • Gender: Male
    • Kindred-999 on GitHub
Re: Add Facebook Like, Tweet, and Google +1
« Reply #125 on: December 06, 2014, 09:03:59 AM »
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.

Offline HRM

  • Jr. Member
  • **
  • Posts: 333
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Add Facebook Like, Tweet, and Google +1
« Reply #126 on: December 06, 2014, 11:20:36 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 
Code: [Select]

// 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
Code: [Select]
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

Offline Bob La Londe

  • Semi-Newbie
  • *
  • Posts: 49
Re: Add Facebook Like, Tweet, and Google +1
« Reply #127 on: January 18, 2015, 02:32:41 PM »
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. 

Offline baywatcharms

  • Semi-Newbie
  • *
  • Posts: 18
Re: Add Facebook Like, Tweet, and Google +1
« Reply #128 on: January 20, 2015, 11:52:13 PM »
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?

Offline baywatcharms

  • Semi-Newbie
  • *
  • Posts: 18
Re: Add Facebook Like, Tweet, and Google +1
« Reply #129 on: January 21, 2015, 12:34:21 PM »
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. 

Offline 0Connors

  • Full Member
  • ***
  • Posts: 491
  • Gender: Male
  • Numéro 2 des Empafés
    • Les Empafés
Re: Add Facebook Like, Tweet, and Google +1
« Reply #130 on: February 06, 2015, 09:12:10 AM »
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,
« Last Edit: February 06, 2015, 09:47:22 AM by 0Connors »
Site : www.pafteam.com

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

Version SMF : 2.0.9

Offline 0Connors

  • Full Member
  • ***
  • Posts: 491
  • Gender: Male
  • Numéro 2 des Empafés
    • Les Empafés
Re: Add Facebook Like, Tweet, and Google +1
« Reply #131 on: February 16, 2015, 09:03:11 AM »
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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,974
  • Gender: Male
    • Kindred-999 on GitHub
Re: Add Facebook Like, Tweet, and Google +1
« Reply #132 on: February 16, 2015, 09:07:47 AM »
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.

Offline 0Connors

  • Full Member
  • ***
  • Posts: 491
  • Gender: Male
  • Numéro 2 des Empafés
    • Les Empafés
Re: Add Facebook Like, Tweet, and Google +1
« Reply #133 on: February 16, 2015, 09:12:38 AM »
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

Offline Miker1029

  • Jr. Member
  • **
  • Posts: 165
  • Gender: Male
    • http://www.facebook.com/428239094034539 on Facebook
    • https://plus.google.com/+Android-x86Net/about on LinkedIn
    • @AndroidX86Forum on Twitter
    • Android - X86 Forums
Re: Add Facebook Like, Tweet, and Google +1
« Reply #134 on: March 18, 2015, 12:29:48 PM »
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


Offline SomaliDoc

  • Semi-Newbie
  • *
  • Posts: 53
Re: Add Facebook Like, Tweet, and Google +1
« Reply #135 on: May 05, 2015, 10:32:10 AM »
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

Offline blackbear4110

  • Semi-Newbie
  • *
  • Posts: 11
Re: Add Facebook Like, Tweet, and Google +1
« Reply #136 on: June 26, 2015, 01:58:18 PM »
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~

Offline SomaliDoc

  • Semi-Newbie
  • *
  • Posts: 53
Re: Add Facebook Like, Tweet, and Google +1
« Reply #137 on: June 26, 2015, 02:02:56 PM »
Go to
Admin -> Configuration -> Modification settings -> Miscellaneous, then enable the icons from there.

Offline Miker1029

  • Jr. Member
  • **
  • Posts: 165
  • Gender: Male
    • http://www.facebook.com/428239094034539 on Facebook
    • https://plus.google.com/+Android-x86Net/about on LinkedIn
    • @AndroidX86Forum on Twitter
    • Android - X86 Forums
Re: Add Facebook Like, Tweet, and Google +1
« Reply #138 on: June 26, 2015, 02:05:21 PM »
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

Offline blackbear4110

  • Semi-Newbie
  • *
  • Posts: 11
Re: Add Facebook Like, Tweet, and Google +1
« Reply #139 on: June 26, 2015, 03:04:52 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.