Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 09:00:08 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155535
Posts in
21713
Topics by
7737
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
(Moderator:
Argos
)
Facebook Like Droplet
Pages: [
1
]
2
Go Down
Author
Topic: Facebook Like Droplet (Read 5123 times)
crnogorac081
AddOn Development
Offline
Posts: 1706
Facebook Like Droplet
«
on:
May 08, 2010, 02:02:07 PM »
Hi,
I found this wordpress plugin and code it to be wb droplet
And the code:
Code:
$host = $_SERVER['HTTP_HOST'];
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$url = !empty($query) ? "http://$host$self?$query" : "http://$host$self";
$the_perma
= rawurlencode($url);
$the_iframe
= '<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href='.$the_perma.'&layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:auto;"></iframe></div>';
return $the_iframe;
let me know the impressions..
cheers
«
Last Edit: September 02, 2010, 10:18:31 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: new Droplet: Facebook Like
«
Reply #1 on:
May 08, 2010, 04:43:25 PM »
hey crnogorac081,
have you seen and tested my soc network droplets
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: new Droplet: Facebook Like
«
Reply #2 on:
May 08, 2010, 05:06:48 PM »
yea I did. It is nice. This is kind of different
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
computer351
Offline
Posts: 1
Re: new Droplet: Facebook Like
«
Reply #3 on:
May 08, 2010, 09:22:00 PM »
I really like this! Good job!! When can we get it? Thanks, Greg (computer351)
Logged
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: new Droplet: Facebook Like
«
Reply #4 on:
May 08, 2010, 09:27:07 PM »
Hello Ivan,
This is really cool!
I am courious about the code.
Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: new Droplet: Facebook Like
«
Reply #5 on:
May 08, 2010, 10:15:26 PM »
Hi Stefek,
There is not much code
I posted it in first post..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: new Droplet: Facebook Like
«
Reply #6 on:
May 09, 2010, 01:55:46 AM »
Hello Ivan,
Thanks,
regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
frankyboy
Offline
Posts: 113
Re: new Droplet: Facebook Like
«
Reply #7 on:
May 10, 2010, 03:37:47 PM »
Great Work!
Logged
Disko-King.de
jollylama
Offline
Posts: 29
Re: new Droplet: Facebook Like
«
Reply #8 on:
August 08, 2010, 05:42:11 PM »
this could be really great! - however i'm not up to speed on droplets - i'm not sure how to add the code.. and where?
any help or tutorials?
thanks!
Logged
jollylama
Offline
Posts: 29
Re: new Droplet: Facebook Like
«
Reply #9 on:
August 08, 2010, 08:16:50 PM »
haha - I figured it out!!
Go to: Admin Tools/Droplets
Add Droplet and flop in the code!
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: new Droplet: Facebook Like
«
Reply #10 on:
August 09, 2010, 12:49:36 PM »
Im glad you like it
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: new Droplet: Facebook Like
«
Reply #11 on:
September 01, 2010, 04:44:24 PM »
I would like to use this on a newspage but I would like the newstitle to be displayed along with the page title ... is that possible?
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: new Droplet: Facebook Like
«
Reply #12 on:
September 01, 2010, 05:19:06 PM »
Hi,
you can try to set the $url parameter to match your page title..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: new Droplet: Facebook Like
«
Reply #13 on:
September 01, 2010, 09:50:00 PM »
I tried that but that does not zeem to respond
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: new Droplet: Facebook Like
«
Reply #14 on:
September 02, 2010, 10:16:27 PM »
did you put droplet on long content page ?
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: Facebook Like Droplet
«
Reply #15 on:
September 03, 2010, 04:57:17 PM »
yes I did, it makes a correct link towards the page but the text of the link as it is displayed in facebook is only the website-title + the newspage-title .. not the actual news-item-title
Logged
biber.beat
Offline
Posts: 45
Re: Facebook Like Droplet
«
Reply #16 on:
March 14, 2011, 10:58:03 PM »
Hey,
I use your droplet but I´m faceing the problem, that the code is NOT tranfering the unique url within the "Like it". Online my main-url will be transfered - no matter on wich page I place the droplet.
What do I wrong?
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Facebook Like Droplet
«
Reply #17 on:
March 15, 2011, 02:05:49 PM »
I noticed that too, but could not find the solution yet..
maybe facebook doesnt allow you to like pages, but site only..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
biber.beat
Offline
Posts: 45
Re: Facebook Like Droplet
«
Reply #18 on:
March 15, 2011, 03:55:20 PM »
I found out that it may has to do something with the open-graph meta-infos.
For example: with "og:image" you can set the thumbnail for Facebook and if you set "og:title" fix - the droplet will deliver this info to Facebook.
Here you can see how it works good:
http://www.hasenfarm.com/pages/motive/ein-aug-hase.php
Logged
biber.beat
Offline
Posts: 45
Re: Facebook Like Droplet
«
Reply #19 on:
March 17, 2011, 12:34:17 AM »
Hey! If you set the following Open-Graph-Meta-Infos the droplet is working fine:
<meta property="og:image" content="absolute_path_to_pi
cture.jpg/>
<meta property="og:title" content="<?php page_title(); ?>"/>
<meta property="og:site_name" content="<?php page_title(); ?>"/>
<meta property="og:description" content="<?php page_description();?"/>
Unfortunally I could not figure out why I have to set an image. Otherwise none-relevant pictures are send to the wall-posting on facebook.
Logged
herojohan
Offline
Posts: 12
Re: Facebook Like Droplet
«
Reply #20 on:
November 13, 2011, 12:05:08 AM »
This is extremly handy!
Thank you!
Logged
Bug
Offline
Posts: 188
Re: Facebook Like Droplet
«
Reply #21 on:
November 13, 2011, 03:29:18 AM »
Does the facebook like script provided by addthis work as it should or does that give the same result
Logged
jacobi22
Betatester
Offline
Posts: 1374
Re: Facebook Like Droplet
«
Reply #22 on:
February 04, 2012, 07:30:08 PM »
english:
here a resolution without W3C-Errors. the internet explorer need the code
"allowTransparency="true"
" to display the iframe transparent, but
allowTransparency
is not W3C-conform
german:
die W3C-Prüfung gibt einen Fehler für
allowTransparency
aus. der Internet-Explorer benötigt aber diese Angabe. Ohne
allowTransparency
würde die Box mit schwarzen bzw. weißen Hintergrund dargestellt.
Um den Fehler abzustellen, fügt man eine Abfrage ein, welcher Browser verwendet wird und verwendet je nach Antwort einen Code für den IE (mit
allowTransparency
) oder für alle anderen Browser ohne allowTransparency
Hier der geänderte Droplet-Code
Code:
$host = $_SERVER['HTTP_HOST'];
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$url = !empty($query) ? "http://$host$self?$query" : "http://$host$self";
$the_perma = rawurlencode($url);
$the_iframe = '<div id="facebook_like"><!--[if IE]><iframe src="http://www.facebook.com/plugins/like.php?href='.$the_perma.'&layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:auto;"></iframe></iframe><![endif]--><iframe src="http://www.facebook.com/plugins/like.php?href='.$the_perma.'&layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:auto;"></iframe><!--<![endif]--></div>';
return $the_iframe;
«
Last Edit: February 04, 2012, 08:16:30 PM by jacobi22
»
Logged
LG Uwe
Wer sagt, Reichtum ist alles, hat nie ein Kind lächeln gesehen.
sky writer
Offline
Posts: 285
Re: Facebook Like Droplet
«
Reply #23 on:
February 05, 2012, 02:23:47 PM »
I still get an error:
Quote
Validation Output: 1 Error
Error Line 120, Column 55: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
…lign: center;"><div id="facebook_like"
>
<!--[if IE]><iframe src="
http://www.fac
…
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
I also have a question about:
Quote from: biber.beat on March 17, 2011, 12:34:17 AM
Hey! If you set the following Open-Graph-Meta-Infos the droplet is working fine:
<meta property="og:image" content="absolute_path_to_pi
cture.jpg/>
<meta property="og:title" content="<?php page_title(); ?>"/>
<meta property="og:site_name" content="<?php page_title(); ?>"/>
<meta property="og:description" content="<?php page_description();?"/>
Unfortunally I could not figure out why I have to set an image. Otherwise none-relevant pictures are send to the wall-posting on facebook.
How and where do you add this code? What do you enter for "absolute_path_to_pi
cture.jpg"
«
Last Edit: February 05, 2012, 02:25:19 PM by sky writer
»
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Facebook Like Droplet
«
Reply #24 on:
February 05, 2012, 10:13:44 PM »
Hi,
my portal was kind of perfect (with no errors at all) before facebook and open graph tags appeared
, and now I am not considering those errors any more..
Abs. path to picture is:
www.yoursite.xy/media/folder/picture.jpg
take a look at tags on my portal:
www.mondocafe.me
cheers,
Ivan
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [
1
]
2
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...