Announcement

Collapse
No announcement yet.

a few questions

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

  • a few questions

    I have a few question on a plugin I need to create. What i am planning to do is create or edit a plugin so that I have a Usergroup e-mail automatically when ever a new post or thread is create and in the e-mail have just a simple statement and the link to the new post/thread. now here is what i need to know how to do after a new thread or post:
    • How to check each user and find out what usergroup(s) they belong to?
      If they belong to a certain usergroup( like 6 ), send a e-mail to the person e-mail with the link to the new thread.post?

    and do this over and over again untill i have checked the last user. I would like for this to be customable in the usergroup premission on the forums but if i have to hard code the forum and usergroup i will. any help would be great.

  • #2
    Doing this one-at-a-time will put a major load on your forum.

    You'll want to add a hook to the posting system so when a post is made, a MySQL query is performed on the user table to SELECT all users of usergroup XX and give you the list of their e-mail addresses. Then you run your mail() script. If you have a lot of these users, your forum performance may suffer.


    If you really sit down and learn (or ask for help) the Plugin (and Product) system you'll find that it is possible to add checkboxes alongside a list of Usergroups (possibly inside the Usergroup Manager) to do what you want instead of having to dig up and put a hard-coded list of ID numbers.

    The place to get started in your research is vbulletin.org. There may even be a Plugin that already exists that comes close to what you want.

    Comment


    • #3
      ok and i also understand about going and getting the info for the database so the only thing i don't know how to do it how would I get the new thread/post link? I mean when it post a link if created but it is store in a variable that i can use or something?

      Comment


      • #4
        Anybody? I think it is possiable becuase the register e--mail does it wiht the activation link. Anybody?

        Comment


        • #5
          Code modifications are handled at vbulletin.org

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X