Hi folks,

I'm setting up a fiction archive, to allow community members to post stories. I'd hope to use the core Book module to allow them to set up hierarchical relationships between stories (e.g. a node that gives a description and outline of a story series, and then the actual stories in that series as child nodes). However, there seems to be no way to allow users to add pages only to books they created themselves.

This is a terrible shame. The Book module is great for collaborative editing, but it appears to be unable to offer ownership. If you give users the permission to 'add book pages', they can add them to any other book page, regardless of who wrote it.

So, the task is now to replicate the functionality of the Book module using Views 2 and CCK. I've figured out a few things, so I'm a third of the way there, and hopefully the good people of the Drupal forum can help me along.

1: Allow a new story to be made the child of an existing 'series' node by the same author

I thought this would be the tricky part, but it's relatively straightforward. After you create a 'series' content type, you have to set up a View that shows only nodes of type 'series' by 'current user'. No need to publish this as a page or anything. Now, edit the content type Story and add a new CCK field: 'node reference'. Then, under 'view to use to select the nodes], you select the View you just created.

Now, when a user posts a new story, they get a little dropdown field where they can assign that story to any of the 'series' nodes they've created. Nice.

2. Expose the contents of a series when viewing the 'series' node.
3. show the contents of the parent series when showing a child story.
4. (maybe) Show 'next', 'up' and 'previous' links when viewing a child story, like in Books.

This is the part I'm stuck on now. I know I'm probably missing something, but I can't seem to figure this one out. I'd played around with the 'what links here' view, but aside from the fact that backlinks only seemed to be tallied on cron (might be a flaw in my installation) it didn't get me too far.

The problem is that in this setup, the relationship is one way. The child knows who the parent is, but the parent has no idea what its children are.

Anyone have any suggestions for tackling 2, 3 or 4? Of course if someone can help me figure out how to allow users to add pages to Books, but only to books they own, that'd be even better!

Comments

WorldFallz’s picture

updating http://drupal.org/project/bookexpand for d6 may be be easier... just a thought

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Osfer’s picture

Sounds like that *would* be a good solution... doesn't seem to be a particularly active module, though. Still, thanks for the tip! I'll give 'em a buzz (I'm no coder, so I can't assist), but I think we're largely on our own in D6...