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

trying to create a digital menu, need some advice

Well I had a guy make a digital menu system that was ok but it was added a blank link to the links section of every node and so I'm considering scrapping it bc that annoys me so much.

Anyways I'd like for a paying customer to post a menu node and then subsequent menu item nodes that will belong to the parent node. Then there would be a page that brings it all together in one pretty layout.

Connecting groups of images with a single node

I have a node type (something like story) where I can describe hospitals all over the country, but that single node should be tied up with groups of images, and I can put many photos inside a single group:
1. photos of doctors in a particular hospital
2. various photos of a hospital

I'm struggling with this problem for a while... can you give me a clue, please?
What's the best way to make these things done? CCK? Flexinode? Taxonomy?

Need HowTo for complex node types!

I created a new complex node type. It represents an aggregate object, which consists of several sub-objects, so the data is spread over several tables in the database. I construct my node object in hook_load like this:

function myNode_load($node)
{
	// switch database
        db_set_active('myDB');

        // create my object
        $myObject = db_fetch_object( db_query( ... ) );
        $myObject->subObject1 = db_fetch_object( db_query( ... ) );
        $myObject->subObject2 = db_fetch_object( db_query( ... ) );
        ...

        // switch back database
        db_set_active('default');

        // append myObject to node-object, and return the node
        $node->myObject = $myObject;
	return $node;
}

Note, that I return $node instead of $myObject. This way $myObject is not flattened into a set of properties an merged with $node, but it remains as an object that is attached to $node. This way I can use the object in other following hooks like I constructed it. For instance in hook_form:

$form['myObject']['subObject1']['latitude'] = array
(
    '#type' => 'textfield',
    '#title' => t('latitude'),
    '#default_value' => $node->myObject->subObject1->latitude
);

My problem is now, that $myObject is lost after submiting the form. As far as I understand, node_form_submit($form_id, $edit) in node.module creates a new node-object out of the data submited in the form elements. Therefore $myObject is lost and not attached to the $node object which is passed to hook_validate, hook_update and so on... The following doesn't work:

Node type 0 (zero)

I am updating my module from 4.6 to 4.7. It was stable at 4.6 and fully functioning.

Now, using 4.7 platform and i've updated the module, but when I go to add a "node" using this module, I see the form, but when it comes to submitting it:
- The confirmation doesn't recognise the content type: "Your was created."
- The data is not added to the module's tables
- In "node" table, the row is added but for "type" field it says "0" (zero)

It shouldn't be the database issue because my other similar modules work, after update.

Any ideas?

Cas Nuy updates drupal/Moodle integration module - now supports 4.7.3

I sent a mail to Cas Nuy, the developer of the Drupal/Moodle Integration module and requested him to update it to work with Drupal 4.7.3.

Guess what he does? He takes 2 days but sends me an email with the updated code. I am attaching it to this post.

I have seen several posts where people have been asking for an updated module. Please donate to Cas Nuy (cas@nuy.info) if you find this module useful.

modules extending the comment module

I want to know if it is possible to extend the comment module the same way a module can extend a node. The alternative is writing my own comment module when all I want to do is have my module add a field to the comment form.

Pages

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