I'm trying to add some wiki type abilities to my website.

What I'm trying to do is give all registered users access to edit specific fields, mostly description and reference fields.

Example Use:

2 Content Types: Movies & Actors

Node Movies has a reference field "Related Actors".

I'd like that field and only that field to be editable by any registered user on the site.

If possible it would be nice to have each person be able to edit or delete their contribution, but not others.

I thought CCK Field permissions thinking it would work, but it doesn't seem to be working, perhaps I'm missing something.

I set permissions to create and edit own on all the appropriate fields, but when I visit a page created by another user I have no way to edit it.

Any ideas would be appreciated. Thanks

Comments

dydecker’s picture

CCK field permissions do not have "edit/create/delete own" permissions. They only have "view" and "edit". Fields cannot have an author - only the node has an author.

A field can be editable/hidden by role, but the permissions don't get too much finer than that.

2ndChanceTech’s picture

okay so if I wanted registered users to edit a reference field or other fields on a node they didn't create, what would be the best way to accomplish it?

I'd like people to be able to reference albums from songs
and movies to reference actors.

This works perfect with references provided by the node creator. Can't figure out how to make just that field available for everyone to edit.

dydecker’s picture

cck field permissions are locked inside node edit permissions. If a user doesn't have permission to edit a node, then by definition they cannot edit a field in it.

So one solution is to make the movie nodes editable by all.

But best to think of node references from the other direction: not as fields to be edited, but as joins between nodes. and the nodes are what you edit, not the node reference fields.

If possible it would be nice to have each person be able to edit or delete their contribution, but not others.

This is possible, but at the node level, not field level. So you make your content at the node level, where you can edit/create/delete/control, & then other nodes can reference them.

A nodereference field is only a number. All of the information is in the node itself (even the title).

Maybe you could explain a little more about you what you want users to control/edit/delete. then maybe there is a solution, eg think Revisions would help to create wiki-like collaboration

2ndChanceTech’s picture

I do have it so people can make new content and reference on creation.

Current Function:

User creates content movie
references actor, if actor doesn't exist addnode is used to create it <- Works Great!

However eventually there's several actors and movies that are not linked because the original creators didn't make the connection. (I don't expect a person to list more then 2 or 3 actors on creation, but there could be a dozen).

So with that thought I'd like someone to be able to visit a node say "Movie", and when they notice a reference is missing or even incorrect, edit it. However I don't want them to be able to delete the node, change title, etc.

Then yes I'd like to use revisions so that changes can be tracked and reverted back in case of sabotage to the node.

------------------------

So if I understand correctly.

If I set a content type to create, edit, and edit own.
Then get field privacy and choose the fields that are accessible for edit.

Would that put a edit tab on the created nodes and only show the fields that the user has access to edit?

My main concern is people deleting the node. I don't use descriptions or any other fields other then reference fields in my content types. If I can let the public change them, track revisions and protect them from being deleted I've struck gold. I have a feeling it can be done I'm just a little lost.

dydecker’s picture

Yes, that's the way. First open up the larger permissions, then close the smaller things one by one.

I don't want them to be able to delete the node, change title, etc.

You can protect nodes from deletion with ordinary permissions. Uncheck "delete all nodes" for the movie content type. If you don't want grant the node author delete powers either, uncheck "delete own nodes". Now nobody can delete anything ;)
The wikitools module also has a "protect node title" function, as well as other useful bits.

Then get field privacy and choose the fields that are accessible for edit. Would that put a edit tab on the created nodes and only show the fields that the user has access to edit?

Yes. You can hide/show CCK fields at create/edit stage for different users with Workflow Fields module. Bingo ;)

2ndChanceTech’s picture

You da man... Fixing that is a major part of how my site works.

I'm using panels to overide all the content types, then in panels on the sides loading views that show all the items that reference the one your viewing. With this functionality, anyone will be able to link anything to anything (well what I let them anyways).

now what I need is how to make a view that displays nodes that reference the same things the current node does.

Example Use:

Image References Venue (A)
View displays all nodes that also reference Venue (A).

This way I can create dynamic galleries underneath all images, or songs, etc.

ammys’s picture

its a real good
dvd, pda, ipod movies

kenorb’s picture

Maybe this module will be useful for you?
http://drupal.org/project/view_own