tumblr - add tagging
This commit is contained in:
parent
e031a5209c
commit
c7ef806b72
1 changed files with 14 additions and 0 deletions
|
@ -155,6 +155,19 @@ function tumblr_send(&$a,&$b) {
|
||||||
|
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
|
$tag_arr = array();
|
||||||
|
$tags = '';
|
||||||
|
$x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER);
|
||||||
|
|
||||||
|
if($x) {
|
||||||
|
foreach($matches as $mtch) {
|
||||||
|
$tag_arr[] = $mtch[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(count($tag_arr))
|
||||||
|
$tags = implode(',',$tag_arr);
|
||||||
|
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'email' => $tmbl_username,
|
'email' => $tmbl_username,
|
||||||
'password' => $tmbl_password,
|
'password' => $tmbl_password,
|
||||||
|
@ -162,6 +175,7 @@ function tumblr_send(&$a,&$b) {
|
||||||
'type' => 'regular',
|
'type' => 'regular',
|
||||||
'format' => 'html',
|
'format' => 'html',
|
||||||
'generator' => 'Friendica',
|
'generator' => 'Friendica',
|
||||||
|
'tags' => $tags,
|
||||||
'body' => bbcode($b['body'])
|
'body' => bbcode($b['body'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue