+function ostatus_format_picture_post($body) {
+ $siteinfo = get_attached_data($body);
+
+ if (($siteinfo["type"] == "photo")) {
+ if (isset($siteinfo["preview"]))
+ $preview = $siteinfo["preview"];
+ else
+ $preview = $siteinfo["image"];
+
+ // Is it a remote picture? Then make a smaller preview here
+ $preview = proxy_url($preview, false, PROXY_SIZE_SMALL);
+
+ // Is it a local picture? Then make it smaller here
+ $preview = str_replace(array("-0.jpg", "-0.png"), array("-2.jpg", "-2.png"), $preview);
+ $preview = str_replace(array("-1.jpg", "-1.png"), array("-2.jpg", "-2.png"), $preview);
+
+ if (isset($siteinfo["url"]))
+ $url = $siteinfo["url"];
+ else
+ $url = $siteinfo["image"];
+
+ $body = trim($siteinfo["text"])." [url]".$url."[/url]\n[img]".$preview."[/img]";
+ }
+
+ return $body;
+}
+