X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=blogger%2Fblogger.php;h=5cf0d27b3f22397a717bd42437ed5c1fd5192e76;hb=cd86ecf8571a6f325c70e7b04b00c05298054805;hp=67aae4a135f88e9c41063c9edb4ad3cbf16854d1;hpb=b2e60b8c61565abf60367f1919ba5ae6b9c0a5fb;p=friendica-addons.git diff --git a/blogger/blogger.php b/blogger/blogger.php old mode 100755 new mode 100644 index 67aae4a1..5cf0d27b --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -1,177 +1,193 @@ ' - . t('Post to blogger') . ''; - } + if (DI::pConfig()->get(local_user(), 'blogger', 'post')) { + $jotnets_fields[] = [ + 'type' => 'checkbox', + 'field' => [ + 'blogger_enable', + DI::l10n()->t('Post to blogger'), + DI::pConfig()->get(local_user(), 'blogger', 'post_by_default') + ] + ]; + } } -function blogger_settings(&$a,&$s) { - - if(! local_user()) - return; - - /* Add our stylesheet to the page so we can make our settings look nice */ - - $a->page['htmlhead'] .= '' . "\r\n"; - - /* Get the current state of our config variables */ - - $enabled = get_pconfig(local_user(),'blogger','post'); +function blogger_settings(App $a, &$s) +{ + if (! local_user()) { + return; + } - $checked = (($enabled) ? ' checked="checked" ' : ''); + /* Add our stylesheet to the page so we can make our settings look nice */ - $def_enabled = get_pconfig(local_user(),'blogger','post_by_default'); + DI::page()['htmlhead'] .= '' . "\r\n"; - $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); + /* Get the current state of our config variables */ - $bl_username = get_pconfig(local_user(), 'blogger', 'bl_username'); - $bl_password = get_pconfig(local_user(), 'blogger', 'bl_password'); - $bl_blog = get_pconfig(local_user(), 'blogger', 'bl_blog'); + $enabled = DI::pConfig()->get(local_user(), 'blogger', 'post'); + $checked = (($enabled) ? ' checked="checked" ' : ''); + $css = (($enabled) ? '' : '-disabled'); + $def_enabled = DI::pConfig()->get(local_user(), 'blogger', 'post_by_default'); - /* Add some HTML to the existing form */ + $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - $s .= '