diff --git a/.gitignore b/.gitignore index 1cde3a6254..217622c84d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,4 @@ config-*.php good-config.php lac08.log php.log - +.DS_Store diff --git a/EVENTS.txt b/EVENTS.txt index 68cb28603b..34a222e8f3 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -32,10 +32,10 @@ StartShowLaconicaStyles: backwards compatibility; deprecated EndShowLaconicaStyles: backwards compatibility; deprecated - $action: the current action -StartShowUAStyles: Showing custom UA Style links +StartShowUAStyles: Showing custom User-Agent style links - $action: the current action -EndShowUAStyles: End showing custom UA Style links; good place to add user-agent (e.g., filter, -webkit, -moz) specific styles +EndShowUAStyles: End showing custom User-Agent links; good place to add user-agent (e.g., filter, -webkit, -moz) specific styles - $action: the current action StartShowScripts: Showing JavaScript links @@ -87,6 +87,18 @@ StartShowContentBlock: Showing before the content container EndShowContentBlock: Showing after the content container - $action: the current action +StartShowAside: Showing before the Aside container +- $action: the current action + +EndShowAside: Showing after the Aside container +- $action: the current action + +StartShowNoticeFormData: Showing before the notice form data +- $action: the current action + +EndShowNoticeFormData: Showing after the notice form data +- $action: the current action + StartNoticeSave: before inserting a notice (good place for content filters) - $notice: notice being saved (no ID or URI) @@ -117,6 +129,9 @@ StartSubGroupNav: Showing the subscriptions group nav menu EndSubGroupNav: At the end of the subscriptions group nav menu - $action: the current action +StartInitializeRouter: Before the router instance has been initialized; good place to add routes +- $m: the Net_URL_Mapper that has just been set up + RouterInitialized: After the router instance has been initialized - $m: the Net_URL_Mapper that has just been set up @@ -134,3 +149,428 @@ StartAddressData: Allows the site owner to provide additional information about EndAddressData: At the end of
- $action: the current action + +StartLoginGroupNav: Before showing the login and register navigation menu +- $action: the current action + +EndLoginGroupNav: After showing the login and register navigation menu +- $action: the current action + +StartAccountSettingsNav: Before showing the account settings menu +- $action: the current action + +EndAccountSettingsNav: After showing the account settings menu +- $action: the current action + +StartAccountSettingsProfileMenuItem: Before showing the Profile menu item +- $widget: AccountSettingsNav instance being shown + +EndAccountSettingsProfileMenuItem: After showing the Profile menu item +- $widget: AccountSettingsNav instance being shown + +StartAccountSettingsAvatarMenuItem: Before showing the Avatar menu item +- $widget: AccountSettingsNav instance being shown + +EndAccountSettingsAvatarMenuItem: After showing the Avatar menu item +- $widget: AccountSettingsNav instance being shown + +StartAccountSettingsPasswordMenuItem: Before showing the Password menu item +- $widget: AccountSettingsNav instance being shown + +EndAccountSettingsPasswordMenuItem: After showing the Password menu item +- $widget: AccountSettingsNav instance being shown + +StartAccountSettingsEmailMenuItem: Before showing the Email menu item +- $widget: AccountSettingsNav instance being shown + +EndAccountSettingsEmailMenuItem: After showing the Email menu item +- $widget: AccountSettingsNav instance being shown + +StartAccountSettingsDesignMenuItem: Before showing the Design menu item +- $widget: AccountSettingsNav instance being shown + +EndAccountSettingsDesignMenuItem: After showing the Design menu item +- $widget: AccountSettingsNav instance being shown + +StartAccountSettingsOtherMenuItem: Before showing the Other menu item +- $widget: AccountSettingsNav instance being shown + +EndAccountSettingsOtherMenuItem: After showing the Other menu item +- $widget: AccountSettingsNav instance being shown + +Autoload: When trying to autoload a class +- $cls: the class being sought. A plugin might require_once the file for the class. + +SensitiveAction: determines if an action is 'sensitive' and should use SSL +- $action: name of the action, like 'login' +- $sensitive: flag for whether this is a sensitive action + +LoginAction: determines if an action is a 'login' action (OK for public view in private mode) +- $action: name of the action, like 'register' +- $login: flag for whether this is a login action + +StartShowHead: called before showing the element and children +- $action: action object being show + +EndShowHead: called after showing the element (and ) +- $action: action object being shown + +StartShowBody: called before showing the element and children +- $action: action object being shown + +EndShowBody: called after showing the element (and ) +- $action: action object being shown + +StartPersonalGroupNav: beginning of personal group nav menu +- $action: action object being shown + +EndPersonalGroupNav: end of personal group nav menu (good place to add a menu item) +- $action: action object being shown + +StartGroupGroupNav: Showing the group nav menu +- $action: the current action + +EndGroupGroupNav: At the end of the group nav menu +- $action: the current action + +StartEndHTML: just before the tag +- $action: action object being shown + +EndEndHTML: just after the tag +- $action: action object being shown + +StartShowDesign: just before showing a site, user, or group design +- $action: action object being shown + +EndShowDesign: just after showing a site, user, or group design +- $action: action object being shown + +StartShowExportData: just before showing the
with export data (feeds) +- $action: action object being shown + +EndShowExportData: just after showing the
with export data (feeds) +- $action: action object being shown + +StartShowNoticeItem: just before showing the notice item +- $action: action object being shown + +EndShowNoticeItem: just after showing the notice item +- $action: action object being shown + +StartShowPageNotice: just before showing the page notice (instructions or error) +- $action: action object being shown + +EndShowPageNotice: just after showing the page notice (instructions or error) +- $action: action object being shown + +StartShowPageTitle: just before showing the main h1 title of a page (only for registration) +- $action: action object being shown + +StartProfileFormData: just before showing text entry fields on profile settings page +- $action: action object being shown + +EndProfileFormData: just after showing text entry fields on profile settings page +- $action: action object being shown + +StartProfileSaveForm: before starting to save a profile settings form +- $action: action object being shown + +EndProfileSaveForm: after saving a profile settings form (after commit, no profile or user object!) +- $action: action object being shown + +StartRegistrationFormData: just before showing text entry fields on registration page +- $action: action object being shown + +EndRegistrationFormData: just after showing text entry fields on registration page +- $action: action object being shown + +StartRegistrationTry: before validating and saving a new user +- $action: action object being shown + +EndRegistrationTry: after saving a new user (note: no profile or user object!) +- $action: action object being shown + +StartNewQueueManager: before trying to start a new queue manager; good for plugins implementing new queue manager classes +- $qm: empty queue manager to set + +RedirectToLogin: event when we force a redirect to login (like when going to a settings page on a remembered login) +- $action: action object being shown +- $user: current user + +StartLoadDoc: before loading a help doc (hook this to show your own documentation) +- $title: title of the document +- $output: HTML output to show + +EndLoadDoc: after loading a help doc (hook this to modify other documentation) +- $title: title of the document +- $output: HTML output to show + +StartApiRss: after the rss element is started +- $action: action object being shown + +StartApiAtom: after the element is started +- $action: action object being shown + +StartEnqueueNotice: about to add a notice to the queues (good place to add a new transport) +- $notice: the notice being added +- &$transports: modifiable list of transports (as strings) to queue for + +EndEnqueueNotice: after adding a notice to the queues +- $notice: the notice being added +- $transports: modifiable list of transports to use + +UnqueueHandleNotice: Handle a notice when no queue manager is available +- $notice: the notice to handle +- $queue: the "queue" that is being executed + +GetValidDaemons: Just before determining which daemons to run +- &$daemons: modifiable list of daemon scripts to run, filenames relative to scripts/ + +HandleQueuedNotice: Handle a queued notice at queue time (or immediately if no queue) +- &$notice: notice to handle + +StartShowHeadElements: Right after the tag +- $action: the current action + +EndShowHeadElements: Right before the tag; put ', $apikey, - $login_url, $logout_url); + // The below function alters the logout link so that it logs the user out + // of Facebook Connect as well as the site. However, for some pages + // (FB Connect Settings) we need to output the FB Connect scripts (to + // show an existing FB connection even if the user isn't authenticated + // with Facebook connect) but NOT alter the logout link. And the only + // way to reliably do that is with the FB Connect .js libs. Crazy. - $action->raw($html); + $js .= ' FB.ensureInit(function() {'; + $js .= ' FB.Connect.ifUserConnected('; + $js .= ' function() { '; + $js .= ' $(\'#nav_logout a\').attr(\'href\', \'#\');'; + $js .= ' $(\'#nav_logout a\').click(function() {'; + $js .= ' FB.Connect.logoutAndRedirect(\'%3$s\');'; + $js .= ' return false;'; + $js .= ' })'; + $js .= ' },'; + $js .= ' function() {'; + $js .= ' return false;'; + $js .= ' }'; + $js .= ' );'; + $js .= ' });'; + $js .= ''; + + $js = sprintf($js, $apikey, $login_url, $logout_url); + + // Compress the bugger down a bit + + $js = str_replace(' ', '', $js); + + $action->raw(" $js"); // leading two spaces to make it line up } } - // Note: this script needs to appear as close as possible to + /** + * Add in an additional Facebook Connect script that's supposed to + * appear as close as possible to + * + * @param Action $action the current action + * + * @return void + * + */ function onEndShowFooter($action) { if ($this->reqFbScripts($action)) { - $action->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php'); + $action->script('http://static.ak.connect.facebook.com' . + '/js/api_lib/v0.4/FeatureLoader.js.php'); } } + /** + * Output Facebook Connect specific CSS link + * + * @param Action $action the current action + * + * @return void + * + */ + function onEndShowStatusNetStyles($action) { - if ($this->reqFbScripts($action)) { - $action->cssLink('plugins/FBConnect/FBConnectPlugin.css'); + $action->cssLink('plugins/Facebook/FBConnect.css'); } } @@ -161,12 +271,13 @@ class FBConnectPlugin extends Plugin * want to output FB namespace, scripts, CSS, etc. on the pages that * really need them. * - * @param Action the action in question + * @param Action $action the current action * * @return boolean true */ - function reqFbScripts($action) { + function reqFbScripts($action) + { // If you're logged in w/FB Connect, you always need the FB stuff @@ -228,10 +339,19 @@ class FBConnectPlugin extends Plugin return null; } + /** + * Add in a Facebook Connect avatar to the primary nav menu + * + * @param Action $action the current action + * + * @return void + * + */ + function onStartPrimaryNav($action) { - $user = common_current_user(); + $connect = 'FBConnectSettings'; if (common_config('xmpp', 'enabled')) { $connect = 'imsettings'; @@ -262,78 +382,31 @@ class FBConnectPlugin extends Plugin 'alt' => 'Facebook Connect User', 'width' => '16'), ''); - $iconurl = common_path('plugins/FBConnect/fbfavicon.ico'); + $iconurl = common_path('plugins/Facebook/fbfavicon.ico'); $action->element('img', array('id' => 'fb_favicon', 'src' => $iconurl)); $action->elementEnd('li'); } + } - $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)), - _('Home'), _('Personal profile and friends timeline'), false, 'nav_home'); - $action->menuItem(common_local_url('profilesettings'), - _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account'); - $action->menuItem(common_local_url($connect), - _('Connect'), _('Connect to services'), false, 'nav_connect'); - if (common_config('invite', 'enabled')) { - $action->menuItem(common_local_url('invite'), - _('Invite'), - sprintf(_('Invite friends and colleagues to join you on %s'), - common_config('site', 'name')), - false, 'nav_invitecontact'); - } - - // Need to override the Logout link to make it do FB stuff - if (!empty($fbuid)) { - - $logout_url = common_local_url('logout'); - $title = _('Logout from the site'); - $text = _('Logout'); - - $html = sprintf('', - $title, $logout_url, $text); - - $action->raw($html); - - } else { - $action->menuItem(common_local_url('logout'), - _('Logout'), _('Logout from the site'), false, 'nav_logout'); - } - } - else { - if (!common_config('site', 'openidonly')) { - if (!common_config('site', 'closed')) { - $action->menuItem(common_local_url('register'), - _('Register'), _('Create an account'), false, 'nav_register'); - } - $action->menuItem(common_local_url('login'), - _('Login'), _('Login to the site'), false, 'nav_login'); - } else { - $this->menuItem(common_local_url('openidlogin'), - _('OpenID'), _('Login with OpenID'), false, 'nav_openid'); - } - } - - $action->menuItem(common_local_url('doc', array('title' => 'help')), - _('Help'), _('Help me!'), false, 'nav_help'); - if ($user || !common_config('site', 'private')) { - $action->menuItem(common_local_url('peoplesearch'), - _('Search'), _('Search for people or text'), false, 'nav_search'); - } - - // We are replacing the primary nav entirely; give other - // plugins a chance to handle it here. - - Event::handle('EndPrimaryNav', array($action)); - - return false; + return true; } + /** + * Alter the local nav menu to have a Facebook Connect login and + * settings pages + * + * @param Action $action the current action + * + * @return void + * + */ + function onStartShowLocalNavBlock($action) { - $action_name = get_class($action); + $action_name = get_class($action); $login_actions = array('LoginAction', 'RegisterAction', 'OpenidloginAction', 'FBConnectLoginAction'); @@ -356,8 +429,16 @@ class FBConnectPlugin extends Plugin return true; } + /** + * Have the logout process do some Facebook Connect cookie cleanup + * + * @param Action $action the current action + * + * @return void + */ + function onStartLogout($action) -{ + { $action->logout(); $fbuid = $this->loggedIn(); @@ -375,9 +456,16 @@ class FBConnectPlugin extends Plugin return true; } + /** + * Get the URL of the user's Facebook avatar + * + * @param int $fbuid the Facebook user ID + * + * @return string $url the url for the user's Facebook avatar + */ + function getProfilePicURL($fbuid) { - $facebook = getFacebook(); $url = null; @@ -396,8 +484,70 @@ class FBConnectPlugin extends Plugin "Facebook client failure requesting profile pic!"); } - return $url; + return $url; + } + /** + * Add a Facebook queue item for each notice + * + * @param Notice $notice the notice + * @param array &$transports the list of transports (queues) + * + * @return boolean hook return + */ + + function onStartEnqueueNotice($notice, &$transports) + { + array_push($transports, 'facebook'); + return true; + } + + /** + * broadcast the message when not using queuehandler + * + * @param Notice &$notice the notice + * @param array $queue destination queue + * + * @return boolean hook return + */ + + function onUnqueueHandleNotice(&$notice, $queue) + { + if (($queue == 'facebook') && ($this->_isLocal($notice))) { + facebookBroadcastNotice($notice); + return false; + } + return true; + } + + /** + * Determine whether the notice was locally created + * + * @param Notice $notice the notice + * + * @return boolean locality + */ + + function _isLocal($notice) + { + return ($notice->is_local == Notice::LOCAL_PUBLIC || + $notice->is_local == Notice::LOCAL_NONPUBLIC); + } + + /** + * Add Facebook queuehandler to the list of daemons to start + * + * @param array $daemons the list fo daemons to run + * + * @return boolean hook return + * + */ + + function onGetValidDaemons($daemons) + { + array_push($daemons, INSTALLDIR . + '/plugins/Facebook/facebookqueuehandler.php'); + return true; } } diff --git a/plugins/Facebook/README b/plugins/Facebook/README new file mode 100644 index 0000000000..bf2f4a1800 --- /dev/null +++ b/plugins/Facebook/README @@ -0,0 +1,129 @@ +This plugin allows you to use Facebook Connect with StatusNet, provides a +Facebook application for your users, and allows them to update their +Facebook statuses from StatusNet. + +Facebook Connect +---------------- + +Facebook connect allows users to register and login using nothing but their +Facebook credentials. With Facebook Connect, your users can: + +- Authenticate (register/login/logout -- works similar to OpenID) +- Associate an existing StatusNet account with a Facebook account +- Disconnect a Facebook account from a StatusNet account + +Built-in Facebook Application +----------------------------- + +The plugin also installs a StatusNet Facebook application that allows your +users to automatically update their Facebook statuses with their latest +notices, invite their friends to use the app (and thus your site), view +their notice timelines, and post notices -- all from within Facebook. The +application is built into the StatusNet Facebook plugin and runs on your +host. + +Quick setup instructions* +------------------------- + +Install the Facebook Developer application on Facebook: + + http://www.facebook.com/developers/ + +Use it to create a new application and generate an API key and secret. Add a +Facebook app section of your config.php and copy in the key and secret, +e.g.: + + // Config section for the built-in Facebook application + $config['facebook']['apikey'] = 'APIKEY'; + $config['facebook']['secret'] = 'SECRET'; + +In Facebook's application editor, specify the following URLs for your app: + +- Canvas Callback URL : http://example.net/mublog/facebook/app/ +- Post-Remove Callback URL: http://example.net/mublog/facebook/app/remove +- Post-Add Redirect URL : http://apps.facebook.com/yourapp/ +- Canvas Page URL : http://apps.facebook.com/yourapp/ +- Connect URL : http://example.net/mublog/ + + *** ATTENTION *** + These URLs have changed slightly since StatusNet version 0.8.1, + so if you have been using the Facebook app previously, you will + need to update your configuration! + +Replace "example.net" with your host's URL, "mublog" with the path to your +StatusNet installation, and 'yourapp' with the name of the Facebook +application you created. (If you don't have "Fancy URLs" on, you'll need to +change http://example.net/mublog/ to http://example.net/mublog/index.php/). + +Additionally, Choose "Web" for Application type in the Advanced tab. In the +"Canvas setting" section, choose the "FBML" for Render Method, "Smart Size" +for IFrame size, and "Full width (760px)" for Canvas Width. Everything else +can be left with default values. + +* NOTE: For more under-the-hood detailed instructions about setting up a + Facebook application and getting an API key, check out the + following pages on the Facebook wiki: + + http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site + http://wiki.developers.facebook.com/index.php/Creating_your_first_application + +Finally you must activate the plugin by adding the following line to your +config.php: + + addPlugin('Facebook'); + +Testing It Out +-------------- + +If the Facebook plugin is enabled and working, there will be a new Facebook +Connect Settings tab under each user's Connect menu. Users can connect and +disconnect* to their Facebook accounts from it. + +To try out the plugin, fire up your browser and connect to: + + http://SITE/PATH_TO_STATUSNET/main/facebooklogin + +or, if you do not have fancy URLs turned on: + + http://SITE/PATH_TO_STATUSNET/index.php/main/facebooklogin + +You should see a page with a blue button that says: "Connect with Facebook" +and you should be able to login or register. + +From within Facebook, you should also be able to get to the Facebook +application, and run it by hitting the link you specified above when +configuring it: + + http://apps.facebook.com/yourapp/ + +That link should be present you with a login screen. After logging in to +the app, you are given the option to update their Facebook status via +StatusNet. + +* Note: Before a user can disconnect from Facebook, she must set a normal + StatusNet password. Otherwise, she might not be able to login in to her + account in the future. This is usually only required for users who have + used Facebook Connect to register their StatusNet account, and therefore + haven't already set a local password. + +Offline Queue Handling +---------------------- + +For larger sites needing better performance it's possible to enable queuing +and have users' notices posted to Facebook via a separate "offline" +FacebookQueueHandler (facebookqueuhandler.php in the Facebook plugin +directory), which will be started by the plugin along with their other +daemons when you run scripts/startdaemons.sh. See the StatusNet README for +more about queuing and daemons. + +TODO +---- + +- Invite Facebook friends to use your StatusNet installation via Facebook + Connect +- Auto-subscribe Facebook friends already using StatusNet +- Share StatusNet favorite notices to your Facebook stream +- Allow users to update their Facebook statuses once they have authenticated + with Facebook Connect (no need for them to use the Facebook app if they + don't want to). +- Re-design the whole thing to support multiple instances of StatusNet diff --git a/extlib/facebook/facebook.php b/plugins/Facebook/facebook/facebook.php similarity index 100% rename from extlib/facebook/facebook.php rename to plugins/Facebook/facebook/facebook.php diff --git a/extlib/facebook/facebook_desktop.php b/plugins/Facebook/facebook/facebook_desktop.php similarity index 100% rename from extlib/facebook/facebook_desktop.php rename to plugins/Facebook/facebook/facebook_desktop.php diff --git a/extlib/facebook/facebookapi_php5_restlib.php b/plugins/Facebook/facebook/facebookapi_php5_restlib.php similarity index 100% rename from extlib/facebook/facebookapi_php5_restlib.php rename to plugins/Facebook/facebook/facebookapi_php5_restlib.php diff --git a/extlib/facebook/jsonwrapper/JSON/JSON.php b/plugins/Facebook/facebook/jsonwrapper/JSON/JSON.php similarity index 100% rename from extlib/facebook/jsonwrapper/JSON/JSON.php rename to plugins/Facebook/facebook/jsonwrapper/JSON/JSON.php diff --git a/extlib/facebook/jsonwrapper/JSON/LICENSE b/plugins/Facebook/facebook/jsonwrapper/JSON/LICENSE similarity index 100% rename from extlib/facebook/jsonwrapper/JSON/LICENSE rename to plugins/Facebook/facebook/jsonwrapper/JSON/LICENSE diff --git a/extlib/facebook/jsonwrapper/jsonwrapper.php b/plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php similarity index 100% rename from extlib/facebook/jsonwrapper/jsonwrapper.php rename to plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php diff --git a/extlib/facebook/jsonwrapper/jsonwrapper_inner.php b/plugins/Facebook/facebook/jsonwrapper/jsonwrapper_inner.php similarity index 100% rename from extlib/facebook/jsonwrapper/jsonwrapper_inner.php rename to plugins/Facebook/facebook/jsonwrapper/jsonwrapper_inner.php diff --git a/lib/facebookaction.php b/plugins/Facebook/facebookaction.php similarity index 88% rename from lib/facebookaction.php rename to plugins/Facebook/facebookaction.php index 5cbb9be531..c852bbf5e6 100644 --- a/lib/facebookaction.php +++ b/plugins/Facebook/facebookaction.php @@ -2,7 +2,7 @@ /** * StatusNet, the distributed open-source microblogging tool * - * Low-level generator for HTML + * Base Facebook Action * * PHP version 5 * @@ -22,19 +22,17 @@ * @category Faceboook * @package StatusNet * @author Zach Copley - * @copyright 2008 StatusNet, Inc. + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) -{ +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/facebookutil.php'; -require_once INSTALLDIR.'/lib/noticeform.php'; - +require_once INSTALLDIR . '/plugins/Facebook/facebookutil.php'; +require_once INSTALLDIR . '/lib/noticeform.php'; class FacebookAction extends Action { @@ -46,17 +44,6 @@ class FacebookAction extends Action var $app_uri = null; var $app_name = null; - /** - * Constructor - * - * Just wraps the HTMLOutputter constructor. - * - * @param string $output URI to output to, default = stdout - * @param boolean $indent Whether to indent output, default true - * - * @see XMLOutputter::__construct - * @see HTMLOutputter::__construct - */ function __construct($output='php://output', $indent=true, $facebook=null, $flink=null) { parent::__construct($output, $indent); @@ -96,8 +83,8 @@ class FacebookAction extends Action function showStylesheets() { $this->cssLink('css/display.css', 'base'); - $this->cssLink('css/display.css',null,'screen, projection, tv'); - $this->cssLink('css/facebookapp.css', 'base'); + $this->cssLink('css/display.css', null, 'screen, projection, tv'); + $this->cssLink('plugins/Facebook/facebookapp.css'); } function showScripts() @@ -108,10 +95,8 @@ class FacebookAction extends Action /** * Start an Facebook ready HTML document * - * For Facebook we don't want to actually output any headers, - * DTD info, etc. Just Stylesheet and JavaScript links. - * - * If $type isn't specified, will attempt to do content negotiation. + * For Facebook we don't want to actually output any headers, + * DTD info, etc. Just Stylesheet and JavaScript links. * * @param string $type MIME type to use; default is to do negotation. * @@ -140,8 +125,6 @@ class FacebookAction extends Action /** * Show notice form. * - * MAY overload if no notice form needed... or direct message box???? - * * @return nothing */ function showNoticeForm() @@ -158,10 +141,6 @@ class FacebookAction extends Action $this->elementEnd('div'); } - function showAside() - { - } - function showHead($error, $success) { @@ -181,7 +160,6 @@ class FacebookAction extends Action } - // Make this into a widget later function showLocalNav() { @@ -216,8 +194,6 @@ class FacebookAction extends Action /** * Show header of the page. * - * Calls template methods - * * @return nothing */ function showHeader() @@ -241,7 +217,6 @@ class FacebookAction extends Action $this->endHTML(); } - function showInstructions() { @@ -257,22 +232,16 @@ class FacebookAction extends Action $this->elementStart('dd'); $this->elementStart('p'); $this->text(sprintf($loginmsg_part1, common_config('site', 'name'))); - if (!common_config('site', 'openidonly')) { - $this->element('a', - array('href' => common_local_url('register')), _('Register')); - } else { - $this->element('a', - array('href' => common_local_url('openidlogin')), _('Register')); - } + $this->element('a', + array('href' => common_local_url('register')), _('Register')); $this->text($loginmsg_part2); - $this->elementEnd('p'); + $this->elementEnd('p'); $this->elementEnd('dd'); $this->elementEnd('dl'); $this->elementEnd('div'); } - function showLoginForm($msg = null) { @@ -304,7 +273,7 @@ class FacebookAction extends Action $this->elementEnd('ul'); $this->submit('submit', _('Login')); - $this->elementEnd('fieldset'); + $this->elementEnd('fieldset'); $this->elementEnd('form'); $this->elementStart('p'); @@ -317,14 +286,13 @@ class FacebookAction extends Action } - function updateProfileBox($notice) { // Need to include inline CSS for styling the Profile box - $app_props = $this->facebook->api_client->Admin_getAppProperties(array('icon_url')); - $icon_url = $app_props['icon_url']; + $app_props = $this->facebook->api_client->Admin_getAppProperties(array('icon_url')); + $icon_url = $app_props['icon_url']; $style = '