You are here

README.txt in Tweet 6

=============
== 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 the URL of the relevant page on your site.  It can optionally also
contain the title of the relevant page. The URL will be abbreviated using one of
these services: hex.io, idek.net, is.gd, lin.cr, ri.ms, th8.us, or TinyURL.

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.

==================
== Requirements ==
==================
There are no requirements for using this module, but it is recommended that your
PHP installation is compiled with either the file_get_contents() function, cURL,
or both.  If you're not sure, your PHP probably supports at least
file_get_contents(), and most installations support cURL as well.  Without one
of these, you will not be able to use the URL abbreviation feature.  For more
information visit http://php.net/file_get_contents and http://php.net/curl.

=====================
== 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.

$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.
$title
  If FALSE, no page title will be included in the twitter message; if TRUE, the
  pagetitle will be included and will be determined from the current page or
  the NID passed to the function. If $title is a string and it is not empty,
  the string will be used as the title.  In this case @title is replaced with
  the current page's title or the title as determined from the NID passed to
  the function. If 1, the default 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 some minor 
        settings. The defaults should work for most people.

===========
== 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

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 the URL of the relevant page on your site. It can optionally also
  7. contain the title of the relevant page. The URL will be abbreviated using one of
  8. these services: hex.io, idek.net, is.gd, lin.cr, ri.ms, th8.us, or TinyURL.
  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. == Requirements ==
  22. ==================
  23. There are no requirements for using this module, but it is recommended that your
  24. PHP installation is compiled with either the file_get_contents() function, cURL,
  25. or both. If you're not sure, your PHP probably supports at least
  26. file_get_contents(), and most installations support cURL as well. Without one
  27. of these, you will not be able to use the URL abbreviation feature. For more
  28. information visit http://php.net/file_get_contents and http://php.net/curl.
  29. =====================
  30. == Development/API ==
  31. =====================
  32. If you are using this module to display links to twitter arbitrarily, you will
  33. probably be using the tweet_to_twitter() function. This constructs the link
  34. you need according to the following arguments. All arguments are optional
  35. unless otherwise noted. If no arguments are passed the link constructed will
  36. be for the current page according to your settings.
  37. $type
  38. Specifies what will show up in the link: the twitter icon, the twitter icon
  39. and text, or just text. Pass 'icon' to show just the icon, 'icon_text' to
  40. show the icon and text, and 'text' to show just the text. Required if display
  41. options for nodes are set to 'none' on the settings page.
  42. $title
  43. If FALSE, no page title will be included in the twitter message; if TRUE, the
  44. pagetitle will be included and will be determined from the current page or
  45. the NID passed to the function. If $title is a string and it is not empty,
  46. the string will be used as the title. In this case @title is replaced with
  47. the current page's title or the title as determined from the NID passed to
  48. the function. If 1, the default from the settings page will be used.
  49. $nid
  50. The NID of the node for which the twitter link should be constructed.
  51. $q
  52. The absolute URL of the page for which the twitter link should be
  53. constructed. If this is not the current page, the _title_ MUST be set
  54. manually, or it will be incorrect.
  55. ==================
  56. == Installation ==
  57. ==================
  58. 1. Install this module as usual (FTP the files to sites/all/modules, enable
  59. at admin/build/modules). See http://drupal.org/node/176044 for help.
  60. 2. If you want, go to admin/settings/tweet to change some minor
  61. settings. The defaults should work for most people.
  62. ===========
  63. == Links ==
  64. ===========
  65. Visit the module page for more information.
  66. Module Page: http://drupal.org/project/tweet
  67. Enable Module: http://example.com/?q=admin/build/modules
  68. Settings Page: http://example.com/?q=admin/settings/tweet