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

Hook calls reordering

There is quite frequent necessity in modules hooks sequence reordering.
The simple method is to change module's 'weight' in the 'system' table.
But this influences all the module's hooks, while I don't want to reorder they all.

Say we have 3 modules: mod1, mod2, mod3.
And for example I want for hook_form_alter the following sequence:

-mod3_form_alter()
-mod2_form_alter()
-mod1_form_alter()

and for hook_nodeapi() I need:

-mod1_nodeapi()
-mod2_nodeapi()
-mod3_nodeapi()

node insert post processing in hook_nodeapi

I need to post-process a disknode after it has been added. I attempted hook_nodeapi in my module but it seems that the file has not yet been processed by the disknode hook_nodeapi. Since the disknode.module populates the $node with info such as mimetype, filesize, etc I must wait until after it completes its processing. I tried modifying the module weight but that did not seem to help.

Autosave not saving CCK custom fields?

Hi,

I was wondering if the autosave module will also save any/all custom cck fields (not just title and body)? FYI, I am using v5 rc2, and php5.
Just seeing if anyone else has had experience with this...

thanks!

How to get Buddy Chat to work?

I installed BuddyChat module and enabled the chat block on left sidebar.
However though I have two buddies, the block shows two bullets with "Anonymous" written next to them.
I checked for any settings - couldnt find any.

I'm running Drupal 4.7.x and Buddylist module is installed too.

Any ideas if I'm missing somehing?

Thanks,
Reggie

Special HTML chars in menu title

Whitin my module, I need to put some accentuated characters in menu titles.

If I wrote the code this way:

$items[] = array('path' => 'view/' . $uid . '/populacao', 'title' => 'População', ...

I don't get correct title, but garbbed char instead.

If I wrote the code this way:

$items[] = array('path' => 'view/' . $uid . '/populacao', 'title' => 'População', ...

I get title literally as coded.

SMTP module success with test email, failure for new user emails

Hello!

I am using:
Drupal 5.0-RC2
PHP 5.2
Apache 2.2
MySql 5.0.27
SMTP module Head revision

I installed the SMTP module, configured it, and sent a test email successfully. So I know that some code path is working.

When a new user creates an account, however, I get the following error:

warning: mail() [function.mail]: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts. in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal\includes\common.inc on line 1970.

I believe this means that it is not authenticating, indicating it is not using the SMTP module.

Looking at the code in common.inc (below) it looks like the if statement fails to find the smtp_library variable. Then it calls the mail function, which throw the error. Presumably if the if statement succeeded and called the SMTP module mail function it would work.

I'm new to PHP, so this is hard for me to debug after this point. I'd greatly appreciate any help. Thank you!

<?php
// Allow for custom mail backend
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
include_once './' . variable_get('smtp_library', '');
return drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers);
}
else {
/*
** Note: if you are having problems with sending mail, or mails look wrong

Pages

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