From e74a3926feacbb3005a9f6dbbd6e54931a43ffba Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 20 Nov 2014 17:38:41 -0800 Subject: yet another option for the homepage --- mod/update_home.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 mod/update_home.php (limited to 'mod/update_home.php') diff --git a/mod/update_home.php b/mod/update_home.php new file mode 100644 index 000000000..c139682e1 --- /dev/null +++ b/mod/update_home.php @@ -0,0 +1,38 @@ + 1) && (argv(1) == 'load')) ? 1 : 0); + header("Content-type: text/html"); + echo "\r\n"; + echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '
' : '
'); + + $text = home_content($a,$profile_uid, $load); + $pattern = "/]*) src=\"([^\"]*)\"/"; + $replace = "'; + $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; + $text = preg_replace($pattern, $replace, $text); + $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; + $text = preg_replace($pattern, $replace, $text); + $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i"; + $text = preg_replace($pattern, $replace, $text); + $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; + $text = preg_replace($pattern, $replace, $text); + } + + echo str_replace("\t",' ',$text); + echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '
' : ''); + echo "\r\n"; +// logger('update_home: ' . $text); + killme(); + +} \ No newline at end of file -- cgit v1.2.3