From 7521977ab8cb5586e9d68fa70cfdb0f340f00e71 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 24 Apr 2014 10:28:23 +0200 Subject: [PATCH 1/3] Google+: Option to use the commercial script "postToGooglePlus.php", Settings of "fromgplus" are shown inside of "gpluspost" when activated. --- fromgplus/fromgplus.php | 9 +- gpluspost/gpluspost.php | 362 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 358 insertions(+), 13 deletions(-) diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index ca26ce2b1..7b25fd3d2 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -30,15 +30,20 @@ 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+ Mirror').'

'; + $s .= '

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

'; $s .= '
'; $s .= ''; } return $o; @@ -291,11 +317,15 @@ function fbpost_content(&$a) { * @param null|object $b */ function fbpost_plugin_settings(&$a,&$b) { + $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`"); + if(count($result) > 0) + $title = t('Facebook Import/Export/Mirror'); + else + $title = t('Facebook Export/Mirror'); $b .= '
'; - $b .= '

' . t('Facebook Export/Mirror') . '

'; + $b .= '

'.$title.'

'; $b .= '
'; - } diff --git a/fbsync/fbsync.php b/fbsync/fbsync.php index f6310ccfe..a1f88af92 100644 --- a/fbsync/fbsync.php +++ b/fbsync/fbsync.php @@ -100,6 +100,9 @@ function fbsync_follow($a, &$contact) { function fbsync_settings(&$a,&$s) { + // Settings are done inside the fbpost addon + return; + if(! local_user()) return; @@ -120,11 +123,11 @@ function fbsync_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= ''; - $s .= '

' . t('Facebook Import') . '

'; + $s .= '

'. t('Facebook Import').'

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