24 Sep
2006
24 Sep
'06
2:26 a.m.
On Saturday 23 September 2006 11:54, Jeff Eaton wrote:
Dave Cohen wrote:
So my plan is to put some logic in hook_nodeapi. If $op == 'view', and the user has not subscribed to the node in question, I can do something like:
$node->body = t('Sorry, you have to subscribe to view this.');
In Drupal 4.7, the Premium module uses a similar approach. I think you'll do pretty well with it. Under Drupal 5.0, it's a little more complicated but follows the same basic pattern. Looking at the code for Premium.module will definitely give you a good start.
Thanks for the pointer. Premium defines a hook so that I can customize the logic that grants permission. Maybe I can use Premium as part of my solution.