Your SlideShare is downloading. ×
0
Rules Yaroslav Doroshuk http://donetsk.drupal.ua
Rules http://drupal.org/project/rules
Data selection
Loops
Examples
Mark as spam <ul><ul><li>Flag (Mark as spam) </li></ul></ul><ul><ul><li>Rules: </li></ul></ul><ul><ul><ul><li>Unpublish sp...
Moderators' workflow <ul><ul><li>Fields: </li></ul></ul><ul><ul><ul><li>Moderation status field </li></ul></ul></ul><ul><u...
Demo
Useful modules:
Rules Bonus Pack http://drupal.org/project/rb Aditional triggers, actions and conditions.
Views Bulk Operations http://drupal.org/project/views_bulk_operations Run Your rules on the views-result.
Flag http://drupal.org/project/flag Trigger rules on flag/unflag any item.
Rules Link http://drupal.org/project/rules_link Create links which trigger rules.
Page Manager http://drupal.org/project/ctools User rules conditions to check access for page.
Content Access http://drupal.org/project/content_access   Give role-based access to nodes with rules.
Relation http://drupal.org/project/relation Work with related entities and create relations.
Difference in performance *Measurement was made on page load Rules Custom module Update user's name after account was upda...
Difference in performance
What does it mean? <ul><ul><li>~40 ms additional page execution time </li></ul></ul><ul><ul><li>~3 ms additional queries e...
Development <ul><ul><li>Provide your own ations and conditions using :  </li></ul></ul><ul><ul><ul><li>hook_rules_action_i...
<ul><li>Use Rules because:  Rules is flexible Rules is more clear for a customer Rules intagrates with other modules You ...
Useful Links Code exampels:  http://drupal.org/project/rules_example Documentation:  http://drupal.org/node/878720 Screenc...
Questions? Yaroslav Doroshuk email: yarroha@gmail.com skype: yarroha twitter:  https://twitter.com/#!/yarroha blog:  http:...
Upcoming SlideShare
Loading in...5
×

Rules - Yaroslav Doroshuk

1,365

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,365
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • что такое Rules? что можно сделать при помощи Rules? 2 Демо, одно с VBO одно с простым лупом. Возможно еще одно с модулем FLAG Rules в связке с другими модулями (Views, Flag, Ctools, Views Bulk Operation) краткий обзор API.
  • Transcript of "Rules - Yaroslav Doroshuk"

    1. 1. Rules Yaroslav Doroshuk http://donetsk.drupal.ua
    2. 2. Rules http://drupal.org/project/rules
    3. 3. Data selection
    4. 4. Loops
    5. 5. Examples
    6. 6. Mark as spam <ul><ul><li>Flag (Mark as spam) </li></ul></ul><ul><ul><li>Rules: </li></ul></ul><ul><ul><ul><li>Unpublish spam comment </li></ul></ul></ul><ul><ul><ul><li>Block spammer </li></ul></ul></ul><ul><ul><ul><li>Notify moderator about bad user </li></ul></ul></ul><ul><ul><li>Messages in spam log  </li></ul></ul>
    7. 7. Moderators' workflow <ul><ul><li>Fields: </li></ul></ul><ul><ul><ul><li>Moderation status field </li></ul></ul></ul><ul><ul><ul><li>Unpublish date field </li></ul></ul></ul><ul><ul><li>Fields permission  </li></ul></ul><ul><ul><li>Rules for publishing and notification. </li></ul></ul><ul><ul><li>VBO and Rules for bulk operations </li></ul></ul><ul><ul><li>Message module for logging changes </li></ul></ul><ul><li>  </li></ul>
    8. 8. Demo
    9. 9. Useful modules:
    10. 10. Rules Bonus Pack http://drupal.org/project/rb Aditional triggers, actions and conditions.
    11. 11. Views Bulk Operations http://drupal.org/project/views_bulk_operations Run Your rules on the views-result.
    12. 12. Flag http://drupal.org/project/flag Trigger rules on flag/unflag any item.
    13. 13. Rules Link http://drupal.org/project/rules_link Create links which trigger rules.
    14. 14. Page Manager http://drupal.org/project/ctools User rules conditions to check access for page.
    15. 15. Content Access http://drupal.org/project/content_access   Give role-based access to nodes with rules.
    16. 16. Relation http://drupal.org/project/relation Work with related entities and create relations.
    17. 17. Difference in performance *Measurement was made on page load Rules Custom module Update user's name after account was updated. ~177,57 ms ~174,35 ms Update user's name after node was viewed. ~230,5 ms ~193,06 ms
    18. 18. Difference in performance
    19. 19. What does it mean? <ul><ul><li>~40 ms additional page execution time </li></ul></ul><ul><ul><li>~3 ms additional queries execution time </li></ul></ul><ul><ul><li>~17 additional exuquted queries </li></ul></ul><ul><ul><li>~3,5 mb additional RAM usage. </li></ul></ul>
    20. 20. Development <ul><ul><li>Provide your own ations and conditions using :  </li></ul></ul><ul><ul><ul><li>hook_rules_action_info()  </li></ul></ul></ul><ul><ul><ul><li>hook_rules_condition_info()  </li></ul></ul></ul><ul><ul><li>Define entity properties using hook_entity_property_info of the entity API </li></ul></ul>
    21. 21. <ul><li>Use Rules because:  Rules is flexible Rules is more clear for a customer Rules intagrates with other modules You can easily move needed functionality using Features Clicking is faster that writing a code </li></ul>
    22. 22. Useful Links Code exampels:  http://drupal.org/project/rules_example Documentation: http://drupal.org/node/878720 Screencasts:  http://nodeone.se/node/984 http://london2011.drupal.org/conference/sessions/rules-way-life http://www.youtube.com/watch?v=1itm3t0YMfw
    23. 23. Questions? Yaroslav Doroshuk email: yarroha@gmail.com skype: yarroha twitter:  https://twitter.com/#!/yarroha blog: http://yarroha.name/
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×