tags:

views:

34

answers:

2

I'm writing an install file for a custom module, that needs to create some new nodequeues. But a drupal and google search are so far turning up empty. Anyone know how to do this?

Drupal 6

A: 

Some API documentation might help you on the road? http://api.lullabot.com/file/contrib/nodequeue/nodequeue.module

berkes
-1, linking to the source code is not particular helpful.
googletorp
It ís the official documentation, not just a link to the sourcecode.
berkes
@berkes It's not the official documentation. Lullabot have created that from the source code with the same module that powers api.drupal.org. Still providing a list of functions in a module's module file is not helpful.
googletorp
A: 

The closet thing you come to a API function to save nodes is nodequeue_save, but all you really need to do, is to insert some data to the {nodequeue_queue} table. You can do it yourself with SQL or use the function, but the result will be the same.

You should remember to add the nodequeue module as a dependency in your module's info file and check if it's installed before running your stuff in hook_install.

googletorp
In addition, you should make sure there are no nodequeue-addons that need to be noticed of changes. Nodequeue_save, nor manually inserting will notice them: such modules typically add their own listereners (so called submit callbacks) to forms. Results may become unexpected when queues are inserted into the database directly.
berkes
Thanks googletorp and berkes. I was coming to similar conclusions, and you've verified for me. I appreciate that...
Michael D

related questions