+function poco_contact_from_body($body, $created, $cid, $uid) {
+ preg_replace_callback("/\[share(.*?)\].*?\[\/share\]/ism",
+ function ($match) use ($created, $cid, $uid){
+ return(sub_poco_from_share($match, $created, $cid, $uid));
+ }, $body);
+}
+
+function sub_poco_from_share($share, $created, $cid, $uid) {
+ $profile = "";
+ preg_match("/profile='(.*?)'/ism", $share[1], $matches);
+ if ($matches[1] != "")
+ $profile = $matches[1];
+
+ preg_match('/profile="(.*?)"/ism', $share[1], $matches);
+ if ($matches[1] != "")
+ $profile = $matches[1];
+
+ if ($profile == "")
+ return;
+
+ logger("prepare poco_check for profile ".$profile, LOGGER_DEBUG);
+ poco_check($profile, "", "", "", "", $created, $cid, $uid);
+}
+