vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   v2.0 Email new thread notifications to subscribed users (https://vborg.vbsupport.ru/showthread.php?t=18718)

Pie'oh'pah 10-15-2001 04:13 PM

No i must stand corrected: It's happening even if users are registered...

-Pie

claytonp 10-16-2001 08:19 AM

Hello,

I thought I would attempt this code hack myself, however I cannot locate the following in newthread.php

below the section //send email to moderators which ends with

}
}
}
}

as indicated by chrispadfield. Am I doing something wrong.

I have already created the two templates.

Regards,

Clayton

webhost 10-16-2001 02:10 PM

Below This


PHP Code:


// send email to moderators
      
if ($enableemail) {
        
$moderators=$DB_site->query_first("SELECT CONCAT(newthreademail,' ',newpostemail) AS newthreademail FROM forum WHERE forumid='$forumid'");

        
$modtable=$DB_site->query("SELECT DISTINCT user.email FROM moderator,user WHERE moderator.userid=user.userid AND forumid IN ($foruminfo[parentlist]) AND (newthreademail=1 OR newpostemail=1)");
        while(
$thismod=$DB_site->fetch_array($modtable)) {
          
$moderators['newthreademail'].=$thismod[email]";
        }

        if (
$moderators['newthreademail']!="") {
          
$mods=explode(" ",trim($moderators['newthreademail']));
          while (list(
$key,$val)=each($mods)) {

            if (
trim($val)!="") {
              
$toemail=$val;
              
$forumtitle $foruminfo['title'];
              
$threadinfo['title'] = $subject;

              eval(
"\$emailmsg = \"".gettemplate("email_moderator",1,0)."\";");
              eval(
"\$emailsubject = \"".gettemplate("emailsubject_moderator",1,0)."\";");
              
mail($toemail,$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
            }
          }
        }
      } 


Stasik 10-16-2001 04:42 PM

to fix "nobody" problem replace"
Code:

eval("\$emailsubject = \"".gettemplate("email_newthreadsubject",1,0)."\";");
with:
Code:

eval("\$emailsubject = \"".gettemplate("emailsubject_moderator",1,0)."\";");
then you can delete teplate called "email_newthreadsubject"

chrispadfield 10-16-2001 05:51 PM

not quite sure how that will help as that edits the subject of the email not where it is from. Unless you have a linebreak in the subject template, that might make it not work.

Stasik 10-16-2001 05:55 PM

that was linebrake

webhost 10-16-2001 08:11 PM

Tested and works great on my board and 2 others.

VirtueTech 10-16-2001 11:39 PM

I can't believe I overlooked this.

WizyWyg 10-17-2001 12:09 AM

Hi can someone repost the code in its entirety with all the corrections. looking through the coding and this site is somewhat driving me cross eyed

chrispadfield 10-17-2001 07:41 AM

Quote:

Originally posted by WizyWyg
Hi can someone repost the code in its entirety with all the corrections. looking through the coding and this site is somewhat driving me cross eyed
my code in the 1st post still works for me :)


All times are GMT. The time now is 09:32 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.03175 seconds
  • Memory Usage 1,745KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete