]> git.mxchange.org Git - friendica.git/blob - mod/update_community.php
Merge pull request #2324 from rabuzarus/0502_vier_dark
[friendica.git] / mod / update_community.php
1 <?php
2
3 // See update_profile.php for documentation
4
5 require_once('mod/community.php');
6
7 if(! function_exists('update_community_content')) {
8 function update_community_content(&$a) {
9
10         header("Content-type: text/html");
11         echo "<!DOCTYPE html><html><body>\r\n";
12         echo "<section>";
13
14         $text = community_content($a,true);
15         $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
16         $replace = "<img\${1} dst=\"\${2}\"";
17         $text = preg_replace($pattern, $replace, $text);
18
19                 $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
20         $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
21         $text = preg_replace($pattern, $replace, $text);
22         $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
23         $text = preg_replace($pattern, $replace, $text);
24         $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
25         $text = preg_replace($pattern, $replace, $text);
26         $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
27         $text = preg_replace($pattern, $replace, $text);
28
29         echo str_replace("\t",'       ',$text);
30         echo "</section>";
31         echo "</body></html>\r\n";
32         killme();
33 }
34 }