nukeSEO.com - PHPNuke SEO Search engine optimization, professional tools including nukeSEO, nukeSPAM, nukeFEED, nukePIE, nukeWYSIWYG and more

 

. Welcome to nukeSEO.com  ! 
.
.
.


.
nukeSEO.com: Forums


 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Facebook like box
 
 
Post new topic   Reply to topic    nukeSEO.com Forum Index -> PHP-Nuke enhancement ideas
View previous topic :: View next topic  
Author Message
mastermindzorg
webmaster


Joined: Dec 04, 2010
Posts: 6

PostPosted: Fri Jan 07, 2011 1:19 am    Post subject: Facebook like box Reply with quote

Here is the FaceBook like code I used on my site.

Code:



$uri1 = urlencode("http://".$_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
// Code By MasterMind of MasterMindz.org
$str = <<<STR
<iframe src="http://www.facebook.com/plugins/like.php?href=$uri1&amp;layout=button_count&show_faces=false&width=125&action=recommend&font=tahoma&colorscheme=light&height=30" scrolling="no" frameborder="0" style="border:none; width:110px; height:24px" allowTransparency="true"></iframe>
STR;
$str2 = <<<STR
<iframe src="http://www.facebook.com/plugins/like.php?href=$uri1&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;colorscheme=light&amp;height=10" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:24px;" allowTransparency="true"></iframe>
STR;
echo $str;
echo $str2;
  
Back to top
View user's profile Send private message
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 876

PostPosted: Wed Jan 12, 2011 9:30 pm    Post subject: Reply with quote

Interesting. Did you add this to the content page and other sections of your site?
_________________
  
Back to top
View user's profile Send private message Visit poster's website
mastermindzorg






PostPosted: Thu Jan 13, 2011 12:19 am    Post subject: Yes I added it Reply with quote

Yes I added this script to the downloads, content, and the news module. It works great!
  
Back to top
Guardian
webmaster


Joined: Dec 25, 2005
Posts: 364
Location: Vsetin, Czech Republic

PostPosted: Mon Jan 17, 2011 7:05 pm    Post subject: Reply with quote

I'm using something similar for my News module but it doesn't use IFRAME - I just spent 2 days cleaning someones site that got hacked through the use of an iframe to a 'trusted' site - every single file had to be cleansed and I'm still not finished.
  
Back to top
View user's profile Send private message
sortilege2021
webmaster


Joined: Dec 02, 2010
Posts: 5

PostPosted: Wed Feb 02, 2011 8:34 am    Post subject: Reply with quote

thanks Very Happy
  
Back to top
View user's profile Send private message
Guardian






PostPosted: Mon Feb 14, 2011 12:09 pm    Post subject: Reply with quote

Just to let you know, I used the iframe code on a static page website and experienced a worrying issue.
I then tried the same code at CodeAuthors and was able to replicate the 'problem'. It might just be coincidence but it is worth mentioning.

When viewing a page with the 'Like' button iframe code, navigate away and then hit your browser 'back' button.
In both cases, on two different websites, the 'Like' button had now been replaced by a banner advert.
*Edit* for additional comment. I reviewed the HTML page source code and everything seems fine, so this seems to confirm the iframe has a problem.
  
Back to top
mastermindzorg






PostPosted: Mon Feb 14, 2011 1:29 pm    Post subject: Reply with quote

I cant get the issue to replicate what browser are you using?
  
Back to top
Guardian






PostPosted: Mon Feb 14, 2011 3:40 pm    Post subject: Reply with quote

Firefox 3.6.13 though I cannot see how it might be browser lated it is possible I guess.
Both sites used jQuery but that is about the only common thing between the two sites. The code I used was lacking your first line of code because the url link is created differently but it was rather disconcerting that it would happen on two unrelated sites.
Since IFRAME doesn't validate for (x)HTML compliance I only used it as a temporary thing any way.
  
Back to top
mastermindzorg






PostPosted: Mon Feb 14, 2011 7:45 pm    Post subject: Reply with quote

see how this works for you maybe better?

Code:


$str = <<<STR
      <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"</script>
    <fb></fb>
STR;
echo $str;


The code Above needs to look like the below inside the <>
fb:like
/fb:like
  
Back to top
Guardian






PostPosted: Tue Feb 15, 2011 3:38 am    Post subject: Reply with quote

Yes, that uses the FB API, which may be better.
I'm currently using Disqus now on one site which has built in support for Facebook 'Like' and Twitter etc
  
Back to top
montego
webmaster


Joined: Dec 26, 2005
Posts: 254

PostPosted: Tue Feb 15, 2011 6:20 am    Post subject: Reply with quote

Just curious Guardian, does it like/Tweet the whole page or just the comment?
_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login!
  
Back to top
View user's profile Send private message Visit poster's website
Guardian






PostPosted: Tue Feb 15, 2011 7:06 am    Post subject: Reply with quote

Disqus Tweets the actual content page, so for example at the bottom of this article in what appears to be the last comment box
http://www.code-authors.com/article165.html#disqus_thread
You can see it Tweeted for the article page url.
Disqus calls Tweets and Facebook 'Likes' as 'Reactions'
Since Disqus comments use the url as the unique identifier, it works really, really well.
  
Back to top
Guardian






PostPosted: Tue Feb 15, 2011 7:13 am    Post subject: Reply with quote

Correction to the above.
The whole page can be Like or Tweeted because it uses the page URL but I just noticed that individual comments (that are NOT your own comments) can also be Liked.
There is an additional setting at Disqus to Tweet your own comments but I have not looked at it yet.
  
Back to top
GazJ
webmaster


Joined: Mar 20, 2007
Posts: 29

PostPosted: Wed Mar 30, 2011 12:41 am    Post subject: Reply with quote

http://developers.facebook.com/docs/guides/web/ Smile
  
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    nukeSEO.com Forum Index -> PHP-Nuke enhancement ideas All times are GMT - 5 Hours
 
 Page 1 of 1

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001-2008 phpBB Group


Page Generation: 0.07 Seconds