Drupal Module: Loft Social Manager
Author: Aaron Klump firstname.lastname@example.org
This module provides extra help for using social media links in Drupal
It provides a set of social buttons that can be placed in your website in several ways: on all public pages, on all node pages as part of node content or node links, or as one or more blocks placed in regions. It's up to you to decide how you'd like to use it.
This module leverages the Facebook Social module and provides a default "Like" preset. It also leverages the Metatag modules and overrides form values and metatags to increase the likelihood that you are setup correctly for Facebook. It insures that the following values in your html source on the front page match exactly.
Furthermore, it makes sure you use
http instead of
https for your social page links.
Upload an image to have the og:image and image_url metatags handled for you. Delete your image and you can modify these fields in the metatag module as expected.
- This module works hand-in-hand with On the Web to create a tweet button from the account you've entered in On the Web.
- If you enable Shorten URLs, twitter links will be shortened using the chosen service.
- Use the constant
Open graph tags are supported when this module leverages metatag and metatag_opengraph. See
loft_social.api.php for hook(s).
Install as usual, see http://drupal.org/node/70151 for further information.
admin/structure/fbsocialand set your Facebook application id and Base URL and submit the form.
admin/config/services/loft-socialand review/alter/submit the settings form.
Set your twitter url in the On the Web settings form.
Return to the module settings page and copy the text at the bottom of the form and paste into
settings.phpif you wish to disable the ability for admins to change these settings (a good idea once you start getting like counts, etc.)
You can disable all loading of social plugins to speed up development by setting the following variable to 'all'.
$conf['loft_social_suspend'] = 'all'
Plug your custom social things into this module using
Get the current page url for sharing links, Twitter, Facebook, etc. using
You program your social services using the module settings of On the Web and you can programatically obtain a service name using
loft_social_get_name(). As an example, to set your Twitter name, which is used by the tweet button visit
admin/config/services/on_the_weband enter your twitter url.
To encapsulate a common pattern in a module.
- In the Loft Studios
- Aaron Klump - Developer
- PO Box 29294 Bellingham, WA 98228-1294
- aim: theloft101
- skype: intheloftstudios
- d.o: aklump