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

Changing style IDs

Discussion in 'Troubleshooting and Problems' started by faeronsayn, Dec 10, 2011.

  1. faeronsayn

    faeronsayn Well-Known Member

    Okay I just decided to customize a theme and use it for a part of my forum, which forces users to default to my theme. So the one that I previously had is going to be switched with the one that I have customized. Problem is this, I have a lot of subforums in that section and I am not planning on going to each one and changing the style from there.

    Is it somehow possible to switch the Style ID's so my new theme is now default for that whole section because it has the same style ID as my old one? Is that possible?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Try this:

    UPDATE xf_node
    SET style_id = 3
    WHERE style_id = 2;
    UPDATE xf_node
    SET effective_style_id = 3
    WHERE effective_style_id = 2
    So 2 is the existing style and 3 is the style you want to change it to.

    Take a backup of that table first, just in case.
  3. faeronsayn

    faeronsayn Well-Known Member

    We don't need to specify which node we want to change the style ID of ? Or does it just look for a node that has a style ID of 2 and changes it to 3 ?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The latter.

    Any node which currently has a style ID of 2 will be changed to 3.

Share This Page