aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-12 04:06:14 -0800
committerfriendica <info@friendica.com>2011-11-12 04:06:14 -0800
commitab6bf767df4a06494b314f7d0c3928a795b81bae (patch)
treea9e2a68d109be3d68e745af1beb5882d187dd5e2
parentd23867f5a0564d680680e4bae3691bdecdcc183f (diff)
parente853549bc8a2d37b1be813396d7adb217cbda921 (diff)
downloadvolse-hubzilla-ab6bf767df4a06494b314f7d0c3928a795b81bae.tar.gz
volse-hubzilla-ab6bf767df4a06494b314f7d0c3928a795b81bae.tar.bz2
volse-hubzilla-ab6bf767df4a06494b314f7d0c3928a795b81bae.zip
Merge pull request #3 from fabrixxm/master
fix for #191 and some other
-rw-r--r--include/oembed.php6
-rw-r--r--js/main.js41
-rw-r--r--mod/oembed.php13
-rw-r--r--view/theme/duepuntozero/style.css12
4 files changed, 53 insertions, 19 deletions
diff --git a/include/oembed.php b/include/oembed.php
index 3e86627e4..7c0da4594 100644
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -56,7 +56,7 @@ function oembed_fetch_url($embedurl){
function oembed_format_object($j){
$embedurl = $j->embedurl;
- $jhtml = oembed_iframe($j->html,$j->width,$j->height );
+ $jhtml = oembed_iframe($j->embedurl,$j->width,$j->height );
$ret="<span class='oembed ".$j->type."'>";
switch ($j->type) {
case "video": {
@@ -116,7 +116,9 @@ function oembed_iframe($src,$width,$height) {
$height = intval($height) + 80;
$width = intval($width) + 40;
- $s = 'data:text/html;base64,' . base64_encode('<html><body>' . $src . '</body></html>');
+ $a = get_app();
+
+ $s = $a->get_baseurl()."/oembed/".base64url_encode($src);
return '<iframe height="' . $height . '" width="' . $width . '" src="' . $s . '" frameborder="no" >' . t('Embedded content') . '</iframe>';
}
diff --git a/js/main.js b/js/main.js
index 15c5b5d1f..9832b2cbc 100644
--- a/js/main.js
+++ b/js/main.js
@@ -168,28 +168,35 @@
function NavUpdate() {
- if($('#live-network').length) { src = 'network'; liveUpdate(); }
- if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
- if($('#live-community').length) { src = 'community'; liveUpdate(); }
- if($('#live-notes').length) { src = 'notes'; liveUpdate(); }
- if($('#live-display').length) {
- if(liking) {
- liking = 0;
- window.location.href=window.location.href
- }
- }
- if($('#live-photos').length) {
- if(liking) {
- liking = 0;
- window.location.href=window.location.href
- }
- }
-
if(! stopped) {
$.get("ping",function(data) {
$(data).find('result').each(function() {
// send nav-update event
$('nav').trigger('nav-update', this);
+
+
+ // start live update
+
+ if($('#live-network').length) { src = 'network'; liveUpdate(); }
+ if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
+ if($('#live-community').length) { src = 'community'; liveUpdate(); }
+ if($('#live-notes').length) { src = 'notes'; liveUpdate(); }
+ if($('#live-display').length) {
+ if(liking) {
+ liking = 0;
+ window.location.href=window.location.href
+ }
+ }
+ if($('#live-photos').length) {
+ if(liking) {
+ liking = 0;
+ window.location.href=window.location.href
+ }
+ }
+
+
+
+
});
}) ;
}
diff --git a/mod/oembed.php b/mod/oembed.php
new file mode 100644
index 000000000..25995813a
--- /dev/null
+++ b/mod/oembed.php
@@ -0,0 +1,13 @@
+<?php
+require_once("include/oembed.php");
+
+function oembed_content(&$a){
+ if ($a->argc == 2){
+ echo "<html><body>";
+ $url = base64url_decode($a->argv[1]);
+ $j = oembed_fetch_url($url);
+ echo $j->html;
+ echo "</body></html>";
+ }
+ killme();
+}
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index 98b8cd43e..867756302 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -2840,3 +2840,15 @@ a.mail-list-link {
.acpopupitem.selected {
color: #FFFFFF; background: #3465A4;
}
+
+/* popup notifications */
+div.jGrowl div.notice {
+ background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
+ color: #ffffff;
+ padding-left: 58px;
+}
+div.jGrowl div.info {
+ background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center;
+ color: #ffffff;
+ padding-left: 58px;
+}