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

Force Unselectable Style Change 1.0.0

Corrects the XF user table to contain proper style information

  1. Snog

    Snog Well-Known Member

    Snog submitted a new resource:

    Force Unselectable Style Change - Corrects the XF user table to contain proper style information

    Read more about this resource...
  2. karll

    karll Well-Known Member

    When does this add-on run? I didn't notice any cron entries in the ACP ...
  3. Snog

    Snog Well-Known Member

    It runs when you change the default style, or mark a style as unselectable in the admin area.
  4. karll

    karll Well-Known Member

    Well, this add-on doesn't work for me, unfortunately. I have 10 selectable styles, and my xf_user table has 13 distinct style_ids (including style_id 0 which I understand means the default style). I've briefly changed which is the default style, but the 13 distinct style_ids stay unchanged.
  5. Snog

    Snog Well-Known Member

    The only way it will change all user's styles is as described in the add-on description....

    Just changing the default style and not marking the others as unselectable will not change all user's styles.
  6. karll

    karll Well-Known Member

    I forgot to mention: I already have 7 unselectable styles.

    So is there something I'm misunderstanding or is there an issue with the add-on? (I see no errors neither in my web server error log nor in the XF error log.)
  7. Snog

    Snog Well-Known Member

    I just went through all of the style combinations I can think of and the add-on works properly.

    The way the add-on works is if you have style ID 12 marked as the default style and say 100 users are using style ID 10. You decide style ID 10 is no longer selectable. When you uncheck 'Allow User Selection' for style ID 10, then the 100 users are switched to style ID 12.

    If you already have styles that are not selectable but possibly being used by some members, you need to toggle them as selectable and then again as unselectable to clear them out.

    The easy way to switch all members to a new style...
    1) Take your site offline (admin->options->board active)
    2) Mark all styles as selectable
    3) Choose the default style you want everyone to use
    4) Mark all styles, except your default style, as unselectable (this is what sets the new style for everyone)
    5) Mark all styles you want a user to be able to change to as selectable
    6) Put your site back online.

    At this point the style_id for all members should be either 0 or the style ID for your new default style.
    Last edited: Aug 6, 2015
    Cyb3r and karll like this.
  8. karll

    karll Well-Known Member

    Thank you for the explanation - this works! I toggled all the unselectable styles (from unselectable to selectable and back again), and now the style_ids in the database have been updated.
    Snog likes this.
  9. Cyb3r

    Cyb3r Well-Known Member

    Work like a charm!
    Snog likes this.

Share This Page