I needed a way to schedule a cclink event 30 days after a node was created. The standard cclinks Set event scheduling event action doesn't allow php code, so I found a way to do it with a php action. You may use the following code to control your event date:

// Schedule event in 30 days.
$event_date = time() + 60 * 60 * 24 * 30;
cclinks_link_apply_schedule_date($node, 'cclink1', strftime( "%Y-%m-%d %H:%M:%S", $event_date));

where cclink1 is your cclink internal name. I think you will find this code useful and it will be probably a good idea to be included in the documentation.

Comments

fago’s picture

could you add it to the documentation?

Perhaps just add it as example rule under this page? http://drupal.org/node/156294 - I can review it then.

nekobul’s picture

Wolfang,

I have added example page. Btw Have you reviewed the code I have posted here: http://drupal.org/node/250319 ?

Thank you for the great module.

Regards,
Ivan

fago’s picture

Status: Active » Fixed

I've reviewed it, thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.