- // To-Do: look for bookmark-bbcode and handle it with priority
-
- $links = collecturls($html);
- if (sizeof($links) > 0) {
- reset($links);
- $link = current($links);
- /*if (strlen($msg."\n".$link) <= FACEBOOK_MAXPOSTLEN)
- $msg .= "\n".$link;
- else
- $toolong = true;*/
+ $link = '';
+ // look for bookmark-bbcode and handle it with priority
+ if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches))
+ $link = $matches[1];
+
+ if ($link == '') {
+ $links = collecturls($html);
+ if (sizeof($links) > 0) {
+ reset($links);
+ $link = current($links);
+ /*if (strlen($msg."\n".$link) <= FACEBOOK_MAXPOSTLEN)
+ $msg .= "\n".$link;
+ else
+ $toolong = true;*/
+ }