]> git.mxchange.org Git - friendica.git/commitdiff
replace embedded images before statustext is shortened
authorFabrixxm <fabrix.xm@gmail.com>
Thu, 23 Oct 2014 15:04:07 +0000 (17:04 +0200)
committerFabrixxm <fabrix.xm@gmail.com>
Thu, 23 Oct 2014 15:04:07 +0000 (17:04 +0200)
include/api.php

index 3d01c10cb8b9df5478dfd547c4f52041fcf3edb7..374a718479345db80f6f0ecdef0d8e9cc7f219a0 100644 (file)
                        //$statusbody = trim(html2plain(bbcode(api_clean_plain_items($item['body']), false, false, 5, true), 0));
                        $html = bbcode(api_clean_plain_items($item['body']), false, false, 2, true);
                        $statusbody = trim(html2plain($html, 0));
-
+                       
+                       // handle data: images
+                       $statusbody = api_format_items_embeded_images($item,$statusbody);
+                       
                        $statustitle = trim($item['title']);
 
                        if (($statustitle != '') and (strpos($statusbody, $statustitle) !== false))
                                $statustext = trim($statusbody);
                        else
                                $statustext = trim($statustitle."\n\n".$statusbody);
-
+                               
                        if (($item["network"] == NETWORK_FEED) and (strlen($statustext)> 1000))
                                $statustext = substr($statustext, 0, 1000)."... \n".$item["plink"];
 
                        $statushtml = trim(bbcode($item['body'], false, false));
                        
-                       // handle data: images
-                       
-                       $statustext = api_format_items_embeded_images($item,$statustext);
                        
                        $status = array(
                                'text'          => $statustext,