You are here

README.txt in Rules Bonus Pack 7

Same filename in this branch
  1. 7 README.txt
  2. 7 rb_batch/README.txt
Same filename and directory in other branches
  1. 6 README.txt
This project is a greenhouse for Rules functionality – triggers, actions, data
types, conditions and more 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: MISCELLANEOUS
==========================

Conditions

* 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 a node list with Views: This action executes a node view, along with any
  defined arguments, and loads the result as Rules list. This allows executing
  Rules loops on the results of a view. Yeah.

* Load a user list with Views: This works the same way as the previous action,
  but acts on user views and returns a list of users.

* Load a comment list with Views: This works the same way as the previous
  action, but acts on comment views and returns a list of comments.

* Set page title: This action sets the page title. The page title will be used
  as $title in page.tpl.php. The action uses drupal_set_title to set the current
  page title

* 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. Currently it sets active-trail
  class on the item chosen. Requires the Menu position module.

* Clone a node: This action clones a node and resets a few properties (such as
  nid) before saving it. Useful if you want to clone a node, but make some
  changes in the copy.

* Load the first node in a Views list: This action fetches the first node in a
  node view (assuming there is at least one row of results). It is similar to
  loading a node list with Views (see above), but is quicker if you are only
  interested in getting the first hit. This is useful if you want to perform
  more complex queries than "fetch entity by property" allows.

* Create a date from a number: This action provides a variable of the date type,
  with the time given in an integer unix timestamp.

* Load a path alias: Fetches the alias for a given path and, optionally, a given
  language.

* Merge two strings: Allows merging two strings into a new one. This action is
  only present because it is currently not possible to get metadata from text
  variables. :-/

Events

* Allow Page manager variants to act as Rule even triggers: This introduces a
  new setting on your Page manager variants – "Create a Rules event for this
  variant" (found in the new tab "Reactions"). This makes your variant appear in
  the list of Rules events, allowing you to execute Rules conditions and
  conditions when variants are loaded. Not least: You also get the context
  objects in the variant to work with.

Other

* All Rules condition components are exposed as CTools access plugins, for
  example making them accessible in Page manager and Panels.

RULES BONUS: THEME
==================

Actions

* Set head title: This action sets the head title. This is the <title> element
  in the HTML document. The action implements hook_preprocess_html to set the
  head title

* Set body class: This adds classes to the <body> element. It can use available
  substitutions. The outputted class is sanitized. The action implements
  hook_preprocess_html to set additional body classes.

RULES BONUS: BLOCK
==================

Actions

* Place a block: This action lets you place a block in a region, and decide its
  weight. Works on both blocks enabled by default (thereby moving them) and on
  disabled blocks (thereby enabling them). All regions in all enabled themes are
  available for selection.

* Disable a block: This action hides a block from view.

RULES BONUS: VIEWS
==================

Data types

* View display: This data type contains a number of properties.
  - Read-only properties are machine name, human name, display (machine) name,
    base table and total number of rows (assuming the view has been built).
  - Writable properties are: argument values (list of text strings), current
    page number, items per page and offset.
  - View handlers are also available, but currently only supports reading of
    alias names and the action 'unset a view handler' described below. Available
    handlers are fields, contextual filters, sort criteria, filters,
    relationships, headers, footers and no-result behaviours.

Plugins

* Views argument validator: This plugin can be used for building custom
  validators for Views arguments (contextual filter values). The validators have
  access to the current argument as well as a list of all arguments (so far)
  provided to the view, and can alter both. The plugin must set the 'validation'
  variable to TRUE to mark the argument as valid.

Events

* Before a view is being built: This event allows Rules to, for example, change
  the arguments being sent to the view. You cannot, however, read the number of
  results (since the view has not yet been executed).
* After a view has been built: This allows Rules to act whenever a view is going
  to be rendered. Allows, for example, to check the number of results from a
  view.
* After a view has been rendered: This is very similar to the previous event,
  but also contains the actual output of the view.

Actions

* Unset a view handler: This allows removing a handler, such as a filter or
  a field, based on its alias.

RULES BONUS: THINK TWICE
========================

This module contains experimental code for Rules. The module depends on bad
judgement. If you need to enable/disable a module through Rules you probably
have other problems to deal with.

Actions

* Enable a module: Now you can have modules enabled when users log in!

* Disable a module: Combine this with the 'module has been enabled' event for
  interesting effects.

* Modify $page: Now you can override any part of the $page render array, and
  finally have the main content set to your favourite video clip. On all pages!

File

README.txt
View source
  1. This project is a greenhouse for Rules functionality – triggers, actions, data
  2. types, conditions and more that could be included in the Rules module, but
  3. probably should be tested out and voted on first. Feel free to add your own
  4. ideas, opinions, examples and feature requests!
  5. INSTALLATION
  6. ============
  7. The usual. Download, enable. You will need the Rules module. (Surprise!)
  8. RULES BONUS: MISCELLANEOUS
  9. ==========================
  10. Conditions
  11. * Check number of results from a view: This condition loads a view and checks
  12. the number of results – condition is passed if it is at least as many results
  13. as you set. You can pass on arguments to the view.
  14. Actions
  15. * Load a node list with Views: This action executes a node view, along with any
  16. defined arguments, and loads the result as Rules list. This allows executing
  17. Rules loops on the results of a view. Yeah.
  18. * Load a user list with Views: This works the same way as the previous action,
  19. but acts on user views and returns a list of users.
  20. * Load a comment list with Views: This works the same way as the previous
  21. action, but acts on comment views and returns a list of comments.
  22. * Set page title: This action sets the page title. The page title will be used
  23. as $title in page.tpl.php. The action uses drupal_set_title to set the current
  24. page title
  25. * Set the active menu item: This action is A FIRST ATTEMPT at setting the active
  26. menu item using Rules. It sets the active menu item in the sense that the menu
  27. recognises it and show all children links. Currently it sets active-trail
  28. class on the item chosen. Requires the Menu position module.
  29. * Clone a node: This action clones a node and resets a few properties (such as
  30. nid) before saving it. Useful if you want to clone a node, but make some
  31. changes in the copy.
  32. * Load the first node in a Views list: This action fetches the first node in a
  33. node view (assuming there is at least one row of results). It is similar to
  34. loading a node list with Views (see above), but is quicker if you are only
  35. interested in getting the first hit. This is useful if you want to perform
  36. more complex queries than "fetch entity by property" allows.
  37. * Create a date from a number: This action provides a variable of the date type,
  38. with the time given in an integer unix timestamp.
  39. * Load a path alias: Fetches the alias for a given path and, optionally, a given
  40. language.
  41. * Merge two strings: Allows merging two strings into a new one. This action is
  42. only present because it is currently not possible to get metadata from text
  43. variables. :-/
  44. Events
  45. * Allow Page manager variants to act as Rule even triggers: This introduces a
  46. new setting on your Page manager variants – "Create a Rules event for this
  47. variant" (found in the new tab "Reactions"). This makes your variant appear in
  48. the list of Rules events, allowing you to execute Rules conditions and
  49. conditions when variants are loaded. Not least: You also get the context
  50. objects in the variant to work with.
  51. Other
  52. * All Rules condition components are exposed as CTools access plugins, for
  53. example making them accessible in Page manager and Panels.
  54. RULES BONUS: THEME
  55. ==================
  56. Actions
  57. * Set head title: This action sets the head title. This is the element </li><li> in the HTML document. The action implements hook_preprocess_html to set the </li><li> head title </li><li> </li><li>* Set body class: This adds classes to the <body> element. It can use available </li><li> substitutions. The outputted class is sanitized. The action implements </li><li> hook_preprocess_html to set additional body classes. </li><li> </li><li>RULES BONUS: BLOCK </li><li>================== </li><li> </li><li>Actions </li><li> </li><li>* Place a block: This action lets you place a block in a region, and decide its </li><li> weight. Works on both blocks enabled by default (thereby moving them) and on </li><li> disabled blocks (thereby enabling them). All regions in all enabled themes are </li><li> available for selection. </li><li> </li><li>* Disable a block: This action hides a block from view. </li><li> </li><li>RULES BONUS: VIEWS </li><li>================== </li><li> </li><li>Data types </li><li> </li><li>* View display: This data type contains a number of properties. </li><li> - Read-only properties are machine name, human name, display (machine) name, </li><li> base table and total number of rows (assuming the view has been built). </li><li> - Writable properties are: argument values (list of text strings), current </li><li> page number, items per page and offset. </li><li> - View handlers are also available, but currently only supports reading of </li><li> alias names and the action 'unset a view handler' described below. Available </li><li> handlers are fields, contextual filters, sort criteria, filters, </li><li> relationships, headers, footers and no-result behaviours. </li><li> </li><li>Plugins </li><li> </li><li>* Views argument validator: This plugin can be used for building custom </li><li> validators for Views arguments (contextual filter values). The validators have </li><li> access to the current argument as well as a list of all arguments (so far) </li><li> provided to the view, and can alter both. The plugin must set the 'validation' </li><li> variable to TRUE to mark the argument as valid. </li><li> </li><li>Events </li><li> </li><li>* Before a view is being built: This event allows Rules to, for example, change </li><li> the arguments being sent to the view. You cannot, however, read the number of </li><li> results (since the view has not yet been executed). </li><li>* After a view has been built: This allows Rules to act whenever a view is going </li><li> to be rendered. Allows, for example, to check the number of results from a </li><li> view. </li><li>* After a view has been rendered: This is very similar to the previous event, </li><li> but also contains the actual output of the view. </li><li> </li><li>Actions </li><li> </li><li>* Unset a view handler: This allows removing a handler, such as a filter or </li><li> a field, based on its alias. </li><li> </li><li>RULES BONUS: THINK TWICE </li><li>======================== </li><li> </li><li>This module contains experimental code for Rules. The module depends on bad </li><li>judgement. If you need to enable/disable a module through Rules you probably </li><li>have other problems to deal with. </li><li> </li><li>Actions </li><li> </li><li>* Enable a module: Now you can have modules enabled when users log in! </li><li> </li><li>* Disable a module: Combine this with the 'module has been enabled' event for </li><li> interesting effects. </li><li> </li><li>* Modify $page: Now you can override any part of the $page render array, and </li><li> finally have the main content set to your favourite video clip. On all pages! </li></ol></code></pre></details> <div class="api-objects"> </div> </div></div> <!-- /.section, /#content --> <div id="sidebar-second" class="column sidebar"><div class="section"> <div class="region region-sidebar-second"> <div id="block-api-navigation" class="block block-api"> <h2>API Navigation</h2> <div class="content"> <div class="item-list"><ul><li class="first"><a href="/api/rb/7">Rules Bonus Pack 7</a></li> <li><a href="/api/rb/classes/7">Classes</a></li> <li><a href="/api/rb/functions/7">Functions</a></li> <li class="last"><a href="/api/rb/files/7">Files</a></li> </ul></div> </div> </div> </div> </div></div> <!-- /.section, /#sidebar-second --> </div></div> <!-- /#main, /#main-wrapper --> <div id="footer-wrapper"><div class="section"> <footer id="footer" role="contentinfo" class="clearfix"> <div class="region region-footer"> <div id="block-block-1" class="block block-block"> <div class="content"> <p><footer>Drupal is a registered trademark of Dries Buytaert. This site is not affiliated with Dries Buytaert, Drupal Association or Drupal.org.</footer></p> </div> </div> </div> </footer> <!-- /#footer --> </div></div> <!-- /.section, /#footer-wrapper --> </div></div> <!-- /#page, /#page-wrapper --> </body> </html> <!-- Page cached by Boost @ 2022-08-16 03:58:32, expires @ 2023-08-15 03:58:32, lifetime 12 months 4 days -->