I am setting up a website with Drupal 7. I would like to provide premium content for subscribers on monthly basis. I would like provide ability to buy a recurring subscription.

To avoid leeching old content, that has previously been published, is it possible to limit visibility of blog posts form history?

Let me try to clarify the use case:

I would like to provide content to my Premium subscribers in December 2012. All the users that are members in December 2012 would be eligible to see all the content created then. Since I would like this type of subscription to be real time, it would need to restrict the usage of content created before one's membership. When January 2013 arrives, I would like to have recurring membership continue, but new users that arrive in January, would be restricted to content that have been published only when they are subscribers.

The best would be, that if one purchased Dec 2012, left Jan 2013 away and resubscribed Feb 2013, he or she would see material produced in Dec 2012 and Feb 2013, but not Jan 2013.

Dripping Content would be nice, but I am not providing that kind of cumulative courses but time based content instead, and would not like to provide new users the ability to leech all the old material that they've not paid for at the time.

Thank you in advance!

1 Answer 1


To do this, you probably should implement hook_node_access($node, $op, $account).

You should return:

  • NODE_ACCESS_ALLOW if content is new, or user have premium role
  • NODE_ACCESS_DENY if content is old and user does not have premium role
  • NODE_ACCESS_IGNORE if you do not want to control access for this content type

There are already contributed modules to sell roles, or to take payments, so this part should be easy.

Note that hook's documentation says:

See Node access rights for a full explanation.

I strongly advise to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.