X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=blogger%2Fblogger.php;h=18a1b8eac47c93b252611f01b381145d2b75c414;hb=bbaf463a204f84d0ac05336925abf99ae3583b8e;hp=aa1b9add3120d5ee45712f91d3c8dbd21b19d503;hpb=94d3235df7a0ea626eebd34a30dc993aa3569e64;p=friendica-addons.git diff --git a/blogger/blogger.php b/blogger/blogger.php old mode 100755 new mode 100644 index aa1b9add..18a1b8ea --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -1,177 +1,211 @@ ' - . t('Post to blogger') . ''; - } + if (DI::pConfig()->get(local_user(), 'blogger', 'post')) { + $jotnets_fields[] = [ + 'type' => 'checkbox', + 'field' => [ + 'blogger_enable', + 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 .= '