Wednesday, May 18, 2011

Facebook-style Statuses Tags

Facebook-style Statuses Tags (FBSST, or facebook_status_tags) is a submodule of Facebook-style Statuses which parses statuses for usernames marked with an "at" sign (@) or taxonomy terms marked with a "hash" sign (#) and themes them appropriately. For example, if "@Dries" was in a status, it may be themed to link to Dries' account on that site. If "#Drupal" was in a status, it would be themed as a link to the page listing statuses that also had the "Drupal" tag. If the module finds a #hashtag in a status that has not yet been added to the vocabulary, it automatically adds the term to the vocabulary.

Taxonomy is not a dependency; if Taxonomy is not enabled, only the username-theming part of the description above will work.


Tags can be written in standard format (i.e. #hashtag or @username) or surrounded by square brackets ([#hello world] or [@Clark Kent]). Surround a tag with square brackets if the tag has word-break characters in it like spaces or periods (full stops). The square brackets will not appear in the text of the status that other users see.
Taxonomy terms and user mentions marked with a hashmark (#) or "at" sign (@) respectively are always turned into links when viewing statuses. However, for the purposes of categorical listings, FBSST is only aware of references in statuses submitted while FBSST was enabled.
Views integration is provided, including two default Views that list statuses containing certain tags or referencing certain users.


Facebook-style Statuses Tags adds one setting to the Facebook-style Statuses Settings page at admin/settings/facebook_status if Taxonomy is enabled. This setting allows choosing the vocabulary into which new tags will be added. The Taxonomy part of this module will not work until a vocabulary is set, but the module automatically creates and assigns a taxonomy for use with tags when it is enabled, so you shouldn't have to touch this.


A "Facebook-style Statuses Popular Tags" block is provided to list the most popular tags. The block's settings allow you to specify how many tags to display, and how long ago statuses could have been posted that will be included in the search for popular tags.
If you want finer control over the block (for example, if you wanted a table instead of a list) you could override the theme function (see below).


theme_facebook_status_popular_tags($count = NULL, $time = NULL)
Outputs an HTML representation of a list of popular tags. $count is the number of tags to show and $time is how long ago statuses could have been posted that will be included in the search for popular tags (one of "day," "week," "month," "year," "all").
For more information about Drupal Development, Drupal Expert, Drupal Developer and Drupal Programmer visit at Source:

No comments:

Post a Comment