Thank you hubie. I added like button next to Post Reply button in each thread. I like it this way instead of placing the like button after first post. Like button is more prominent if you place it in the top of thread -- just my thought.
I modfied showthread template. Find
Code:
<td class="smallfont"><a
href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID"
rel="nofollow">
and create another td element after this td; place the iframe tag between the new td tags.
To see how it looks, see
http://www.digitalbhoomi.in/forums/.
Complete code:
Code:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<if condition="$show['largereplybutton']">
<td width="120px;" valign="top" class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a>
</td>
<td>
<iframe scrolling="no" frameborder="0" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.digitalbhoomi.in/forums/showthread.php?t=$thread[threadid]&layout=standard&show_faces=false&width=450&action=like&font=verdana&colorscheme=light&height=30" style="border: medium none; overflow: hidden; width: 450px; height: 30px;" allowtransparency="true"></iframe>
</td>
<else />
I used iframe instead of xfbml. The reason is that xfbml needs Javascript SDK which mess up with flash ads in the page. Facebook has a solution for this, but it's not working. Moreover, I don't want to add too many javascripts in the forum page that will slow down the page loading.