X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fromgplus%2Ffromgplus.php;h=933567ce7c07f5a9a788fd95292d25f8747076d4;hb=02e952d57d326c9ab4a324868feba7c5a472c64a;hp=058c6e406ac3450608ed23ea667d990f9a82fe9c;hpb=ccc6c2b78593101a6812a682a4bf8d93663769c5;p=friendica-addons.git diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 058c6e40..933567ce 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -9,6 +9,8 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes +require_once('mod/share.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,11 +32,22 @@ 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"' : ''); $account = get_pconfig(local_user(),'fromgplus','account'); - $s .= '
'; - $s .= '

' . t('Google+ Import Settings').'

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

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

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