You are here

README.txt in Subscriptions 6

Same filename and directory in other branches
  1. 5.2 README.txt
  2. 5 README.txt
  3. 7 README.txt
  4. 2.0.x README.txt
README.txt for Subscriptions 6.x-1.x



>>>> Please feel free to suggest improvements and additions to this file! <<<<




Overview
--------

Subscriptions enables users to subscribe to be notified of changes to nodes
or taxonomies, such as new comments in specific forums, or additions to some
category of blog. Once enabled, all nodes will have an additional link that
allows the user to change their subscriptions. Users have tab on their user
screen to manage their own subscriptions. Users can also set an auto-subscribe
function which notifies the user if anyone comments on posts they have made.
Admins can turn this on by default.




Acknowledgements
----------------

Subscriptions 5.x-2.0 has been rewritten from scratch by chx and salvis.
Ported to Drupal 6 and continuously enhanced by salvis.
Doxygen documentation by develCuy, sponsored by www.transit.york.ac.uk.

http://drupalcontrib.org/drupal-6-modules provides on-line developer documentation.

Initial Translations:
- German:               salvis
- Hebrew:               yhager
- Italian:              peterpoe
- Spanish:              develCuy
- French:               matkeane
- Japanese:             PineRay
- Danish:               wulff / Anders Lund
- Brazilian Portuguese: Márcio Moreira
- Hungarian:            muczy
- Arabic:               N2H

Contributed Modules:
-

Known independent add-on modules:
- subscriptions_author:  by develCuy, sponsored by www.transit.york.ac.uk.
- subscriptions_og:      by develCuy, sponsored by www.transit.york.ac.uk.

The Organic Groups Subscriptions module has been developed independently.
Special care was taken to document the Subscriptions APIs that need to be
implemented and used for a non-trivial add-on module. As such it is an
example for building other add-on modules.




Modules
-------

For standard Subscriptions functionality you need to enable the following modules:
 * Subscriptions UI
 * Subscriptions Mail
 * Content Subscriptions
 * Taxonomy Subscriptions (e.g. forums!)

Mail Editor (http://drupal.org/project/mail_edit) allows you to customize the
notification messages sent by Subscriptions Mail.

SMTP Authentication (http://drupal.org/project/smtp) may be useful for sending
out emails, if your provider imposes limits on what you can do with PHP mail.





Upgrading from 5.x-1.x
----------------------

Subscriptions D6 is designed to smoothly upgrade and convert a 1.x 
installation. If you currently have 1.x installed, we recommend to put
your site in maintenance mode, remove the 1.x files (if you only move
them to a different directory under the web root, Drupal will still find
them and cause trouble!!!), copy the 2.x files where you want them, and
run update.php (directly or from Administer|Modules) as usual.

Subscriptions 1.x does not have an uninstall function. If you want to
remove it in order to start with a clean slate, then you need to disable
it, remove its database tables, and remove its row from the {system} table
(be careful!!!). Then you can do a fresh install of Subscriptions 2.0.






Permissions
-----------

Don't forget to set the permissions!

Subscriptions does not support anonymous users -- there's no use in
giving them any subscribe permissions.






Subscribe links
---------------

http://example.com/subscriptions/add/node/1234
http://example.com/subscriptions/add/type/blog
http://example.com/subscriptions/add/type/blog/12
http://example.com/subscriptions/add/type/forum
http://example.com/subscriptions/add/type/forum/12
http://example.com/subscriptions/add/taxa/123
http://example.com/subscriptions/add/taxa/123/12

You can combine these with a log-in link as follows:

http://example.com/user/login?destination=subscriptions/add/taxa/123


There are also corresponding

http://example.com/subscriptions/del/...

links with the same parameters, which can be used by the administrator to
provide unsubscribe links to a user. These unsubscribe links require the
user to be logged in. By default, Subscriptions sends out encrypted 
unsubscribe links with each notification, and those latter unsubscribe
links work even without logging in, but they cannot be generated by hand.




Send Intervals
--------------

Choose (and possibly adapt the strings) for the Send Intervals at 
admin/settings/subscriptions/intervals to your site! 
Specifically, "As soon as possible" means at the next cron run,
which of course primarily depends on how often you run cron...

Notifications are governed by the following rules:
1. They are only sent out when cron runs. 
2. Each user's first notification is sent at the very next cron run.
3. Whenever a notification is sent, the current timestamp is stored 
   as that user's last_sent entry in the {subscriptions_user} table.
4. Whenever a new notification is queued, the queue entry gets the
   last_sent timestamp and the send_interval for the subscription
   stored along with other information.
5. When cron runs, it considers only queue entries for which
   last_sent+send_interval is in the past.
6. When a notification is sent, possible duplicates for the same
   node are removed, so that no duplicate notifications are sent,
   even if multiple notifications are queued, e.g. because the user
   entered overlapping subscriptions or the node was updated or
   commented. 
   Obviously, in the case of overlapping subscriptions, the one with 
   the lowest Send Interval wins.
7. If digests are enabled, then a digest is sent whenever at least
   one notification is ready to be sent, and it includes all the
   notifications that are ready.






Cron Job
--------

The subscriptions_mail submodule uses cron to send notifications by email. 
You may want to adjust the list and descriptions of the Send Intervals.

We recommend that you keep the cron summary watchdog message enabled.
It gives you valuable information about the load of your cron job and your 
mail server.

Note: On a busy site it is normal that the queue does not become empty, 
but it should not keep growing indefinitely; if it does, you should run 
cron more frequently. 

Note: Subscriptions tries not to use up all the available time, because 
other modules may come after it; if it uses too much or too little, 
you can decrease or increase the subscriptions_cron_percent variable 
(the default is 50).





Mail Templates
--------------

Go to admin/build/mail_edit to edit the mail templates.

Some of the variables are only available if you save the templates, 
and not at all in digest mode.

However, as long as you DON'T save the templates, they are automatically
translated to the recipient's language. Like other user-modifiable strings, 
when you edit and save them, they stop getting localized. For multi-language
customization, you need to edit the subscriptions_mail.templates.inc file.

You can use conditional text in the templates. The syntax is

   {{!varname==value?then_text:else_text}} or
   {{!varname!=value?then_text:else_text}}

!varname can be the any variable and will be replaced;
value is a string that doesn't contain a '?';
then_text is a string that doesn't contain a ':' and
else_text must not contain '}}'. The exception is: each of then_text and
else_text can be another conditional expressen (one level of recursion).

Both then_text and else_text can contain newlines and variables.

Example:
This {{!has_new_comments==1?has:doesn't have any}} new comments.

Undefined variables are replaced by themselves, i.e. they remain as !varname.
Example:
{{!sender_name==!sender_name?Sender is undefined:Sender: !sender_name}}

Variables can be defined and empty. Example:
{{!sender_name==?Sender is empty:Sender is either undefined or non-empty}}

Note: All the URL variables are built by calling the url() core function.
You may be able to influence the return value of url() by setting $base_url 
in settings.php. In any case, if you don't get what you expect, it's not 
an issue of Subscriptions.




Attached files
--------------
With a conditional expression like

{{!has_files==0?:| Files:
!files}}

you can send links to attached files along with the node in question.
We like showing the ugly login block only where needed, like on nodes
that aren't accessible without logging in and also when trying to download
an attached file through a direct link (if the Download method is Private).
To achieve that goal, you need to set the Login block to show only on 
the following URLs:

node/*
system/files/*




Unpublished Nodes/Comments
--------------------------

Subscriptions does not send notifications for unpublished nodes/comments 
except to users who have the 'administer nodes' / 'administer comments'
permissions. The
   !is_unpublished
   !comment_is_unpublished
variables let you mark unpublished nodes/comments, as demonstrated
in the default templates.

Publishing a node/comment will cause a notification to be sent to all 
subscribers.




Blocking sending of email notifications
---------------------------------------

The Subscriptions module can be configured to discard all notification emails
by adding a kill-switch in your settings.php file. This is often useful during
development and testing when you have a database of real users subscribed to
receive notifications, but you do not wish to send these notifications from a
development or staging server.

Add a single line at the end of the settings.php file like this:

  $conf['subscriptions_mail_trash_silently'] = TRUE;

Note that by default, this variable is set to FALSE, unless you specifically
override it. Although it cannot be configured directly from the settings page
in the administration interface, you will receive an error message on that
page to remind you that this kill-switch has been enabled from the code.

Also see the MailLog module for site-wide control that allows blocking of all
email messages.




Support/Customizations
----------------------

Support by volunteers is available on

   http://drupal.org/project/issues/subscriptions?status=All&version=6.x

Please consider helping others as a way to give something back to the community
that provides Drupal and the contributed modules to you free of charge.


For paid support and customizations of this module or other Drupal work
contact the maintainer through his contact form:

   http://drupal.org/user/82964

File

README.txt
View source
  1. README.txt for Subscriptions 6.x-1.x
  2. >>>> Please feel free to suggest improvements and additions to this file! <<<<
  3. Overview
  4. --------
  5. Subscriptions enables users to subscribe to be notified of changes to nodes
  6. or taxonomies, such as new comments in specific forums, or additions to some
  7. category of blog. Once enabled, all nodes will have an additional link that
  8. allows the user to change their subscriptions. Users have tab on their user
  9. screen to manage their own subscriptions. Users can also set an auto-subscribe
  10. function which notifies the user if anyone comments on posts they have made.
  11. Admins can turn this on by default.
  12. Acknowledgements
  13. ----------------
  14. Subscriptions 5.x-2.0 has been rewritten from scratch by chx and salvis.
  15. Ported to Drupal 6 and continuously enhanced by salvis.
  16. Doxygen documentation by develCuy, sponsored by www.transit.york.ac.uk.
  17. http://drupalcontrib.org/drupal-6-modules provides on-line developer documentation.
  18. Initial Translations:
  19. - German: salvis
  20. - Hebrew: yhager
  21. - Italian: peterpoe
  22. - Spanish: develCuy
  23. - French: matkeane
  24. - Japanese: PineRay
  25. - Danish: wulff / Anders Lund
  26. - Brazilian Portuguese: Márcio Moreira
  27. - Hungarian: muczy
  28. - Arabic: N2H
  29. Contributed Modules:
  30. -
  31. Known independent add-on modules:
  32. - subscriptions_author: by develCuy, sponsored by www.transit.york.ac.uk.
  33. - subscriptions_og: by develCuy, sponsored by www.transit.york.ac.uk.
  34. The Organic Groups Subscriptions module has been developed independently.
  35. Special care was taken to document the Subscriptions APIs that need to be
  36. implemented and used for a non-trivial add-on module. As such it is an
  37. example for building other add-on modules.
  38. Modules
  39. -------
  40. For standard Subscriptions functionality you need to enable the following modules:
  41. * Subscriptions UI
  42. * Subscriptions Mail
  43. * Content Subscriptions
  44. * Taxonomy Subscriptions (e.g. forums!)
  45. Mail Editor (http://drupal.org/project/mail_edit) allows you to customize the
  46. notification messages sent by Subscriptions Mail.
  47. SMTP Authentication (http://drupal.org/project/smtp) may be useful for sending
  48. out emails, if your provider imposes limits on what you can do with PHP mail.
  49. Upgrading from 5.x-1.x
  50. ----------------------
  51. Subscriptions D6 is designed to smoothly upgrade and convert a 1.x
  52. installation. If you currently have 1.x installed, we recommend to put
  53. your site in maintenance mode, remove the 1.x files (if you only move
  54. them to a different directory under the web root, Drupal will still find
  55. them and cause trouble!!!), copy the 2.x files where you want them, and
  56. run update.php (directly or from Administer|Modules) as usual.
  57. Subscriptions 1.x does not have an uninstall function. If you want to
  58. remove it in order to start with a clean slate, then you need to disable
  59. it, remove its database tables, and remove its row from the {system} table
  60. (be careful!!!). Then you can do a fresh install of Subscriptions 2.0.
  61. Permissions
  62. -----------
  63. Don't forget to set the permissions!
  64. Subscriptions does not support anonymous users -- there's no use in
  65. giving them any subscribe permissions.
  66. Subscribe links
  67. ---------------
  68. http://example.com/subscriptions/add/node/1234
  69. http://example.com/subscriptions/add/type/blog
  70. http://example.com/subscriptions/add/type/blog/12
  71. http://example.com/subscriptions/add/type/forum
  72. http://example.com/subscriptions/add/type/forum/12
  73. http://example.com/subscriptions/add/taxa/123
  74. http://example.com/subscriptions/add/taxa/123/12
  75. You can combine these with a log-in link as follows:
  76. http://example.com/user/login?destination=subscriptions/add/taxa/123
  77. There are also corresponding
  78. http://example.com/subscriptions/del/...
  79. links with the same parameters, which can be used by the administrator to
  80. provide unsubscribe links to a user. These unsubscribe links require the
  81. user to be logged in. By default, Subscriptions sends out encrypted
  82. unsubscribe links with each notification, and those latter unsubscribe
  83. links work even without logging in, but they cannot be generated by hand.
  84. Send Intervals
  85. --------------
  86. Choose (and possibly adapt the strings) for the Send Intervals at
  87. admin/settings/subscriptions/intervals to your site!
  88. Specifically, "As soon as possible" means at the next cron run,
  89. which of course primarily depends on how often you run cron...
  90. Notifications are governed by the following rules:
  91. 1. They are only sent out when cron runs.
  92. 2. Each user's first notification is sent at the very next cron run.
  93. 3. Whenever a notification is sent, the current timestamp is stored
  94. as that user's last_sent entry in the {subscriptions_user} table.
  95. 4. Whenever a new notification is queued, the queue entry gets the
  96. last_sent timestamp and the send_interval for the subscription
  97. stored along with other information.
  98. 5. When cron runs, it considers only queue entries for which
  99. last_sent+send_interval is in the past.
  100. 6. When a notification is sent, possible duplicates for the same
  101. node are removed, so that no duplicate notifications are sent,
  102. even if multiple notifications are queued, e.g. because the user
  103. entered overlapping subscriptions or the node was updated or
  104. commented.
  105. Obviously, in the case of overlapping subscriptions, the one with
  106. the lowest Send Interval wins.
  107. 7. If digests are enabled, then a digest is sent whenever at least
  108. one notification is ready to be sent, and it includes all the
  109. notifications that are ready.
  110. Cron Job
  111. --------
  112. The subscriptions_mail submodule uses cron to send notifications by email.
  113. You may want to adjust the list and descriptions of the Send Intervals.
  114. We recommend that you keep the cron summary watchdog message enabled.
  115. It gives you valuable information about the load of your cron job and your
  116. mail server.
  117. Note: On a busy site it is normal that the queue does not become empty,
  118. but it should not keep growing indefinitely; if it does, you should run
  119. cron more frequently.
  120. Note: Subscriptions tries not to use up all the available time, because
  121. other modules may come after it; if it uses too much or too little,
  122. you can decrease or increase the subscriptions_cron_percent variable
  123. (the default is 50).
  124. Mail Templates
  125. --------------
  126. Go to admin/build/mail_edit to edit the mail templates.
  127. Some of the variables are only available if you save the templates,
  128. and not at all in digest mode.
  129. However, as long as you DON'T save the templates, they are automatically
  130. translated to the recipient's language. Like other user-modifiable strings,
  131. when you edit and save them, they stop getting localized. For multi-language
  132. customization, you need to edit the subscriptions_mail.templates.inc file.
  133. You can use conditional text in the templates. The syntax is
  134. {{!varname==value?then_text:else_text}} or
  135. {{!varname!=value?then_text:else_text}}
  136. !varname can be the any variable and will be replaced;
  137. value is a string that doesn't contain a '?';
  138. then_text is a string that doesn't contain a ':' and
  139. else_text must not contain '}}'. The exception is: each of then_text and
  140. else_text can be another conditional expressen (one level of recursion).
  141. Both then_text and else_text can contain newlines and variables.
  142. Example:
  143. This {{!has_new_comments==1?has:doesn't have any}} new comments.
  144. Undefined variables are replaced by themselves, i.e. they remain as !varname.
  145. Example:
  146. {{!sender_name==!sender_name?Sender is undefined:Sender: !sender_name}}
  147. Variables can be defined and empty. Example:
  148. {{!sender_name==?Sender is empty:Sender is either undefined or non-empty}}
  149. Note: All the URL variables are built by calling the url() core function.
  150. You may be able to influence the return value of url() by setting $base_url
  151. in settings.php. In any case, if you don't get what you expect, it's not
  152. an issue of Subscriptions.
  153. Attached files
  154. --------------
  155. With a conditional expression like
  156. {{!has_files==0?:| Files:
  157. !files}}
  158. you can send links to attached files along with the node in question.
  159. We like showing the ugly login block only where needed, like on nodes
  160. that aren't accessible without logging in and also when trying to download
  161. an attached file through a direct link (if the Download method is Private).
  162. To achieve that goal, you need to set the Login block to show only on
  163. the following URLs:
  164. node/*
  165. system/files/*
  166. Unpublished Nodes/Comments
  167. --------------------------
  168. Subscriptions does not send notifications for unpublished nodes/comments
  169. except to users who have the 'administer nodes' / 'administer comments'
  170. permissions. The
  171. !is_unpublished
  172. !comment_is_unpublished
  173. variables let you mark unpublished nodes/comments, as demonstrated
  174. in the default templates.
  175. Publishing a node/comment will cause a notification to be sent to all
  176. subscribers.
  177. Blocking sending of email notifications
  178. ---------------------------------------
  179. The Subscriptions module can be configured to discard all notification emails
  180. by adding a kill-switch in your settings.php file. This is often useful during
  181. development and testing when you have a database of real users subscribed to
  182. receive notifications, but you do not wish to send these notifications from a
  183. development or staging server.
  184. Add a single line at the end of the settings.php file like this:
  185. $conf['subscriptions_mail_trash_silently'] = TRUE;
  186. Note that by default, this variable is set to FALSE, unless you specifically
  187. override it. Although it cannot be configured directly from the settings page
  188. in the administration interface, you will receive an error message on that
  189. page to remind you that this kill-switch has been enabled from the code.
  190. Also see the MailLog module for site-wide control that allows blocking of all
  191. email messages.
  192. Support/Customizations
  193. ----------------------
  194. Support by volunteers is available on
  195. http://drupal.org/project/issues/subscriptions?status=All&version=6.x
  196. Please consider helping others as a way to give something back to the community
  197. that provides Drupal and the contributed modules to you free of charge.
  198. For paid support and customizations of this module or other Drupal work
  199. contact the maintainer through his contact form:
  200. http://drupal.org/user/82964