You are here

README.txt in Tweet 6.2

=============
== Summary ==
=============
This module provides links to post pages to twitter. Clicking the links will
open a new window or tab with twitter in it. The tweet will be in focus and will
contain a customizable string (making hashtags possible) which can
programmatically include the relevant URL and title. The Shorten URLs module is
used to shorten the URLs if it is installed.

URLs and titles will be for either the node which is being displayed as a
teaser or for the current page. Multiple links can appear on the same page, as
on a View of teasers. By default, links appear in the Links section when viewing
full nodes or teasers.

Administrators can choose whether to show the link as an icon, an icon and
text, or just text.  Options can be chosen separately for nodes and teasers.
Administrators can also choose which node types the links should appear on, or
could choose not to have links show up on nodes at all.  If the module is
configured not to display links automatically, administrators can display their
own links wherever they like by calling tweet_to_twitter().  A more complete
explanation is below.

=====================
== Development/API ==
=====================
If you are using this module to display links to twitter arbitrarily, you will
probably be using the tweet_to_twitter() function.  This constructs the link
you need according to the following arguments.  All arguments are optional
unless otherwise noted.  If no arguments are passed the link constructed will
be for the current page according to your settings.

If you want more control, the _tweet_to_twitter() function takes the same
arguments and returns an array in the format required by hook_link()
(http://api.drupal.org/api/function/hook_link/6).

$type
  Specifies what will show up in the link: the twitter icon, the twitter icon
  and text, or just text. Pass 'icon' to show just the icon, 'icon_text' to
  show the icon and text, and 'text' to show just the text. Required if display
  options for nodes are set to 'none' on the settings page.
$format
  A string representing the tweet text, optionally with the case-insensitive
  tokens [url] and [title]. If not passed, the format from the settings page
  will be used.
$nid
  The NID of the node for which the twitter link should be constructed.
$q
  The absolute URL of the page for which the twitter link should be
  constructed. If this is not the current page, the _title_ MUST be set
  manually, or it will be incorrect.

==================
== Installation ==
==================
   1. Install this module as usual (FTP the files to sites/all/modules, enable 
        at admin/build/modules).  See http://drupal.org/node/176044 for help.
   2. If you want, go to admin/settings/tweet to change the module's settings.

===========
== Links ==
===========
Visit the module page for more information.

Module Page: http://drupal.org/project/tweet
Enable Module: http://example.com/?q=admin/build/modules
Settings Page: http://example.com/?q=admin/settings/tweet
Shorten URLs: http://drupal.org/project/shorten

File

README.txt
View source
  1. =============
  2. == Summary ==
  3. =============
  4. This module provides links to post pages to twitter. Clicking the links will
  5. open a new window or tab with twitter in it. The tweet will be in focus and will
  6. contain a customizable string (making hashtags possible) which can
  7. programmatically include the relevant URL and title. The Shorten URLs module is
  8. used to shorten the URLs if it is installed.
  9. URLs and titles will be for either the node which is being displayed as a
  10. teaser or for the current page. Multiple links can appear on the same page, as
  11. on a View of teasers. By default, links appear in the Links section when viewing
  12. full nodes or teasers.
  13. Administrators can choose whether to show the link as an icon, an icon and
  14. text, or just text. Options can be chosen separately for nodes and teasers.
  15. Administrators can also choose which node types the links should appear on, or
  16. could choose not to have links show up on nodes at all. If the module is
  17. configured not to display links automatically, administrators can display their
  18. own links wherever they like by calling tweet_to_twitter(). A more complete
  19. explanation is below.
  20. =====================
  21. == Development/API ==
  22. =====================
  23. If you are using this module to display links to twitter arbitrarily, you will
  24. probably be using the tweet_to_twitter() function. This constructs the link
  25. you need according to the following arguments. All arguments are optional
  26. unless otherwise noted. If no arguments are passed the link constructed will
  27. be for the current page according to your settings.
  28. If you want more control, the _tweet_to_twitter() function takes the same
  29. arguments and returns an array in the format required by hook_link()
  30. (http://api.drupal.org/api/function/hook_link/6).
  31. $type
  32. Specifies what will show up in the link: the twitter icon, the twitter icon
  33. and text, or just text. Pass 'icon' to show just the icon, 'icon_text' to
  34. show the icon and text, and 'text' to show just the text. Required if display
  35. options for nodes are set to 'none' on the settings page.
  36. $format
  37. A string representing the tweet text, optionally with the case-insensitive
  38. tokens [url] and [title]. If not passed, the format from the settings page
  39. will be used.
  40. $nid
  41. The NID of the node for which the twitter link should be constructed.
  42. $q
  43. The absolute URL of the page for which the twitter link should be
  44. constructed. If this is not the current page, the _title_ MUST be set
  45. manually, or it will be incorrect.
  46. ==================
  47. == Installation ==
  48. ==================
  49. 1. Install this module as usual (FTP the files to sites/all/modules, enable
  50. at admin/build/modules). See http://drupal.org/node/176044 for help.
  51. 2. If you want, go to admin/settings/tweet to change the module's settings.
  52. ===========
  53. == Links ==
  54. ===========
  55. Visit the module page for more information.
  56. Module Page: http://drupal.org/project/tweet
  57. Enable Module: http://example.com/?q=admin/build/modules
  58. Settings Page: http://example.com/?q=admin/settings/tweet
  59. Shorten URLs: http://drupal.org/project/shorten