Free Forever. Our themes will always be free. Forever. Period.

Facebook Like Mod

Mick in Mods
Apr 22, 2010

Facebook Like Mod
Facebook Like v.1.2
By BlueDevil

COMPATIBLE WITH SMF RC3
[/center]


Bug Fixes / Updates
1.) Created v.1.1 on April 21 2010
2.) Added board permissions v.1.2 April 25 2010


An Error Has Occurred!



This mod installs the Facebook "Like" button on every topic. When the Facebook user clicks on it, a link with title will be posted in the Facebook users Recent Activity wall.

It will work on any custom theme that does NOT have display.template.php.

NOTE***  Just like Facebook settings, you can only view the names of those youre friends with.










PHP blocks for your portal ;)   

*Replace yoursite.com in the code with your own domain.
*Adjust height & width to your likings
*Replace light for light themes or dark for dark themes.

Recent Activity:

The Activity Feed plugin displays the most interesting recent activity taking place on your site. Since the content is hosted by Facebook, the plugin can display personalized content whether or not the user has logged into your site. The activity feed displays stories both when users like  content on your site and when users share content from your site back to Facebook. If a user is logged into Facebook, the plugin will be personalized to highlight content from their friends. If the user is logged out, the activity feed will show recommendations from your site, and give the user the option to log in to Facebook.

The plugin is filled with activity from the user's friends. If there isn't enough friend activity to fill the plugin, it is backfilled with recommendations. If you set the recommendations param to true, the plugin is split in half, showing friends activity in the top half, and recommendations in the bottom half. If there is not enough friends activity to fill half of the plugin, it will include more recommendations.




		// Facebook Recent Activity

echo '
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>

<div align="center"><fb:activity site="yoursite.com" width="170" height="300" header="true" colorscheme="light" /></fb:activity></div>';

//  End Of Facebook Recent Activity

Recommendations:

The Recommendations plugin shows personalized recommendations to your users. Since the content is hosted by Facebook, the plugin can display personalized recommendations whether or not the user has logged into your site. To generate the recommendations, the plugin considers all the social interactions with URLs from your site. For a logged in Facebook user, the plugin will give preference to and highlight objects her friends have interacted with.




		// Facebook Recommedations

echo '
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>

<div align="center"><fb:recommendations site="yoursite.com" width="170" height="300" header="true" colorscheme="light" /></fb:recommendations></div>';

//  End Of Facebook Recommendations


Comments

The Comments Box easily enables your users to comment on your site's content whether it's for a web page, article, photo, or other piece of content. Then the user can share the comment on Facebook on their Wall and in their friends' streams.

To be used in PHP articles and/or pages.




		// Facebook Comments

echo '
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>

<div align="center"><fb:comments></fb:comments></div>';

//  End Of Facebook Comments

Tagged with: facebook rc4 mod Thanks 


Mick

Mick G

Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded idesignSMF in 2009 to which he is dedicated full time and has a weakness for Tacos and Pizza.

Website: https://www.idesignsmf.com/

    


39 Comments

Dismal Shadow
Apr 23, 2010
In the center looks fine because if you move it to the right...it may mess up the Sleepy Arcade's FB Connect mod.

Just one request....
Add board permission and you are all set
1

Mick
Apr 23, 2010
In the center looks fine because if you move it to the right...it may mess up the Sleepy Arcade's FB Connect mod.

Just one request....
Add board permission and you are all set

Um, i dont use sleepy's FB connect.    Really? board permissions? i didnt think it was necessary.
2

Dismal Shadow
Apr 23, 2010
Um, i dont use sleepy's FB connect.    Really? board permissions? i didnt think it was necessary.
Because there are private boards which will still show up on facebook but on Fb it will look like this:
Nathan likes "Login"
3

Mick
Apr 23, 2010
Because there are private boards which will still show up on facebook but on Fb it will look like this:
Nathan likes "Login"

I see that.... let me see what i can do.
4

Mick
Apr 25, 2010
I added board permissions ;)

v.1.2
5

Dismal Shadow
Apr 25, 2010
No link? Guess I have to wait for SMF approval then...  :-\
6

Mick
Apr 25, 2010
Ooops.... look in first post.
7

Dismal Shadow
Apr 25, 2010
interesting, I was thinking of a better permission like this, more easier.
 
8

Dismal Shadow
Apr 25, 2010
UPDATE: It does not work with FB Connect installed as it's conflit with each other somehow.
With FB Connect the "Link" button won't show up.
9

Mick
May 15, 2010
UPDATE: It does not work with FB Connect installed as it's conflit with each other somehow.
With FB Connect the "Link" button won't show up.

SA uses an older Facebook .js SDK
10

Dismal Shadow
May 16, 2010
SA uses an older Facebook .js SDK
Anyhow to get it to work together? Tell me where to change the code to the new facebook.js SDK
11

Mick
May 16, 2010
Anyhow to get it to work together? Tell me where to change the code to the new facebook.js SDK

That's the thing, in order to make SA's mod to work with the new FB javascript, his code needs to be rewritten.
12

Dismal Shadow
May 19, 2010
Is it possible to make the text light? It doesn't fare well on dark themes.

And also, if the topic title is long it will remove the title.
13

Mick
May 19, 2010
Is it possible to make the text light? It doesn't fare well on dark themes.

And also, if the topic title is long it will remove the title.

Yes, in display.template.php find:

light

Replace with:

dark

or


evil

I noticed titles get cutoff too.  Moving the button is the best choice.
14



Connect with us:


Improve SMF

If you wish to contribute to the development of SMF you can contribute to the coding discussions taking place on Github. You are also welcome to suggest features which you would like to see added to the software in the Feature Requests board.

  Receive our monthly newsletter right in your inbox.


Advertisement  




 Mods
In this category you will find plugins related to SMF development. Here we present some new mods to help you get the most of your SMF installation.



go up