Lack of interest Select nodetree with nodetype limit

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

ajnos

Member
It would be great if the getNodeDataForListDisplay function would have an extraparameter to limit the nodetypes, so we could use this function also for add-ons, without needing to run this, and then to filter for only the needed nodetypes.

PHP:
    /**
     * Gets all the node data required for a node list display
     * (eg, a forum list) from a given point. Returns 3 pieces of data:
     *     * nodesGrouped - nodes, grouped by parent, with all data integrated
     *  * nodeHandlers - list of node handlers by node type
     *  * nodePermissions - the node permissions passed on
     *
     * @param array|false $parentNode Root node of the tree to display from; false for the entire tree
     * @param integer $displayDepth Number of levels of nodes to display below the root, 0 for all
     * @param array|null $nodePermissions List of node permissions, [node id] => permissions; if null, get's current visitor's permissions
     *
     * @return array Empty, or with keys: nodesGrouped, parentNodeId, nodeHandlers, nodePermissions
     */
    public function getNodeDataForListDisplay($parentNode, $displayDepth, array $nodePermissions = null)
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
We've found also a other scenario why it's important to have this.

If the moderator wants to move an thread, he gets a form with a selectbox with ALL NODES!
If the board have 100 nodes, the form will show 100 nodes and (maybe) only 20 would be forum nodes, which would be usable
Code:
    <dd>
        <select name="node_id" id="ctrl_node_id" class="textCtrl selectForum">
        <xen:foreach loop="$nodeOptions" value="$node">
            <option value="{$node.node_id}" {xen:selected '{$node.node_id} == {$firstThread.node_id}'} {xen:if "{$node.node_type_id} != 'Forum'", 'disabled="disabled"'}>{xen:string repeat, '&nbsp; ', $node.depth}{$node.title}</option>
        </xen:foreach>
        </select>
    </dd>
It would be better, if only forumnodes would be selected and shown.

AS you see on the screenshot, only 2 nodes are forums, all other are article & gallery nodes, where the thread can't be moved, but they are there.
 

Attachments

  • nodes.webp
    nodes.webp
    14.7 KB · Views: 9
Top Bottom