]> git.mxchange.org Git - friendica.git/blob - mod/update_profile.php
better intro text
[friendica.git] / mod / update_profile.php
1 <?php
2
3 // This page is fetched via ajax to update the profile page with
4 // new content while you are viewing it.
5
6 require_once('mod/profile.php');
7
8 function update_profile_content(&$a) {
9
10         header("Content-type: text/html");
11         echo "<!DOCTYPE html><html><body>\r\n";
12         echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
13
14         // Grab the page inner contents, but move any image src attributes to another attribute name.
15         // Some browsers will prefetch all the images for the page even if we don't need them.
16         // The only ones we need to fetch are those for new page additions, which we'll discover
17         // on the client side and then swap the image back.
18
19         $text = profile_content($a,true);
20         $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
21         $replace = "<img\${1} dst=\"\${2}\"";
22         $text = preg_replace($pattern, $replace, $text);
23
24         echo str_replace("\t",'       ',$text);
25         echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
26         echo "</body></html>\r\n";
27         killme();
28
29 }