3 // See update_profile.php for documentation
6 use Friendica\Core\PConfig;
8 require_once("mod/community.php");
10 function update_community_content(App $a) {
12 header("Content-type: text/html");
13 echo "<!DOCTYPE html><html><body>\r\n";
16 $text = community_content($a, true);
17 $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
18 $replace = "<img\${1} dst=\"\${2}\"";
19 $text = preg_replace($pattern, $replace, $text);
21 if (PConfig::get(local_user(), "system", "bandwith_saver")) {
22 $replace = "<br />".t("[Embedded content - reload page to view]")."<br />";
23 $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
24 $text = preg_replace($pattern, $replace, $text);
25 $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
26 $text = preg_replace($pattern, $replace, $text);
27 $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
28 $text = preg_replace($pattern, $replace, $text);
29 $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
30 $text = preg_replace($pattern, $replace, $text);
33 echo str_replace("\t", " ", $text);
35 echo "</body></html>\r\n";