<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>Aries, that would be fine if it was a node display, but wouldn't work on a View.<BR> </DIV>
<P><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P> </P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Fehér János <feher.janos@mindworks.hu><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> development@drupal.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thu, January 20, 2011 2:16:47 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [development] Facebook like button count problem with drupal?<BR></FONT><BR>
<DIV>Hi Rajat,</DIV>
<DIV><BR></DIV>
<DIV>You can use this in node.tpl.php and page-node.tpl.php files:</DIV>
<DIV><BR></DIV>
<DIV><?php echo url('node/'. $node->nid, array('absolute' => TRUE)); ?><BR></DIV>
<DIV><BR></DIV>
<DIV>This prints out the url of the node in absolute form (beginning with http:)</DIV>
<DIV><BR></DIV>
<DIV>Bests,</DIV>
<DIV>Aries</DIV>
<DIV><BR></DIV>
<DIV class=gmail_quote>2011/1/20 Rajat Arora <SPAN dir=ltr><<A href="mailto:arora271@yahoo.com" rel=nofollow target=_blank ymailto="mailto:arora271@yahoo.com">arora271@yahoo.com</A>></SPAN><BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="COLOR: #000000; FONT-SIZE: 12pt">
<DIV style="COLOR: rgb(0,0,0); FONT-SIZE: 12pt">Hi List, </DIV>
<DIV style="COLOR: rgb(0,0,0); FONT-SIZE: 12pt"><BR></DIV>
<DIV><FONT size=3 face="'times new roman', 'new york', times, serif">I am facing an issue with the implementation of </FONT><FONT face="'times new roman', 'new york', times, serif">Facebook</FONT><FONT size=3 face="'times new roman', 'new york', times, serif"> like button on my website. </FONT><SPAN>Here is quick summary of Issue:</SPAN></DIV>
<DIV><FONT size=3 face="'times new roman', 'new york', times, serif"><BR></FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif">The like button is inserted for different pages which are shown after making a filter search on website. The problem is that, the like button increase the count for whole website instead of that particular page where the "like" button is pressed. It </FONT><SPAN style="FONT-SIZE: 16px">is always counting the likes for the server “<A href="http://abc.com/" rel=nofollow target=_blank>abc.com</A>” instead of calculating for different pages where the like button is pressed. </SPAN></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif"><BR></FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif">Here is the code snippet used for implementation:</FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif">
<P><SPAN> </SPAN></P>
<P><B><U><SPAN>Code: </SPAN></U></B></P>
<P><SPAN> </SPAN></P>
<P><SPAN><div class="facebook_button"></SPAN></P>
<P><SPAN><SPAN> </SPAN>{php}</SPAN></P>
<P><SPAN><SPAN> </SPAN>function fetch_url() {</SPAN></P>
<P><SPAN><SPAN> </SPAN><SPAN>$curURL="http://%22.$_SERVER%5B'];</SPAN></SPAN></P>
<P><SPAN>return $curURL;</SPAN></P>
<P><SPAN>}</SPAN></P>
<P><SPAN>{/php}</SPAN></P>
<P> </P>
<P><SPAN style="LINE-HEIGHT: 115%; COLOR: teal; FONT-SIZE: 10pt"><</SPAN><SPAN style="LINE-HEIGHT: 115%; COLOR: #3f7f7f; FONT-SIZE: 10pt">iframe</SPAN><SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"> <SPAN style="COLOR: #7f007f">src</SPAN><SPAN style="COLOR: black">=</SPAN><I><SPAN style="COLOR: #2a00ff"><SPAN>"http://www.facebook.com/plugins/like.php?href=%7Bphp} echo urlencode(fetch_url()); {/php}&layout=button_count&show_faces=true&width=110&action=like&colorscheme=light&height=20&locale=de_DE"</SPAN></SPAN></I> <SPAN style="COLOR: #7f007f">scrolling</SPAN><SPAN style="COLOR: black">=</SPAN><I><SPAN style="COLOR: #2a00ff">"no"</SPAN></I> <SPAN style="COLOR: #7f007f">frameborder</SPAN><SPAN style="COLOR: black">=</SPAN><I><SPAN style="COLOR: #2a00ff">"0"</SPAN></I> <SPAN style="COLOR: #7f007f">style</SPAN><SPAN style="COLOR: black">="</SPAN><SPAN style="COLOR: #7f007f">border</SPAN><SPAN style="COLOR:
black">:</SPAN><I><SPAN style="COLOR: #2a00e1">none</SPAN></I><SPAN style="COLOR: black">; </SPAN><SPAN style="COLOR: #7f007f">overflow</SPAN><SPAN style="COLOR: black">:</SPAN><I><SPAN style="COLOR: #2a00e1">hidden</SPAN></I><SPAN style="COLOR: black">; </SPAN><SPAN style="COLOR: #7f007f">width</SPAN><SPAN style="COLOR: black">:</SPAN><I><SPAN style="COLOR: #2a00e1">110px</SPAN></I><SPAN style="COLOR: black">; </SPAN><SPAN style="COLOR: #7f007f">height</SPAN><SPAN style="COLOR: black">:</SPAN><I><SPAN style="COLOR: #2a00e1">20px</SPAN></I><SPAN style="COLOR: black">;" </SPAN><SPAN style="COLOR: #7f007f">allowTransparency</SPAN><SPAN style="COLOR: black">=</SPAN><I><SPAN style="COLOR: #2a00ff">"true"</SPAN></I><SPAN style="COLOR: teal">></</SPAN><SPAN style="COLOR: #3f7f7f">iframe</SPAN><SPAN style="COLOR: teal">></SPAN></SPAN></P></FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif"> </FONT></DIV>
<DIV>
<P style="COLOR: rgb(0,0,0); FONT-SIZE: 12pt"><FONT face="'Times New Roman', serif"><BR></FONT></P>
<DIV><FONT size=3 face="'times new roman', 'new york', times, serif"><I>I don't know if anyone faces this issue before, but i cannot find anything relevant in the older posts. </I></FONT></DIV>
<DIV style="FONT-STYLE: italic; COLOR: rgb(0,0,0); FONT-SIZE: 12pt"><BR></DIV><FONT size=3 face="'times new roman', 'new york', times, serif"><I>Best Regards,</I></FONT></DIV>
<P style="FONT-STYLE: italic; COLOR: rgb(0,0,0); FONT-SIZE: 12pt">Rajat Arora</P>
<DIV style="COLOR: rgb(0,0,0); FONT-SIZE: 12pt"><BR></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></div></body></html>