You are here

README.txt in Subscriptions 5.2

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



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




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

Subscriptions 5.x-2.0 has been rewritten from scratch by chx and salvis.
Doxygen documentation by develCuy, sponsored by www.transit.york.ac.uk.
subscriptions_og.module by develCuy, sponsored by www.transit.york.ac.uk.

The Organic Groups Subscriptions module is being developed independently.
Special care is 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.

http://api.drupal-contrib.org/api/subscriptions provides great developer
documentation.

Initial Translations:
- German:   salvis
- Hebrew:   yhager
- Italian:  peterpoe
- Spanish:  develCuy
- French:   matkeane
- Danish:   wulff / Anders Lund

Contributed Modules written and maintained by:
- moderate_content_notifications:  beginner





Modules
-------

For standard Subscriptions functionality you need to enable the following modules:
* Subscriptions UI
* Subscriptions Mail (requires Mail Editor, http://drupal.org/project/mail_edit)
* Content Subscriptions
* Taxonomy Subscriptions (e.g. forums!)

If you have any HTML in your content, e.g. URLs, then the HTML_to_text module
(http://drupal.org/project/html_to_text) will provide much better text rendering,
if it's installed.

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 2.x 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!






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 doesn't have that limitation.

Both then_text and else_text can contain newlines and variables.

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

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.




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.



File

README.txt
View source
  1. README.txt for Subscriptions 5.x-2.x
  2. >>>> Please feel free to suggest improvements and additions to this file! <<<<
  3. Acknowledgements
  4. ----------------
  5. Subscriptions 5.x-2.0 has been rewritten from scratch by chx and salvis.
  6. Doxygen documentation by develCuy, sponsored by www.transit.york.ac.uk.
  7. subscriptions_og.module by develCuy, sponsored by www.transit.york.ac.uk.
  8. The Organic Groups Subscriptions module is being developed independently.
  9. Special care is taken to document the Subscriptions APIs that need to be
  10. implemented and used for a non-trivial add-on module. As such it is an
  11. example for building other add-on modules.
  12. http://api.drupal-contrib.org/api/subscriptions provides great developer
  13. documentation.
  14. Initial Translations:
  15. - German: salvis
  16. - Hebrew: yhager
  17. - Italian: peterpoe
  18. - Spanish: develCuy
  19. - French: matkeane
  20. - Danish: wulff / Anders Lund
  21. Contributed Modules written and maintained by:
  22. - moderate_content_notifications: beginner
  23. Modules
  24. -------
  25. For standard Subscriptions functionality you need to enable the following modules:
  26. * Subscriptions UI
  27. * Subscriptions Mail (requires Mail Editor, http://drupal.org/project/mail_edit)
  28. * Content Subscriptions
  29. * Taxonomy Subscriptions (e.g. forums!)
  30. If you have any HTML in your content, e.g. URLs, then the HTML_to_text module
  31. (http://drupal.org/project/html_to_text) will provide much better text rendering,
  32. if it's installed.
  33. SMTP Authentication (http://drupal.org/project/smtp) may be useful for sending
  34. out emails, if your provider imposes limits on what you can do with PHP mail.
  35. Upgrading from 5.x-1.x
  36. ----------------------
  37. Subscriptions 2.x is designed to smoothly upgrade and convert a 1.x
  38. installation. If you currently have 1.x installed, we recommend to put
  39. your site in maintenance mode, remove the 1.x files (if you only move
  40. them to a different directory under the web root, Drupal will still find
  41. them and cause trouble!!!), copy the 2.x files where you want them, and
  42. run update.php (directly or from Administer|Modules) as usual.
  43. Subscriptions 1.x does not have an uninstall function. If you want to
  44. remove it in order to start with a clean slate, then you need to disable
  45. it, remove its database tables, and remove its row from the {system} table
  46. (be careful!!!). Then you can do a fresh install of Subscriptions 2.0.
  47. Permissions
  48. -----------
  49. Don't forget to set the permissions!
  50. Subscribe links
  51. ---------------
  52. http://example.com/subscriptions/add/node/1234
  53. http://example.com/subscriptions/add/type/blog
  54. http://example.com/subscriptions/add/type/blog/12
  55. http://example.com/subscriptions/add/type/forum
  56. http://example.com/subscriptions/add/type/forum/12
  57. http://example.com/subscriptions/add/taxa/123
  58. http://example.com/subscriptions/add/taxa/123/12
  59. You can combine these with a log-in link as follows:
  60. http://example.com/user/login?destination=subscriptions/add/taxa/123
  61. There are also corresponding
  62. http://example.com/subscriptions/del/...
  63. links with the same parameters, which can be used by the administrator to
  64. provide unsubscribe links to a user. These unsubscribe links require the
  65. user to be logged in. By default, Subscriptions sends out encrypted
  66. unsubscribe links with each notification, and those latter unsubscribe
  67. links work even without logging in, but they cannot be generated by hand.
  68. Send Intervals
  69. --------------
  70. Choose (and possibly adapt the strings) for the Send Intervals at
  71. admin/settings/subscriptions/intervals to your site!
  72. Specifically, "As soon as possible" means at the next cron run,
  73. which of course primarily depends on how often you run cron...
  74. Notifications are governed by the following rules:
  75. 1. They are only sent out when cron runs.
  76. 2. Each user's first notification is sent at the very next cron run.
  77. 3. Whenever a notification is sent, the current timestamp is stored
  78. as that user's last_sent entry in the {subscriptions_user} table.
  79. 4. Whenever a new notification is queued, the queue entry gets the
  80. last_sent timestamp and the send_interval for the subscription
  81. stored along with other information.
  82. 5. When cron runs, it considers only queue entries for which
  83. last_sent+send_interval is in the past.
  84. 6. When a notification is sent, possible duplicates for the same
  85. node are removed, so that no duplicate notifications are sent,
  86. even if multiple notifications are queued, e.g. because the user
  87. entered overlapping subscriptions or the node was updated or
  88. commented.
  89. Obviously, in the case of overlapping subscriptions, the one with
  90. the lowest Send Interval wins.
  91. 7. If digests are enabled, then a digest is sent whenever at least
  92. one notification is ready to be sent, and it includes all the
  93. notifications that are ready.
  94. Cron Job
  95. --------
  96. The subscriptions_mail submodule uses cron to send notifications by email.
  97. You may want to adjust the list and descriptions of the Send Intervals.
  98. We recommend that you keep the cron summary watchdog message enabled.
  99. It gives you valuable information about the load of your cron job and your
  100. mail server.
  101. Note: On a busy site it is normal that the queue does not become empty,
  102. but it should not keep growing indefinitely; if it does, you should run
  103. cron more frequently.
  104. Note: Subscriptions tries not to use up all the available time, because
  105. other modules may come after it; if it uses too much or too little,
  106. you can decrease or increase the subscriptions_cron_percent variable
  107. (the default is 50).
  108. Mail Templates
  109. --------------
  110. Go to admin/build/mail_edit to edit the mail templates.
  111. Some of the variables are only available if you save the templates,
  112. and not at all in digest mode.
  113. However, as long as you DON'T save the templates, they are automatically
  114. translated to the recipient's language. Like other user-modifiable strings,
  115. when you edit and save them, they stop getting localized. For multi-language
  116. customization, you need to edit the subscriptions_mail.templates.inc file.
  117. You can use conditional text in the templates. The syntax is
  118. {{!varname==value?then_text:else_text}} or
  119. {{!varname!=value?then_text:else_text}}
  120. !varname can be the any variable and will be replaced;
  121. value is a string that doesn't contain a '?';
  122. then_text is a string that doesn't contain a ':' and
  123. else_text doesn't have that limitation.
  124. Both then_text and else_text can contain newlines and variables.
  125. Example:
  126. This {{!has_new_comments==1?has:doesn't have any}} new comments.
  127. Note: All the URL variables are built by calling the url() core function.
  128. You may be able to influence the return value of url() by setting $base_url
  129. in settings.php. In any case, if you don't get what you expect, it's not
  130. an issue of Subscriptions.
  131. Unpublished Nodes/Comments
  132. --------------------------
  133. Subscriptions does not send notifications for unpublished nodes/comments
  134. except to users who have the 'administer nodes' / 'administer comments'
  135. permissions. The
  136. !is_unpublished
  137. !comment_is_unpublished
  138. variables let you mark unpublished nodes/comments, as demonstrated
  139. in the default templates.
  140. Publishing a node/comment will cause a notification to be sent to all
  141. subscribers.