Facebook Like Mod
Facebook Like v.1.2
By
BlueDevil COMPATIBLE WITH SMF RC3[/center]
Bug Fixes / Updates1.) 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
CommentsThe 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