first import
This commit is contained in:
10
sites/all/modules/nodequeue/help/about.html
Normal file
10
sites/all/modules/nodequeue/help/about.html
Normal file
@@ -0,0 +1,10 @@
|
||||
The Nodequeue module allows an administrator or site editor 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.
|
||||
|
||||
<div class="clear-block"><a href="path:screenshot-lg.png"><img class="help-box help-right" src="path:screenshot-sm.png" /></a>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 <strong>back</strong> of the queue. If a queue is full when a node is added, the <strong>front</strong> of the queue is removed. In listings, the first item is the front and the last item is the back.
|
||||
|
||||
The queue administration page allows the administrator or site editor to arrange the queue in whatever order is suitable. There are 5 buttons for each entry; move up one, move to top (front), move down one, move to bottom, and remove from queue. Nodes may be added to the queue here using the autocomplete (in addition to the links and nodequeue tab) and there are various buttons to shuffle and clear the queue.
|
||||
</div>
|
77
sites/all/modules/nodequeue/help/api.html
Normal file
77
sites/all/modules/nodequeue/help/api.html
Normal file
@@ -0,0 +1,77 @@
|
||||
Various API functions can be used as PHP snippets to include nodequeue functionality without Views. These are not nearly as powerful as simply using Nodequeue with Views, but they are available. Mostly these are leftover from older versions of nodequeue and they have not really been updated for Nodequeue 2.
|
||||
|
||||
<h2>To create a block to display node titles of a queue</h2>
|
||||
|
||||
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:
|
||||
|
||||
<pre>
|
||||
<?php print nodequeue_node_titles(QUEUEID); ?>
|
||||
</pre>
|
||||
|
||||
If you want this queue to be printed in the reverse order, you can tell it
|
||||
to print backward:
|
||||
|
||||
<pre>
|
||||
<?php print nodequeue_node_titles(QUEUEID, '', true); ?>
|
||||
</pre>
|
||||
|
||||
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.
|
||||
|
||||
<h2>To create a page to display node teasers of a queue</h2>
|
||||
|
||||
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:
|
||||
|
||||
<pre>
|
||||
<?php print nodequeue_nodes(QUEUEID); ?>
|
||||
</pre>
|
||||
|
||||
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.
|
||||
|
||||
<h2>To show just the first or last element of a queue</h2>
|
||||
|
||||
Starting with the examples above, but use the following:
|
||||
|
||||
<pre>
|
||||
<?php print nodequeue_fetch_front(QUEUEID); ?>
|
||||
</pre>
|
||||
|
||||
or
|
||||
|
||||
<pre>
|
||||
<?php print nodequeue_fetch_back(QUEUEID); ?>
|
||||
</pre>
|
||||
|
||||
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.
|
||||
|
||||
<h2>Available functions and descriptions</h2>
|
||||
|
||||
<dl>
|
||||
<dt><strong>nodequeue_node_titles($qid, $title = '', $backward = true, $from = 0, $count = 0)</strong></dt>
|
||||
<dd>Display a title list of the queue. If backward is true (the default) the list will be from back (newest) to front (oldest).</dd>
|
||||
|
||||
<dt><strong>nodequeue_nodes($qid, $backward = true, $teasers = true, $links = true, $from = 0, $count = 0)</strong></dt>
|
||||
<dd>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.</dd>
|
||||
|
||||
<dt><strong>nodequeue_fetch_front($qid, $teasers = true, $links = true) </strong></dt>
|
||||
<dd> Fetch the node at the front of the queue.</dd>
|
||||
|
||||
<dt><strong>nodequeue_fetch_back($qid, $teasers = true, $links = true) </strong></dt>
|
||||
<dd> Fetch the node at the back of the queue.</dd>
|
||||
|
||||
<dt><strong>function nodequeue_fetch_random($qid, $teasers = true, $links = true) </strong></dt>
|
||||
<dd> Fetch a random node from the queue</dd>
|
||||
</dl>
|
||||
|
12
sites/all/modules/nodequeue/help/nodequeue.help.ini
Normal file
12
sites/all/modules/nodequeue/help/nodequeue.help.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
[advanced help settings]
|
||||
line break = TRUE
|
||||
|
||||
[about]
|
||||
title = About nodequeue
|
||||
|
||||
[smartqueue]
|
||||
title = Smartqueues
|
||||
|
||||
[api]
|
||||
title = Nodequeue API
|
||||
weight = 10
|
BIN
sites/all/modules/nodequeue/help/screenshot-lg.png
Normal file
BIN
sites/all/modules/nodequeue/help/screenshot-lg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 226 KiB |
BIN
sites/all/modules/nodequeue/help/screenshot-sm.png
Normal file
BIN
sites/all/modules/nodequeue/help/screenshot-sm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
65
sites/all/modules/nodequeue/help/smartqueue.html
Normal file
65
sites/all/modules/nodequeue/help/smartqueue.html
Normal file
@@ -0,0 +1,65 @@
|
||||
Smartqueues are a collection of subqueues wrapped up into a single queue; each subqueue within a smartqueue has some special attachment. For example, taxonomy smartqueues are attached to terms; nodes with a specific term can only be added to subqueues that match that term.
|
||||
|
||||
What this means is that if you have a taxonomy vocabulary named 'fruit', and in that vocabulary you have the terms 'apple', 'orange' and 'banana that you can create a taxonomy smartqueue associated with this vocabulary. A node tagged 'apple' will only be eligible to be added to the 'apple' subqueue. You could call this queue "Top %subqueues" and each taxonomy term will have its own top ten list. Each node will still only have a manageable number of queues listed on its nodequeue tab or on the links page.
|
||||
|
||||
Each kind of smartqueue will have its own rules; the form for creating that smartqueue should give you enough information to do so.
|
||||
|
||||
Smartqueue modules can be implemented with a fairly small amount of code; they might have to define an extra table to store information.
|
||||
|
||||
<h2>Smartqueue API</h2>
|
||||
|
||||
These are the hooks that a smartqueue module can use to implement.
|
||||
|
||||
Smartqueues should use the 'reference' field of the subqueue to determine what that particular subqueue is attached to, if at all possible.
|
||||
<dl>
|
||||
<dt><strong>hook_nodequeue_info()</strong></dt>
|
||||
<dd>Collect info about all of the possible nodequeue types from owning modules. Returns an array; the key is the name of the 'module' for hook calls. The value is another array, which contains a 'title' and a 'description' for administrative purposes.</dd>
|
||||
|
||||
<dt><strong>hook_nodequeue_form($queue, &$form)</strong></dt>
|
||||
<dd>Send the nodequeue edit form to the owning module for modification. This allows the smartqueue to modify the edit form to add additional fields or hide fields that are not appropriate.
|
||||
|
||||
$queue: The queue being edited.
|
||||
&$form: The form. This may be modified.
|
||||
</dd>
|
||||
|
||||
<dt><strong>hook_nodequeue_form_validate($queue, &$form_state, &$form)</strong></dt>
|
||||
<dd>Validate the nodequeue edit form.
|
||||
|
||||
$queue: The queue being edited.
|
||||
$form_state: The form state, which includes ['values'].
|
||||
&$form: The actual form object. This may be modified.
|
||||
</dd>
|
||||
|
||||
<dt><strong>hook_nodequeue_form_submit(&$queue, &$form_state)</strong></dt>
|
||||
<dd>Send the nodequeue edit form to the owning module upon submit.
|
||||
|
||||
&$queue: The queue being edited. This may be modified prior to being saved.
|
||||
$form_state: The form state, including the values.
|
||||
</dd>
|
||||
|
||||
<dt><strong>hook_nodequeue_form_submit_finish($queue, &$form_state)</strong></dt>
|
||||
<dd>Send the nodequeue edit form to the owning module after the queue has been saved. This is the only form state where you can be assured that the queue being edited will have a qid.
|
||||
|
||||
&$queue: The queue being edited. This may be modified prior to being saved.
|
||||
$form_state: The form state, including the values that were submitted.
|
||||
</dd>
|
||||
|
||||
<dt><strong>hook_nodequeue_subqueues(&$queue, $node)</strong></dt>
|
||||
<dd>Fetch a list of subqueues that are valid for this node from the owning module. This is where the smartqueue module is likely to do the most work, since it has to determine which subqueues to display to a user here. This function is also responsible for creating smartqueues as they are needed.
|
||||
|
||||
$queue: The queue to check.
|
||||
$node: The loaded node object being checked.
|
||||
|
||||
return: An array of subqueues. This will be keyed by $sqid.
|
||||
</dd>
|
||||
|
||||
<dt><strong>hook_nodequeue_autocomplete($queue, $subqueue, $string)</strong></dt>
|
||||
<dd>Fetch a list of nodes available to a given subqueue for autocomplete used on the queue arrange page.
|
||||
|
||||
$queue: The queue that owns the subqueue
|
||||
$subqueue: The subqueue to check
|
||||
$string: The string being matched.
|
||||
|
||||
return: An keyed array of nodes in the form $nid => $title, with a maximum of 10.
|
||||
</dd>
|
||||
</dl>
|
Reference in New Issue
Block a user