define("FACEBOOK_CONNECT_SERVICE", 3);
require_once INSTALLDIR . '/plugins/Facebook/facebookutil.php';
-require_once INSTALLDIR . '/plugins/Facebook/FBConnectAuth.php';
-require_once INSTALLDIR . '/plugins/Facebook/FBConnectLogin.php';
-require_once INSTALLDIR . '/plugins/Facebook/FBConnectSettings.php';
-require_once INSTALLDIR . '/plugins/Facebook/FBCLoginGroupNav.php';
-require_once INSTALLDIR . '/plugins/Facebook/FBCSettingsNav.php';
-require_once INSTALLDIR . '/plugins/Facebook/FBC_XDReceiver.php';
/**
* Facebook plugin to add a StatusNet Facebook application
// Facebook App stuff
- $m->connect('facebook', array('action' => 'facebookhome'));
- $m->connect('facebook/index.php', array('action' => 'facebookhome'));
- $m->connect('facebook/settings.php', array('action' => 'facebooksettings'));
- $m->connect('facebook/invite.php', array('action' => 'facebookinvite'));
- $m->connect('facebook/remove', array('action' => 'facebookremove'));
+ $m->connect('facebook/app', array('action' => 'facebookhome'));
+ $m->connect('facebook/app/index.php', array('action' => 'facebookhome'));
+ $m->connect('facebook/app/settings.php', array('action' => 'facebooksettings'));
+ $m->connect('facebook/app/invite.php', array('action' => 'facebookinvite'));
+ $m->connect('facebook/app/remove', array('action' => 'facebookremove'));
// Facebook Connect stuff
include_once INSTALLDIR . '/plugins/Facebook/' .
strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;
+ case 'FBConnectAuthAction':
+ case 'FBConnectLoginAction':
+ case 'FBConnectSettingsAction':
+ case 'FBC_XDReceiverAction':
+ include_once INSTALLDIR . '/plugins/Facebook/' .
+ mb_substr($cls, 0, -6) . '.php';
+ return false;
+ case 'FBCLoginGroupNav':
+ include_once INSTALLDIR . '/plugins/Facebook/FBCLoginGroupNav.php';
+ return false;
+ case 'FBCSettingsNav':
+ include_once INSTALLDIR . '/plugins/Facebook/FBCSettingsNav.php';
+ return false;
default:
return true;
}
}
- // Add in xmlns:fb
+ // Add in xmlns:fb
function onStartShowHTML($action)
{
}
}
- // Note: this script needs to appear in the <body>
+ // Note: this script needs to appear in the <body>
function onEndShowScripts($action)
{
}
- // Note: this script needs to appear as close as possible to </body>
+ // Note: this script needs to appear as close as possible to </body>
function onEndShowFooter($action)
{
}
}
- /**
+ /**
* Does the Action we're plugged into require the FB Scripts? We only
* want to output FB namespace, scripts, CSS, etc. on the pages that
* really need them.
return true;
}
-}
\ No newline at end of file
+}