I want anon users to be able to submit content without "access content" permission

hypothesis - October 17, 2009 - 15:49

I have this problem:

Content on my site is only available as a view which shows a very specific subset of information from my nodes.

I don't want users of the site to be able to see content in any other way. There are no accounts, just my admin and anonymous.

But:

I want anonymous people to be able to submit content and after I review it, it gets added to the site.

If I set the permissions to "create xxx content" it does not work unless "access content" is also checked. Any access to content other than my view should not be allowed. I want a secure solution.

I have looked at countless "permission" modules but found none that perform this function.

One for the wish list:

hypothesis - October 17, 2009 - 15:50

Ideally it would be nice if the anonymous user could re-edit their own content if they have something new to add/change. I could do this possible with the login by IP address module.

alternate submit module

hypothesis - October 18, 2009 - 07:41

is there another module that allows a different way to submit nodes other than the standard way?

I tried editview

hypothesis - October 19, 2009 - 17:56

I tried the editview module but alas it relies on that specific permission as well to be able to add new nodes.

I just cannot find any other module that allows such fine grain permissions to allow to create but not access content.

This must be either very

hypothesis - October 19, 2009 - 18:12

This must be either very simple and I am really missing something, or far too difficult and noone seems to know the answer.

Either way it is imperative that I get this working on my site ASAP. I just want to stop short of having to create an entire module for this.

_

WorldFallz - October 19, 2009 - 23:19

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

I am using editable fields

hypothesis - October 20, 2009 - 03:39

I am using editable fields actually, but the I cannot use it to edit the Title and body firled of the node, only my CCK fields, and also I don't know how this could be implemented for new content.

It seems Drupal runs a permissions check before it allow any sort of adding content form, no matter how I present it.

This is getting really frustrating...

_

WorldFallz - October 20, 2009 - 12:06

Prior to d7 title and body are not 'fields' in the cck sense so they don't follow the cck conventions.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

External form

hypothesis - October 20, 2009 - 04:31

The best possible solution would be to have some sort of "alternate" external form that could be used outside the context of the standard content creation schema.

Like a form that just feeds data into the database as if it were the original creation form, but with it's own customizable settings.

Before anyone suggests Panels, I have tried it with the same result.

_

WorldFallz - October 20, 2009 - 12:04

Panels just uses the standard drupal forms so no, it's not going to do anything differently that allows you to do this. I think you're right-- you'll have to create a custom form and just save the node programmatically.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Could someone point me in the

hypothesis - October 20, 2009 - 14:13

Could someone point me in the right direction?

I tried taking a form, saving it as a .php file and plopping it on the server and using it. It appears mostly correct but the submit button does nothing.

Now what do I need to connect to? Or what do I need to "hook"?

I have never delved into to this sort of code in drupal so I don't know where to start.

_

WorldFallz - October 20, 2009 - 14:21

For form api docs see http://api.drupal.org/api/drupal/developer--topics--forms_api.html. For programmatically creating nodes see http://drupal.org/node/201594. I would think you could put the code for creating the node right in the submit function for the form.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Wow, looks daunting for a

hypothesis - October 20, 2009 - 16:46

Wow, looks daunting for a simple create content form. I was hoping I didn't have to dive into the code but here I go!

Sounds like the node factory

hypothesis - October 21, 2009 - 11:55

Sounds like the node factory module
http://drupal.org/project/node_factory
could accomplish something like this.

I saw it before but never thought of how it could work until your suggestion!

Thanks!

To make everything in the

hypothesis - October 20, 2009 - 16:55

To make everything in the form work properly, I am thinking I need to create a empty node first, then have the anon user edit it.

I am thinking this because my imagefields' upload only work after the node is saved. I think this is because I have all files related to a node stored in it's own subdirectory (named as the node number) in the files directory, also prefixed with the node number.

BUT... if I do this and many people visit the page, and don't do anything, I will have a ton of empty nodes to delete.

Seems I just can't win!

 
 

Drupal is a registered trademark of Dries Buytaert.