rules

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

Stop system message on create node

I've put together a rule that sends an email on a create node for a specific content type and this is working correctly.

However, I would like to prevent the standard message for a node create being displayed and set one of my own.

I've tried adding an action to "Execute custom PHP code" with the following in it:

<?php

  drupal_get_messages
('');
 
drupal_set_message('My message in here','');
?>

The result is that my message is displayed as well as the standard create node message in the form " has been created."

Read more
aendra's picture

Creating a rule to email Storm person/organization when field is updated?

I'm wanting to create a Rule, such that when a new Storm project is created, and an appointment date is selected via a CCK field I've added to that content type, the referenced organization will be emailed with that date.

Any idea how I'd do that? Using the Send Email action, I'm currently only given acting user and node creator as recipient options; how would I tell it to email the value of a loaded field?

Thanks! Apologies for the lack of documentation work; I'm just now finishing off the project I'm using Storm in relation to.

Read more
drecute's picture

How to determine when a rule or rule_set is executed or evaluated?

Hello,

I want to be able to determine when exactly a rule_set or rule has been executed successfully. I have looked vividly at the entire Rules code and I can't just find what I need. The only implementation that gave me a result is rules_log_evaluation_finished(). Below is my understanding about some pretty clear Rules APIs (I hope I'm correct).

  • rules_get_items (returns info about all defined items - rules or rule set)
  • rules_gather_items (used for collecting events, rules, actions and conditions from other modules)
Read more
jocken's picture

Rules och nodereference

Drupal 7.

Okej jag försöker skapa en nodereference med hjälp av rules.

Event:
Före sparning av innehåll (before saving content)

Min condtion ser ut såhär:
Om nodtypen är objekt

Min action fungerar såhär:

Hämta node id från entity (fungerar)
Skapa ny entity, hämtar värde från ett textfält i hämtade noden och sätter som titel i nya entityn (rum) med variabel room_created (fungerar)

//Här börjar det märkliga då jag har 2 nodereferenser, rum och plats i min nodtyp objekt och en referens till plats i rum.

Read more
orbmantell's picture

Token fails to validate in custom action

I have two custom actions I am using on a site I am working on. The first action is based off the Rules Bonus Pack get argument from path, and it returns the argument. This action creates a token that I can access. I have checked and the token validates correctly when used in pre-defined actions.

The second action takes a numeric input and looks up an email address associated with that number. When I give it an interger it works correctly, however when I feed it the token created by my first action it errors because it treats the input as the raw string instead of evaluating the token.

Read more
LandonAB's picture

Rules 2.x tutorials and documentation

Hi all. I am working on a D7 site and trying integrate the Rules 2.x module to create an expiration date for a node. I have tried working through the Rules 1.x tutorials and documentation and am really struggling. Example, R1.x tutorial explains how to create a trigger but R2.x has nothing called trigger.

Does anyone know of any tutorials or documentation? I am quite frustrated at this point!

Thank you,

Landon

Read more
vcardoso's picture

Rule to generate sequential number and set it as part of the node title

I'd like to have an automated procedure to generate a sequential number that would be set as part of the node title. This number would have a format like TEXT_2011_###### and it woud start with TEXT_YEAR_000001. As an example: INCIDENT_2011_000001.
And finally this string would be the node title.

Is this possible to achieve with rules and without programming?

Read more
göran's picture

Tips önskas: skapa en webform för automatisk publicering och mailsändning

Efter ett otal error i mina försök så undrar Jag om jag kan få lite hjälp, med HUR jag sätter upp följande problem:

Under rubriken "Fråga BildMannen" så vill jag sätta upp ett webbformulär där gäster (ej inloggade) kan ställa frågor, samt ta ställning till om frågan ska visas (publiceras) under samma rubrik (Fråga BildMannen).

I de fall de ställer frågan offentligt (JA) ska svaret från BildMannen även synas när den sen besvaras (helst via Views - jag antar att det sker som en kommentar). (Vore kul om detta även kunde ske per mail = överkurs...)

Read more
doctorow_r's picture

Automating badges for specific/correct answers

I am interested in using Drupal as the platform for an alternate reality game (ARG), where people are asked to complete narrative-related missions (e.g. completing mobile-phone-aided scavenger hunts, decrypting mysterious notes, creating zany steampunk inventions in answer to a prompt and posting photographs of their work).

Read more
mcferren's picture

Rules Action: Set a data value - for a date field

Hi there,

I am attempting to create a rule that automatically creates a group event node when a group post node is created by the users. Once things are said and done, I'd like to use that group event node in a calendar view.

My Event is................. After saving new content
My Condition is............. Content is of type - Parameter: Content: [node], Content types: Post
My Actions are..............

  • Fetch entity by id
    Parameter: Entity type: Node, Identifier: [node:nid], Revision identifier: [node:vid]
    Provides variables: Learning Link (node)

  • Fetch entity by id

Read more
Subscribe with RSS Syndicate content