I am just researching something for a client and membership functionality

Rather than allowing visitors/ unregistered users the ability to see a teaser and then full access to content if they register we would like visitors to see say 3 articles and when they click on the 4th they then have to register.

SO rather than restricting content by type or category the restriction is quantity before you have to register.

Does anyone know of any modules which deal with this type of functionality?

Thanks in advance

2 Answers 2


You'll need to install the ACL and Content Access modules as well as uc_node_access.

Every site is different, but the general workflow goes something like this:

Create a new content type, and use the content access features to make nodes of this content type inaccessible to users by default Create your 'paid content' node using the new content type. These nodes will not be viewable by site users by default. Create a node of type 'product' (an ubercart node type). Users who purchase this product will gain access to the 'paid content' node. Add a feature to the product node of type 'node_access' (Edit the product node, click the features tab, and add a node_access feature). Here's where you specify the node that purchasers of this product will gain access to. Repeat steps 2 thru 4 for each node that you want to offer for purchase. If you've done everything correctly, then users who purchase the product node will gain access to the corresponding 'paid-access' node.

I've used the D6 version of uc_node_access on a few sites, and it works flawlessly for me. Can't speak for the D7 version of uc_node_access, but I'm guessing it works equally well. Takes a bit of setup, but it does work.

For track anonymous viewing the only thing I know is use the browser's cookies, but that method will only work in the actual session if the user do not registers and clear his browser's caches then he can see 3 nodes again, I think you should look for alwasy force the user to register, or show only a teaser of the nodes for anonymous and force them to register for see the full node, then you can only let registered users see 3 nodes, then they have to pay, that way is possible and better. Its just a suggestion


If you have n number of nodes and you want the anonymous user to able to see any three nodes out of these, then that is not possible, though you can use IP details or Cookies to track, it is not reliable, the user can always find a way to see other nodes too.

Simply, it is not possible to keep track of anonymous user.

Rather you can make three nodes to be publicly visible using node access settings, and remaining nodes to be seen only by authenticated persons. But all anonymous users can see the same three nodes.

Update : I am not aware of any modules which can provide this functionality, but you can write a custom module and restrict the user based on IP details or Cookie, though the user can easily find a way to see other nodes.

Write a custom module, create a schema with two columns IP address, count.

Implement hook_node_view() and check $view_mode=='full' and insert/update record to your custom table.

Implement hook_node_access(), query your custom table to see the count for this IP, If the count is three then deny access.

Similarly you can use cookies instead of custom table, or you can use both cookies & custom table.

  • economist.com has the functionality I am looking for - after a certain amount of articles it then forces you to subscribe, is this by ip would you think?
    – agilityweb
    Commented Jul 2, 2014 at 16:14
  • They might block you based on IP or Cookie, try changing your IP or clearing the cookie, then you can access.
    – msmani
    Commented Jul 2, 2014 at 16:20
  • i want to try and replicate this not circumnavigate it
    – agilityweb
    Commented Jul 2, 2014 at 16:28
  • With uc_node_access you can easily reach taht functionalty read the answer below
    – svelandiag
    Commented Jul 2, 2014 at 16:59
  • @agilityweb updated the answer
    – msmani
    Commented Jul 2, 2014 at 17:03

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.