Re: A way to copy forums

Posted:
Fri Feb 09, 2007 7:36 pm
Author: Helter
you can copy/paste and edit them and insert them directly into your db via phpmyadmin
example
make all your catagories first. Export your table "phpbb_catagories" to get the catagory id #
In this example, I have two catagory's. The catagory id #'s are the second #'s after "VALUES" youll have to edit the catagory and forum id #'s, forum names, etc...
Be sure to first export your original phpbb_forums, in case of an error. When your done, go to acp and resync the forums to add the new forum info to def_tree.php
- Code: Select all
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);INSERT INTO `phpbb_forums` VALUES (2, 1, 'Test Forum 2', '', 0, 30, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);INSERT INTO `phpbb_forums` VALUES (3, 2, 'Test Forum 1', '', 0, 50, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);INSERT INTO `phpbb_forums` VALUES (4, 2, 'Test Forum 2', '', 0, 60, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
VALUES
[table]
[mrow color=#81A7E8]Field[mcol color=#81A7E8]type[mcol color=#81A7E8]Collation[mcol color=#81A7E8]attributes[mcol color=#81A7E8]Null[mcol color=#81A7E8]Default
[row][col][col][col][col][col]
[row]forum_id[col]smallint(5)[col][col]UNSIGNED[col]No[col]0
[row]cat_id[col]mediumint(8)[col][col]UNSIGNED[col]No[col]0
[row]forum_name[col]varchar(150)[col]latin1_swedish_ci[col][col]Yes[col]NULL
[row]forum_desc[col]text[col]latin1_swedish_ci[col][col]Yes[col]NULL
[row]forum_status[col]tinyint(4)[col][col][col]No[col]0
[row]forum_order[col]mediumint(8)[col][col]UNSIGNED[col]No[col]1
[row]forum_posts[col]mediumint(8)[col][col]UNSIGNED[col]NO[col]0
[row]forum_topics[col]mediumint(8)[col][col]UNSIGNED[col]No[col]0
[row]forum_last_post_id[col]mediumint(8)[col][col]UNSIGNED[col]No[col]0
[row]prune_next[col]int(11)[col][col][col]Yes[col]NULL
[row]prune_enable[col]tinyint(1)[col][col][col]No[col]0
[row]auth_view[col]tinyint(2)[col][col][col]No[col]0
[row]auth_read[col]tinyint(2)[col][col][col]No[col]0
[row]auth_post[col]tinyint(2)[col][col][col]No[col]0
[row]auth_reply[col]tinyint(2)[col][col][col]No[col]0
[row]auth_edit[col]tinyint(2)[col][col][col]No[col]0
[row]auth_delete[col]tinyint(2)[col][col][col]No[col]0
[row]auth_sticky[col]tinyint(2)[col][col][col]No[col]0
[row]auth_announce[col]tinyint(2)[col][col][col]No[col]0
[row]auth_global_announce[col]tinyint(2)[col][col][col]No[col]0
[row]auth_vote[col]tinyint(2)[col][col][col]No[col]0
[row]auth_pollcreate[col]tinyint(2)[col][col][col]No[col]0
[row]auth_attachments[col]tinyint(2)[col][col][col]No[col]0
[row]auth_download[col]tinyint(2)[col][col][col]No[col]0
[row]auth_news[col]tinyint(2)[col][col][col]No[col]2
[row]forum_link[col]varchar(255)[col]latin1_swedish_ci[col][col]Yes[col]NULL
[row]forum_link_internal[col]tinyint(1)[col][col][col]No[col]0
[row]forum_link_hit_count[col]tinyint(1)[col][col][col]No[col]0
[row]forum_link_hit[col]bigint(20)[col][col]UNSIGNED[col]No[col]0
[row]icon[col]varchar(255)[col]latin1_swedish_ci[col][col]Yes[col]NULL
[row]main_type[col]char(1)[col]atin1_swedish_ci[col][col]Yes[col]NULL
[row]auth_cal[col]tinyint(2)[col][col][col]No[col]0
[row]auth_ban[col]tinyint(2)[col][col][col]No[col]3
[row]auth_greencard[col]tinyint(2)[col][col][col]No[col]5
[row]auth_bluecard[col]tinyint(2)[col][col][col]No[col]1
[row]auth_delayedpost[col]tinyint(4)[col][col][col]No[col]3
[/table]
Re: A way to copy forums

Posted:
Wed Feb 21, 2007 12:28 am
Author: Helter
this is the first of the 4 forum codes I posted
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
most of these fields will remain the same for your purposes. The ones youll have to edit are the first 3 or 4 and the 6th
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
the fields are described in the lower section of the post
ie... INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
this is the forum id. You will need to increment this by one for every forum
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
this is the catagory id. You can get the catagory id by looking in phpbb_catagories in your db
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
this is your forum name
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
forum de.scription goes here if you have one
INSERT INTO `phpbb_forums` VALUES (1, 1, 'Test Forum 1', '', 0, 20, 0, 0, 0, NULL, 0, 0, 0, 1, 1, 1, 1, 3, 3, 5, 1, 1, 3, 0, 3, '', 0, 0, 0, '', 'c', 3, 3, 5, 1, 3);
forum order. Increment by 10 for every forum