rules

Rules session @Drupalcon Paris

Better late as never, so here are the slides from the rules presentation at the drupalcon. I'm also attaching the two features which were built with rules during the presention:

Reactive rules for drupal have grown-up!

Finally, after over 1 year of development the rules module has reached the 1.0 version! You can download it from the project page.

Reactive rules?
Reactive rules (or ECA-rules) are rules triggered upon a given event. This allows one to conditionally fire actions based on arbitrary events. As modules can provide further conditions, actions and events this enables site builders to automate a lot of things using reactive rules! As of now a lot of popular drupal modules provide already rules integration: CCK, Organic Groups, Token, Flag, Content Profile, Content Access, ViewsBulkOperations and many more.

Features?
The modules comes with a bunch of useful features, e.g. a flexible input evaluation system that allows to use token replacements or even PHP evaluation in your rules. To ease the management of rules the module supports tagging of rules as well as Import/Export. Often used behaviour can be put into Rule-Sets and is easily invoked by provided actions. Not enough, the execution of those Rule-Sets can be scheduled easily with help of the provided action, thus providing a powerful scheduling system, which allows you to schedule arbitrary tasks!

screenshot

It's finally grown-up?
Rules is already stable for quite a time, however I didn't consider it to be complete. During the last months I added missing important features, fixed bugs and translation issues and completed the documentation! While there was quite a bunch of useful developer documentation for a while, now there is also a complete hook reference in the doxygen format.

So it's grown up, but it's not (yet) perfect. So what comes next?

Rules 1.0-rc1 is out!

I've just released the first release candidate for rules 1.0. Read more at groups.drupal.org!

Flag module 6.x-1.0 shipping with rules integration!

Finally the flag module got released - a really useful module and known as the successor of the previous "Views bookmarks" module. The project page says:

Flag is a flexible flagging system that is completely customizable by the administrator. Using this module, the site administrator can provide any number of flags for nodes, comments, or users. Some possibilities include bookmarks, marking important, friends, or flag as offensive. With extensive views integration, you can create custom lists of popular content or keep tabs on important content.

But even better the 1.0 (and 1.1) release is shipping with extensive rules integration. So once you have installed both modules you can create flags and use rules to add some behaviour to them, e.g. you can react once a flag is "flagged" or "unflagged" and send mail to the content node's author, unpublish it, change the content's access settings - or whatever you have actions and conditions for!
Then the module also provides actions for flagging or unflagging flags, checking the flag count in case of global flags and even to "Trim flags", which allows you to restrict the number of flagged items. This way you could even create simple queues. Of course there also conditions to check whether a flag is flagged and again in case of a global flag you can check the flagging count. Amazing!

Also the flag module comes with a bunch of useful settings, so you can configure the flag to have a confirmation form or to just work with an AJAX link. Together with the powerful rules integration one could implement a lot of useful stuff - want a custom link with custom permissions to publish a content node? Just use a flag and an appropriate rule!

Bringing rules to the next level!

While I've been working on the flag module's rules integration and getting the 1.0 release out, I've also fixed the details of my master thesis. I am happy to announce to further enhance rules during my thesis. The main feature I'm going to work on is allowing rules to work with remote sites and content. I'm going build client and server-side web service support, so that several drupal sites can talk to each other. Furthermore I'm going to make it possible to invoke arbitrary SOAP-based web-services out there, maybe also others. Perhaps the right way to do achieve that might be doing rules integration for the service module. You want to invoke a web-service? - Just use the action for it. You want to create a web-service? - Just build a rule set. Apart from that I'm going to build a readable rule export for documentation purposes, work out a basic publishing workflow and research some semantic web research capabilities. Actually I'm thinking about integrating with the RDF-API to get some meta-data about drupal objects, which is important to have in place when dealing with remote content steming from other drupal sites.

Presenting rules at the drupalcamp in Cologne

Today I held a presentation about rules at the drupalcamp in Cologne, Germany. It was really amazing to see how many people are interested into rules!
You can find the slides of my presentation attached to my post. If you are interested, my presentation was also recorded. Hopefully the video is up soon - probably it'll be linked here.

photo of the presentation
Thanks go to criz for taking the photo!

The drupalcamp here in Cologne is a pure success! There are really interesting sessions and it's just amazing how many great people are here! I'm looking forward to the next day tomorrow.

Oh

Greetings from cologne!

XChange - reactive rules for the web...

Last Thursday I had to give a talk as part of a course at the university. I presented the reactive rules language XChange.

Content Profile 1.0 BETA 3 is out!

The BETA 2 is already more than a half year old - so a new BETA release is really long overdue. So I've worked hard during last days to get a next BETA out of the door - finally it's there!

Of course there were a lot of improvements and bug fixes since BETA 2, so let me mention only the most notable ones:

  • added support for an edit tab at the users page: either on the top level or as secondary tab below the "Edit" tab.
  • added an extension module for integration at the registration page
  • made theming with content profile easier and added content profile docs for themers
  • added the possibility for admins to add content profile nodes for other users
  • basic support for translated profiles with the help of the "content translation" module
  • added Views integration
  • added rules integration with support of upgrading from nodeprofile workflow-ng rules.
  • by Gundalo and Michelle: added Panels integration
  • added more usage help and hints to the README

Let's have a closer look at some points of these...

Theming with content profile

When you have a "profile-as-nodes" you probably want to use some profile information stored in your profile content in some of your themes, e.g. to show some additional information about the author of a forum post. To do so, you previously had to manually load the profile node in your theme and output the right data at the right place - yeah and not forget to properly check your data...
This cried for improvements, so I tackled this problem. We need to be able to easily access the data of the created profiles, where it should be already properly prepared for use in a template so you haven't to check it yourself. Yes and we should do that fast.. So just loading all profile data and putting it into $user is really no option.

Content Access 1.0 for drupal 6 released!

I've just released 6.x-1.0 of the content access module - yet another node access module. In comparison to the 5.x version there are quite some changes and improvements.
First off the module leverages the new permissions for content types of drupal 6: "edit any type", and "delete any type". Then consequently it makes also use of the "edit own type" and "delete own type" permissions and provides a "view own type" setting. So the 5.x "author" checkbox has been removed in favour of these role based settings.
So with content access you have got the modules' settings and drupal's access permission settings. To give you a better overview about your settings content access respects and makes use of drupal's built in permissions as far as possible. Which means the access control settings provided take the built in settings of drupal into account and provide you a good overview about the really applied access control settings for a content type or content node - on just one screen!

Let's show an example. If you don't grant "access content" to your anonymous users, they won't be able to do so - regardless what you would configure in content access. So the module forces the corresponding tick to be unchecked and shows you this message:

Forced to unchecked

Another example: If you set access control permissions for a certain content node, which is unpublished, drupal won't take your settings into account as it treats unpublished nodes in a special way. So content access warns you:

unpublished content

Then if you use the "per content node" settings, it's now possible to reset the permissions of a content node back to the content type defaults.
Apart from that there were a bunch of bug fixes for both drupal 5 and 6 versions. klausi tackled writing simpletests for content access and did an awesome job - now there is bunch of tests for both the drupal 5 and 6 version. This is really important thing to have, as access control is important to work right, right? Right!

Drupalcon and the Rules BETA1!

I'm happy to announce the rules 6.x 1.0 BETA 1 release. Check out the rules project page and try it. Now the API is frozen and modules developers are encouraged to write module integration and to port their workflow-ng integration to rules. You can find the documentation here.

To get token support everywhere in your actions you just have to install the latest development snapshot of it.

Now basically everything is there, including support for

  • firing core actions
  • grouping rules in rule sets
  • scheduling arbitrary rule sets
  • a module input evaluation system
  • and much more!

If you want to know more details about the improvements done for rules 6.x check out the development status page or the slides from the drupalcon session.

Syndicate content

Back to top