X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=blogger%2Fblogger.php;h=30c450bda9f6e5c180c597fdb70fee59c381750c;hb=cdf5a5db8b832879337fed4cb033a7864c961598;hp=050aaa7a1734cfb0d28dae387163f5ba139fe8bc;hpb=c71f7b0e1a7bb5ca88347b295dd3a4cc3106c5a9;p=friendica-addons.git diff --git a/blogger/blogger.php b/blogger/blogger.php index 050aaa7a..30c450bd 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -5,8 +5,12 @@ * Version: 1.0 * */ + +use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; +use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Util\Network; function blogger_install() { @@ -43,7 +47,7 @@ function blogger_jot_nets(&$a, &$b) $bl_defpost = PConfig::get(local_user(), 'blogger', 'post_by_default'); $selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' - . t('Post to blogger') . '
'; + . L10n::t('Post to blogger') . ''; } } @@ -74,40 +78,40 @@ function blogger_settings(&$a, &$s) /* Add some HTML to the existing form */ $s .= ''; - $s .= '

'. t('Blogger Export').'

'; + $s .= '

'. L10n::t('Blogger Export').'

'; $s .= '
'; $s .= ''; + $s .= '
'; } @@ -179,10 +183,8 @@ function blogger_send(&$a, &$b) $bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog'); if ($bl_username && $bl_password && $bl_blog) { - require_once('include/bbcode.php'); - - $title = '' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . ''; - $post = $title . bbcode($b['body']); + $title = '' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . ''; + $post = $title . BBCode::convert($b['body']); $post = xmlify($post); $xml = <<< EOT @@ -204,7 +206,7 @@ EOT; logger('blogger: data: ' . $xml, LOGGER_DATA); if ($bl_blog !== 'test') { - $x = post_url($bl_blog, $xml); + $x = Network::post($bl_blog, $xml); } logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG);