You are here

README.txt in Rules Bonus Pack 6

Same filename and directory in other branches
  1. 7 README.txt
This module is a greenhouse for Rules functionality – triggers, actions and
conditions that could be included in the Rules module, but probably should be
tested out and voted on first. Feel free to add your own ideas, opinions,
examples and feature requests!

INSTALLATION
============

The usual. Download, enable. You will need the Rules module. (Surprise!)


RULES BONUS: CCK
================

Conditions

* Field value is one of several: This condition checks if a field contains one
  of several provided values. This could theoretically be done with Rules core,
  but would require terrible nesting of and/or statements.
* Field has content: This condition utilizes the CCK field callbacks for
  determining if the field is empty or not. Useful for checking if a complex
  CCK field has content or not.

Actions

* Set a CCK field without validation: This gives you a plain old textfield to
  enter data into CCK fields. That means that you won't be limited to
  validations or form elements that the CCK widget provides. Please have a look
  at http://drupal.org/node/1144404 if you'd like this functionality in Rules
  core.
* Insert a value in a multiple-value field: This action adds a new value to a
  multiple-value field, if it wasn't already present.
* Remove a value from a multiple-value field: This action kind of does the
  opposite to the previously described action.
* Get a field value, bypassing Token: This action gets a field value, even if a
  node hasn't been saved to the database yet. This is basically only for the
  cases when you're working on the node presave event, which causes Token to
  provide outdated content.
* Copy multiple field content between nodes: This action copies the content of
  selected fields from one node to another (assuming the fields exist on the
  target node). There are options for skipping empty fields when copying, and to
  also copy node title.
* Copy entire field content between nodes: This takes the field content and
  copies it into another field. Unlike other actions to set field content, this
  works well with multiple-value fields as well (and it has no restrictions on
  which field types to work with).
* Send e-mail to all users in a user reference field: This action mimics the 
  'send e-mail to a user' action, but does it for all users listed in a user
  reference field. Note that bloated user reference fields causes bloated e-mail
  sendouts – with potential negative side effects of servers dying and also
  becoming blacklisted.
* Insert multiple values to a CCK field: Insert a whole bunch of values into a
  multiple-value CCK field. Optionally clear the field before setting new
  values. (Duplicate values are ignored.)
* Force a text field to an allowed value: This checks a (single-value) text
  field against the allowed values for the field. If it doesn't match, the value
  is removed. Optionally does white space-insensitive and case-insensitive
  comparison. Can be useful when importing content.
* Merge two multiple-value fields: This takes all the values in a multiple-value
  field and inserts them into another multiple-value field (possibly in another
  node). Only values not already present will be inserted. Only works for fields
  with single-value storage keys.

RULES BONUS: COMMENT
====================

Actions

* Change the comment owner: This action updates the comment owner to a selected
  user.


RULES BONUS: MISCELLANEOUS
==========================

Conditions

* Verify path argument: Provides the option to check an eqality condition on one
  part of the path.
* Check number of results from a view: This condition loads a view and checks
  the number of results – condition is passed if it is at least as many results
  as you set. You can pass on arguments to the view.

Actions

* Load path argument: Loads a selected part of the argument into a string.
* Get a string with current time: Creates a string object with the current time,
  in a custom format and with the acting user's time zone settings.
* Use Views to load a node: This action executes a view of your choice,
  including arguments you send to it, and loads the first node returned by the
  view as a new Rules object. (Note that you might first want to check that the
  view actually has any result using the condition above.)
* Get URL alias for an internal path: Gives you the URL alias for any internal
  path. Could be useful for adding additional URL aliases for node related
  paths.
* Set the active menu item: This action is A FIRST ATTEMPT at setting the active
  menu item using Rules. It sets the active menu item in the sense that the menu
  recognises it and show all children links, but it does not yet set the
  'active' class to the item in question. Requires the Menu position module.
* Get import nid for content: This action may be useful if you're using the
  Feeds module, and use import nodes for importing content. Given an imported
  node, this action will give you the node ID for the node used to import it.
  Requires the Feeds module, obviosly.
* Set node creation time: This sets the post time for a node to the current
  time, or optionally any given time expression.


RULES BONUS: NUMBERS
====================

Actions

* Generate a random number: This gives a random integer in a set interval. Some
  validation checks on the interval is still missing.
* Sum up numbers: This provides a sum of a list of numbers you write. Tokens are
  allowed.
* Multiply numbers: Much like the action above, but multiplies instead of adds.
* Build a sum from Views: Get a sum of all the values in selected
  fields/columns, in a selected view. Use to build dynamically updated sums, and
  store/display them any way you want.


RULES BONUS: USER
=================

Conditions

* Node author is an authenticated user: This condition checks that a node has a
  real user account as owner – i.e. is not written by an anonymous user.
* A string is valid user name: This checks whether a given string is an ok user
  name, optionally also checking if the name is still available.

Actions

* Load the acting user: Guess what this action does. :-)
* Load session ID for active user: Provides the session ID as a number object,
  as defined by the Session API module. (Session API module is required.)
* Generate a valid user name: This action takes a string and processes it until
  it is a valid and unique Drupal user name. NOTE: It currently replaces invalid
  suggested strings with 'dummy name' instead of removing disallowed characters.

File

README.txt
View source
  1. This module is a greenhouse for Rules functionality – triggers, actions and
  2. conditions that could be included in the Rules module, but probably should be
  3. tested out and voted on first. Feel free to add your own ideas, opinions,
  4. examples and feature requests!
  5. INSTALLATION
  6. ============
  7. The usual. Download, enable. You will need the Rules module. (Surprise!)
  8. RULES BONUS: CCK
  9. ================
  10. Conditions
  11. * Field value is one of several: This condition checks if a field contains one
  12. of several provided values. This could theoretically be done with Rules core,
  13. but would require terrible nesting of and/or statements.
  14. * Field has content: This condition utilizes the CCK field callbacks for
  15. determining if the field is empty or not. Useful for checking if a complex
  16. CCK field has content or not.
  17. Actions
  18. * Set a CCK field without validation: This gives you a plain old textfield to
  19. enter data into CCK fields. That means that you won't be limited to
  20. validations or form elements that the CCK widget provides. Please have a look
  21. at http://drupal.org/node/1144404 if you'd like this functionality in Rules
  22. core.
  23. * Insert a value in a multiple-value field: This action adds a new value to a
  24. multiple-value field, if it wasn't already present.
  25. * Remove a value from a multiple-value field: This action kind of does the
  26. opposite to the previously described action.
  27. * Get a field value, bypassing Token: This action gets a field value, even if a
  28. node hasn't been saved to the database yet. This is basically only for the
  29. cases when you're working on the node presave event, which causes Token to
  30. provide outdated content.
  31. * Copy multiple field content between nodes: This action copies the content of
  32. selected fields from one node to another (assuming the fields exist on the
  33. target node). There are options for skipping empty fields when copying, and to
  34. also copy node title.
  35. * Copy entire field content between nodes: This takes the field content and
  36. copies it into another field. Unlike other actions to set field content, this
  37. works well with multiple-value fields as well (and it has no restrictions on
  38. which field types to work with).
  39. * Send e-mail to all users in a user reference field: This action mimics the
  40. 'send e-mail to a user' action, but does it for all users listed in a user
  41. reference field. Note that bloated user reference fields causes bloated e-mail
  42. sendouts – with potential negative side effects of servers dying and also
  43. becoming blacklisted.
  44. * Insert multiple values to a CCK field: Insert a whole bunch of values into a
  45. multiple-value CCK field. Optionally clear the field before setting new
  46. values. (Duplicate values are ignored.)
  47. * Force a text field to an allowed value: This checks a (single-value) text
  48. field against the allowed values for the field. If it doesn't match, the value
  49. is removed. Optionally does white space-insensitive and case-insensitive
  50. comparison. Can be useful when importing content.
  51. * Merge two multiple-value fields: This takes all the values in a multiple-value
  52. field and inserts them into another multiple-value field (possibly in another
  53. node). Only values not already present will be inserted. Only works for fields
  54. with single-value storage keys.
  55. RULES BONUS: COMMENT
  56. ====================
  57. Actions
  58. * Change the comment owner: This action updates the comment owner to a selected
  59. user.
  60. RULES BONUS: MISCELLANEOUS
  61. ==========================
  62. Conditions
  63. * Verify path argument: Provides the option to check an eqality condition on one
  64. part of the path.
  65. * Check number of results from a view: This condition loads a view and checks
  66. the number of results – condition is passed if it is at least as many results
  67. as you set. You can pass on arguments to the view.
  68. Actions
  69. * Load path argument: Loads a selected part of the argument into a string.
  70. * Get a string with current time: Creates a string object with the current time,
  71. in a custom format and with the acting user's time zone settings.
  72. * Use Views to load a node: This action executes a view of your choice,
  73. including arguments you send to it, and loads the first node returned by the
  74. view as a new Rules object. (Note that you might first want to check that the
  75. view actually has any result using the condition above.)
  76. * Get URL alias for an internal path: Gives you the URL alias for any internal
  77. path. Could be useful for adding additional URL aliases for node related
  78. paths.
  79. * Set the active menu item: This action is A FIRST ATTEMPT at setting the active
  80. menu item using Rules. It sets the active menu item in the sense that the menu
  81. recognises it and show all children links, but it does not yet set the
  82. 'active' class to the item in question. Requires the Menu position module.
  83. * Get import nid for content: This action may be useful if you're using the
  84. Feeds module, and use import nodes for importing content. Given an imported
  85. node, this action will give you the node ID for the node used to import it.
  86. Requires the Feeds module, obviosly.
  87. * Set node creation time: This sets the post time for a node to the current
  88. time, or optionally any given time expression.
  89. RULES BONUS: NUMBERS
  90. ====================
  91. Actions
  92. * Generate a random number: This gives a random integer in a set interval. Some
  93. validation checks on the interval is still missing.
  94. * Sum up numbers: This provides a sum of a list of numbers you write. Tokens are
  95. allowed.
  96. * Multiply numbers: Much like the action above, but multiplies instead of adds.
  97. * Build a sum from Views: Get a sum of all the values in selected
  98. fields/columns, in a selected view. Use to build dynamically updated sums, and
  99. store/display them any way you want.
  100. RULES BONUS: USER
  101. =================
  102. Conditions
  103. * Node author is an authenticated user: This condition checks that a node has a
  104. real user account as owner – i.e. is not written by an anonymous user.
  105. * A string is valid user name: This checks whether a given string is an ok user
  106. name, optionally also checking if the name is still available.
  107. Actions
  108. * Load the acting user: Guess what this action does. :-)
  109. * Load session ID for active user: Provides the session ID as a number object,
  110. as defined by the Session API module. (Session API module is required.)
  111. * Generate a valid user name: This action takes a string and processes it until
  112. it is a valid and unique Drupal user name. NOTE: It currently replaces invalid
  113. suggested strings with 'dummy name' instead of removing disallowed characters.