X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fromgplus%2Ffromgplus.php;h=4c96892c662d94efd9ff9cdee6ee5742bc3c94d9;hb=5fb7ef40fd9861a8011cfb01dc0dbd4d1d6046f6;hp=ca26ce2b1e190964431ede20c1a23ead074c0aad;hpb=02735d12ff4a234ff84cb68faa52c37b33c3b636;p=friendica-addons.git diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index ca26ce2b..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+ Mirror').'

'; + $s .= '

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

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