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

Adding Multiple Forum Nodes

Discussion in 'XenForo Questions and Support' started by v7web, Apr 22, 2011.

  1. v7web

    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
     
  2. v7web

    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);
     
  3. Brogan

    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.
     
  4. v7web

    v7web Active Member

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

Share This Page