From 7e9b3450c53fcf8d6057d789fbe0ad95b34a90f1 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 23 Apr 2012 22:58:52 +0200 Subject: [PATCH] Take the name of the bookmark link as title - when not set. --- tumblr/tumblr.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php index 31021842..3dd4daed 100755 --- a/tumblr/tumblr.php +++ b/tumblr/tumblr.php @@ -166,8 +166,13 @@ function tumblr_send(&$a,&$b) { } } if(count($tag_arr)) - $tags = implode(',',$tag_arr); + $tags = implode(',',$tag_arr); + if ($b['title'] == '') { + // Take the description from the bookmark + if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches)) + $b['title'] = $matches[2]; + } $params = array( 'email' => $tmbl_username,