You are here

README.txt in Nodequeue 5.2

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 7.3 README.txt
  4. 7.2 README.txt
The Node Queue module allows an administrator to arbitrarily put nodes in a
group for some purpose; examples of this might be to highlight one particular
node, as in a typical news site's Lead Article. Another use might be to create
a block listing teasers for 5 forum posts that the admin thinks are important.
Another use might be to create a group of nodes, and then have a block or the
front page offer one of these randomly.

Queues can be set to allow only certain types of nodes to be added to the
queue. Queue can be a fixed size or of infinite length. And the admin can
select which roles have permission to add nodes to a given queue.

Once a queue is set up, a new tab will appear on eligible nodes for eligible
users. This tab will allow the user--regardless of edit permissions--to add or
remove that node from the queue. Queue admins can view the nodes in the queue,
and can modify the order of items already in the queue. Items may also appear
in a nodes links area to add/remove them from the queue.

When a node is added to the queue, it is added to the back of the queue. If a
queue is full when a node is added, the front of the queue is removed. 

Nodequeue has support for nodes with i18n Internationalizations.
You must install the Translation Helpers module from http://drupal.org/project/translation_helpers to use this functionality.

It is highly recommended that you use the Views module to display your queues.
However, if you choose not to, here is an alternative: Writing a PHP snippet.

To Create a Block to Display Node Titles of a Queue
===================================================

You'll need the Queue ID, which is easily extracted from the URL on the
queue administration page.

Create a new block, and insert the following PHP snippet into the block:

   <?php print nodequeue_node_titles(QUEUEID); ?>

If you want this queue to be printed in the reverse order, you can tell it
to print backward:

   <?php print nodequeue_node_titles(QUEUEID, '', true); ?>

The '' in the line above is an optional title field. Feel free to put
something here, but it's not terribly necessary in a block.

To Create a Page to Display Node Teasers of a Queue
===================================================

Like above, you'll need the Queue ID.

Create a new page (or a new dashboard!) or any node type you like, really, 
and set the input filter to PHP. Insert the following PHP snippet:

   <?php print nodequeue_nodes(QUEUEID); ?>

There are a few more options available here; changing the order of the nodes,
whether or not to use teasers or full nodes, whether or not to display the
links, and how much of the queue to display. See below.

To Show Just The First or Last Element of a Queue
=================================================

Starting with the examples above, but use the following:

   <?php print nodequeue_fetch_front(QUEUEID); ?>

or

   <?php print nodequeue_fetch_back(QUEUEID); ?>

Remember that the front of the queue will have the least recently added
nodes (unless it was rearranged manually), and the back will have the
most recently added.

Available Functions and Descriptions
====================================

nodequeue_node_titles($qid, $title = '', $backward = true, $from = 0, $count = 0)
    Display a title list of the queue. If backward is true (the default) the
    list will be from back (newest) to front (oldest).

nodequeue_nodes($qid, $backward = true, $teasers = true, $links = true, 
         $from = 0, $count = 0) 
    Display the nodes of a queue. If backward is true (the default) the
    list will be from back (newest) to front (oldest). If $count
    is set to non-zero, it will use a range. For example, passing 
    $from = 2 and $count = 2 will show the 3rd and 4th elements of
    the queue. ($count starts at 0, not 1.)

    if $teasers is true, the node teaser will be shown; otherwise the full
    node will be shown.

nodequeue_fetch_front($qid, $teasers = true, $links = true) 
    Fetch the node at the front of the queue.

nodequeue_fetch_back($qid, $teasers = true, $links = true) 
    Fetch the node at the back of the queue.

function nodequeue_fetch_random($qid, $teasers = true, $links = true) 
    Fetch a random node from the queue

Actions Module Integration
==========================

The node queue module provides two actions, so that workflow can add and
remove items from queues.



File

README.txt
View source
  1. The Node Queue module allows an administrator to arbitrarily put nodes in a
  2. group for some purpose; examples of this might be to highlight one particular
  3. node, as in a typical news site's Lead Article. Another use might be to create
  4. a block listing teasers for 5 forum posts that the admin thinks are important.
  5. Another use might be to create a group of nodes, and then have a block or the
  6. front page offer one of these randomly.
  7. Queues can be set to allow only certain types of nodes to be added to the
  8. queue. Queue can be a fixed size or of infinite length. And the admin can
  9. select which roles have permission to add nodes to a given queue.
  10. Once a queue is set up, a new tab will appear on eligible nodes for eligible
  11. users. This tab will allow the user--regardless of edit permissions--to add or
  12. remove that node from the queue. Queue admins can view the nodes in the queue,
  13. and can modify the order of items already in the queue. Items may also appear
  14. in a nodes links area to add/remove them from the queue.
  15. When a node is added to the queue, it is added to the back of the queue. If a
  16. queue is full when a node is added, the front of the queue is removed.
  17. Nodequeue has support for nodes with i18n Internationalizations.
  18. You must install the Translation Helpers module from http://drupal.org/project/translation_helpers to use this functionality.
  19. It is highly recommended that you use the Views module to display your queues.
  20. However, if you choose not to, here is an alternative: Writing a PHP snippet.
  21. To Create a Block to Display Node Titles of a Queue
  22. ===================================================
  23. You'll need the Queue ID, which is easily extracted from the URL on the
  24. queue administration page.
  25. Create a new block, and insert the following PHP snippet into the block:
  26. If you want this queue to be printed in the reverse order, you can tell it
  27. to print backward:
  28. The '' in the line above is an optional title field. Feel free to put
  29. something here, but it's not terribly necessary in a block.
  30. To Create a Page to Display Node Teasers of a Queue
  31. ===================================================
  32. Like above, you'll need the Queue ID.
  33. Create a new page (or a new dashboard!) or any node type you like, really,
  34. and set the input filter to PHP. Insert the following PHP snippet:
  35. There are a few more options available here; changing the order of the nodes,
  36. whether or not to use teasers or full nodes, whether or not to display the
  37. links, and how much of the queue to display. See below.
  38. To Show Just The First or Last Element of a Queue
  39. =================================================
  40. Starting with the examples above, but use the following:
  41. or
  42. Remember that the front of the queue will have the least recently added
  43. nodes (unless it was rearranged manually), and the back will have the
  44. most recently added.
  45. Available Functions and Descriptions
  46. ====================================
  47. nodequeue_node_titles($qid, $title = '', $backward = true, $from = 0, $count = 0)
  48. Display a title list of the queue. If backward is true (the default) the
  49. list will be from back (newest) to front (oldest).
  50. nodequeue_nodes($qid, $backward = true, $teasers = true, $links = true,
  51. $from = 0, $count = 0)
  52. Display the nodes of a queue. If backward is true (the default) the
  53. list will be from back (newest) to front (oldest). If $count
  54. is set to non-zero, it will use a range. For example, passing
  55. $from = 2 and $count = 2 will show the 3rd and 4th elements of
  56. the queue. ($count starts at 0, not 1.)
  57. if $teasers is true, the node teaser will be shown; otherwise the full
  58. node will be shown.
  59. nodequeue_fetch_front($qid, $teasers = true, $links = true)
  60. Fetch the node at the front of the queue.
  61. nodequeue_fetch_back($qid, $teasers = true, $links = true)
  62. Fetch the node at the back of the queue.
  63. function nodequeue_fetch_random($qid, $teasers = true, $links = true)
  64. Fetch a random node from the queue
  65. Actions Module Integration
  66. ==========================
  67. The node queue module provides two actions, so that workflow can add and
  68. remove items from queues.