This patch does several things. Mainly, upon visiting node/add/[node-type] it checks to see if the user is allowed to create just one node of this type. If they are allowed only one node AND they've already created it, they are redirected to the editing page for this node with a friendly message to this effect.

We're using this module to implement CCK nodes as user profiles, so this is much more user-friendly than a dead-end "You cannot create any more nodes of this type.

Other changes in this patch include:

- fixed node-type naming for CCK (and Flexinode)
- enclosed "you cannot create any more nodes of this type" in the t() translate function and changed it to "You cannot create any more %type items" -- the word "node" is kind of a no-no in the u.i.
- added a function called usernodes_list_for_user() that can be used to see if users nave nodes of a certain type. Could be used by a theme to switch a link from "create profile" to "edit profile" or similar.

CommentFileSizeAuthor
usernodes-jjeff.patch3.15 KBjjeff

Comments

Coyote’s picture

I ended up unexpectedly having to move out of state a lot earlier than I thought, and was away from keyboard unexpectedly for an extended period.

And when I return, what do I find, but this patch!

Okay... I think I love you.

I notice that there's some changes to CVS, so as soon as I've reviewed them, I'll commit this.

Coyote’s picture

Okay, unless I've done something completely silly (always possible), the changes should now be updated to CVS.

jjeff’s picture

Status: Reviewed & tested by the community » Fixed

Isn't CVS fun!? ;-)

Coyote’s picture

I suspect CVS is a lot of fun once you know how to use it. Unfotrunately, I'm easily confused. : )

Apparently, last night, I updated the CVS version and not the 4.7 one. Hopefully, I've fixed that now.

Thanks again for your contribution to this - especially as I feel I've been dropping the ball on this a bit.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 50850)