• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Adding Multiple Forum Nodes

v7web

Active member
#1
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
#2
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
#3
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.