diff options
author | friendica <info@friendica.com> | 2014-09-09 23:23:52 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-09 23:23:52 -0700 |
commit | e45a9b1522854c1e3341c2feae7a44a1b964b83a (patch) | |
tree | b032d1bab3cbbca815db050bbbea8397556ed1d3 | |
parent | f09b7ca40936b8f2891d3dc0317968111eb34fb1 (diff) | |
download | volse-hubzilla-e45a9b1522854c1e3341c2feae7a44a1b964b83a.tar.gz volse-hubzilla-e45a9b1522854c1e3341c2feae7a44a1b964b83a.tar.bz2 volse-hubzilla-e45a9b1522854c1e3341c2feae7a44a1b964b83a.zip |
this should be the final piece of the puzzle
-rwxr-xr-x | include/diaspora.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index e7a6cb8ea..afb318b05 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -864,6 +864,20 @@ function diaspora_post($importer,$xml,$msg) { } } + $cnt = preg_match_all('/@\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $datarray['term'][] = array( + 'uid' => $importer['channel_id'], + 'type' => TERM_MENTION, + 'otype' => TERM_OBJ_POST, + 'term' => $mtch[2], + 'url' => $mtch[1] + ); + } + } + + // this won't work for Friendica or Redmatrix but it's probably the best we can do. $plink = 'https://'.substr($diaspora_handle,strpos($diaspora_handle,'@')+1).'/posts/'.$guid; |