Page 1 of 2

Direct links in pm notification emails

Posted: Fri Mar 27, 2009 5:21 pm
by Extensions Robot
Modification name: Direct links in pm notification emails
Author: asinshesq
Modification description: Changes links in emails notifying users of new private messages so that the links take recipients directly to private messages (rather than just to the inbox).
Modification version: 1.0.1
Tested on phpBB version: 3.0.6

Download file: direct_links_in_pm_notification_emails_1-0-1.zip
File size: 32.56 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extension Customisations Team may not be able to provide support.

-->Modification support<--

Direct links in pm notification emails

Posted: Fri Mar 27, 2009 5:21 pm
by Paul
Modification validated/released

Notes:

Direct links in pm notification emails

Posted: Fri Mar 27, 2009 5:21 pm
by asinshesq
This is a tiny little mod but I find it useful. Hope others will as well.

Once you install it, you should make the additinal change I describe in this post: http://www.phpbb.com/community/viewtopi ... #p10512945

Re: Direct links in pm notification emails

Posted: Fri Apr 03, 2009 8:35 pm
by HolyHannah
Hello,

Ok so I am new to mods. At the risk of looking like a total noob-

First off, I am not an administrator but just a user in a forum. I am wondering - if I download a module - does it only affects my user preferences? So in other words, as a user I can download any mod and have it only apply to me? Or are mods only for administrators and modulators?

With respect to this mod specifically-

How does it work? Can I assume that if I recieve a PM notificaton via email that I can view the text of the message directly in the email (versus just a link to the message) without clicking on a link in the email and then having to log into the database and then going to my private messages?? If this is correct as I just mentioned above - will the private message continue to sit in the senders outbox evn though I have actually viewed the message?

Re: Direct links in pm notification emails

Posted: Fri Apr 03, 2009 11:38 pm
by HolyHannah
Hello,

This is with respect to my forum post I just made today - I wanted to clarify - is there some way someone (the reciever) can view the text of a private message (via email notification or something) without opening the message in the person's Inbox so that it appears to the sender that the message was never recieved? You can also know that the reciever in this case is one of the global moderator's of the forum and most likely has experience with Mods and perhaps coding them.

Thanks

Re: Direct links in pm notification emails

Posted: Sat Apr 04, 2009 4:01 am
by asinshesq
HolyHannah wrote:First off, I am not an administrator but just a user in a forum. I am wondering - if I download a module - does it only affects my user preferences? So in other words, as a user I can download any mod and have it only apply to me? Or are mods only for administrators and modulators?
Sorry, but mods are software installed by the admin. If you do not have the ability to change the software on the server, you cannot install this mod.
HolyHannah wrote:Can I assume that if I recieve a PM notificaton via email that I can view the text of the message directly in the email (versus just a link to the message) without clicking on a link in the email and then having to log into the database and then going to my private messages??
No, that's got nothing to do with this mod. Although you could write a mod that includes the text of the pm in the notification (analogous to what I do in my boardwatch mod), that is not this mod and I have no plans of doing that.

Re: Direct links in pm notification emails

Posted: Tue Jul 21, 2009 9:42 pm
by NicksNet
hi asinshesq,

regarding my questions about this mod in the wrong forum i will ask you here what i can do, so that this mod works "correctly" - i wouldnt say this mod wont work, but i think it has trouble with another mod i installed
popup-layer-on-new-pms-1.0.1 wrote:If you have new unread private messages, you are notified about this via popup window. Most modern browsers prevent this action, as they consider this window to be an advertisement. This MOD will notify you via popup layer, so browsers won't block it.
link: http://www.phpbb.com/community/viewtopi ... 05&start=0

only if the popup of this mod was closed, the link in notification email (whether or not ... &f=0) will work - otherwise the redirection fails


i hope you have a hint to help how i can use both mods (yours and OlegNT`s)


regards Nick

Re: Direct links in pm notification emails

Posted: Wed Jul 22, 2009 1:27 am
by asinshesq
I'm sorry, but I'm not sure what you are asking. Are you asking how to add f=0 to the link this mod adds? If so, here's how you would do that:

Code: Select all

OPEN
includes/functions_privmsgs.php

FIND
			'U_INBOX'		=> generate_board_url() . "/ucp.$phpEx?i=pm&mode=view&p=$msg_id")

REPLACE WITH
			'U_INBOX'		=> generate_board_url() . "/ucp.$phpEx?i=pm&mode=view&f=0&p=$msg_id")

Re: Direct links in pm notification emails

Posted: Wed Jul 22, 2009 11:23 am
by NicksNet
hi,

no thats not what i asking ;) - i dont need this, because tho original link in your mod works!

my english is to bad to explain what i want and i think i have to ask OlegNT to add the direct link of pm in his mod


regards

Re: Direct links in pm notification emails

Posted: Wed Jul 22, 2009 12:21 pm
by asinshesq
NicksNet wrote:i think it has trouble with another mod i installed
popup-layer-on-new-pms-1.0.1 wrote:If you have new unread private messages, you are notified about this via popup window. Most modern browsers prevent this action, as they consider this window to be an advertisement. This MOD will notify you via popup layer, so browsers won't block it.
link: http://www.phpbb.com/community/viewtopi ... 05&start=0

only if the popup of this mod was closed, the link in notification email (whether or not ... &f=0) will work - otherwise the redirection fails
I don't think that mod will affect this mod. They do not change the same files. I think you've got some other problem.

Can you explain what doesn't work? Do the emails go out with a direct link the way they are supposed to? If you want to pm me the following files I will take a look when I get a chance:

ucp.php
includes/functions_privmsgs.php

Re: Direct links in pm notification emails

Posted: Fri Aug 14, 2009 11:57 pm
by daniel.w
I have the same problem, but no popup mod installed. When I click on the Email link and the popup hasnt shown before, I get the message, that the PN doesnt exist.

When the popup has shown and I've read the PN, I can get access over the Email link and everythings fine.

Re: Direct links in pm notification emails

Posted: Sun Aug 16, 2009 10:38 pm
by asinshesq
daniel.w wrote:I have the same problem, but no popup mod installed. When I click on the Email link and the popup hasnt shown before, I get the message, that the PN doesnt exist.

When the popup has shown and I've read the PN, I can get access over the Email link and everythings fine.
I spent some time this weekend tracking down the problem, and the following seems to work. Please give it a try and let me know if it creates any other problems that you can see.

Code: Select all

OPEN
inlcudes/ucp/ucp_pm.php

FIND
				if ($user->data['user_new_privmsg'] && $action == 'view_folder')

REPLACE WITH
				// start mod direct pm links in notification emails (and end mod too)...added reference to 'view_message' in next line
				if ($user->data['user_new_privmsg'] && ($action == 'view_folder' || $action == 'view_message'))

Re: Direct links in pm notification emails

Posted: Sun Aug 16, 2009 11:03 pm
by NicksNet

Code: Select all

OPEN
inlcudes/ucp/ucp_pm.php

FIND
				if ($user->data['user_new_privmsg'] && $action == 'view_folder')

REPLACE WITH
				// start mod direct pm links in notification emails (and end mod too)...added reference to 'view_message' in next line
				if ($user->data['user_new_privmsg'] && ($action == 'view_folder' || $action == 'view_message'))

thank you very much - as far as I can judge that works perfectly !!!

and: thanks for better translation of the problem @daniel.w ;)

Re: Direct links in pm notification emails

Posted: Sun Aug 16, 2009 11:22 pm
by asinshesq
NicksNet wrote:

Code: Select all

OPEN
inlcudes/ucp/ucp_pm.php

FIND
				if ($user->data['user_new_privmsg'] && $action == 'view_folder')

REPLACE WITH
				// start mod direct pm links in notification emails (and end mod too)...added reference to 'view_message' in next line
				if ($user->data['user_new_privmsg'] && ($action == 'view_folder' || $action == 'view_message'))

thank you very much - as far as I can judge that works perfectly !!!

and: thanks for better translation of the problem @daniel.w ;)
Great, glad it finally is working for you!

Re: Direct links in pm notification emails

Posted: Mon Aug 17, 2009 7:45 am
by daniel.w
Works also fine here now! Thank you very much for the mod and for support!