Posted by bestrank on April 15, 2010 at 6:15pm
Hello everyone, I'm looking for a module that will give me the ability to display a node content snippet to anonymous users and display the full node's content to authenticated users (sort of like a signup to view the full post kind of offer). I don't want to have this ability governed by node type since that seems a bit clunky, would prefer it if either there might be a on/off switch on the node or an interface where I can define the node ID's to apply this behavior to. Does anyone know of such an existing module?

Comments
We have a module that
We have a module that provides this functionality but manages the permissions based on Organic Groups. It is awaiting approval so it can be added to CVS.
In the meantime, I would be happy to send it to you as-is. If you don't want to use OG, it might at least show you the logic being used to achieve this affect.
Regardless, we did not find a module that provided the need you mentioned above, so we wrote one. If there is one, I would be interested in finding out so we could possibly integrate any cross-features with them and prevent duplicate modules.
Actually, I found a nice
Actually, I found a nice little module still in development that was about 95% of the way there
http://drupal.org/project/restricted_content
But noticed it wouldn't work right out of the box, seemed after I assigned a node to be restricted to anonymous users it wouldn't throw up the restricted message for them. I modified a few things in the restricted_content.module file to get it working properly and also added a preview check box to the node edit form to optionally print a snippet of the page :)
here is my diff of the restricted_content.module file
http://www.bestrank.com/files/restricted_content_diff.txt
Just realized that I'm
Just realized that I'm setting the on/off preview check box using a single persistent variable in my diff code but that won't exactly work for all pages on a site, so whoever wants to use that code be weary of that. May need to store the on/off value in a db table.
Did you consider Premium?
Did you consider Premium? I've used it for similar situations.
Right out of the box, Premium
Right out of the box, Premium allows us to assign node types a "premium" status and bulk update all nodes of that type, but I don't see where we might be able to tell the system that we only want nodes x, y and z and not all nodes of a certain type to have premium status.
What happens when you set a
What happens when you set a node type to have "premium" status is that it adds an option on every node of that type with a checkbox for "Access restricted for non-premium users" in the "Publishing options" fieldset.
Then, in the node text, you type
<!--break-->and that is where the content will be cut off if the option is set.It does work on a per-node basis like you are wanting to do.
Nice, looks like this module
Nice, looks like this module would also be good for settings content as premium for a certain time period then automatically having it switch back to non-premium or vice versa.