commit
ab6bf767df
4 changed files with 53 additions and 19 deletions
|
@ -56,7 +56,7 @@ function oembed_fetch_url($embedurl){
|
||||||
|
|
||||||
function oembed_format_object($j){
|
function oembed_format_object($j){
|
||||||
$embedurl = $j->embedurl;
|
$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."'>";
|
$ret="<span class='oembed ".$j->type."'>";
|
||||||
switch ($j->type) {
|
switch ($j->type) {
|
||||||
case "video": {
|
case "video": {
|
||||||
|
@ -116,7 +116,9 @@ function oembed_iframe($src,$width,$height) {
|
||||||
$height = intval($height) + 80;
|
$height = intval($height) + 80;
|
||||||
$width = intval($width) + 40;
|
$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>';
|
return '<iframe height="' . $height . '" width="' . $width . '" src="' . $s . '" frameborder="no" >' . t('Embedded content') . '</iframe>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
17
js/main.js
17
js/main.js
|
@ -168,6 +168,15 @@
|
||||||
|
|
||||||
function NavUpdate() {
|
function NavUpdate() {
|
||||||
|
|
||||||
|
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-network').length) { src = 'network'; liveUpdate(); }
|
||||||
if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
|
if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
|
||||||
if($('#live-community').length) { src = 'community'; liveUpdate(); }
|
if($('#live-community').length) { src = 'community'; liveUpdate(); }
|
||||||
|
@ -185,11 +194,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(! stopped) {
|
|
||||||
$.get("ping",function(data) {
|
|
||||||
$(data).find('result').each(function() {
|
|
||||||
// send nav-update event
|
|
||||||
$('nav').trigger('nav-update', this);
|
|
||||||
});
|
});
|
||||||
}) ;
|
}) ;
|
||||||
}
|
}
|
||||||
|
|
13
mod/oembed.php
Normal file
13
mod/oembed.php
Normal file
|
@ -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();
|
||||||
|
}
|
|
@ -2840,3 +2840,15 @@ a.mail-list-link {
|
||||||
.acpopupitem.selected {
|
.acpopupitem.selected {
|
||||||
color: #FFFFFF; background: #3465A4;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue