Adding Multiple Forum Nodes

v7web

Active member
Hi,
Does anyone know the best way to add multiple forum nodes? I have around 70 to add which will take me forever via the "create new node" method. Any of you sql experts out there know code/format to do this in one hit?
Thanks
 

v7web

Active member
No worries, I worked out how to do it myself.
Code:
INSERT INTO `xf_node` (`node_id`, `title`, `description`, `node_name`, `node_type_id`, `parent_node_id`, `display_order`, `display_in_list`, `lft`, `rgt`, `depth`, `style_id`, `effective_style_id`) VALUES

(9, 'title', 'description', 'node-name', 'Forum', 3, 1, 1, 16, 17, 1, 0, 0);
 

Brogan

XenForo moderator
Staff member
The xf_node table uses nested sets so are you sure you used the correct values for lft and rgt?

Not to mention the knock on effect on the other nodes.
 

v7web

Active member
Yep, I increased each lft and rgt value as required for every new node. All appears fine.
 
Top