Announcement

Collapse
No announcement yet.

Default forum subscriptions for new (or existing) users?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default forum subscriptions for new (or existing) users?

    I would like to give a bunch of users default subscriptions to certain forums (either automatically directly when the user accounts are created, or with some operation performed from the AdminCP by me for the users after they already exist). Is this possible?

    Otherwise, could you possibly guide me to some nice SQL command that I can execute in the AdminCP to subscribe a certain UserID to a certain ForumID?

  • #2
    You can set some defaults in the AdminCP under Settings -> Options -> User Registration Options. However, Subscription is designed to be an opt-in feature. There is no way to manually subscribe users to different channels or content built into the system.

    TO build something out of your own, a query would look like this:

    Code:
    INSERT INTO `subscribediscussion` (`userid`, discussionid, emailupdate) VALUES ({userid},{nodeid},1);
    • {userid} equals the numerical ID of the user.
    • {nodeid} equals the numerical ID of the forum/channel.

    Both of these values are listed in the AdminCP when editing the object. Users -> User Search for users. Channel Management -> Channel Manager for forums.

    After running queries, you will need to clear your cache. You can do this in the AdminCP under Maintenance.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Ok, thanks a lot for the SQL query!

      And just to confirm then, you mean that the query is identical no matter if a discussion or a forum is being subscribed to? (that is, a forum ID and a discussion ID can never "collide"?)

      Comment


      • #4
        Everything comes down to a nodeid in vBulletin 5. Forums, Topics, Replies, Blogs, Comments, Social Groups, Articles, etc...
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          Great, thanks!

          Comment


          • #6
            I tried this now, but the user didn'g get any email when I made a post to a forum that I subscribed by means of this SQL query (I also verified that it was actually added to that table).

            Could there be a delay before the email is sent out? (the forum is not live yet, so there is no activity except from my test user, if it would be that case that the emails are somehow sent out during executions of later forum visitor hits)

            Also, what does the "emailupdate" in that table column mean? All previous subscriptions in that table (which have been added by the normal subscription mechanisms from inside vBulletin) had a zero in that column, but your query added a one (1), and emails have indeed been sent out for those previous subscriptions during my tests?

            (and yes, I cleared the cache from the AdminCP before making my post in the forum that I subscribed the user to by means of the SQL query)

            Comment


            • #7
              Ok, the email arrived later, so I assume it was queued up internally in vBulletin somehow then.

              I'm still very interested in what the "emailupdate" column in that table does though?!

              PS.
              What I really need is to subscribe all members of a certain usergroup to a certain forum, and they´re quite many, so you wouldn't by any chance be able to offer a working SQL query for this too? That would be so awesome, and highly appreciated!

              Comment


              • #8
                Originally posted by Wayne Luke View Post
                TO build something out of your own, a query would look like this:

                Code:
                INSERT INTO `subscribediscussion` (`userid`, discussionid, emailupdate) VALUES ({userid},{nodeid},1);
                • {userid} equals the numerical ID of the user.
                • {nodeid} equals the numerical ID of the forum/channel.
                Just a little bump here.

                Could you please let me know what the "emailupdate" column in the table in question (subscribediscussion) does?

                You instructed me above to set it to 1, while all "normal" subscriptions registered through the normal vBulletin GUI by the users themselves seem to set it to 0 instead?

                Comment


                • #9
                  It sets the initial flag so they get email updates. If they subscribe directly, it will use the setting they chose in their User Settings. Users can choose to get notifications but not get email updates. Personally, I think email notifications are overkill so I have them turned off on every vBulletin site that I visit. Though, I personally loathe email altogether and if the technology disappeared then I wouldn't miss it.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API - Full / Mobile
                  Vote for your favorite feature requests and the bugs you want to see fixed.

                  Comment


                  • vbSuperfan
                    vbSuperfan commented
                    Editing a comment
                    Thanks a lot for this technical explanation - this is exactly what I was after!

                Related Topics

                Collapse

                Working...
                X