Hallo,
I'm managing multiple drupal sites, mostly by deploying custom php scripts with drush, and I'd like to know whether there's a way to set a vocabulary as 'orderable' in code. I checked the module's php, and I don't think there is a function to make it happen, or at least I didn't find it: I was looking for something like
nodeorder_set_orderable($vid)
The module - as far as I can understand - makes a vocabulary orderable through the
nodeorder_taxonomy_form_vocabulary_submit($form, &$form_state)
function. I'm not very good at module/admin interface coding, and I couldn't find out how these two arrays (or objects?) are supposed to look like in this case...
Can anybody help me out?
L.F.
Comments
Comment #1
lucio.ferrari commentedWell, I guess I found a possible solution myself, by digging a little deeper into the Forms API:
seems to do the job.
To revert this, just replace items as 'orderable' => 0, 'module' => 'nodeorder' .
I leave it here in case somebody else is interested.
Regards
L.F.
Comment #2
marcp commentedIt would be nice if we provided a true API, but that looks good to me.
Comment #3
lucio.ferrari commentedThanks, but I wonder whether the first line actually works...
After I posted this, I met some (unrelated) trouble when I was trying to load content.crud.inc in another script, so I did at last read the API entry for
module_load_include.I believe that the first line only loaded 'taxonomy.admin', and should have been replaced with:
Nevertheless, it did work... so I guess that loading 'taxonomy.admin' also loads 'nodeorder', probably via its
hook_form_alter, thus the second line above is useless. Am I right?Comment #4
dieuweClosing as the Drupal 6 branch of this module (and Drupal 6 in general) has been discontinued.