on the nodevote settings page (admin/settings/nodevote), flexinodes show up as flexinode-1 rather than their proper display name.

I know other modules can display the proper name.

Comments

kbahey’s picture

Can you point me to a module that does that, and I will see how they do it and try to make my module do the same?

I don't use flexinode myself, so I will not be able to test it, but perhaps you can help there.

moggy’s picture

freelinking module shows them correctly.

I think I've found the solution. You need to use node_invoke($type, 'node_name') to get the right names.

this works

...
function nodevote_settings() {

  $output = '';
  foreach(node_list() as $type) {
    $output .= form_checkbox (node_invoke($type, 'node_name'), NODE_TYPE . $type, 1, variable_get(NODE_TYPE . $type, '0'));
    }
...
kbahey’s picture

Status: Active » Closed (fixed)

Thanks I commited this fix.