aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-17 16:30:32 -0800
committerfriendica <info@friendica.com>2012-01-17 16:30:32 -0800
commitd84094362165524ce64fb2f0a588a376efa96c68 (patch)
tree57a9fe91c49aa356bfc8ff766174f36c6f8d3eec /include/items.php
parent2cc02716e1866ca16f941f82874fa7471af613a1 (diff)
downloadvolse-hubzilla-d84094362165524ce64fb2f0a588a376efa96c68.tar.gz
volse-hubzilla-d84094362165524ce64fb2f0a588a376efa96c68.tar.bz2
volse-hubzilla-d84094362165524ce64fb2f0a588a376efa96c68.zip
use reltoabs - primarily for github activity feeds
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 0bd77582a..a939bfc88 100644
--- a/include/items.php
+++ b/include/items.php
@@ -295,6 +295,11 @@ function get_atom_elements($feed,$item) {
$res['body'] = unxmlify($item->get_content());
$res['plink'] = unxmlify($item->get_link(0));
+ if($res['plink'])
+ $base_url = implode('/', array_slice(explode('/',$res['plink']),0,3));
+ else
+ $base_url = '';
+
// look for a photo. We should check media size and find the best one,
// but for now let's just find any author photo
@@ -414,6 +419,8 @@ function get_atom_elements($feed,$item) {
if((strpos($res['body'],'<') !== false) || (strpos($res['body'],'>') !== false)) {
+ $res['body'] = reltoabs($res['body'],$base_url);
+
$res['body'] = html2bb_video($res['body']);
$res['body'] = oembed_html2bbcode($res['body']);