vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Mandatory Subscriptions be User Group (https://vborg.vbsupport.ru/showthread.php?t=46167)

todd.o.callen 11-27-2002 08:04 PM

Mandatory Subscriptions be User Group
 
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:
PHP Code:

 // send email to moderators 

Before that add:
PHP Code:

//Logician Send Mail to Usergroup if Forum is X Hack
$email_usergroup=X;
$email_forumid=Y;
if (
$visible==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 10: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?


All times are GMT. The time now is 03:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02140 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete