Haven't had much luck trying to find anyone else that is using node statistics with rules.

Basically I want to set up an e-mail alert that notifies users when a story has been viewed X number of times.

Figure the way to go about is to use a number comparison each time a node is viewed.

Ultimately I figure I could do a "statistics_get($node->nid)", but it seem like there should be a more graceful way?

Comments

Ken Hawkins’s picture

Component: Rules Core » Rules Engine

Groan. Typos. Maybe that should be my resolution for the new year: proofreading.

mitchell’s picture

Status: Active » Fixed

Perhaps something like this would work:

Event: Node is going to be viewed.
Condition:  Load a view and perform textual comparison.  See: #251008: Node view count as field.
Action:  E-mail.

Status: Fixed » Closed (fixed)

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

mrjavarava’s picture

Component: Rules Engine » Rules Core

Yes, I need a similar feature with Rules Statistics integration. Like a node be unpublished after x number of views. Subscribing.

mrjavarava’s picture

Version: 6.x-1.1 » 7.x-2.x-dev
Category: support » feature
Priority: Normal » Major
Status: Closed (fixed) » Active

Yes, I need a similar feature with Rules Statistics integration. Like a node be unpublished after x number of views. Subscribing.

TR’s picture

Issue summary: View changes
Priority: Major » Normal
Status: Active » Closed (won't fix)

There doesn't seem to be much interest in this as a feature, and no contributions from the community either ...

If you want to contribute some Rules events/conditions/actions for integration with the statistics module, then we can consider that for inclusion into Rules. Regardless, if you find it useful, then others might, so put it into a contributed module and we can try it!