[ABD] newpost2mail: Send new posts as email to admin

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
henmedia
Registered User
Posts: 140
Joined: Wed Dec 19, 2007 9:31 am
Location: Germany
Contact:

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by henmedia »

ok all ... now I need YOUR help :-)

Has anybody successfully integrated n2m into Tapatalk? If you are running Tapatalk in your board and someone posts using the Tapatalk APP, no mail will be sent by n2m, because Tapatalk uses it's own skripts for posting.

In fact there are the following the three skripts involved:
  • mobiquo/function/new_topic.php
  • mobiquo/function/reply_post.php
  • mobiquo/function/save_raw_post.php
If we locate the line $redirect_url = submit_post[...] as we do in posting.php for a normal installation and add the n2m line behind, n2m should work (but it doesn't).

Of course we have to alter or delete the first command in newpost2mail.php to let n2m do it's job. It could look like this for testing:

Code: Select all

// if ((substr($_SERVER["SCRIPT_NAME"],-11) != "posting.php") and (substr($_SERVER["SCRIPT_URI"],-11) != "posting.php")) die("ACCESS DENIED");
So ... did anybody have success with that? I'm lost :cry:
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]
pramod7770
Registered User
Posts: 49
Joined: Sat Apr 30, 2011 9:51 am

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by pramod7770 »

hai

ijust installed the mod its working fine but it shows hidden links in mails i just wants to hide or remove links from emails pls help this is the current email preview pls help i just wants to hide the contents below download image pls help what to do i am ussing gust hide mode

Code: Select all

---------- Forwarded message ----------
From: [b]ashija.com ! malayalam nostalgic songs world[/b] 

Date: Sun, Dec 18, 2011 at 11:35 AM
Subject: [post] Chamayam mp3 songs

 [color=#ff0000][size=200][b]Chamayam (1993)[/b][/size][/color]
 [img]http://img196.imageshack.us/img196/8879/chamayam1993.jpg[/img]
 [b][color=#008000]Music Director(s)	Johnson
 Lyricist(s)	Kaithapram
 Director	Bharathan
 Singer(s)	Jolly Abraham,KS Chithra,MG Sreekumar[/color][/b]
 
 [size=160][b][color=#800080]Anthikkadapurathu MG Sreekumar,Jolly Abraham Chamayam (1993) .mp3
 [/color][/b][/size][size=160][b][color=#800080]
 Raajahamsame KS Chithra Chamayam (1993) .mp3
 [/color][/b][/size][size=160][b][color=#800080]
 Ragadevanum MG Sreekumar,KS Chithra Chamayam (1993) .mp3[/color][/b][/size]
 
 
 
[b][color=#0000FF][b][img]http://www.ashija.com/images/download.png[/img] just click on the below file name[/b][/color] [b][removed][/b]
 
 [b][removed][/b]
 
 [b][removed][/b] 

  This message was sent by [i]newpost2mail beta 20[/i] for phpBB3.
Visit [removed] for updates and documentation.

If you find this MOD useful, you can support this project using PayPal.
To make a donation click here: [removed] / [removed] - thank you :-)
Last edited by camm15h on Mon Jan 23, 2012 10:05 am, edited 1 time in total.
Reason: Warez links removed.
henmedia
Registered User
Posts: 140
Joined: Wed Dec 19, 2007 9:31 am
Location: Germany
Contact:

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by henmedia »

I understand, but I do not see why one would remove the links as n2m is supposed to be a admin tool, sorry.
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]
pramod7770
Registered User
Posts: 49
Joined: Sat Apr 30, 2011 9:51 am

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by pramod7770 »

thanks for your relay i just want to use this mod as a new topic notification for all members through my group mail pls help
Crew
Registered User
Posts: 35
Joined: Tue Mar 11, 2008 7:52 pm

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by Crew »

Is there any way to combine your mode with mode which merging last posts from one user? Sorry, only russian link. :(
rony76
Registered User
Posts: 2
Joined: Fri Jan 27, 2012 7:49 am

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by rony76 »

Hello there!
Excellent job!
I wanted to have the moderators of the hosting forum for each new post to be notified too.
I couldn't find a way to do that, other than manually adding entries in the n2m_MONITOR_FORUM array.

So I added a little feature, adding a n2m_MAILTO_ADD_FORUM_MODERATORS setting right after n2m_MAILTO_BOARDCONTACT; if that's set to 1, then a list of moderators for the forum is loaded, whose email get added to the list of recipients.
It's sort of a raw implementation, in that I didn't take into account the case when moderators are part of a group, but that could be easily added.
If you think this feature should be of any use to anybody else, I'm more than happy to share this little patch.

Rony
henmedia
Registered User
Posts: 140
Joined: Wed Dec 19, 2007 9:31 am
Location: Germany
Contact:

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by henmedia »

rony76 wrote:It's sort of a raw implementation, in that I didn't take into account the case when moderators are part of a group, but that could be easily added.
If this just generates duplicate email adresses, it does not matter as dupes are filtered before sending the mail.
If you think this feature should be of any use to anybody else, I'm more than happy to share this little patch.
Why not, if it works safely, I can make it part of my distrubution. Perhaps you want to publish it here and some users who need this feature can test it a while.

Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]
rony76
Registered User
Posts: 2
Joined: Fri Jan 27, 2012 7:49 am

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by rony76 »

henmedia wrote:
rony76 wrote:It's sort of a raw implementation, in that I didn't take into account the case when moderators are part of a group, but that could be easily added.
If this just generates duplicate email adresses, it does not matter as dupes are filtered before sending the mail.
Yes, I had seen that, which is cool!
I meant something else, though: according to the data model, I think that an administrator can specify that a specific forum is moderated by one or more user, supplying their user names, or a proper group of users; if the latter is the case, I don't walk the tables path to find all the users in the group.

Anyway, after the invocation of newpost2mail, at line 15 on my copy of the newpost2mail.php file, I added a function definition:

Code: Select all

	
	function loadModeratorEmailAddressesForForum($forumId) {
		global $db;
		
		$sql_array = array(
			'SELECT'	=> 'u.user_email',
			'FROM'	=> array(MODERATOR_CACHE_TABLE	=> 'm', USERS_TABLE => 'u'),
			'WHERE'	=> 'm.user_id = u.user_id and m.forum_id = ' . $forumId
		);

		$sql = $db->sql_build_query('SELECT',	$sql_array);
		
		$result = $db->sql_query($sql, 3600);
		
		$moderatorEmailAddresses = array();
	
		while	($row = $db->sql_fetchrow($result))
		{
			$moderatorEmailAddresses[] = $row['user_email'];
		}
		$db->sql_freeresult($result);
		
		return $moderatorEmailAddresses;
	}
... and after the n2m_MAILTO_ADD_FORUM_MODERATORS setting is checked (at what becomes line 278), I checked the newly introduced n2m_MAILTO_ADD_FORUM_MODERATORS setting.

Code: Select all

		if ($n2m_MAILTO_ADD_FORUM_MODERATORS) {
			$moderatorEmailAddresses = loadModeratorEmailAddressesForForum($data[forum_id]);
			$n2m_MAILTO = array_merge($n2m_MAILTO, $moderatorEmailAddresses);
		}
As a said before, the query does not extract email addresses for users who are part of a group of moderators, which can be considered a "TODO" item.

Take care, Rony
Explorz
Registered User
Posts: 8
Joined: Sun Mar 20, 2011 12:08 am

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by Explorz »

Hi,

My form has been working for years. Suddenly it has stopped. I use this mod to send an email to a specific group as soon as a new post is made or a reply is given to any post.

I know this is a wide open question, but what might be the most common reason for a sudden malfunction of this mod?

I haven't changed the name of the group that the mod is set to send emails to. And the group is still populated with the forum members.

Thanks
henmedia
Registered User
Posts: 140
Joined: Wed Dec 19, 2007 9:31 am
Location: Germany
Contact:

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by henmedia »

Did you check that n2m is still executed by posting.php?
Are board eMails still working?

Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]
bytte
Registered User
Posts: 1
Joined: Wed Mar 14, 2012 8:09 pm

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by bytte »

Thanks for this mod!

Is it possible to have an email sent to all members of a group, but only if a new topic is posted in a specific forum? Not all forums?

Thanks for any advice.
User avatar
dan231
Registered User
Posts: 7
Joined: Fri Jun 26, 2009 2:12 pm

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by dan231 »

This works perfectly!
Is there a way to have the emails sent as urgent?

Thanks,
Dan
henmedia
Registered User
Posts: 140
Joined: Wed Dec 19, 2007 9:31 am
Location: Germany
Contact:

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by henmedia »

Yes, you have to add a line to to the headers section of newpost2mail.php:

after

Code: Select all

$headers .= "Content-type: text/html; charset=UTF-8\n";
add

Code: Select all

$headers .= "X-Priority: high\n";
Gruß
Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]
wesdunn
Registered User
Posts: 11
Joined: Thu Aug 13, 2009 2:16 pm

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by wesdunn »

Dude, this is a super cool mod, nice an easy to install and works like a dream!!!

Danke

Wes
trinity04
Registered User
Posts: 2
Joined: Sat Apr 28, 2012 2:21 am

Re: [BETA] newpost2mail: Send new posts as email to admin

Post by trinity04 »

ok, I am having this issue. I have another mod that Creates posts from a form. Like an application. For some reason, this mod doesn't seem to see that the post is created to send the email. If I create a post in the forum manually, it sends the email as it's supposed to. Any Idea why the mod isn't seeing the new posts created by the form? I can post the other mod if anyone would like to see it.

Edit: here it is http://www.phpbb.com/community/viewtopic.php?t=2076825
Locked

Return to “[3.0.x] Abandoned MODs”