Last updated April 22, 2011. Created by publicmind on August 14, 2010.
Log in to edit this page.

Link plugin provides the ability for users to publish links. Users can publish a link with an (optional) thumbnail, title and description along with their status. In the nutshell, it imitates the link attachment feature on Facebook.

It also provides support for publishing links from video providers such as youtube, vimeo, etc through integration with emvideo module, so that it is published, in the status stream, as an embedded video along with appropriate title and description.

Along with video providers, Link plugin also allows to share favorite links from audio providers such as 8tracks and others through integration with emaudio module, so that the audio player gets embedded with the status to play your favorite pods or mixes right there in the status stream.

Share Page

Facebook-style Statuses provides a Share page to quickly and easily post status updates. This page is at http://example.com/share-status and allows people browsing other sites to easily post status (Read more: Facebook-style Statuses: Share Page). Link plugin allows to share links by providing the URL of the page as the flink parameter of the query which will fetch the information from the shared page and pre-fills the form to share the link. For example, if you want to allow people share the page http://drupal.org, the link to your site should look like http://example.com/share-status?s=Cool%20Beans&flink=http%3A%2F%2Fdrupal.org.

Theme functions

theme('fbsmp_link_attachment', $attachment, $settings = array())
It returns the completely themed link attachment as used in status streams and tokens. $attachment is a full attachment object. $settings is an optional array which should contain the following keys: width, height, class, external, nofollow, emvideo_width, emvideo_height, emvideo_autoplay and emvideo_providers.
theme_fbsmp_link_thumbnail($attachment, $settings = array())
Formats the image thumbnail of the shared link with the specified width and height. $attachment is a full attachment object. $settings is an optional array which should contain the following keys: width and height.
theme_fbsmp_link_url($attachment, $settings = array())
It returns the themed URL which was shared, with thumbnail (or embedded video/audio) and title. $attachment is a full attachment object. $settings is an optional array which should contain the following keys: width, height, class, external, nofollow, emvideo_width, emvideo_height, emvideo_autoplay and emvideo_providers.
theme_fbsmp_link_emvideo($attachment, $settings = array())
It returns the HTML embed code to display the shared video. $attachment is a full attachment object. $settings is an optional array which should contain the following keys: width, height, class, external, nofollow, emvideo_width, emvideo_height, emvideo_autoplay and emvideo_providers.
theme_fbsmp_link_emaudio($attachment, $settings = array())
It returns the HTML embed code to display the shared audio. $attachment is a full attachment object. $settings is an optional array which should contain the following keys: width, height, class, external, nofollow, emaudio_width, emaudio_height, emaudio_autoplay and emaudio_providers.

Variables:

The variables used in the above functions are:

$settings
* An array which can have one or more of following keys:
*   - width
*       An integer specifying the width attribute of the img tag.
*   - height
*       An integer specifying the height attribute of the img tag.
*   - class
*       A string specifying the class attribute of the link.
*   - external
*       A boolean specifying whether to add target="_blank"
*       attribute to the link.
*   - nofollow
*       A boolean specifying whether to add rel="nofollow"
*       attribute to the link.
*   - emvideo_width
*       An integer specifying the height of the embedded video.
*   - emvideo_height
*       An integer specifying the width of the embedded video.
*   - emvideo_autoplay
*       A boolean specifying whether to autoplay the video on page load.
*   - emvideo_providers
*       An array specifying the available video providers.

Tokens

link-title
The page title of the shared link (No HTML allowed).
link-description
The page summary of the shared link (No HTML allowed).
link-themed-url
The themed URL which was shared, with thumbnail (or embedded video) and title.
link-themed-thumbnail
The themed thumbnail for the shared link.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.