]> git.mxchange.org Git - friendica-addons.git/blobdiff - fbpost/fbpost.php
Merge pull request #188 from annando/master
[friendica-addons.git] / fbpost / fbpost.php
index 3d28a9693a17def021bf663df1c3804e3a7e16e2..93a31e2b4d6ac640fa9e81dfc1465fc520472872 100644 (file)
@@ -189,6 +189,9 @@ function fbpost_content(&$a) {
                info( t('Facebook Post disabled') . EOL);
        }
 
+       require_once("mod/settings.php");
+       settings_init($a);
+
        $o = '';
 
        $fb_installed = false;
@@ -317,6 +320,10 @@ function fbpost_content(&$a) {
  * @param null|object $b
  */
 function fbpost_plugin_settings(&$a,&$b) {
+
+       $enabled = get_pconfig(local_user(),'facebook','post');
+       $css = (($enabled) ? '' : '-disabled');
+
        $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`");
        if(count($result) > 0)
                $title = t('Facebook Import/Export/Mirror');
@@ -324,7 +331,7 @@ function fbpost_plugin_settings(&$a,&$b) {
                $title = t('Facebook Export/Mirror');
 
        $b .= '<div class="settings-block">';
-       $b .= '<a href="fbpost"><img class="connector" src="images/facebook.png" /><h3 class="connector">'.$title.'</h3></a>';
+       $b .= '<a href="fbpost"><img class="connector'.$css.'" src="images/facebook.png" /><h3 class="connector">'.$title.'</h3></a>';
        $b .= '</div>';
 }