if (preg_match_all("(\[url=([$URLSearchString]*)\]\s*\[img\]([$URLSearchString]*)\[\/img\]\s*\[\/url\])ism", $body, $pictures, PREG_SET_ORDER)) {
if (count($pictures) == 1) {
// Checking, if the link goes to a picture
- $data = parseurl_getsiteinfo($pictures[0][1], true);
+ $data = parseurl_getsiteinfo_cached($pictures[0][1], true);
if ($data["type"] == "photo") {
$post["type"] = "photo";
if (isset($data["images"][0]))
}
} elseif (isset($post["url"]) AND ($post["type"] == "video")) {
require_once("mod/parse_url.php");
- $data = parseurl_getsiteinfo($post["url"], true);
+ $data = parseurl_getsiteinfo_cached($post["url"], true);
if (isset($data["images"][0]))
$post["image"] = $data["images"][0]["src"];
$msg = trim($msg."\n".$line);
// Is the new message empty by now or is it a reshared message?
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
- $msg = substr(substr(trim($msg."\n".$line), 0, $limit), 0, -3)."...";
+ $msg = iconv_substr(iconv_substr(trim($msg."\n".$line), 0, $limit, "UTF-8"), 0, -3, "UTF-8")."...";
else
break;
}
$post["url"] = $b["plink"];
} elseif (strpos($b["body"], "[share") !== false)
$post["url"] = $b["plink"];
+ elseif (get_pconfig($b["uid"], "system", "no_intelligent_shortening"))
+ $post["url"] = $b["plink"];
$msg = shortenmsg($msg, $limit);
}