• Extensions
  • FriendsOfFlarum Default User Preferences

Hi,
I have install and enable this extension, But I dont now where can I set setting?

    hamedkouhfallah there are none in the Admin CP 🙂 these just turn the following Notifications on/enabled/checked ✅ by default in a user's personal forum settings when users join your forum rather than the default which is set to off/disabled/crossed out ❌


    Default Notification Settings for Email

    a year later

    0.3.0

    • beta 14 compatible
    Updating
    composer require fof/default-user-preferences:^0.3.0
    php flarum cache:clear
    6 days later

    0.3.1

    • Updated meta ready for beta 15 (no code/functionality change)
    • Compatible with beta 14 and up
    Updating
    composer require fof/default-user-preferences:^0.3.1
    17 days later

    Gatsu Even if you do not use this extension, and a user enables email notifications manually for mentions/replies, the PrettyMail templates for those actions would still be used.. this extension just enables those notifications for users by default in their preferences.

    So yes it does work with, but they are not related. One changes default notification behaviour for a user for replies and mentions, the other is used for email notification templates. PrettyMail is restricted to a few different types of email templates (default, subscription/new post, mentioned user, mentioned post).

    3 months later

    0.4.0

    • Beta 16
    Updating
    composer require fof/default-user-preferences:"*"
      a month later

      Bishwas-py it's not configurable. It enables everything for new users.

      I think that for existing users, it depends if they ever changed the default settings before. If they didn't, it will apply to them as well, but if they changed their settings before, their settings will stay.

      [deleted] if what I describe in my post above isn't correct, it should be easy enough to try on a test forum.

      25 days later
      a month later

      This is great. We have a lot of users who don't realise they're being tagged in posts, because they're not actively checking the forum themselves. When they don't see any emails, they assume there's no activity that warrants their attention.

      Is there a simple way for me to alter this to iterate through the existing users on the forum, also? Looking at the code, it doesn't look like it should be too difficult - but I don't know where to look in the documentation to give this a go myself.

      https://github.com/FriendsOfFlarum/default-user-preferences/blob/master/extend.php

      • ctml replied to this.

        troymccann Might be easier to just replace everyones user settings in the db directly with the default you want, and then after that people can customize and new users get the defaults.

          ctml I was looking into that. Where are they in the database? Closest I could see was preferences stored in a binary blob?

          • ctml replied to this.

            troymccann yeah exactly you got it, the preferences column in the users table. The simplest solution would probably to just set the defaults you'd like on your own profile via the flarum GUI and then run a simple UPDATE to set everyone elses to that. Of course that would overwrite any preferences currently set by the users, but they can always go back and disable them again if needed.

            UPDATE users
            SET preferences = (SELECT preferences FROM users WHERE username = 'troymccann')
            WHERE username != 'troymccann'

              ctml Great idea! Thanks for the tip. 👏

              ctml Of course that would overwrite any preferences currently set by the users, but they can always go back and disable them again if needed.

              Yes, that's my thinking, I wouldn't usually be inclined to alter everyone's personal preferences, if it wasn't for so many of our users commenting that they're missing posts and expecting email notifications but haven't worked out how to set them themselves! I've got a growing push for our community to be moved to Slack, but this should settle things down until I can work out a true push notification solution.

              FYI, if anyone needs to do something similar, you can't run a SQL query within a table that you're updating. There's a cheeky workaround as follows:

              UPDATE users
              SET preferences = (SELECT * FROM (SELECT preferences FROM users WHERE username = 'troymccann') as t)
              WHERE username != 'troymccann'
                5 days later

                I have the opposite problem 😅

                Now, by default in Flarum when new user register, the Email Notification with "someone posts in a discussion I´m following" is active. In my case I prefer it to be disabled by default (only the part for Email). I find it too invasive and spend some resources sending emails. If the user requires it, I prefer that he activate it himself

                I think I remember that someone user create a small extension to leave this option by default deactivated for new users.
                I've looked for it but I can't find it. Someone remember?
                or I may have dreamed it? 😆

                Thanks!

                  4 months later

                  troymccann
                  Looks like this statement is just for a single user. How would I update all users?

                  UPDATE users
                  SET preferences = (SELECT * FROM (SELECT preferences FROM users WHERE username = 'troymccann') as t)
                  WHERE username != 'troymccann'

                    lmx This should take your user preferences and set it to everyone else. The username != 'troymccann' condition makes sure all users except troymccann are selected.

                    • lmx replied to this.
                    • lmx likes this.