PDA

View Full Version : Mandatory Subscriptions be User Group


todd.o.callen
11-27-2002, 08:04 PM
As an administrator, I want to be able to "force" subscriptions by user group? In vB2.2.8 I can hardcode email addresses within a forum definition so that they always receive notice on new posts/threads, but I need to manage secure forums by user groups.

This would be IMMENSELY helpful for my company's supplier transactions. We give each contact at a supplier an ID, already set up, and assign that ID to the corresponding user group for that company. We expect those users to receive notices whenever new posts are made by us (or by any of that group's users), but this becomes more prone to failure if it can't be enforced.

I am begging!!!!!

Logician
11-27-2002, 10:50 PM
I dont understand whether you are after a mandatory forum subscription (which by default have no mail notification) or mandatory thread subscription, but why don't use some kind of mailing lists as a solution?

vb (2.x.x) subscription system is not designed to handle mass amount of subscribers and if you force mass amounts of mandatory mail notifications inside vb, you might end up slowness or even timout errors in postings..

todd.o.callen
12-02-2002, 12:01 PM
Yes. In a nutshell, I am am trying to link mailing lists to forum posting. Since I always want certain users notified about new threads and posts in a given forum, it makes sense to automate it.

As to slowing the system down, the total of emails generated should never exceed 500 at a time. Normally it would be more like 10.

Logician
12-08-2002, 12:39 PM
not tested:

edit newthread.php, find:

// send email to moderators


Before that add:
//Logician Send Mail to Usergroup if Forum is X Hack
$email_usergroup=X;
$email_forumid=Y;
if ($visible==1 AND $email_forumid==$forumid)
{

$emailusersDB=$DB_site->query("SELECT username,email FROM user WHERE usergroup=$email_usergroup");
while($emailusers=$DB_site->fetch_array($emailusersDB))
{
eval("\$emailmsg = \"".gettemplate("email_notifyusergroup",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_notifyusergroup",1,0)."\";");
mail($emailusers[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
unset($emailmsg);unset($emailsubject);
}
}
//Logician Send Mail to Usergroup if Forum is X Hack

(Replace X with the usergroup to mail and Y with the forumid. )

Create 2 new templates named "email_notifyusergroup" and "emailsubject_notifyusergroup".

What does it do?
It sends a notification mail (content is from "email_notifyusergroup" template) to all users in usergroup X whenever a newthread (not a reply!) is send to forum Y..

And you are warned about performance above if email number is high.

Enjoy..

todd.o.callen
12-10-2002, 12:12 PM
Looks cool. :D

What about for replies? Do you think that this is just begging for a lot of trouble?

Logician
12-16-2002, 08:55 PM
umm I didnt check it out but I believe it should work with replies if you add the same code to newreply.php (same location)

emanSickelsburg
06-25-2009, 11:31 PM
I would like to do something like this that includes all the subforums. Basically, anything that a usergroup has permission to access without having to code for each forum.

Is that posible?