rules

Fix for Adding globally available data to Rules

  1. function jmm_suspect_words_entity_property_info_alter(&$items) {
  2.   $items['site']['properties']['suspected'] = array(
  3.     'label' => t('Suspected words'),
  4.     'getter callback' => 'jmm_suspect_word

Adding globally available data to Rules

  1. function rules_entity_property_info_alter(&$items) {
  2.   $items['site']['properties']['suspected'] = array(
  3.     'label' => t('Suspected words'),
  4.     'getter callback' => 'myfunction',
  5.     'type' =>

rules debugging

  1. 0 ms "A node has been unflagged, under "Update Child Profile"" has been invoked.
  2. 0.076 ms Executing the rule "Update a child profile" on rule set "A node has been unflagged, under "Update Child Profi

Fix for Can't set the $node->menu["parent"] when saving new content

  1. $node->menu["link_title"] = $node->title;
  2. $node->menu["hidden"] = 1;
  3. $node->menu["parent"] = "menu-mymenu:0";  // this doesn't work ( i created before a menu "mymenu" )
  4. return array("node" => $node

Fix for change CCK field path in Rules when node is saved - use Custom PHP

  1. I put my own queries into the Custom PHP field
  2.  
  3. //this is the path to the actual uploaded to pass to the encoding.com script
  4. $_SESSION['videoup'] = '[node:field_video-filefield-filepath]';
  5.  
  6. //upd

change CCK field path in Rules when node is saved to receive the encoding.com transcoded file - doesn't change path

  1. return array(
  2.   0 => array('fid' =>'[node:field_video-filefield-fid]', 'filepath' => 'sites/default/files/transcoded/[node:field_video-filefield-filename].flv'),
  3. );

Fix for Fix for cURL script does not work in Rules Custom PHP Action - set $_SESSION var and redirect to page with the script

  1. in Rules, set a session var to the filepath of the uploaded video in Execute custom PHP
  2.  
  3. eg $_SESSION['uploaded_video'] = '[node:field_video-filefield-filepath]';
  4.  
  5. then put the cURL script in the

Fix for cURL script does not work in Rules Custom PHP Action - set $_SESSION var and redirect to page with the cURL script

  1. in Rules, set a session var to the filepath of the uploaded video in Execute custom PHP code
  2. !REG3XP1!>
  3. eg $_SESSION['uploaded_video'] = '[node:field_video-filefield-filepath]';
  4.  
  5. then put the cURL script in
decibel.places's picture

cURL script does not work in Rules Custom PHP Action, works fine in Devel Execute PHP or as file

  1. function sendRequest($adixml)
  2. {
  3.     $adich = curl_init();
  4.     curl_setopt($adich, CURLOPT_URL, "http://manage.encoding.com/");
  5.     curl_setopt($adich, CURLOPT_POSTFIELDS, "xml=" .

Fix for Custom php code for setting ubercart sales_price via rules

  1. $nid=[node:nid];
  2. $seminarNID = $node->field_seminar_id[0]['nid'];
  3. $seminarNode = node_load($seminarNID);
  4. $sell_price =  ($node->field_class_revenue[0]['value']) / ($seminarNode->field_participants[
Syndicate content