[RC] Prime Notify - Put the message in notification emails

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!
Suggested Hosts
craigbru
Registered User
Posts: 4
Joined: Thu Sep 24, 2009 7:01 pm

Re: [RC] Prime Notify - Put the message in notification emai

Post by craigbru »

Gah, this is driving me nuts. I went through all of my edits again. Nothing unusual is standing out, yet the private message template is the only one ever sent. If it's an actual PM, all the appropriate information is there. If it's a topic notification, it simply leaves the missing and not applicable information blank ({TOPIC_TITLE}, {U_NEWEST_POST}, etc.)

I'm using 3.0.9, and while running other mods, there shouldn't be anything that directly affects this one. I'll keep at it...

Edit: Just for the fun of it, I added the text from the message notification template to the private message template. When a notification is received, it has the appropriate information is filled in either part. I suppose if all else fails, I could come up with some sort of universal notification, but that's a hack solution.
Hel9000
Registered User
Posts: 1
Joined: Tue Nov 08, 2011 10:51 pm

Re: [RC] Prime Notify - Put the message in notification emai

Post by Hel9000 »

Hello, thanks for a great mod.

When people receive email notification of a private message from the forum, they get in the message header:

from: my forum name
reply-to: the user's email address
to: the message recipient
date: the date
subject: the subject of the PM
mailed-by: the forum server

How would one be able to mask the "reply-to" information that is sent out in the email, so that users can have their email addresses remain anonymous when sending out PMs that are then also sent out as emails?
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [RC] Prime Notify - Put the message in notification emai

Post by primehalo »

Open the includes/prime_notify.php file and change this:

Code: Select all

define('PRIME_NOTIFY_REPLY_TO_SENDER',    true);    // Set the PM notification reply-to address to be that of the sender (only if their e-mail address is set to be visible). 
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
cableghost
Registered User
Posts: 6
Joined: Fri Nov 11, 2011 2:51 pm

Re: [RC] Prime Notify - Put the message in notification emai

Post by cableghost »

I receive the following two errors upon install. They appear to be similar, but neither can be found. Pardon if I missed a step.

1. Find

Code: Select all

'template'		=> ($topic_notification) ? 'topic_notify' : 'newtopic_notify',
			'method'		=> $row['user_notify_type'],
			'allowed'		=> false
		);
Add After

//-- mod: Prime Notify ------------------------------------------------------//

Code: Select all

$prime_notify->setup_post_template($notify_rows[$row['user_id']], $row);
//-- end: Prime Notify ------------------------------------------------------//

The Find specified by the MOD could not be found

2. Find

Code: Select all

'template'		=> 'forum_notify',
				'method'		=> $row['user_notify_type'],
				'allowed'		=> false
			);
Add After

//-- mod: Prime Notify ------------------------------------------------------//

Code: Select all

$prime_notify->setup_post_template($notify_rows[$row['user_id']], $row);
//-- end: Prime Notify ------------------------------------------------------//

The Find specified by the MOD could not be found


-Scott
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [RC] Prime Notify - Put the message in notification emai

Post by primehalo »

The first find you mention is found on line 1218 of an unmodified includes/functions_posting.php. Perhaps you installed a MOD which modified some of these lines?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
cableghost
Registered User
Posts: 6
Joined: Fri Nov 11, 2011 2:51 pm

Re: [RC] Prime Notify - Put the message in notification emai

Post by cableghost »

Thanks, you were correct.
bddforum
Registered User
Posts: 7
Joined: Wed Mar 30, 2011 2:20 am

Re: [RC] Prime Notify - Put the message in notification emai

Post by bddforum »

Recently (and without me having even accessed these files for the past few months), I have started receiving Forum Notification emails for topic replies. Any idea what might be causing this problem?

For instance, at 3:58PM today someone replied to topic ABC. I received an email alerting me to this using the Topic Reply Notification email template. Perfect. at 4:23PM someone else replied again - to the same topic - but this time I got a Forum Notification email template (the template that should be used when a new topic is started).

Same exact stimulus (a reply to a topic), but two different templates. This has been happening at seemingly random times over the past few days now.

Any help would be appreciated.

Thanks,
bddforum admin
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [RC] Prime Notify - Put the message in notification emai

Post by primehalo »

I would probably start by disabling the MOD and then see which of the default phpbb3 templates are being used to see if it is an issue with phpbb3 or an issue with the MOD.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
.EwG.TheButcher
Registered User
Posts: 2
Joined: Fri Dec 16, 2011 7:36 pm

Re: [RC] Prime Notify - Put the message in notification emai

Post by .EwG.TheButcher »

I am having an issue with this MOD.

i followed all the instructions, and went through and double checked all of the code modifications a second time.

However, It only seems to work at random times. Most of the emails we are getting are just the notification emails that you have to click to go back to the forums. Then once in a while, we get the prime notify version with the post contents included.

We have tried to track when it does and does not happen (who started the thread, quick reply vs. full) but there seems to be no consistency to the issue.

Question 1) is there a set of criteria, where this works, and where it doesn't?

Question 2) any idea why this would be?

Thanks in advance!
.EwG.TheButcher
EpochWaste Gaming Founder
www.epochwaste.com
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [RC] Prime Notify - Put the message in notification emai

Post by primehalo »

Sorry, I'm really not sure. It should always work, unless you have the User's Choice add-on installed, in which case it should only work for those users that have it enabled.

There is code within the MOD which is supposed to prevent using the new email template if something goes wrong, such as the post message not existing (see the setup_post function in the includes/prime_notify.php file).
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
.EwG.TheButcher
Registered User
Posts: 2
Joined: Fri Dec 16, 2011 7:36 pm

Re: [RC] Prime Notify - Put the message in notification emai

Post by .EwG.TheButcher »

this is what I find there:

Code: Select all

		/**
		* Initial setup for including message text in the new post notification e-mail
		*/
		function setup_post(&$data)
		{
			global $user, $phpEx;

			$this->enabled = PRIME_NOTIFY_POST_ENABLED;
			if ($this->enabled && isset($data['message']) && $user->page['page_name'] == "posting.$phpEx")
			{
				$this->author  = $user->data['username']; // This is the name, not the ID
				$this->message = empty($data['message']) ? '' : $data['message'];

				// If BBCodes are not enabled for this post, then we keep them because they do not represent formatting
				$keep_bbcodes = empty($data['enable_bbcode']) ? true : PRIME_NOTIFY_BBCODES;

				// Format the message
				$uid = empty($data['bbcode_uid']) ? '' : $data['bbcode_uid'];
				$this->format_message($this->message, $uid, $keep_bbcodes);

				// If something went wrong, then just go back to using the default e-mail notification template
				if (empty($this->author) && empty($this->message))
				{
					$this->enabled = false;
				}
			}
			else
			{
				$this->enabled = false;
			}
		}
Anything that would cause this?
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [RC] Prime Notify - Put the message in notification emai

Post by primehalo »

I don't really have anything to add to my previous response that would help. Sounds like you would need to add debug code to figure out what is going wrong.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
shadowpuck
Registered User
Posts: 1
Joined: Sun Feb 12, 2012 1:30 am

Re: [RC] Prime Notify - Put the message in notification emai

Post by shadowpuck »

jgonsalves wrote:My apolpgoies for be a bit of a noob, but I have just installed the mod Prime Notify and It look as if the Private messages are emailing out the mesaage but normal post do not', can anyone point in the right direction of were to look to resolve this issue. I have check codes insert and they seem to be in the correct place.

Thanks in advaned

Ken, I am having this same problem with a 3.0.8 based board. This is a very simple board, only one mod besides prime notify - the Add User mod.

private messages are working fine, but the topic notifications are not showing the prime notify template.
how do i check which email templates are in use?

Thank you for the time and assistance - this is a great mod and I've used it before without any issues.
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [RC] Prime Notify - Put the message in notification emai

Post by primehalo »

I had one person e-mail me to say the cause of this issue was that they accidentally installed it incorrectly, that they pasted code in the wrong place, such as after the found reference code instead of before. If you installed it manually, then I'd check that. If you installed it using AutoMOD, then it should have been installed correctly and thus I have no idea. It seems to be working fine for me.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
emcquaid
Registered User
Posts: 3
Joined: Thu Jun 14, 2012 6:39 pm

Notify with POST_SUBJECT instead of TOPIC_TITLE

Post by emcquaid »

Thank you very much for this great modification.

Do you know how I would use POST_SUBJECT instead of TOPIC_TITLE for the message subject? In our forum we change the post_subject within teh topic to get a bit more specific, so if I could figure this out, it would help us.

Thank you!

Cheers,


Eric

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