Rules

This is a working group for people interested in the rules module.

The group serves as a place to discuss new features and possible use cases of the rules module in drupal.
Furthermore it's used to announce recent developments related to the group.

Check the developer's blog for rules related news.
Read and help improving the documentation.

My condition parameter's 'optional' and 'default mode' options not having any effects?

Coming from a previous problem, I finally decided to just code my own condition, and the condition is working properly so far. Except for one thing, that is. There is one optional parameter I would like to add to my condition; basically, I'd like to let the user specify the content types he/she would like to restrict, if any. So, my condition function is as follow:

<?php
/**
* Implementation of hook_rules_condition_info().
*/
function nodecount_rules_condition_info() {
$conditions = array();
$conditions['nodecount_rules_condition'] = array(
'group' => t('Nodes'),

Read more

How to restrict content creation of a specific type with user post quota

Hello,

Still a bit new to Rules, but I have been looking around and checking the documentation and API for the solution to my problem; still, I am quite lost as to where to begin, how to proceed.

So, all I want is to restrict, for a particular user role, the creation of nodes of a particular content type, by a quota. I want to count how many nodes of that type the user currently has. And say, that the maximum amount allowed for that user is 5, and he/she already has 5 nodes of that type when he/she tries to create a new one, negate the creation of the node.

Read more

Redirect url for views with pager

Hello,

I'm trying to make comments to work with nodes organized in views (need navigation, filtering, etc).

The goal is to prevent comment submit to redirect to original node, but to a page of a view from where the comment was submitted.

The url of views is complex, and I have no idea which expression to put in Rules to get this to work. Redirecting isn't a problem in its self, but I cant find any documentation about complex views url variables.

Thanks in advance.

Mail Verification for anonym Webform Submission with Rules possible?

Is it possible to realize a Mail Verification for anonym (not registered users) Webform Submission with Rules and possibly in combination with other modules (Drupal 7)?

how to send customized mails depending on the value of a field with the rules module

i was wondering if i can use the selected value of a drop box or optiongroup to make an automated customized mail for my clients. For example i have a drop box with the following options:

price (drop box or option group):

a) 10 $ for 10 days
b) 20 $ for 20 days
c) 30 $ for 30 days

Read more

send an email notification to members of a particular role when a new product is created

Has anyone had any luck with creating a rule that can send an email notification to members of a particular role when a new product is created.

I've checked the standard and advance sets of rules and although you can seem to email when a particular trigger occurs, there does not seem to be the most appropriate action available from the list of optional actions. You only seem to be able to send an email to one recipient.

  1. Can I use Rules to lookout for the creation of new products?
Read more

Save node when content with reference to it is created

Brief overview of relevant aspects of my site:
Content type - review: created by users, contains entity reference field to business page being reviewed
Content type - business: contains fields which average, from the database, the ratings submitted by users using the review content type.

I need to create a rule which saves the business page when a Review which references it is created/saved by a user. This is necessary because the fields with averages in them only update when the node is saved. What would be the best way to go about doing this?

busla's picture

Rules, VBO and Page manager

Hi all.

I have a weird scenario that must have a simple solution but I´m not figuring it out.

In the Node View template in PM, I created a variant where I put a %node into region-1 and a general view with no contextual filter in region-2.

Here is my case:
* Region-1: Body field from the %node
* Region-2: A general view with no contextual filter and a VBO field. The component loops through the selected items. It then creates a new node (different CT) and adds each item as a reference in of of the node reference fields in the new node.

Read more

Need help with Rule scheduling based on Flags

Hello there,

I'm trying to figure out how to create a rule to do the following:

Check whether a user has a boolean set to true in the users profile,
If the user has, get the date field from nodes the user has flagged
Then send an email a day before the date field for each flagged node.

Obviously this rule will have to turn off if the boolean is set to false.

Read more

Is it possible to create IF/THEN's in actions?

Is there any way through components or other modules to create IF/THEN constructs in actions?? (or at least simulate them)

For example..

If I had a content type with a select list of say 10 items.. Based on the selection I need to run a rule to set something..

The long way would be to create 10 rules each reacting on a different option in the select list..

Is there an easier way to do this?

Entity Reference with VBO and Rules

I am trying to create a rule which fires after modifying node content. Specifically i want to modify the entity reference field values of all the node entities provided by vbo. So i created the rule and the component as shown below.
My problem is that i can not find a way to empty the entityref list of all node entities before the loop, maybe my whole approach is wrong.

Affecting rules on a node containing a field collection?

Hi,

I am trying to create a rule that will modify the permissions (ACL) of the node containing the field collection based on a user reference field in the field collection entity..

By the looks of it I have to use "field-collection-item:host-entity:" but in the data selector is doesn't have any further options to pick up the node id or anything for the host entity..

I am sure I am probably missing something simple but can't see it..

Read more

Use Rules to fill EntityReference field with previously visited node?

So, I'm building a site based on reviewing businesses. To build the review form I created a content type called "Review," that users are authorized to create. Users then simply save the content to submit the review. To relate the review back to the business page that they are reviewing, EntityReference seems to be my best bet. But, I don't want the user to have to enter in the name of the business that they are reviewing. Instead, I'm hoping to autopopulate the Entity Reference field with the node that they just navigated from.

So the workflow would be:

Read more

Rule sets and how to use them...

Looking at rule sets, they appear to be conceptually cool, but damned if I can figure out how to actually get them to do anything.

What I would have expected from the description is that:

  1. You define a rule set (effectively writing a subroutine).
  2. You then connect that rule set with an event trigger of some kind.
  3. When the even happens, the rule set gets triggered.

But that doesn't seem to be the way it works.

Read more

Noob:Rule to unpublish a custom content based upon a custom "exipration" field

Hello all,

I am new to rules (and Drupal for that matter.)

Rules, Tokens, views (installed and enabled)

I've successfully created rules to notify users by email when comments were added or when new nodes are created but I am having difficulty with this new task.

I created a custom content and added a field for "expiration date." I'd like to create a rule that would unpublish the content after the date in the expiration date field for the content. It seems like it should be a fairly straight forward task, but it is getting the best of me.

Read more

Bot Rules released

Ladies and gentlemen,

it is my pleasure to announce that Bot Rules 7.x-1.0-alpha1 has been released today. It provides basic events, conditions and actions to integrate an IRC bot (using Bot module) with Rules.

What can it be used for? For example, to send new content/comments notifications to IRC, to retrieve data from your site ('Bot, how many new nodes this week?') and more, limited only by your imagination and skill.

Read more

"content is viewed" rules not running on "panels" pages..

HI,

Hopefully someone can help..

I need a rule to react when content is viewed but it doesn't seem to work on pages that have been laid out using page manager and panels..

I have even created a rule that simply says when content is viewed send me an email.. It works for non-panels pages but not panels pages..

Had anyone else had this?
How do you get a rule to react when panels pages are viewed??

Thanks..

Scheduled Rules, User Inactivity Notification based on Field contents

Goal: to create a scheduled rule which notifies users who have not commented recently.

I've exhausted all existing rules documentation, including the full learning library at NodeOne. I would really appreciate some help.

I've included full exports of both components.

Read more
otcassetmgmt's picture

Limiting Flags

I am looking for a way to limit users on the amount of flagging per entity type.

More info:

I have a view that displays 50 node titles of the same content type and I want to create a component so users may flag (using VBO) a limit of 5 only? After that I may clone the component and change it from 5 to 1 or 10 or 20 this way I may apply these components to more views assigning them inside a VBO field?

mayurpimple's picture

ON Event User has logged in via Facebook

Hi
I have use fb module & rule. i want login via facebook then page is redirect to dashboard.

but rule is not working for this event. any solution.

Thanks
Mayur

Subscribe with RSS Syndicate content

Rules

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week