This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

One Module with Multiple Forms

Hi,

I'm wondering if it's possible for Drupal to utilize ONE module that displays DIFFERENT forms (depending on the URI).

Here's my implementation situation.

I want to create a "Fiction" (like a novel). A "Fiction" contains "Chapters", which are basically sub-nodes of a "Fiction" (very similar to the pages of a book). A user creates a "Fiction" that has fields such as "Genre", "Rating" (set up through taxonomy) and "Story Summary" (the node content).

When a user who owns the fiction is viewing a Fiction Node, they are permitted to add "Chapters". A "Chapter" inherits the "Genre" and "Rating" from the root Fiction node. The user is the allowed to write a "Chapter Body" (the node content).

One reason I did not use the existing book module is because the UI for the book isn't clear for my target audience. If they created a book with a genre, then it would be annoying if they had to specify the genre every time they posted a chapter.

My problem is that I want to call this customized form and can not create it. I create a link that points to "fiction/addchapter/38" (to edit fiction with node 38). I use my callback for viewing fiction (fiction_page) as follows:

if (arg(1) == "addchapter") {
	print fiction_chapter_form(arg(2));
	break;
}

The function

fiction_chapter_form

defines the logic for displaying form elements. The problem is that it does not display the standard Drupal form elements that are shown if you call something like "fiction_form" or "node_form".

Creating a "Fiction" module with "Chapters" without using a Taxonomy

I have written up a set of requirements for a "Document Submission" module at [http://yetta.net/~arcana/fiction_drupal_module/requirements.php]. It's similar to the book module, except that there's no permission for other users to edit it, I want to build a "file upload" field for it (I should add that to the book module too), and I want to auto-generate chapters.

Module Inheritance/Module cloning

I am designing software for managing fiction (or more generally, documents). An example of what I am attempting to build would be the script at Fanfiction.net (http://www.fanfiction.net) or the eFiction script provided by Orodruin (http://orodruin.sourceforge.net). I wrote down a set of requirements that I am looking for in composing this module, located at http://yetta.net/~arcana/fiction_drupal_module/requirements.php.

The navigation provided with the "Book" module would fit into my requirements perfectly. However, there are some limitations with that module - it doesn't allow restricted editing access, for example.

Why is this a problem? If I want to use the "Book" navigation tree in a module in Drupal right now, I would have to either code-clone the Book navigation tree, or import book.module and call the book_ functions for navigation. Code cloning is obviously not a good idea, because if the book module gets a nice facelift, then I want my module to get that facelift as well. Importing book.module would work, but it's risky as far as programming goes because I am exposing entirely that module to my own.

Is there a way to inherit characteristics from other modules without making it all kludgy and ugly?

"Persona" module for characters in role-playing games and stories

About four months ago, I was working on a module that was designed to manage a list of "persona" that a Drupal user might create for the purposes of something such as a role-playing game or a collborative fiction piece.

I have not worked on it for some time now, and have only tested it with a patched version od Drupal 4.2.0, so it might not necessarily work. However, I thought I would share it in case this might help someone out.

email2post module ?

Is anyone aware of a way to email content into the system directly.

I'm a system admin and use drupal as change tracking system; when we make changes to IT infrastucture, we post what we did.

We use the taxonomy to help keep track of the chages.

Id like some of systems to be able to post directly to the site.
Like OpenManage events and systems starting up or services stopping, etc.

Is there a way I could email these events directly to Drupal ?
Or can I construct a url and post the data in ?

any ideas ?

Matt

Update to new module... Essentialy new... Just look! :)

Hey everyone,

To people who took interest in my module before, I'm sorry on the lack of updates. I don't have a personal web-site to link to, and I haven't had much chance to work on it lately. Anyway here's the low-down:

This is a module for a simple e-commerce site. You set up you're store, create items to sell, and collect the cash!
* You can group items by creating a taxonomy linked to the module for the different categories (doesn't work with sub-categories yet).
* The module comes with 3 blocks as well: a shopping cart, a newest item block, and a special navigation block for getting between your item types (remember the taxonomy?).
* The users check out using PayPal.
* There is support for shipping and handling per item, and per group.
* You can link items to one-another to create sub-items. For example, if you have a shirt to sell, you can make a blue shirt and a red-shirt item and link them both to shirt. This way when they go to the product page they can choose between which shirt to buy.
* Each item can have 2 images. One product image, and one thumbnail.
* Intuitive and easy to use. Add content as just another node, so it can be managed in the same way as a story or forum post.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions