Announcement

Collapse
No announcement yet.

Help with SQL Queries to set Forum Subscriptions

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

  • Help with SQL Queries to set Forum Subscriptions

    Can someone help me with the SQL Queries I would need in order to set a Forum Subscription (I need to know how to do both Daily and Weekly Digest) for a specific SubForum for an entire UserGroup?

    In addition - is there any easy way to do the above, but where we're setting Subscriptions for All SubForums that each user in that UserGroup has access to?


    Or should I be asking this in the SQL SubForum?


    TIA!
    echo $ocean_signature;

    ;)

  • #2
    Subscriptions are added on a user basis, not a group basis. To subscribe an entire group to a forum you would need to run an INSERT query for each user in the group:

    INSERT INTO subscribeforum (userid, forumid, emailupdate) VALUES ('userid of user', 'forumid', '1 or 0')");

    If you use table prefixes then you need to change subscribeforum to include the prefix.

    If you want to automate this process so you don't have to run a bunch of individual queries, then you will need a custom script. For help with this I recommend you post on www.vbulletin.org , the official vB hacking site.

    An alternative would be to modify the files or make a custom scheduled task to send out email notifications to everyone. This would probably be easier to manage than a bunch of individual subscriptions. This is also a www.vbulletin.org thing.

    Comment


    • #3
      Originally posted by Jake Bunce
      Subscriptions are added on a user basis, not a group basis. To subscribe an entire group to a forum you would need to run an INSERT query for each user in the group:

      INSERT INTO subscribeforum (userid, forumid, emailupdate) VALUES ('userid of user', 'forumid', '1 or 0')");
      Ah. Okay then. Well, working on the one-user-at-a-time strategy - the query listed above seems to show the "emailupdate" value as either being on or off. What controls whether it's set to Daily or Weekly Digest?
      echo $ocean_signature;

      ;)

      Comment


      • #4
        It looks like:

        0 = no email
        1 = instant update
        2 = daily
        3 = weekly

        Comment


        • #5
          Thanks, Jake! I'll give it a shot.
          echo $ocean_signature;

          ;)

          Comment

          Loading...
          Working...
          X