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

Suggestions on how to create additional modules for Drupal CVS (waiting for Drupal 4.4...)

Hi all,
since Drupal is changing so rapidly, I need to decide which way to choose in order to create additional module for Drupal.
Basically, I need to create different modules that will be extension of the standard STORY module (they will contain more fields than a normal story).
I also want users to be able to link ONE image (with automatic thumbnail creation, possibly) to each node.

Now i'm a bit confused on how to go on, while waiting at the new Drupal 4.4 coming out.

Now I'm working on Drupal CVS.

The possible choices are:

How do you add a Taxonomy Type definition?

(NOTE: I originally posted this in Usage... forum, this is probably (??) a more appropriate place for it.)

I've searched about six or seven modules for clues, and the online doc - but no dice. I'm completely baffled how a Taxonomy Type is defined. I noticed the menu.module does not create a Taxonomy Type - so when you define a Menu structure, you select a taxonomy term to associate with that menu. No taxonomy type of "menu" exists. I know I can use a different type, and it shouldn't matter, but it still bothers me.

A "Visit links in new window(s)" block in weblink.module

I've just hacked together a very small module that extends the weblink module to add a block that allows users to enable/disable the $user->weblink_new variable with a checkbox.

For the purposes of my site I wanted anonymous users to also have the ability to enable/disable this. This was not possible in the weblinks module as it exists, so I saw no other solution than to hack it. (I hate doing this, but what can you do?) This required saving/reading the variable in $_SESSION for anonymous users instead of in the $user object.

Taxomony in a Block

Hello
What are the easiest ways to include selected taxonomies in a block. I mean displaying the latest articles/posts (in a selected taxomony) in a block.

Thank you,

Using hyperlink to set locale cookie.

I have written a function within locale.module to display a block with hyperlinks that I want to use to set cookies similar to the following:

$path = preg_replace("/.+\/\/[^\/]+(.*)/", "\$1/", $base_url);
setcookie("locale", 'en', time() + 3600 * 24 * 365, $path);

Can anyone explain how to set such a cookie - e.g. the format of the link and the required location of the code above?

New Module: Wordfilter for filtering posted content

I wanted this functionality for my site and I didn't see it built in anywhere in Drupal. You can enter word/phrase pairs, such as "crap" and "crud". Wordfilter will search for all instances of "crap" and replace it with "crud". It is case insensitive and you can use regex expressions.

Try not to be too restrictive, I don't want to create a big brother / 1984 thing here (e.g. replacing "great" with "double plus good" ... shudder), but I want some control over my site without the burden of moderation.

Pages

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