X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=libertree%2Flibertree.php;h=b064c6bc2bb7d925eeef40ff9e21e2e086bcfe80;hb=02735d12ff4a234ff84cb68faa52c37b33c3b636;hp=0e7e1a8191b2491ed96f257bc49841ad40ac9eb2;hpb=677d3da259d4b22aaa1dcb883d3a15667db68cfa;p=friendica-addons.git diff --git a/libertree/libertree.php b/libertree/libertree.php index 0e7e1a81..b064c6bc 100755 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -63,8 +63,14 @@ function libertree_settings(&$a,&$s) { /* Add some HTML to the existing form */ - $s .= '
'; - $s .= '

' . t('libertree Post Settings') . '

'; + $s .= ''; + $s .= '

' . t('libertree Export') . '

'; + $s .= '
'; + $s .= ''; } @@ -153,7 +159,11 @@ function libertree_send(&$a,&$b) { $ltree_api_token = get_pconfig($b['uid'],'libertree','libertree_api_token'); $ltree_url = get_pconfig($b['uid'],'libertree','libertree_url'); $ltree_blog = "$ltree_url/api/v1/posts/create/?token=$ltree_api_token"; - $ltree_source = "Friendica"; + if (isset($a->config['sitename']) AND ($a->config['sitename'] != "")) + $ltree_source = $a->config['sitename']; + else + $ltree_source = "Friendica"; + if($ltree_url && $ltree_api_token && $ltree_blog && $ltree_source) { require_once('include/bb2diaspora.php'); @@ -188,12 +198,12 @@ function libertree_send(&$a,&$b) { } while ($oldbody != $body); // convert to markdown - $body = bb2diaspora($body); + $body = bb2diaspora($body, false, false); // Adding the title if(strlen($title)) $body = "## ".html_entity_decode($title)."\n\n".$body; - + $params = array( 'text' => $body,