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

Q regarding hook_footer()

Hi,

The API docs state that the var passed to hook_footer($main) :-

$main Whether the current page is the "main page" of the site.

However, regardless of page, $main seems to be set to 0 all the time. Hitting "Home" on the menu sends the browser to home page (see the mission statement) but $main is still zero.

What's the real purpose of $main arg ?

Regards
AjK

ARTICLE MODULE

I' m sorry my english is bad,

I' m installing the module Article on my local site (I'm working on)

I went in administer -> modules menu. I Enabled the module by clicking the box next
to it and I saved my configuration via the button at the bottom of
the page.

into the INSTALL FILE I' m not able to follow the instruction " goto the settings -> article menu"
(I' have the italian version of Drupal), and I really can not understand where I can find the -> article menu...
can you help me?

THANK YOU
Laura

Including a file upload for a new node module

I am in the process of making a restaurant guide node module, and it works great, but I'm having issues on how to get Drupal to play nice with a file upload feature. I've figured out that I need to set the options in the form hook to do enctype="multipart/form-data" and I can get the file picker on the screen with the form_file() function, but in what hook do I get ahold of that uploaded file so I can manipulate it? There's a nice file.inc file that lets me do all kinds of nifty things with the file once I get it, but I don't see how to get at my file once I click save.

node_privacy_byrole module set up

Hi,

I'm currently using Drupal 4.7. Everything works fine except I tried adding a new module: node_prviacy_byrole as I'm trying to make a wiki like page.

After I enable it I keep getting the following error:

Fatal error: Call to undefined function: form_hidden() in /var/www/modules/node_privacy_byrole.module on line 426

Does anybody have any idea why?

thanks

Listhandler and postgres issues

Okay, I was not sure where to put this, so please excuse me if this is in the wrong place.

Here is the problem. I am using Listhandler, Mailhandler, forums and postgresql. When people mail to the mailing list, comments and new forum topics get posted. When I add a comment from the web interface the comment get's sent to the correct mailing list. When I post a new forum topic vai the web interface, the comment get's posted but no mail is sent. It just silently fails.

Here is the function that I *think* that sends the forum topic to the mailing list. If my understanding is correct, a node is inserted, the node_invoke_nodeapi function is called, all 'listening' modules with hook_nodeapi respond, including this listhandler one.


function listhandler_nodeapi(&$node, $op, $arg = 0) {

switch ($op) {
case 'update': // what to do with updates?
break;
case 'insert': // mail new forum topics to mailing list.

if ($node->type == 'forum') {
if($node->sentbylisthandler) { // avoid running an infinite loop.
// save ids in listhandler table.
db_query("INSERT INTO {listhandler} (msgid, nid, cid, pid, uid, mid, tid) VALUES ('%s','%s','%s','%s','%s','%s','%s')", $node->message_id, $node->nid, 0, 0, $node->uid, $node->mid, $node->tid);
// call watchdog
watchdog('listhandler', "Forum '". $node->title ."' inserted.");

Problem with Module Sections and rc3+MySQL 4.0

Hi,
I installed Sections module on my site (rc3+mysql 4.0) but I got an error and couldnt install it (see my bug report : http://drupal.org/node/59579).

I removed the ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */ part from the sections.install file and tried to reinstall the module, but I still got the errors : TABLE sections_data doesnt exist ...

So I tried something else, I installed a new drupal site with a fresh new db (still 4.0) and installed the corrected module, and it worked fine.

Pages

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