foreach($matches as $mtch) {
if(strlen($str_tags))
$str_tags .= ',';
- $str_tags .= '@[url=' . $mtch[1] . '[/url]';
+ $str_tags .= '@[url=' . $mtch[1] . '[/url]';
}
}
+ $plink = 'https://'.substr($diaspora_handle,strpos($diaspora_handle,'@')+1).'/posts/'.$guid;
+
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
$datarray['wall'] = 0;
$datarray['created'] = $datarray['edited'] = datetime_convert('UTC','UTC',$created);
$datarray['private'] = $private;
$datarray['parent'] = 0;
+ $datarray['plink'] = $plink;
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
//$datarray['owner-avatar'] = $contact['thumb'];
$message_id = item_store($datarray);
- if($message_id) {
- q("update item set plink = '%s' where id = %d limit 1",
- dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
- intval($message_id)
- );
- }
+ //if($message_id) {
+ // q("update item set plink = '%s' where id = %d limit 1",
+ // dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
+ // intval($message_id)
+ // );
+ //}
return;
}
}
+ $plink = 'https://'.substr($diaspora_handle,strpos($diaspora_handle,'@')+1).'/posts/'.$guid;
+
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
$datarray['wall'] = 0;
$datarray['created'] = $datarray['edited'] = datetime_convert('UTC','UTC',$created);
$datarray['private'] = $private;
$datarray['parent'] = 0;
+ $datarray['plink'] = $plink;
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
$message_id = item_store($datarray);
- if($message_id) {
- q("update item set plink = '%s' where id = %d limit 1",
- dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
- intval($message_id)
- );
- }
+ //if($message_id) {
+ // q("update item set plink = '%s' where id = %d limit 1",
+ // dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
+ // intval($message_id)
+ // );
+ //}
return;
return;
}
- $datarray = array();
+ $plink = 'https://'.substr($diaspora_handle,strpos($diaspora_handle,'@')+1).'/posts/'.$guid;
+ $datarray = array();
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
$datarray['created'] = $datarray['edited'] = datetime_convert('UTC','UTC',$created);
$datarray['private'] = $private;
$datarray['parent'] = 0;
+ $datarray['plink'] = $plink;
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
//$datarray['owner-avatar'] = $contact['thumb'];
$message_id = item_store($datarray);
- if($message_id) {
- q("update item set plink = '%s' where id = %d limit 1",
- dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
- intval($message_id)
- );
- }
+ //if($message_id) {
+ // q("update item set plink = '%s' where id = %d limit 1",
+ // dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
+ // intval($message_id)
+ // );
+ //}
return;