[2.0.21] email posts or messages to combinations of groups

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
28
70%
Very Good
9
23%
Good
1
3%
Fair
2
5%
Poor
0
No votes
 
Total votes: 40

dcz
Registered User
Posts: 787
Joined: Sun Feb 13, 2005 5:37 am
Contact:

this mod vs mulitlang

Post by dcz »

Well, I try to keep two languages version to my forum : frech and english (most of the time, I translate topic I post in both languages) and I installed the auto lag detection mod, so that users don't have to do anything to have the forum commande in both languages.

So I was wondering if this would be tricky to ad a {lang} somewhere in the path that calls the admin_enabled_email.tpl and admin_enabled_email_no_text.tpl in your mod in order to write a french version of those two file so that user would recieve the correct verion of the file according to the language he specified in is profile?

As I am quite new in php, I'd be glad for ever for some code :D

Then, I think this mod would become the best ever with a include bbcode interpreter in order to keep the initial formatting (at least for the basic ones, like bold andunderligned) or a simple removing of them while sending.

Thanks!

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: this mod vs mulitlang

Post by asinshesq »

dcz wrote: ...So I was wondering if this would be tricky to ad a {lang} somewhere in the path that calls the admin_enabled_email.tpl and admin_enabled_email_no_text.tpl in your mod in order to write a french version of those two file so that user would recieve the correct verion of the file according to the language he specified in is profile?...


I may be wrong about this since I have never tried it (and I have never investigated how phpbb deals with multiple langauges), but I would have guessed that you could simply open up the admin_enabled_email.tpl and admin_enabled_email_no_text.tpl files that come with the mod, translate them to French and then save them to the language/lang_french/email/ folder and it would all work. Please give that a try and let us know if it works. If not, let me know and I'll investigate further.

dcz wrote: ...Then, I think this mod would become the best ever with a include bbcode interpreter in order to keep the initial formatting (at least for the basic ones, like bold andunderligned) or a simple removing of them while sending....

I do plan to try to figure out how to strip out the bbcoding at some point...I just haven't had time yet. I'm sure I can figure this out, but if anyone knows how to do this off the top of their heads, please let me know and I will be happy to 'borrow' your code ;)

User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

Installed this MOD, double checked my function_posts.php :

Error:

Code: Select all

Warning: Missing argument 12 for user_notification() in /forum/includes/functions_post.php on line 793

Warning: Cannot modify header information - headers already sent by
(output started at /forum/includes/functions_post.php:793) in /forum/includes/functions.php on line 847

Line #793:

Code: Select all

function user_notification($mode, &$post_data, &$topic_title, &$post_message, &$forum_id, &$topic_id, &$post_id, &$notify_user, &$mail_to_enabled_groups, &$include_text, &$include_unauthorized_users, &$group_id)
Always Under Construction !

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

vrflyer wrote: Installed this MOD, double checked my function_posts.php :

Error:

Code: Select all

Warning: Missing argument 12 for user_notification() in /forum/includes/functions_post.php on line 793

Warning: Cannot modify header information - headers already sent by
(output started at /forum/includes/functions_post.php:793) in /forum/includes/functions.php on line 847

Line #793:

Code: Select all

function user_notification($mode, &$post_data, &$topic_title, &$post_message, &$forum_id, &$topic_id, &$post_id, &$notify_user, &$mail_to_enabled_groups, &$include_text, &$include_unauthorized_users, &$group_id)


Another user who doesn't use easymod...sigh. (You wouldn't have this problem if you used easymod.)

Anyway, you're looking in the wrong place basd on that error message. It's telling you that the place where that function is called (which is in posting.php) is not passing one of the 12 arguments. So check in posting.php where the mod changes the line that calls user_notification and see if you made all of the mod changes right there. (There are a number of places in the mod that refer to user_notiifcaiton, including at least one where you are supposed to delete it...make sure you pick them all up.) Let me know if you can't figure it out.

User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

asinshesq wrote: Another user who doesn't use easymod...sigh. (You wouldn't have this problem if you used easymod.)


Funny... :lol:

I have over 30-mods by hand(no easy MOD user here) w/o many problems & usually fix them myself...
asinshesq wrote: Anyway, you're looking in the wrong place basd.
:lol:

Yeah I meant to post "posting.php", my bad... :P

Only problem I see, I have this from another MOD( can't recall off hand):

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
		if ($error_msg == '' && $mode != 'poll_delete')
		{
			user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
		}

#
#-----[ REPLACE WITH ]------------------------------------------
#
// 		start mod email to designated groups (and end mod too): note, we deleted the user notification line and moved that concept after the cookies writing is complete...
I used this code prior to change:

Code: Select all

	if ($error_msg == '' && $mode != 'poll_delete')
	{
	user_notification($mode, $post_data, $post_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user);
	// user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
	}
....and this:

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)

#
#-----[ IN-LINE FIND ]------------------------------------------
#
&$notify_user

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$mail_to_enabled_groups, &$include_text, &$include_unauthorized_users, &$group_id
My line is this code prior to ADDING:

Code: Select all

//
// Handle user notification on new post
//
function user_notification($mode, &$post_data, &$topic_title, &$post_message, &$forum_id, &$topic_id, &$post_id, &$notify_user)

EDITED for missing info ....
Last edited by vrflyer on Wed Mar 09, 2005 1:41 am, edited 3 times in total.
Always Under Construction !

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

vrflyer wrote: ...Only problem I see, I have this from another MOD( can't recall off hand):

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
		if ($error_msg == '' && $mode != 'poll_delete')
		{
			user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
		}

#
#-----[ REPLACE WITH ]------------------------------------------
#
// 		start mod email to designated groups (and end mod too): note, we deleted the user notification line and moved that concept after the cookies writing is complete...
I used this code prior to change:
if ($error_msg == '' && $mode != 'poll_delete')
{
user_notification($mode, $post_data, $post_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user);
// user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
}


I'm not following what you had and what you did. Did you delete that code? If not, then that accounts for the error message (since the that code does not have all the arguments that user_notificaiton now has). If you want to pick up those changes from your other mod in this one, just itnker with the user_notification lines the mod actually puts into post.php

User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

asinshesq wrote: I'm not following what you had and what you did. Did you delete that code?


Yes it was removed per instructions, but I carefully added it onto your code(still got the same results)...


EDIT: Found the hack...

Code: Select all

############################################### 
##   Hack Title:   Topic notify email with message
##   Hack Version:   1.0.1
##   Author:      Antony Bailey
##   Description:   Topic notification email, contains the message from teh topic. 
##   Compatibility:   2.0.4 
## 
##   Installation Level: Easy
##   Installation Time:  1 minute
##   Files To Edit: 3
##      posting.php
##      includes/functions_post.php
##      language/lang_english/email/topic_notify.tpl
##
##   History: 
##      1.0.0:   Initial release. 
##	1.0.1:   Typo fixed. {POST_USERNAME} becomes {POSTER_USERNAME}
## 
## 
############################################### 
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. 
##   Please visit http://www.phpbbhacks.com/forums for support. 
############################################### 
## 
############################################### 
##   This hack is released under the GPL License. 
##   This hack can be freely used, but not distributed, without permission. 
##   Intellectual Property is retained by the hack author(s) listed above. 
############################################### 

# 
#-----[ OPEN ]------------------------------------------ 
# 
posting.php
# 
#-----[ FIND ]------------------------------------------ 
# 
user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);

# 
#-----[ REPLACE, WITH ]------------------------------------------ 
# 
user_notification($mode, $post_data, $post_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user);
# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/functions_post.php

# 
#-----[ FIND ]------------------------------------------ 
# 
function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)

# 
#-----[ REPLACE, WITH ]------------------------------------------ 
# 
function user_notification($mode, &$post_data, &$topic_title, &$post_message, &$forum_id, &$topic_id, &$post_id, &$notify_user)

# 
#-----[ FIND ]------------------------------------------ 
# 
		'TOPIC_TITLE' => $topic_title, 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
		'POSTER_NAME' => $userdata['username'],
		'MESSAGE' => $post_message,

I will add the misssing params to your CODE to make it work.... :P
Always Under Construction !

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

So, are you saying that this was just a conflice with that other hack, and once you added the parameters that your other hack needed everything was fine?

User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

asinshesq wrote: So, are you saying that this was just a conflice with that other hack, and once you added the parameters that your other hack needed everything was fine?


Yup....

Here are the revised portions of the "posting.php" file:

Code: Select all

// Start MOD email to designated groups
// if this is a post that is getting emailed and the user has just designated the groups to be emailed, do the user notifiation and then go back to usual redirect...

		if ($designated)
		{

				// first step...update the group notify information...
				$mark_list = ( !empty($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : 0;
				if ( isset($mark_list) && !is_array($mark_list) )
					{
						// Set to empty array instead of '0' if nothing is selected.
						$mark_list = array();
					}

			// now check to see if 'All Users' was selected; if so, set $group_id = -1 and skip
			// the part that resets the group notify columns
			if ($mark_list[0] == -1)
			{
				$group_id = -1;
			}
			else
			{
				// 'All Users' was not selected, so now we zero out the group_notify column and then set that column to 1
				// for whichever groups the admin or mod just selected...
				$sql = "UPDATE " . GROUPS_TABLE . "
				SET group_notify = 0";
				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Could not reset group_notify to 0', '', __LINE__, __FILE__, $sql);
				}

				$group_id = 0;
				if (count($mark_list)>0)
				{
					$sql = "UPDATE " . GROUPS_TABLE . "
					SET group_notify = 1
					WHERE group_id IN (" . implode(',',$mark_list) .")";
					if ( !$db->sql_query($sql) )
					{
						message_die(GENERAL_ERROR, 'Could not update group_notify status', '', __LINE__, __FILE__, $sql);
					}
				}
			}

				// now get information to use for the email itself...

				$error_msg = '';
				$post_data = array();
				$mail_to_enabled_groups = TRUE;
				$notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0;

				$sql = "SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_username, pt.post_subject, pt.post_text, u.username, u.user_id
				FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u
				WHERE p.post_id = $post_id
				AND t.topic_id = p.topic_id
				AND pt.post_id = p.post_id AND u.user_id = p.poster_id";

				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Could not collect post data', '', __LINE__, __FILE__, $sql);
				}
					$post_info = $db->sql_fetchrow($result);
					$db->sql_freeresult($result);

					$forum_id = $post_info['forum_id'];
					$topic_id = $post_info['topic_id'];
					$topic_title = ( $post_info['post_subject'] ) ? $post_info['post_subject'] : $post_info['topic_title'];
					$post_data['username'] = $post_info[username];
					$post_data['message'] = $post_info[post_text];

					$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $post_info);
					if ( !$is_auth['auth_mod'] )
					{
					   message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
					}

					// user_notification($mode, $post_data, $topic_title, &$post_message, $forum_id, $topic_id, $post_id, $notify_user, $mail_to_enabled_groups, $include_text, $include_unauthorized_users, $group_id);
 					user_notification($mode, $post_data, $post_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user, $mail_to_enabled_groups, $include_text, $include_unauthorized_users, $group_id);


					$template->assign_vars(array(
					'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">')
					);
					$message .=  $lang['Email_sent'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id") . '">', '</a>');
					message_die(GENERAL_MESSAGE, $message);
		}

// otherwise, if this is a post that was getting emailed but the user has canceled out the email, just go to the usual redirect...
		if ($cancel_email)
		{
				$template->assign_vars(array(
				'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id") . '">')
				);
				$message = $lang['Stored_but_email_cancelled'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
				message_die(GENERAL_MESSAGE, $message);
		}
// End MOD email to designated groups

Code: Select all

// Start MOD email to designated groups
		if ($error_msg == '' && $mail_to_enabled_groups)
		{


			// here we allow the user to specify which groups to email the post to...
			$page_title = $lang['Designated_groups_CP'];
			include($phpbb_root_path . 'includes/page_header.'.$phpEx);

			$template->assign_vars(array(

			'L_DESIGNATED_GROUPS_CP' => $lang['Designated_groups_CP'],
			'L_DESIGNATED_GROUPS_CP_EXPLAIN' => $lang['Designated_groups_CP_explain'],
			'L_GROUPS' => $lang['Usergroups'],
			'L_SELECT' => $lang['Select'],
			'L_DESIGNATE' => $lang['Send_email'],
			'L_CANCEL_EMAIL' => $lang['Cancel_email'],
			'L_MARK_ALL_GROUPS' => $lang['Mark_all_groups'],
			'L_UNMARK_ALL_GROUPS' => $lang['Unmark_all_groups'],
			'L_INCLUDE_TEXT' => $lang['Include_text'],
			'L_INCLUDE_UNAUTHORIZED_USERS' => $lang['Include_unauthorized_users'],

			'S_HIDDEN_FIELDS' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="notify" value="' . $notify_user . '" />',
			'S_DESIGNATED_GROUPS_CP_ACTION' => append_sid("posting.$phpEx"),
			'S_INCLUDE_TEXT' => '',
			'S_INCLUDE_UNAUTHORIZED_USERS' => '')
			);
			// note that if you want to change the default so the email includes the text of the post by default, change relevant line above to 'S_INCLUDE_TEXT' => 'checked="checked"',
			// and if you want to change the default so the email goes to all users in the selected groups regardless of whether they are authorized to read the relevant forum, change the relevant line above to 'S_INCLUDE_UNAUTHORIZED_USERS' => 'checked="checked"')

			$template->set_filenames(array(
			'body' => 'designated_groups_cp_body.tpl')
			);

			$template->assign_block_vars('switch_include_text_checkbox', array());

			$sql = "SELECT group_id, group_name, group_notify
			FROM " . GROUPS_TABLE . "
			WHERE group_single_user = 0
			ORDER BY group_id";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Cannot find group info', '', __LINE__, __FILE__, $sql);
			}

			// feed the template the information for the 'all users' row...
			$group_id = -1;
			$group_name = $lang['All_users'];
			$group_notify = FALSE;

			$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
			$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

			$template->assign_block_vars('listrow', array(
			'ROW_COLOR' => '#' . $row_color,
			'ROW_CLASS' => $row_class,

			'S_MARK_ID' => $group_id,
			'S_DEFAULT_DESIGNATED_GROUPS' => ( $group_notify ) ? 'checked="checked"' : '',

			'U_GROUP_NAME' => $group_name)
			);

			// now feed the template with info for the other groups (for the remaining rows)

			while ( $row = $db->sql_fetchrow($result) )
			{
				$group_id = $row['group_id'];
				$group_name = $row['group_name'];
				$group_notify = ( $row['group_notify'] == 1 ) ? TRUE : FALSE;
				$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
				$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

				$template->assign_block_vars('listrow', array(
				'ROW_COLOR' => '#' . $row_color,
				'ROW_CLASS' => $row_class,

				'S_MARK_ID' => $group_id,
				'S_DEFAULT_DESIGNATED_GROUPS' => ( $group_notify ) ? 'checked="checked"' : '',

				'U_GROUP_NAME' => $group_name)
				);
			}
			$template->pparse('body');
			include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

			// ok, the template is all drawn.  When it comes back, 'designated' will be in the hidden field so $designate will be true and the rest of the notification is handled close to the top[ of posting.php.
		}

		if ($error_msg == '' && $mode != 'poll_delete')
		{
			// the following code is borrowed from David Herrmann's forum notification mod on phpbbhacks...
			// the code replaced the original lines in phpbb that read 'user_notification($mode blah blah...
			// but I changed the fourth line below this to test whether mode is newtopic rather than whether post is first post to avoid repeat emails when a first post is edited numerous times...

			$post_data['subject'] = $subject;
			$post_data['username'] = ( $userdata['user_id'] == ANONYMOUS ) ? $username : $userdata['username'];
			$post_data['message'] = $message;
			if ( $mode == 'newtopic' )
			{
				// fetch topic title
				$sql = "SELECT topic_title, topic_id
					FROM " . TOPICS_TABLE . "
					WHERE topic_id = $topic_id";

				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Could not obtain topic title for notification', '', __LINE__, __FILE__, $sql);
				}

				if ( $topic_info = $db->sql_fetchrow($result) )
				{
				 user_notification('newtopic', $post_data, $topic_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user, $mail_to_enabled_groups, $include_text, $include_unauthorized_users, $group_id);
				}

			}
			else
			{
			// user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user, $mail_to_enabled_groups, $include_text, $include_unauthorized_users, $group_id);
			user_notification($mode, $post_data, $post_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user, $mail_to_enabled_groups, $include_text, $include_unauthorized_users, $group_id);

			}
		}
// End MOD email to designated groups

Always Under Construction !

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

Glad it's all working. And I guess easymod wouldn't have helped on that one, huh ;)

User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

^^^ Any word on that BBCode thinga-ma-bob?

I saw it posted on this thread .... :wink:
Always Under Construction !

IamwithChrist
Registered User
Posts: 52
Joined: Sat Oct 02, 2004 12:04 am

Post by IamwithChrist »

I don't think all my users are getting emails sent, since I installed this MOD and stopped the YAHOO mail list I thought everything was fine but recently we have had several people complain that they have't received ANY emails at all from us.

Is there a method to verify who/what is getting mailed?

UPDATE - the news person wasn't selecting the Email ALL user option.

Now I guess I better edit postings.php so that ALL boxes are checked by default. Hopefully I can find all occurances.

Ok where exactly is the code for the "All Users" check box :P

Is this it and if so how do I force the check box to be checked? ...

Code: Select all

			// feed the template the information for the 'all users' row...
			$group_id = -1;
			$group_name = $lang['All_users'];
			$group_notify = FALSE;

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

IamwithChrist wrote: I don't think all my users are getting emails sent, since I installed this MOD and stopped the YAHOO mail list I thought everything was fine but recently we have had several people complain that they have't received ANY emails at all from us.

Is there a method to verify who/what is getting mailed?


Hi, Mike.

Sorry to hear that some users are not getting emails.

So, where to start...what version are you running? If you haven't upgraded to version 1.1.9 you really should do that. Otherwise, if it is screening out users who are not authorized to view the forum in question (i.e. if you do not check the box that says (inlcude unauthorized users), the query will take a ridiculous time and it is possible that things time out.

But assuming that's not the problem, let's get a few facts on the table.

1. When you email posts, do you check the box that says 'include unauthorized users" or do you leave it blank?

2. Are you 100% sure that the users who are not getting the emails are in groups that have been designated to receive those emails and are authorized to read the forum in question?

3. Is there any pattern to who is not getting the emails? Are they in the same group as some people who are in fact getting them?

4. How many users are supposed to be getting the emails?

5. Do you have email 'chunking' turned on or off? If you are chunking emails, what is your cutoff for the number of bccs to stick on a single email?

6. Are you using smtp or some other way for your emails to go out?

7. Are you sure your ISP isn't somehow blocking emails?

8. Do you receive any emails from the recipients ISP (or your own) reporting a failure to deliver?

9. Have you checked your php error log to find out whether it is reporting any interesting errors that might be relevant to this problem?

I have about 150 users and when I email a post out to everyone, I get a number of emails from my ISP saying that the emails have been refused by certain people (perhaps 5% of the total). Some of those bounced emails are caused by bad email addresses but others are caused by spam blockers on the recipient's side...there are some spam blockers that block emails if they see that the email is to a 'mailing list' and contains more than one link in it. If that's your problem, I suppose you could have the problem users make sure your board address is put on their safe list. Alteratively you could perhaps fool around with the email text (e.g. get rid of one or both of the links in the text) and that might help.

Let us know what you find since perhaps others are encountering these issues.

IamwithChrist
Registered User
Posts: 52
Joined: Sat Oct 02, 2004 12:04 am

Post by IamwithChrist »

Alan,

I updated my message most likely while you were responding, I would say 99% of my users are CLUELESS the Vice-Chairman of Programs is one of those 99% anyway he wasn't selecting the "ALL USERS" box and I need to change the code so ALL boxes are "checked" by default but as I am not a programmer I am slightly stumped.

Would you be so kind as to point out where and what I need to modify?

Please forgive my lack of information while creating my first post.


YiS,

Michael Sullivan

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

IamwithChrist wrote: ...Alan,

I updated my message most likely while you were responding, I would say 99% of my users are CLUELESS the Vice-Chairman of Programs is one of those 99% anyway he wasn't selecting the "ALL USERS" box and I need to change the code so ALL boxes are "checked" by default but as I am not a programmer I am slightly stumped.

Would you be so kind as to point out where and what I need to modify?...


Aha...you had me stumped but the new question is really easy. So I guess you're saying this is just a little 'human error' issue of people failing to click 'All Users', right?

Well, you will find two different places in the mod file where there are the following lines:

Code: Select all

		$group_name = $lang['All_users'];
		$group_notify = FALSE;
The first one, which is a mod to posting.php, controls what the list looks like when you are emailing a post, and the second one, which is a mod to admin/admin_mass_email.php, controls what the list looks like when you are using the mass email function in the adminstrative control panel.

If you change the 'FALSE' to "TRUE' in the part that appears in posting.php, the all users box will always be checked by default when you try to email a post.

If you change the 'FALSE' to 'TRUE' in the part that appears in admin/admin_mass_email.php, the all users box will always be checked by default when you try to use mass email from the administrative control panel.

Hope that helps....let me know.

[edit: I just read your revised first post...yes, you got it right. But make sure you edit it in the right place for your purposes (assuming you want to fix it only for times when someone is emailing a post, just fix it in posting.php, though if you want to fix it in both places so that it gets checked when you do a mass email too, that's fine as well)]

Post Reply

Return to “[2.0.x] MOD Database Releases”