[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.
Locked
SuurSuomalainen
Registered User
Posts: 10
Joined: Mon Oct 11, 2010 4:13 pm

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

Post by SuurSuomalainen » Wed Nov 10, 2010 10:26 pm

jbygden wrote:I've seen some discussion about sending mail to a group.

But how do I combine the mail to group, and monitor a specific forum?

I want to send mail to a group of users if a new post is posted in a specific forum. Any tips?
+1, I think the mod really misses this feature. Now I'm forced to manage such subscriptions manually via SSH/FTP every time. But yet I'm happy anyway.

SuurSuomalainen
Registered User
Posts: 10
Joined: Mon Oct 11, 2010 4:13 pm

Sending new posts from a specified forum to a group

Post by SuurSuomalainen » Fri Nov 26, 2010 11:25 pm

jbygden wrote:Never mind, copied the if-statement about n2m_MONITOR_FORUM around the final foreach that actually sends the mail. That solved my problem.
jbygden, could you please explain in a more detailed way for php-dummies like me, please?
i tried, i swear... :?

liladude
Registered User
Posts: 7
Joined: Sat Sep 01, 2007 9:34 am

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

Post by liladude » Sat Nov 27, 2010 9:40 am

I have not surfed the past 20 pages, but if you like it,

Code: Select all

  // italiano (it)    



  $n2m_TEXT[it][mode]         = "Modalità";

  $n2m_TEXT[it][forum]        = "Forum";

  $n2m_TEXT[it][thread]       = "Argomento";

  $n2m_TEXT[it][subject]      = "Titolo";

  $n2m_TEXT[it][user]         = "Utente";

  $n2m_TEXT[it][ip_hostname]  = "IP/Host";

  $n2m_TEXT[it][host_na]      = "(n/a)";

  $n2m_TEXT[it][actions]      = "Azioni";

  $n2m_TEXT[it][reply]        = "rispondi";

  $n2m_TEXT[it][quote]        = "cita";

  $n2m_TEXT[it][edit]         = "edita";

  $n2m_TEXT[it][delete]       = "cancella";

  $n2m_TEXT[it][info]         = "info";

  $n2m_TEXT[it][pm]           = "mp";

  $n2m_TEXT[it][email]        = "email";

  $n2m_TEXT[it][attachments]  = "Allegati";

  $n2m_TEXT[it][edited_by]    = "editato da";

  $n2m_TEXT[it][edit_reason]  = "ragione";


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 » Sat Nov 27, 2010 11:18 am

Thanks liladude, this will be published with the next release.

Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]

User avatar
Shakensoul
Registered User
Posts: 77
Joined: Fri Mar 20, 2009 9:37 am
Location: India
Contact:

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

Post by Shakensoul » Wed Dec 08, 2010 6:04 am

Which part of the newpost2mail.php do I need to delete/modify to not display the post text in the email body ?

Instead of the post text, I want to put a statement " Please click on the topic link to read the contents".

Any help would be appreciated.

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 » Wed Dec 08, 2010 9:12 am

After

Code: Select all

$message = wordwrap($message, 256);
which is line 238 in beta 20 simply add an new line like

Code: Select all

$message = "Please click on the topic link to read the contents";
This will overwrite the old message content and if you want to revert, simply delete your new line.

hth
Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]

User avatar
Shakensoul
Registered User
Posts: 77
Joined: Fri Mar 20, 2009 9:37 am
Location: India
Contact:

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

Post by Shakensoul » Thu Dec 09, 2010 6:02 pm

Thanks for the tip, that worked.

However what I am trying to achieve is, the email body should be as it is right now with the User, Subject, Thread, signature, forum links and other options on the email body along with the formatting, and only remove the post contents/text with my custom message. That way, a user can click on any of the link on the email body and go to the forum and read the contents.

I hope I am able to explain myself and any help would be appreciated.

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 » Fri Dec 10, 2010 8:57 am

Sorry, my fault, I knew what you wanted to ;-)

Delete from line 164

Code: Select all

// search for inline attachments to show them in the post text
to line 215 which is before

Code: Select all

$message .= "</div></td></tr></table>\n";
(so leave the above line in the script) and insert

Code: Select all

$message .= "Please click on the topic link to read the contents";
instead of the deleted code.

Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]

User avatar
Shakensoul
Registered User
Posts: 77
Joined: Fri Mar 20, 2009 9:37 am
Location: India
Contact:

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

Post by Shakensoul » Fri Dec 10, 2010 5:40 pm

Deleting the lines again removed all links and formatting.

However I tried the following changes,

In line 172

Code: Select all

// generate post text

$message .= str_replace("<br />", "<br />\n", generate_text_for_display($data[message], $data[bbcode_uid], $data[bbcode_bitfield], $post_data[forum_desc_options]))."\n";
deleted the code and replaced with my custom message

Code: Select all

// generate post text

 $message .= "My message";
and it worked perfectly.

Again thanks for your wonderful support. :D

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 » Fri Dec 10, 2010 5:54 pm

I think you wrote "$message =" instead of "$message .=" which causes what you described.

Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]

frank jance
Registered User
Posts: 25
Joined: Fri Nov 25, 2005 6:35 pm

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

Post by frank jance » Wed Jan 12, 2011 9:09 pm

EDIT:
Is this mod mainly for moderators? Or will it send emails to everyone based on whether or not you're subscribed to a particular topic?

Thanks,
Frank

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 » Thu Jan 13, 2011 10:09 am

It is meant to be for admin purposes and sends mails to any addresses configured in the script. It's independant of any subscriptions inside phpBB3.
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]

frank jance
Registered User
Posts: 25
Joined: Fri Nov 25, 2005 6:35 pm

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

Post by frank jance » Thu Jan 13, 2011 3:33 pm

Thanks for the clarification. It would be nice to have a mod that would send the contents of a post to everyone who was subscribed to that topic. Have you ever considered writing one like that? Or does one exist already?

Thanks again,
Frank

Pale September
Registered User
Posts: 45
Joined: Sat Jan 08, 2011 10:10 am

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

Post by Pale September » Mon Jan 31, 2011 9:17 pm

Thank you for sharing this excellent MOD with all of us.
I have it working splendidly except for an issue with "The requested post does not exist" when the actions of quote, delete or edit are clicked. The only one that works is Reply.
I appreciate that you built this MOD for admin use and I am using it for all users (by creating a group and assigning all members of the forum to this group) so could this be why? But even if I try again with the 'proper' admin email, I still get the same error message.

Just one other thing, in the 'from' column of my email client (Mac Mail) the from address begins with "". Is there anyway I can neaten it up and just have the email address or preferably the name of the forum??
The forum can be found here http://www.colchestercreativeshots.net/forum/
Thanking you in anticipation.

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 » Tue Feb 01, 2011 7:57 am

"The requested post does not exist" when the actions of quote, delete or edit are clicked. The only one that works is Reply.
Could you post the URLs that are generated for the mail and also the working ones that are generated by the forum. Actually I have no idea what could go wrong there.
Just one other thing, in the 'from' column of my email client (Mac Mail) the from address begins with "". Is there anyway I can neaten it up and just have the email address or preferably the name of the forum??
The from line is generated as follows:

Code: Select all

$headers .= "From: \"".mail_encode(html_entity_decode($config[sitename]))."\" <$config[board_email]>\n";
So it normally starts with "name of your site" ... is this properly set in your phpBB3 configuration?

If yes, please try this:

Code: Select all

$headers .= "From: ".mail_encode(html_entity_decode($config[sitename]))." <$config[board_email]>\n";
However you can alter this line to fit your needs, but it should work for normal installations.

Stefan
Get the latest version of newpost2mail for phpBB3 at http://henmedia.de | [donate USD] [donate EUR]

Locked

Return to “[3.0.x] Abandoned MODs”