]> git.mxchange.org Git - friendica-addons.git/blobdiff - gpluspost/gpluspost.php
Added function "bb_CleanPictureLinks" ro all connectors
[friendica-addons.git] / gpluspost / gpluspost.php
index 08bb1423c036f63a82e5e202b945a9f7bd803cc4..a66e1e45ff4c9516207212006188b02769cebdf0 100644 (file)
@@ -58,8 +58,14 @@ function gpluspost_settings(&$a,&$s) {
        $skip_enabled = get_pconfig(local_user(),'gpluspost','skip_without_link');
        $skip_checked = (($skip_enabled) ? ' checked="checked" ' : '');
 
-       $s .= '<div class="settings-block">';
+       $s .= '<span id="settings_gpluspost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_gpluspost_expanded\'); openClose(\'settings_gpluspost_inflated\');">';
        $s .= '<h3>' . t('Google+ Post Settings') . '</h3>';
+       $s .= '</span>';
+       $s .= '<div id="settings_gpluspost_expanded" class="settings-block" style="display: none;">';
+       $s .= '<span class="fakelink" onclick="openClose(\'settings_gpluspost_expanded\'); openClose(\'settings_gpluspost_inflated\');">';
+       $s .= '<h3>' . t('Google+ Post Settings') . '</h3>';
+       $s .= '</span>';
+
        $s .= '<div id="gpluspost-enable-wrapper">';
        $s .= '<label id="gpluspost-enable-label" for="gpluspost-checkbox">' . t('Enable Google+ Post Plugin') . '</label>';
        $s .= '<input id="gpluspost-checkbox" type="checkbox" name="gpluspost" value="1" ' . $checked . '/>';
@@ -82,7 +88,7 @@ function gpluspost_settings(&$a,&$s) {
 
        /* provide a submit button */
 
-       $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="gpluspost-submit" name="gpluspost-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="gpluspost-submit" name="gpluspost-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
        $s .= '<p>Register an account at <a href="https://hootsuite.com">Hootsuite</a>, add your G+ page and add the feed-url there.<br />';
        $s .= 'Feed-url: '.$a->get_baseurl().'/gpluspost/'.urlencode($a->user["nickname"]).'</p></div>';
 }
@@ -278,6 +284,8 @@ function gpluspost_feeditem($pid, $uid) {
        $items = q("SELECT `uri`, `plink`, `author-link`, `author-name`, `created`, `edited`, `id`, `title`, `body` from `item` WHERE id=%d", intval($pid));
        foreach ($items AS $item) {
 
+               $item['body'] = bb_CleanPictureLinks($item['body']);
+
                // Looking for the first image
                $image = '';
                if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$item['body'],$matches))