[BETA] Mass Email and PMs

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

[BETA] Mass Email and PMs

Post by Dr DLP »

#################################################
## MOD Title: Mass Email and PMs
## MOD Author: Dr DLP < > ( Malicious Rabbit ) http://lapin-malin.com/
##
## MOD Description : Allows to send Mass PMs and E-mails to users using the ACP
##
## MOD Version : 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 5 Minutes
##
## Files To Edit: - language/lang_english/lang_admin.php
##
## Included Files: - admin_email_users.php
## - config_email_users_body.tpl
##
##############################################


DOWNLOAD

Many mods like this one already exists , but maybe you'll find it interesting . It allows to send mass PM or emails using the ACP .
You select users from the userlist , then enter the message and subject , then send .
It's easy :)

Seems to work with 2.0.4-2.0.5-2.0.6 , let me know if you have issues with previous versions , thanks .
Last edited by Dr DLP on Mon Mar 08, 2004 5:09 pm, edited 1 time in total.
BADBOY2004UK1234
Registered User
Posts: 15
Joined: Sun Mar 07, 2004 5:49 pm

Post by BADBOY2004UK1234 »

Heres the SQL

4 those who dont know how to :(


Don't mind Dr DLP??


http://www.frozentoast.co.uk/v2/db_update.zip
User avatar
transwarp™
Registered User
Posts: 92
Joined: Fri Jul 19, 2002 11:34 pm

Post by transwarp™ »

We got a problem with it !! - It sends out the MAILS and PM all from the MAIN ADMIN only !! -

If a forum got more ADMINS or JR.ADMINS it should include the right sender name inside the PM or mail but it always include the one from the main ADMIN !! -

We already try to fix this with this kind of change, but it did not working ?? -

Old code:

Code: Select all

		$sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
			VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace("\'", "''", $privmsg_subject) . "', 2 , " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', 0 , 1 , 1 , 1)";
	    if ( !($result = $db->sql_query($sql_info, BEGIN_TRANSACTION)) )
New code, but it still won't work ?? -

Code: Select all

		$sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
			VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace("\'", "''", $privmsg_subject) . "', ". $from_userdata['user_id'] ." , " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', 0 , 1 , 1 , 1)";
	    if ( !($result = $db->sql_query($sql_info, BEGIN_TRANSACTION)) )
Any help about this ?? - :roll:
- TERRA OCEANICA -
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP »

Why is it a problem ?
Paddic
Registered User
Posts: 198
Joined: Tue May 18, 2004 10:58 am

Post by Paddic »

transwarp™ wrote: New code, but it still won't work ?? -

Code: Select all

		$sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
			VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace("\'", "''", $privmsg_subject) . "', ". $from_userdata['user_id'] ." , " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', 0 , 1 , 1 , 1)";
	    if ( !($result = $db->sql_query($sql_info, BEGIN_TRANSACTION)) )
Any help about this ?? - :roll:


Change $from_userdata['user_id'] to $userdata['user_id']
rambo88521
Registered User
Posts: 18
Joined: Tue Mar 02, 2004 9:47 pm

Post by rambo88521 »

It's a problem, yes.

You see, the MOD only sends the mass PM from the Admin who created the board, and who installed phpBB. You see, most people have more than one admin on their board, or as I do, five. My other admins have sent out mass PMs, but the sender is recorded as me, not the admin who was actually logged in and sent the thing!

If you can't get something that automatically recognises which admin is signed in, there should be a field like 'Sender', where the Admin can put their name in.

Hope this helps you understand the problem that the guy above is having. And I haven't tried that code above yet, will get on it.

Rambo.
User avatar
transwarp™
Registered User
Posts: 92
Joined: Fri Jul 19, 2002 11:34 pm

Post by transwarp™ »

Ok THANKS this makes the job working fine now !! - Changing the $userdata['user_id'] did the job !! -

Did anyone know if this also works with e-mails and how to get the right sender there ?? -

It uses the standart mail from inside the board config ?? -

Code: Select all

		if  ( $board_config['version'] == '.0.5' || $board_config['version'] == '.0.6' )
		{
			$emailer->from($board_config['board_email']);
			$emailer->replyto($board_config['board_email']);

			for ($i = 0; $i < count($bcc_list); $i++)
			{
				$emailer->bcc($bcc_list[$i]);
			}

			$email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
			$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
			$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
			$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
		}
		else
		{    
			$email_headers = 'Return-Path: ' . $userdata['board_email'] . "\nFrom: " . $board_config['board_email'] . "\n"; 
			$email_headers .= 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n"; 
			$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n"; 
			$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n"; 
			$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n"; 
			$email_headers .= "Bcc: $bcc_list\n"; 			
		}
- TERRA OCEANICA -
Paddic
Registered User
Posts: 198
Joined: Tue May 18, 2004 10:58 am

Post by Paddic »

transwarp™ wrote: Did anyone know if this also works with e-mails and how to get the right sender there ?? -


In the code you provided, try changing all occurrences of $board_config['board_email'] to $userdata['user_email']...
User avatar
transwarp™
Registered User
Posts: 92
Joined: Fri Jul 19, 2002 11:34 pm

Post by transwarp™ »

Sometimes things are just to simple - :wink: :oops:
- TERRA OCEANICA -
User avatar
Jaffery
Registered User
Posts: 238
Joined: Sat Oct 18, 2003 2:55 pm
Location: Yaar !!
Contact:

Post by Jaffery »

I found another probs with this.. When i send small mesages then it works.. like sending 1 line message but when i send paragraph or big messages it is giving error..

Code: Select all

ould not insert/update private message sent text.

DEBUG MODE

SQL Error : 1196 Warning: Some non-transactional changed tables couldn't be rolled back

INSERT INTO phpbb_privmsgs_text (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) VALUES (1406, '', 'TEX TEXT TEXT TEXT BIG TEXT')

Line : 251
File : /home/jeff/public_html/forums/admin/admin_email_users.php
Is it due to some mistake in running sql ?
Free fast Image Hosting at www.ImageTor.com | Linux Forum <--- LinuxSolved.com
Bodybuilding <--- Bodybuilding.name Forums
Shayari <---- Poetry Forum at Yoindia.com
Linux webhosting <---- Linux Webhosting at MGCyber.net
burnthome
Registered User
Posts: 144
Joined: Thu Jan 08, 2004 9:13 am
Contact:

Post by burnthome »

the download link not work...

thanks,
burnthome
MaddoxX
Registered User
Posts: 450
Joined: Sat May 15, 2004 4:43 pm
Location: Russia

Post by MaddoxX »

Uhm, the default forum/board already has Mass E-mail function; Is there anything so I can also have a Mass PM version?
:D
cheesypeanut
Registered User
Posts: 121
Joined: Mon May 05, 2003 12:51 am
Location: England

Post by cheesypeanut »

Here you go, you guys might be interested as the download link to this MOD is broken.

I made this MOD specifically for MaddoxX but anyone can use it if they want.

http://www.phpbb.com/phpBB/viewtopic.php?p=1191077
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

Locked by Authors request.
Eric
Locked

Return to “[2.0.x] MODs in Development”