23 Sep
2006
23 Sep
'06
8:54 p.m.
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. -Jeff