Yesterday, I blogged about implementing Facebook’s Like Button on this website. It’s fairly easy. There’s already tons of WordPress plugins for this button.
Unfortunately, compared to WordPress, phpLD is a bit smaller community so this is probably the first Facebook like mod for phpLD.
Anyhow, the easiest way to implement Facebook’s Like Button on phpLD is to go to Facebook’s plugin page, fill in your URL, then copy and paste the code provided to your footer or wherever you might want to implement this button on your directory.
The only problem with this easy solution is that it only ‘likes” the URL, most likely your homepage, you’ve given. You can’t share or “like” individual listings or articles like what I’ve done here.
Fortunately, implementing this button on individual listings is fairly simple. Just copy the following code on detail.tpl of the template you’re using.
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fyourwebsite.com/detail.php?id={$ID}&layout=standard&show_faces=true&width=420&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:420px; height:100px"></iframe>
Replace yourwebsite.com with your URL. As you can see, you can manipulate the width and height of the plugin. If you dont want to show Facebook users’ photos, just set show_faces to false.
If you wish, you can also place this code in your link.tpl but you’ll neeed to replace {$ID} to {$link.ID}
NOTE: I installed this on phpLD version 4.0 but the mod is so simple I’m sure it works on version 3.x too and maybe even 2.2




Thanks for this! I just posted about this and linked to this article in the phpLD free mods section.
Thanks for this
How to add Share IN Twitter Example Facebook’s Like button
Many thanks for this mods…simple but very usefull for facebook lovers
Have added it to my own directory — Works like a dream
Thanks :o)
I added this mod to link.tpl because I couldn’t find detail.tpl on v2.2. This really works!