Facebook-style Statuses

Last modified: November 2, 2009 - 20:33

Facebook-style Statuses, or facebook_status (not to be mistaken with fbstatus, and abbreviated FBSS), is a module which provides each user with a microblog where they can write what they're doing, how they feel, or anything they want. With permission, users can also post messages on other users' profiles. This helps build a community and make your users feel more connected to your website.

This documentation is for the 2.x branch of Facebook-style Statuses. The example site demonstrates how this module can be used to imitate Facebook or Twitter.

Learn about this module's:

Permissions

You can access this module's permissions at http://example.com?q=admin/user/permissions#module-facebook_status

Three permissions are available:

edit all statuses
Allows editing or deleting any user's status.
edit own status
Allows posting, editing, and deleting one's own status.
post on all profiles
Allows posting messages on other users' profiles.
use open API
Gives access to the Open API.
view all statuses
Allows viewing everyone's statuses.

Settings

You can access this module's settings at http://example.com/admin/settings/facebook_status

These settings are available:

Facebook Mode
Facebook Mode makes this module work like Facebook, where the user's username is appended to the front of the status. For example, if Joe's status was "is happy," turning this on would display his status as "Joe is happy." It also takes into account English possessives: for example, if Joe's status was "'s website is awesome," with this setting on his status would display "Joe's website is awesome." With this off, the module can be used in a more general context--for example, to post one's favorite song lyric of the moment or to post site announcements.
Legacy Mode
In Facebook-style Statuses 1.x, the status that showed up in the Facebook-style Statuses block changed on node and user pages to the owner of the node or user profile, respectively. In 2.x it always shows the current user's status (along with the update form, if applicable) by default. However, this setting allows you to specify if you want the old behavior on nodes, user profiles, or both.
Default Twitter option
If the Twitter module is enabled, this setting allows you to choose how you want the "Post to Twitter" checkbox to appear if users have assigned a Twitter account to their account on your site. You can have the checkbox always enabled, always disabled, or let the user choose; or you can disable posting to Twitter altogether. Just remember that some messages will get cut off when posted to Twitter if you allow more than 140 characters in a status on your site. Posts on other users' profiles cannot be posted to Twitter.
Form type
Allows you to choose whether you want to use a textfield or textarea for the status update form.
Input filter
Allows you to choose an input filter to run on statuses before display. You can choose not to use any input filters, in which case all HTML will be escaped.
Exclude Users
Users specified here are not allowed to have statuses. This means they cannot post a new status for themselves, and their old statuses will not show up anywhere. They can, however, still update others' statuses if they have permission to do so.
Status Update Field Size
Allows you to set the width of the status update textfield. This allows it to look like it fits in different locations--for example, you might want to set this to "30" if you put the Facebook-style Statuses block in a sidebar, but you may want it to be "72" if you put the block in the main content area or the footer.
Maximum status length
Allows you to set the maximum number of characters users can use in their status. The limit is 1000 characters. Users with JavaScript enabled in their browser will see a counter next to the status update form noting the number of characters remaining as they type a new status.
Advanced: Location of status-term pages
If you have the Facebook-style Statuses Tags submodule installed, this option will allow you to specify a location to which taxonomy terms marked by #hashtags should be linked. You can use the tokens [term-id] and [term-name] in the URL.
Advanced: Vocabulary for #hashtags
If you have the Facebook-style Statuses Tags submodule installed, this option specifies a taxonomy vocabulary into which words marked with a hash mark (#) in statuses will be saved.
Advanced: Hide status above textfield
If enabled, the status text will not appear above the status update form. This overrides other settings.
Advanced: Hide blank and empty statuses above textfield
If enabled and the last status was blank or no status has been posted, nothing will appear above the status update form. Otherwise, a blank status message will appear.
Advanced: Convert line breaks
By default, line breaks in the status update form are ignored. If you use an input filter to fix that, the status text will appear on a different line than the username and other information. Enabling this setting allows line breaks to appear without the side-effect of the input filter.
Advanced: Use AHAH to refresh the status update form without refreshing the page
When enabled, FBSS uses a form of JavaScript known as AHAH to quickly refresh the status update form when it is submitted, without reloading the entire page. This presents a more seamless experience for users. The only reason to turn it off is if you have other elements on the page that should be refreshed when a new status is added - for example, lists of the most recent statuses. However, there are a few techniques to refresh these lists using AJAX (similar to AHAH) as well; see the documentation on that here.
Advanced: Long status update field size
Allows you to set the width of the long status update textfield. The long field is used on user profiles and on the share-status page.
Advanced: Number of OpenAPI accesses allowed per IP address per hour
Limits the number of times external applications can query your site for data about statuses. If you have problems with too many queries, you can either reduce the number in this field or use RSS feeds generated by Views instead.
Advanced: Default text
The text that appears by default in the status update textbox. If you leave this as @laststatus, the default text in the status update form will be the last status, if it exists; if no statuses have been posted or the last status was blank, you can translate the default text (blank by default, identified by "@fbssdefault" in the translation interface). Otherwise, the text you input here will always appear in the status update form and will not be translatable. In both cases, the default text will be automatically cleared when a user clicks in the status update box.

Blocks

One block is provided:

Facebook-style Statuses
Shows the current user's status with the update form, with two exceptions: Legacy Mode can change which user is shown, and there is also a setting in the block configuration to have the block show only a single user's status (and update form where appropriate). This last option can be used on single-user blog sites, for example, or to make site announcements.

Other blocks are available if you have Views installed.

Note: You should not show the status update form more than once per page. This is most important if you have the status update form directly in your profile pages as well as in a sidebar block. To avoid this, change the pages on which the block appears to exclude the paths user/* and share-status. The reason is that having multiple forms on the page confuses the JQuery that handles parts of the form's behavior, most noticeably the character counter (for which symptoms include seeing "NaN characters remaining" or "192,192 characters remaining").

Pages

  • Edit and delete pages are provided for users with permission to edit and delete statuses.
  • A page at the relative URL "share-status" contains a status update form which can be pre-filled with the "s" parameter in the URL, like /share-status?s=test.
  • An Open API is available for third parties with permission to access status update timelines (like on Twitter). This can be found at "statuses/openapi."
  • Other pages are available with the Views module installed.

Module Integration

Facebook-style Statuses integrates with a large number of modules. Many of these modules also integrate with other modules, creating a wide range of possibilities for what you can accomplish with Facebook-style Statuses.

You can also use this small module to migrate your data from the Guestbook module to FBSS. It's easy; just enable the module and your data will be automatically converted, and the module even automatically disables itself.

Profile
Users' statuses (and, if allowed, the status update form) appear on their (core) profiles.
Views
Views integration allows site administrators to make lists of status updates. Examples include User Status History, Friends' Statuses, or All Status Updates.
Activity
Activity integration allows status updates to appear in a Facebook-style "mini-feed" of users' activity on your website. Works with both the 1.x and 2.x branches.
Triggers
Integration with the (core) trigger module is available so that various actions can be performed when statuses are updated. However, no default actions are specifically available through the default user interface. In order to access actions which you want to occur on status updates, use the triggerunlock module to expose all actions to the interface.
Rules
Integration with the Rules module allows complex, pre-determined actions to occur when a user submits or deletes a status. Rules is basically a more powerful version of the core Trigger module. You can use rules to have FBSS integrate with even more other modules like Userpoints.
Relationship Modules
Views integration results in easy integration with the main modules that allow users to express relationships with each other: User Relationships, FriendList (*), and Flag Friend.
Flag
The Flag module allows you to add features like Facebook's "Like" or a "Report" option. A "Like" flag is included by default, as well as a "Delete" flag that deletes statuses, and a "Follow" flag that allows Twitter-style follow/follower action. Flag also integrates with Views, but there are no default FBSS views that use Flags.
Twitter
Facebook-style Statuses integrates with the Twitter module in two ways. First, if a "Special User" is set in the Facebook-style Statuses block, then statuses by that user can be automatically posted to the Twitter account. Second, each individual user can set a Twitter account in their Drupal user account settings to use to post their statuses to Twitter. If the individual user has chosen an account to use, a checkbox will appear on the status update form allowing the status to be posted to Twitter.
Author Pane
The Author Pane module provides block/theme functions that developers can use to display information about a user. This allows you to add users' statuses to the author pane on forum posts built by the Advanced Forum module, among other things.
Input Filters
You can choose an input format to run on statuses when they are displayed. This allows integration with modules like wordfilter or inline.
Popups API
The Popups API module allows links to be opened in modal dialogs so that the whole page doesn't have to be refreshed. FBSS allows the edit and delete links for statuses to be handled in this way; submitting the form will refresh the page with AJAX for a smooth experience for your users.
Views Bulk Operations
The Views Bulk Operations module allows executing processes upon multiple statuses at a time, using the Views module as its interface and Rule Sets for the processes. For example, you could use VBO to set up a page that would allow you to delete several statuses at once.
Application Toolbar
The Application Toolbar (Appbar) module provides a toolbar at the bottom of each page that alerts users of actions on the site that are relevant to them. FBSS provides several alerts for the Appbar.
SMS Framework
Integration with the SMS Framework module allows users to send texts to your site beginning with "s: " which will be saved as statuses.
 
 

Drupal is a registered trademark of Dries Buytaert.