X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fromgplus%2Ffromgplus.php;h=4c96892c662d94efd9ff9cdee6ee5742bc3c94d9;hb=5fb7ef40fd9861a8011cfb01dc0dbd4d1d6046f6;hp=ecdf7656942c77208b4a9d054cfa0e9b28b4281c;hpb=503ec7d072a3d9cf8d394e97fa44a71589d16e37;p=friendica-addons.git diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index ecdf7656..4c96892c 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -9,6 +9,9 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes +require_once('mod/share.php'); +require_once('mod/parse_url.php'); + function fromgplus_install() { register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings'); register_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post'); @@ -30,15 +33,21 @@ function fromgplus_addon_settings(&$a,&$s) { if(! local_user()) return; + // If "gpluspost" is installed as well, then the settings are displayed there + $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'gpluspost' AND `installed`"); + if (count($result) > 0) + return; + $enable_checked = (intval(get_pconfig(local_user(),'fromgplus','enable')) ? ' checked="checked"' : ''); + $keywords_checked = (intval(get_pconfig(local_user(), 'fromgplus', 'keywords')) ? ' checked="checked"' : ''); $account = get_pconfig(local_user(),'fromgplus','account'); $s .= ''; - $s .= '

' . t('Google+ Mirroring').'

'; + $s .= '

'. t('Google+ Mirror').'

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