Announcement

Collapse
No announcement yet.

Determining Who is Subscribed to a Forum

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

  • ShannonA
    replied
    Got it & I think we solved the problem. Thanks much.

    Leave a comment:


  • Wayne Luke
    replied
    The value would vary on upgrades. That is for a new install. You would have to look at your contenttype table and determine which one is the channel.

    select * from contenttype where class='Channel'



    Leave a comment:


  • ShannonA
    replied
    Originally posted by Wayne Luke View Post
    The subscribeforum table isn't a vBulletin 5 table. It would have been held over from a previous version. Though, it should have been deleted during normal upgrade processes.

    All subscriptions are actually held in the subscribediscussion table. Behind the scenes, there is little difference between a topic node and a channel node. As such, the system doesn't need multiple tables to hold this information. To get a listing of who is subscribed to what channel, you would have to query this table, join in the User table and restrict nodes from the node table based on their content type equalling the Channel content type (contenttype table). On a new install, this query will look like this:
    Code:
    select s.userid, u.username, s.discussionid, n.title from `subscribediscussion` as s
    left join `user` as u on (s.userid=u.userid)
    left join `node` as n on (s.discussionid = n.nodeid)
    where n.nodeid in (select nodeid from `node` where contenttypeid=23)
    If you know the specific channel, you can restrict n.nodeid to that channel in the WHERE clause.
    We don't seem to have a contenttypeid=23 but that otherwise provides a rational search. Thanks!

    Leave a comment:


  • Wayne Luke
    replied
    The subscribeforum table isn't a vBulletin 5 table. It would have been held over from a previous version. Though, it should have been deleted during normal upgrade processes.

    All subscriptions are actually held in the subscribediscussion table. Behind the scenes, there is little difference between a topic node and a channel node. As such, the system doesn't need multiple tables to hold this information. To get a listing of who is subscribed to what channel, you would have to query this table, join in the User table and restrict nodes from the node table based on their content type equalling the Channel content type (contenttype table). On a new install, this query will look like this:
    Code:
    select s.userid, u.username, s.discussionid, n.title from `subscribediscussion` as s
        left join `user` as u on (s.userid=u.userid)
        left join `node` as n on (s.discussionid = n.nodeid)
        where n.nodeid in (select nodeid from `node` where contenttypeid=23)
    If you know the specific channel, you can restrict n.nodeid to that channel in the WHERE clause.

    Leave a comment:


  • ShannonA
    started a topic Determining Who is Subscribed to a Forum

    Determining Who is Subscribed to a Forum

    I need to figure out who all is subscribed to a certain Forum (channel), getting mail like this "A new post in your Forum Channel subscription: [Forum Name]".

    I'm perfectly happy to look at the MySQL tables to figure it out, but my top guess of the "subscribeforum" table turns up two different columns that look relevant, "subscribeforumid" and "forumid". Worse, none of the numbers in either match the Node ID that I see for the Forum when I look at the Channel Manager.

    Any way to figure this out would be great.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X