http://example.com/admin/settings/disknode shows the list of node types, that Disk Node will attach itself to. The %node parameter to Attach to %node is passed through node_get_name(), altough it is already in human-readable form, leading to an empty display (note: you might need to install a second locale to observe the described behavior).

The supplied patch fixes this.

Comments

NicholasClark’s picture

StatusFileSize
new666 bytes

I also had an issue here, but I found that the base name was not being used internally which screwed things up when the form hook call checked the disknode type variables.

This code will ensure that the displayed name is the full node type name but the actual single word type is used internally.


foreach (node_get_types() as $type => $name) {
if ($type == 'disknode') continue;

$form['_disknodebehavior']['disknode_node_'.$type] = array(
'#type' => 'checkbox',
'#title' => t('Attach to %base', array('%base' => node_get_name($type))),
'#default_value' => variable_get('disknode_node_'.$type, 0),
'#description' => t('Provide the disknode functionality to the node type %type.', array('%type' => $type)),
);
}

I hope my explainations made some sense.

NicholasClark’s picture

I think the function _disknode_convert will need updating too.

smk-ka’s picture

StatusFileSize
new1.47 KB

Yep. New patch combining both patches from above and adressing the _disknode_convert issue.

smk-ka’s picture

Maybe it should be mentioned that this patch breaks existing Disk Node installations, as it changes the internal variable names, and, thus, requires the node types it should work with to be reassigned (by going to http://example.com/admin/settings/disknode).

smk-ka’s picture

StatusFileSize
new913 bytes

I've made an install file (MySQL and Postgres support) that includes an update hook, which converts the old variable names to the new ones. Not sure if it's correctly applied, though, so this needs testing.

Users who have applied the above patch should direct their browser to http://www.example.com/update.php to update their existing Disk Node entries.

elmuerte’s picture

Status: Needs review » Fixed

thanks, I've merged the patch with the cvs

Anonymous’s picture

Status: Fixed » Closed (fixed)