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

Query to create a forum

Lu Jia

Active member
#1
PHP:
$db->query("INSERT INTO `xf_node` (`title`, `description`, `node_name`, `node_type_id`,    `parent_node_id`, `display_order`, `display_in_list`, `lft`, `rgt`, `depth`, `style_id`, `effective_style_id`) VALUES (...);");
What sould I put in the column 'lft' and 'rgt'?
 
R

ragtek

Guest
#2
You shouldn't use a query for this!

Everytime you want to create a new "xenforo element"(user,post,page,forum,thread,etc...) you should use the datawriter for this.
 

SheepCow

Well-known member
#4
Have a look in the ControllerAdmin directory for the way XenForo does it, but basically, you create a DataWriter, set the values and save :)