This commit has been accessed 596 times via Git panel.
commit 61f61580030e08df02c7c776baba6c3efe96d8c6
tree f72a07b0c12322c82ad0a6804308cf9dc29b36ed
parent 561693358ecb3bc0c21b5e8d67cf628ae0097c0d
author Magie Antonio <magie@majcms.org> 1308833598 +0800
committer Magie Antonio <magie@majcms.org> 1308833598 +0800
Convert Facebook iframes to XFBML
diff --git a/album.php b/album.php
index 9567fb6..d803def 100644
--- a/album.php
+++ b/album.php
@@ -361,9 +361,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album/{$_REQUEST['show']}")) {
$entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/album.php?entry={$_REQUEST['entry']}&show={$_REQUEST['show']}";
}
- $entry_url = rawurlencode($entry_url);
-
- echo "<div style=\"margin: 4px;\"><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&layout=standard&show_faces=true&width=320&action=like&colorscheme=light&height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:320px; height:80px;\" allowTransparency=\"true\"></iframe></div>";
+ echo "<div style=\"margin: 4px;\"><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"$album_image_width\" show_faces=\"true\" font=\"\"></fb:like></div>";
}
diff --git a/index.php b/index.php
index 022245e..715dacc 100644
--- a/index.php
+++ b/index.php
@@ -2626,9 +2626,9 @@ foreach ($maj_disp as $maj_d) {
$entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/index.php?entry=$maj_d";
}
- $entry_url = rawurlencode($entry_url);
+ //$entry_url = rawurlencode($entry_url);
- echo "<br><br><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&layout=standard&show_faces=false&width=510&action=like&colorscheme=light&height=25\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:510px; height:25px;\" allowTransparency=\"true\"></iframe>";
+ echo "<br><br><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"510\" show_faces=\"false\" font=\"\"></fb:like>";
}
if (isset($maj_d_text_b)) {
diff --git a/video.php b/video.php
index 01f11d9..fc3401b 100644
--- a/video.php
+++ b/video.php
@@ -155,9 +155,7 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
$entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/video.php?entry=$maj_d&show=$maj_s";
}
- $entry_url = rawurlencode($entry_url);
-
- echo "<div style=\"margin: 2px;\"><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&layout=standard&show_faces=true&width=320&action=like&colorscheme=light&height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:320px; height:80px;\" allowTransparency=\"true\"></iframe></div>";
+ echo "<div style=\"margin: 4px;\"><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"320\" show_faces=\"true\" font=\"\"></fb:like></div>";
}
//echo "<form method=\"post\"><input type=\"hidden\" name=\"back\" value=\"$maj_d\"><input type=\"submit\" class=\"click\" style=\"width: 100%; margin: 1px;\" value=\"click here to go to the main entry\"></form>";
tree f72a07b0c12322c82ad0a6804308cf9dc29b36ed
parent 561693358ecb3bc0c21b5e8d67cf628ae0097c0d
author Magie Antonio <magie@majcms.org> 1308833598 +0800
committer Magie Antonio <magie@majcms.org> 1308833598 +0800
Convert Facebook iframes to XFBML
diff --git a/album.php b/album.php
index 9567fb6..d803def 100644
--- a/album.php
+++ b/album.php
@@ -361,9 +361,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album/{$_REQUEST['show']}")) {
$entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/album.php?entry={$_REQUEST['entry']}&show={$_REQUEST['show']}";
}
- $entry_url = rawurlencode($entry_url);
-
- echo "<div style=\"margin: 4px;\"><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&layout=standard&show_faces=true&width=320&action=like&colorscheme=light&height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:320px; height:80px;\" allowTransparency=\"true\"></iframe></div>";
+ echo "<div style=\"margin: 4px;\"><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"$album_image_width\" show_faces=\"true\" font=\"\"></fb:like></div>";
}
diff --git a/index.php b/index.php
index 022245e..715dacc 100644
--- a/index.php
+++ b/index.php
@@ -2626,9 +2626,9 @@ foreach ($maj_disp as $maj_d) {
$entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/index.php?entry=$maj_d";
}
- $entry_url = rawurlencode($entry_url);
+ //$entry_url = rawurlencode($entry_url);
- echo "<br><br><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&layout=standard&show_faces=false&width=510&action=like&colorscheme=light&height=25\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:510px; height:25px;\" allowTransparency=\"true\"></iframe>";
+ echo "<br><br><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"510\" show_faces=\"false\" font=\"\"></fb:like>";
}
if (isset($maj_d_text_b)) {
diff --git a/video.php b/video.php
index 01f11d9..fc3401b 100644
--- a/video.php
+++ b/video.php
@@ -155,9 +155,7 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
$entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/video.php?entry=$maj_d&show=$maj_s";
}
- $entry_url = rawurlencode($entry_url);
-
- echo "<div style=\"margin: 2px;\"><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&layout=standard&show_faces=true&width=320&action=like&colorscheme=light&height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:320px; height:80px;\" allowTransparency=\"true\"></iframe></div>";
+ echo "<div style=\"margin: 4px;\"><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"320\" show_faces=\"true\" font=\"\"></fb:like></div>";
}
//echo "<form method=\"post\"><input type=\"hidden\" name=\"back\" value=\"$maj_d\"><input type=\"submit\" class=\"click\" style=\"width: 100%; margin: 1px;\" value=\"click here to go to the main entry\"></form>";