]> git.mxchange.org Git - friendica.git/blob - mod/update_display.php
Use network paging
[friendica.git] / mod / update_display.php
1 <?php
2
3 // See update_profile.php for documentation
4
5 use Friendica\App;
6 use Friendica\Core\PConfig;
7
8 require_once "mod/display.php";
9
10 function update_display_content(App $a)
11 {
12         $profile_uid = intval($_GET["p"]);
13
14         header("Content-type: text/html");
15         echo "<!DOCTYPE html><html><body>\r\n";
16         echo "<section>";
17
18         $text = display_content($a, true, $profile_uid);
19         $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
20         $replace = "<img\${1} dst=\"\${2}\"";
21         $text = preg_replace($pattern, $replace, $text);
22
23         if (PConfig::get(local_user(), "system", "bandwith_saver")) {
24                 $replace = "<br />" . t("[Embedded content - reload page to view]") . "<br />";
25                 $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
26                 $text = preg_replace($pattern, $replace, $text);
27                 $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
28                 $text = preg_replace($pattern, $replace, $text);
29                 $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
30                 $text = preg_replace($pattern, $replace, $text);
31                 $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
32                 $text = preg_replace($pattern, $replace, $text);
33         }
34
35         echo str_replace("\t", "       ", $text);
36         echo "</section>";
37         echo "</body></html>\r\n";
38         killme();
39 }