Description
-----------
This project aims to solve a common problem of displaying a twitter widget for a
specified username, that has been noted in various places, but never properly
developed.
The module (currently Drupal 7 only, but could easily be backported) implements
a custom field formatter that takes the contents of a generic Text Field,
attached to a Node, and treats it like a Twitter Username. It then provides a
default template file (twitter-field-widget.tpl.php) That can be overridden in
your module, with the code generated after you configure a Twitter Profile
Widget and click the "Finish & Grab code" button at Twitter.com.
The default template provided by this module implements the Twitter Profile
widget, with a basic color scheme. You may override the default template in your
theme to use the custom code generated by the Profile widget generator, and may
work with the Twitter search widget or the Twitter faves widget as well.
Unfortunately, the Twitter List Widget requires knowledge of at least two pieces
of information (user-name, and list-name) and so it is currently not possible
to override this widget type.
Todo
----
A planned enhancement would be to create a completely custom field type, which
would allow for storage of two fields as one (needed for the Twitter List Widget
implementation), but for now, we're piggybacking off of the simple text field
type.
Usage
-----
1) Download and enable the module as usual.
2) Create a text field called "Twitter ID" on one of your content types, with a
max length of for example 30 characters.
3) Change the display format from "Default" to "Twitter Widget".
4) Profit!
Credits
-------
This module was used in combination with a custom view, to build our individual
profile pages at Bluesparklabs.com. The initial module development sponsored by
Bluespark Labs.
View source
- Description
- -----------
-
- This project aims to solve a common problem of displaying a twitter widget for a
- specified username, that has been noted in various places, but never properly
- developed.
-
- The module (currently Drupal 7 only, but could easily be backported) implements
- a custom field formatter that takes the contents of a generic Text Field,
- attached to a Node, and treats it like a Twitter Username. It then provides a
- default template file (twitter-field-widget.tpl.php) That can be overridden in
- your module, with the code generated after you configure a Twitter Profile
- Widget and click the "Finish & Grab code" button at Twitter.com.
-
- The default template provided by this module implements the Twitter Profile
- widget, with a basic color scheme. You may override the default template in your
- theme to use the custom code generated by the Profile widget generator, and may
- work with the Twitter search widget or the Twitter faves widget as well.
- Unfortunately, the Twitter List Widget requires knowledge of at least two pieces
- of information (user-name, and list-name) and so it is currently not possible
- to override this widget type.
-
- Todo
- ----
-
- A planned enhancement would be to create a completely custom field type, which
- would allow for storage of two fields as one (needed for the Twitter List Widget
- implementation), but for now, we're piggybacking off of the simple text field
- type.
-
- Usage
- -----
-
- 1) Download and enable the module as usual.
- 2) Create a text field called "Twitter ID" on one of your content types, with a
- max length of for example 30 characters.
- 3) Change the display format from "Default" to "Twitter Widget".
- 4) Profit!
-
- Credits
- -------
-
- This module was used in combination with a custom view, to build our individual
- profile pages at Bluesparklabs.com. The initial module development sponsored by
- Bluespark Labs.