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

Forginc node_save NOT to create a new revision

Hello,

I am re-developing node_article.module (used by Free Software Magazine) for Drupal 5.x.
I am basically rewriting it so that it follows all of the coding standards and follows Drupal's "philosophy" (my previous version was a bit of a hack, which worked fine but it was nevertheless a hack).

Now: in my module, I need to have the option of doing:

node_save($node)

WITHOUT creating a new revision.
Right now, this is what I do:

$node->hack_dont_save_revisions = 1;
$node_save($node)

Localization of dynamic variables

I'm trying to localize 'categories' in contact.module. But the code: (contact.module, contact_mail_page())

  while ($category = db_fetch_object($result)) {
    $categories[$category->cid] = t($category->category);
     }

doesn't work. Should t($var) work, at all? I've noticed that localization of content type names doesn't work too...

Add user with my own Add script

Hello,

I made a little module that creates a form, checks the values and adds, if validated, the information in a different database than the one used by Drupal.

In this same module, I'd like to be able to create a user the same way as an *admin* would do through the configuration bar (administer->users->add user). That means: no password sent by email and no admin account validation.

I don't really understand how i could do this.

Can/Do i have to manually add login information directly to the drupals database ? I looked at the database if it was easy understanding values when a user is added but... it saw this for one of the fields:

a:4:{s:6:"notify";i:0;s:6:"submit";s:18:"Create new Account";s:10:"form_token";s:32:"7ef648112c04bc1d3596051811a9264d";s:7:"form_id";s:13:"user_register";}

So i thought i should rather use the drupals specific functions to add the login information ?

And we shouldn't forget that this script/form is launched by a unregistered user...

I did try to create this form from the different values gathered in the first one...

$output .= "\n".'
'."\n";
$output .= ''."\n";

Module changes?

Hello!

I'm trying to change (what I thought was a simple thing to do) some "labeling" code inside the user module.

The code I want to change is this line:

'#description' => t('Your preferred username; punctuation is not allowed except for periods, hyphens, and underscores.'),

I want to make it read this instead:

'#description' => t('Your real name first and last; punctuation is not allowed except for periods, hyphens, and underscores.'),

This label is information listed under the user registration box for new users.

ERP Module

Hi Guys

In the ERP Module it says that you need workflow module for installation. However there is no workflow module for version 5! They do say it is compatible with version 5 but how can it be if there is no workflow module for 5. Can I install the 4.7 version please?

Any ideas please?

Thanks

Rich

Form API with File Problems

I'm trying to develop a module, and I can't seem to find the file that's uploaded from a form api containing a file input. Here's my code...

Pages

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