Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by chrispadfield chrispadfield is offline
Developer Last Online: Oct 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-29-2001 Last Update: Never Installs: 7
 
No support by the author.

A few have requested this, me especially so i made it.

What it does: Emails all those who have subscribed to a forum an email telling them about a new thread.

Extra queries: 1 upon every new thread. Extra time processing new threads as emails must be sent.

code changes, 1 in newthread.php and 2 new templates.




CODE CHANGE:

Add:

PHP Code:
// This emails a new thread notification to those subscribed to the forum
    
if ($enableemail) {
      
// do emails

      
$useremails=$DB_site->query("SELECT user.*
                                   FROM subscribeforum,user
                                   WHERE subscribeforum.forumid='
$forumid'
                                     AND subscribeforum.userid=user.userid
                                     AND user.userid<>'
$bbuserinfo[userid]'
                                    "
);

              
$toemail=$val;
              
$forumtitle $foruminfo['title'];
              
$threadinfo['title'] = $subject;

      
$bbuserinfo['username']=unhtmlspecialchars($bbuserinfo['username']);
      while (
$touser=$DB_site->fetch_array($useremails)) {
        
$touser['username']=unhtmlspecialchars($touser['username']);

        eval(
"\$emailmsg = \"".gettemplate("email_newthread",1,0)."\";");
        eval(
"\$emailsubject = \"".gettemplate("email_newthreadsubject",1,0)."\";");

        
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
      }

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

}
}
}
}

add two templates:

i) email_newthread

Code:
Hello $touser[username],

$bbuserinfo[username] has just started a new thread: in $foruminfo[title]
This is a forum you have subscribed to at $bbtitle

The thread title is: $threadinfo[title] 
This thread is located at:
$bburl/showthread.php?threadid=$threadid&goto=newpost

Yours,
$bbtitle team

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unsubscription information:

You are receiving these "new thread" notifications because 
you are subscribed to the $foruminfo[title] forum. 

To unsubscribe, please visit:
$bburl/usercp.php
and secondly

email_newthreadsubject

Code:
New Thread in $foruminfo[title]
any you are away

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-30-2001, 03:41 PM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please note if you are testing this you need two users because it will NOT send an email to the person who started the thread. Either remove the last line of the query

PHP Code:
AND user.userid<>'$bbuserinfo[userid]' 
or use two different users.
Reply With Quote
  #3  
Old 05-30-2001, 04:21 PM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops, i left a line of debug code in.

if you have already installed this, remove this line
echo $touser;
the code change had been updated so if you have not installed it yet don't worry.
Reply With Quote
  #4  
Old 05-30-2001, 06:05 PM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it possible to make it so it does this every hour and every hour lists all the new threads within the thread.
Reply With Quote
  #5  
Old 05-30-2001, 08:08 PM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am not sure what you mean. Why would you want to send them every hour when they can be done instantly? by the sounds of it you want something more like the community bulletin thing made by Kier/tubedog
Reply With Quote
  #6  
Old 05-31-2001, 01:32 PM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, another fix

you need to change $threadinfo[threadid] to $threadid
Reply With Quote
  #7  
Old 06-02-2001, 05:57 AM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The emails this sends out are from "nobody" at : nobody@snoturtle.serverhost.com

How do i change this to Bike Forums with my real email addy?
Reply With Quote
  #8  
Old 06-02-2001, 11:58 AM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

is the line that generates that and it is copied straight from the newreply.php code (which is where most of this code came from). I can't see how it can work in one place and not the other. sorry, not a clue.
Reply With Quote
  #9  
Old 10-15-2001, 02:23 PM
Kevin Green
Guest
 
Posts: n/a
Default

Hi,

Very interested in this thread for user support purposes.

Will it email users subscribed to the Forum when there are additions to any of the existing threads

Will it email users if there are additions to the thread it has already notified them of?

I ask because I am interested in having users emailed if there is a new thread or if there are any additions to existing threads regardless of whether they have been previously notified but perhaps failed to check the Forum.

Many thanks

kevin
Reply With Quote
  #10  
Old 10-15-2001, 04:48 PM
Pie'oh'pah
Guest
 
Posts: n/a
Default

Hi,

we have the same problem as Joe, when unregistered users are involved.

-Pie
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04453 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete