How can I change forum ID?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • user 1-2-3
    Senior Member
    • Oct 2002
    • 210
    • 4.2.x

    How can I change forum ID?

    For example I want change /forum/forumdisplay.php?f=2 to /forum/forumdisplay.php?f=1

    Shall I just change a forumid field in forum table or somewhere else? Now "f=1" is empty and shows "Invalid Forum specified. If you followed a valid link, please notify the administrator" when accessed.
  • NKBlaze
    Senior Member
    • Mar 2009
    • 147
    • 3.8.x

    #2
    you can use following sql query to change forumid

    5 = current forumid
    1 = new forumid


    PHP Code:
    Code:
    UPDATE `access` SET `forumid` = '1' WHERE `access`.`forumid` =5;
    UPDATE `announcement` SET `forumid` = '1' WHERE `announcement`.`forumid` =5;
    UPDATE `forum` SET `forumid` = '1' WHERE `forum`.`forumid` =5;
    UPDATE `forumpermission` SET `forumid` = '1' WHERE `forumpermission`.`forumid` =5;
    UPDATE `forumread` SET `forumid` = '1' WHERE `forumread`.`forumid` =5;
    UPDATE `moderator` SET `forumid` = '1' WHERE `moderator`.`forumid` =5;
    UPDATE `moderatorlog` SET `forumid` = '1' WHERE `moderatorlog`.`forumid` =5;
    UPDATE `podcast` SET `forumid` = '1' WHERE `podcast`.`forumid` =5;
    UPDATE `rssfeed` SET `forumid` = '1' WHERE `rssfeed`.`forumid` =5;
    UPDATE `subscribeforum` SET `forumid` = '1' WHERE `subscribeforum`.`forumid` =5;
    UPDATE `tachyforumpost` SET `forumid` = '1' WHERE `tachyforumpost`.`forumid` =5;
    UPDATE `thread` SET `forumid` = '1' WHERE `thread`.`forumid` =5;

    after this absolutely update following counter

    AdminCP > Maintenance > Update Counters > Rebuild Forum Information

    Comment

    • user 1-2-3
      Senior Member
      • Oct 2002
      • 210
      • 4.2.x

      #3
      Many thanks, NKBlaze!

      As I'm going to create new forum (for example ID=15) and immediately change its ID to the one, which is not in use (ID=2), I belive I don't need to run all of this sql queries, except the one with the table "forum".

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...