This min-mod came about in answer to a private request to insert a
Facebook "Like" Button plug-in under articles and pages in sNews 1.6. This should work in all versions of sNews 1.6 including my old MEMU versions. It has been tested and can be seen on an old 1.6 MEMU test install here -
On Articles and
On a Page.
1. The first thing we need to do is generate the full URL to articles and pages by defining the value for a new variable -
$social_url Search your snews.php or snewsMU.php file for -
$edit_link = $link - within
function center() and insert the following (excluding the PHP tags) under it:
<?php
# Facebook Mod, July 22.10
$social_url = db('website').$category.'/'.$r['seftitle'].'/'; // generates full URL to content - sNews 1.6
?>
2. Search again for -
if ($infoline == true) { two times and insert the following (again, with no PHP tags).
The first location is just a few lines below the above location, and the second location is not far down from the first one.
This uses the I-Frame script generated from Facebook's Plugins "Like Button" page,
with our new
$social_url variable replacing the static link to generate the links dynamically.
<?php
/*---------- Facebook Mod, July 22.10 - generates the "Like" string --------------------*/
echo '<p><iframe src="http://www.facebook.com/plugins/like.php?href='.$social_url.'&layout=standard&show_faces=false&width=450&action=like&font=arial&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></p>';
/* ----- end Facebook Mod ------------------*/
?>
NOTE: The same mod for
sNews 1.7 versions is located here.