What you need

O means to download/upload files to your modules directory O a text editor

O a little php knowledge is helpful, but not required o a technical name for your node type (16 character limit) - no spaces, numbers or punctuation unless you know what you're doing (don't use the name of a module you already have)

O a user-frieldly name for your node type (and a plural version of this name) (this is how your node type will appear in most places on your site) - spaces and numbers are ok but again no punctuation unless you know what you're doing, note: you can use the same name as your technical name above O a module description - a short description of your node type that will appear on the administer->modules page - don't use quotes or apostrophes unless you know what you are doing

O a create content description - a short description of your node type that will appear on the create content page - don't use quotes or apostrophes unless you know what you are doing

• In the following bolded text in the code boxes is intended to show where the code changes. Quotes and apostrophes in the code are important, please place close attention. It should be noted also that these directions were developed from drupal version 4.6

As an example... say you want a simple press release node type. technical name = release user-friendly name = press release user-friendly plural = press releases module description = Enables the creation of press releases. create content description = Create a press release.

• Download the story.module file from the modules directory

• Save it as your technical name .module in our example the file will be named release.module

• Open the new file in your text editor

Now, without getting into too many details on drupal modules and php code

The first line of code should be

<?php don't touch that

The next line of code should be

// $Id: story.module,v 1.167 2005/04/01 15:55:01 dries Exp $

You should remove this, so that there is no confusion with the story module

The next couple lines of code should be

* Enables users to submit stories, articles or similar content.

change the bolded text above to your user-friendly plural, in our example press releases seen below

* Enables users to submit press releases. */

The story.module file allows for story node types. The module file implements the following 6 drupal hooks

Article Marketing Knockdown

Article Marketing Knockdown

The lifeblood of any online business is in being able to generate highly targeted, consistent traffic to your websites, landing pages and squeeze pages.

Get My Free Ebook


Post a comment