Follow Tags Prompt

License Latest Stable Version Total Downloads Donate

Prompt user for tags to follow after registration.

This is a companion extension that requires FriendsOfFlarum Follow Tags to work.

The modal will open for all new or existing users who have not clicked the "Continue" button present in the modal.
If the modal is closed in any other way than the "Continue" button, it will open again on the next page refresh.

The list of tags shown in the modal can be customized.

By default, a button to access the modal is also added to the "Following" page.
This can be disabled in the settings.

The extension also contains two other unrelated features:

  • Ability to make the "Following" page display all discussions without filtering for guests instead of showing an empty page.
  • Ability to make the "Following" page the homepage (under Basics)

Those options are disabled by default.

Installation

composer require clarkwinkelmann/flarum-ext-follow-tags-prompt

Support

This extension is under minimal maintenance.

It was developed for a client and released as open-source for the benefit of the community.
I might publish simple bugfixes or compatibility updates for free.

You can contact me to sponsor additional features or updates.

Support is offered on a "best effort" basis through the Flarum community thread.

Sponsors: Talkie, Andrew MacLean

Links

7 days later

Excellent idea, I always love extensions that encourage users to be more active. Prompting users to follow tags that interest them right after signup is a great way to do just that. I had considered building something into my site (a hack, through DB) to force users to follow a predefine set of tags after sign-up but this is a much better solution. Thanks clark & sponsors!

7 days later

Is there a way to reset the prompt for all users so it shows again on their next login? I tried looking through the DB to find a table or column where a flag might be stored, could have easily missed it though. For example if you do an overhaul over your tagging by adding/removing, perhaps I may want to re-prompt them (rarely, but on occasion).

    If you set your home page to another supported page (such as tags or blog), the prompt won't ever come up unless you happen to refresh while on /all. Not a huge deal but just something I noticed once I changed my homepage.

      ctml this is intentional behavior. The modal only opens on the IndexPage component https://github.com/clarkwinkelmann/flarum-ext-follow-tags-prompt/blob/0.2.0/js/src/forum/openAutomaticModal.js#L18

      I think this was copied from the way fof/terms does it. This is to prevent the modal opening unexpectedly when directly accessing a discussion or profile.

      But since it will always open after registration and doesn't have a banner at the top of the screen, I guess I could change the behavior to open on any page. If someone wants to sponsor a batch of changes I can include that in there.

      • ctml replied to this.
        7 days later

        Hmm. Just trying this out now to prompt users with access to a hidden tag to follow it. For users who can't see that tag, the prompt loads each time they sign in, and there's (rightfully) no options available to them.

        Is there a way to make it not show if there are no options for a user to follow?

          troymccann you mean the forum only has one hidden tag, and no other tags?

          I suppose I could add a check for the number of tags on the forum before opening the modal.

            clarkwinkelmann No there are lots of tags. Some are hidden. In the setting's for this, though, I've told it to only work with one tag - which happens to be a hidden tag.

            a month later

            I don't fully understand what the "Show all discussions on the Following page for guests" do, since any guest can't see the Following page link 🤔

              enricodx that's for when the Following page is set as homepage, which this extension also allows doing.

              Otherwise it doesn't make much sense indeed.

                3 months later

                Version 1.0.0

                Added compatibility with Flarum 1.0+

                Don't forget to set the extension version constraint to * or ^1.0 in your composer.json file before updating Flarum (as explained in Flarum's own upgrade guide)

                Update sponsored by my GitHub Sponsors. Thanks for the support!

                9 months later

                HasanMerkit does the screenshot show the full viewport or does the modal appear like that on all screens including desktop computers? How many tags are listed in the modal?

                If it is the full viewport, are there devices where this is likely to happen? Is it a mobile phone in landscape orientation?

                  clarkwinkelmann not happened after adding more tags.
                  1920x1080 resolution on Windows. (Latest Google Chrome)

                  May be required test with 1 tag website.