3 // See update_profile.php for documentation
5 require_once('mod/network.php');
6 require_once('include/group.php');
8 function update_network_content(&$a) {
10 $profile_uid = intval($_GET['p']);
12 header("Content-type: text/html");
13 echo "<!DOCTYPE html><html><body>\r\n";
14 echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
16 $no_auto_update = get_pconfig($profile_uid, "system", "no_auto_update");
17 if ($no_auto_update <= 0) {
18 $text = network_content($a,$profile_uid);
19 if ($no_auto_update < 0)
20 set_pconfig($profile_uid, "system", "no_auto_update", 1);
24 $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
25 $replace = "<img\${1} dst=\"\${2}\"";
26 $text = preg_replace($pattern, $replace, $text);
28 $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
29 $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
30 $text = preg_replace($pattern, $replace, $text);
31 $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
32 $text = preg_replace($pattern, $replace, $text);
33 $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
34 $text = preg_replace($pattern, $replace, $text);
35 $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
36 $text = preg_replace($pattern, $replace, $text);
39 echo str_replace("\t",' ',$text);
40 echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
41 echo "</body></html>\r\n";