hi, would be nice to have "rules" React on event options

  • after ad has expired
  • after ad is published

i need this option for unsticky the ad, for now i have made this by "after unpublished node" reaction for this is unsticky, but this only works when users unpublished by his hands, but doesnt work automaticly.

Comments

Acertijo’s picture

Issue summary: View changes
fgm’s picture

Sounds logical and not too complex. Something like this is likely to be implemented.

fgm’s picture

This simple patch exposes the event as a Drupal core trigger: no need for Rules, you can just implement a core action of your choice and enable it on that trigger.

Or you can just skip this, and implement hook_classified_expires_alter() in your module: this hook receives all the nodes that are being expired, without needing triggers or Rules.

fgm’s picture

Status: Active » Needs review
StatusFileSize
new1.92 KB

Attaching patch...

fgm’s picture

StatusFileSize
new98.29 KB

New version, with updated coding standards.

fgm’s picture

StatusFileSize
new92.55 KB

Rerolled, some fixes required PHP 7.

  • fgm committed fb6663b on 7.x-3.x
    Issue #2133615 by fgm: Automatic unsticky when ad expires
    
fgm’s picture

Status: Needs review » Fixed

Committed in latest HEAD.

Status: Fixed » Closed (fixed)

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