View Full Version : New Feature: If you turn PM notification email to ON, you get new PMs emailed to you!
Try it.
Switch "Send you an email when you receive a Private Message?" to YES.
Each time you get a new PM, you will get the contents of the whole PM emailed to you. Click on the link in the PM to go directly to the PM and make a Quick Reply.
Convenient... :)
Convienient indeed, nice addition Erwin. :)
filburt1
14 Apr 2003, 14:32
Has anybody released this? If not I'll write it.
amykhar
14 Apr 2003, 15:25
What's to write? You just put $message in the emailsubject_pmreceived template. ;)
Amy
filburt1
14 Apr 2003, 16:16
I thought it wasn't in there already :)
LOL! Amy is right, it's just a template mod. :)
filburt1
15 Apr 2003, 01:28
Today at 08:19 PM Erwin said this in Post #7 (http://www.vbulletin.org/forum/showthread.php?postid=382274#post382274)
LOL! Amy is right, it's just a template mod. :)
Makes me wonder then why vB would go through the trouble of getting the contents of the message when it never is even displayed...
BTW you might want to strip vB code from the messages, it's somewhat awkward to read. :)
Yesterday at 07:22 PM filburt1 said this in Post #7 (http://www.vbulletin.org/forum/showthread.php?postid=382276#post382276)
Makes me wonder then why vB would go through the trouble of getting the contents of the message when it never is even displayed...
BTW you might want to strip vB code from the messages, it's somewhat awkward to read. :)
How would you do this?
majin gotenks
15 Apr 2003, 13:31
would be good if you could make it replace it with html instead :)
hmm, you have to bbcodeparse it then before sending the mail ;)
i don't use e-mail for pm at all *gg*
but nice edit Erwin.
Yesterday at 11:25 PM majin gotenks said this in Post #12 (http://www.vbulletin.org/forum/showthread.php?postid=382439#post382439)
would be good if you could make it replace it with html instead :)
Done - stripped bbcode, and converted to a HTML email.
So you get the whole PM message as it would look like in your PM inbox on vB.org, without the colors and frills.
Oooh, now I gotta try it. :)
Will someone be releasing this as a hack, by chance?
filburt1
15 Apr 2003, 15:43
As Amy says it's apparently just a template mod.
But what about stripping the vbcode?
I posted a fix for this in the hack thread...
Today at 01:56 AM Boofo said this in Post #18 (http://www.vbulletin.org/forum/showthread.php?postid=382489#post382489)
But what about stripping the vbcode?
The vBcode is converted into HTML, and sent to you.
Today at 03:15 AM TECK said this in Post #20 (http://www.vbulletin.org/forum/showthread.php?postid=382525#post382525)
I posted a fix for this in the hack thread...
What fix?
I'm not really stripping vBcode, just converting it into HTML and then sending it.
And this is no longer just a template mod, it's a hack, just 2 extra lines in private.php.
Do we still have the text option or will it only ne html now? It really doesn't matter to me but there are some who will want text over html.
I'm not making any changes to the database until vB3 gets here, so there is no option - if the email does not support HTML, the member can still click on the link to go directly to the actual PM.
Nice addition guys, thanks! :bunny:
majin gotenks
16 Apr 2003, 13:04
sounds good. can someone please pm me so i can see how it looks? thanks :)
Gary King
16 Apr 2003, 16:10
Nice addition erwin, good job!
@ Erwin, can you release this hack please?
Thanks in advance
Kars
bharvey42
21 Apr 2003, 19:36
Cool this is exactly what i am looking for thanks.
Is there going to be a full hack released for this?
Smoothie
14 May 2003, 19:06
Any plans on the full hack being released?
At the moment, it's not a hack. :) It's just a template mod.
Just add $message into your email_pmreceived template.
Linking directly to the PM is a hack that has been released here already.
Smoothie
15 May 2003, 04:03
04-15-03 at 06:26 PM Erwin said this in Post #18 (http://www.vbulletin.org/forum/showthread.php?postid=382708#post382708)
What fix?
I'm not really stripping vBcode, just converting it into HTML and then sending it.
And this is no longer just a template mod, it's a hack, just 2 extra lines in private.php. Whats this? Can you release this? Thats what I was referring to...
The HTML version? If you really want it, I will find time to release it. :)
Smoothie, if you really want html for pms, Logician made a hack a while back that allows the user to pick whether he wants text of html pms in his modify options.
Smoothie
15 May 2003, 19:12
Erwin and Boofo,
thanks, I just used part of this hack, and the one with the links for the pm in the email.
filburt1
15 May 2003, 19:15
Might want to add an option in the user CP such that if you receive fulltext PMs via e-mail that they should be marked read by default :)
Smoothie
15 May 2003, 19:24
Today at 02:15 PM filburt1 said this in Post #32 (http://www.vbulletin.org/forum/showthread.php?postid=395498#post395498)
Might want to add an option in the user CP such that if you receive fulltext PMs via e-mail that they should be marked read by default :) good iidea.
How would you do that? Sounds like a good idea.
Good idea filburt1. When I have time I would do it here.
Would you post it here when you do it?
I think I may have done this... can someone PM me so that I can check...
I'm getting a db error when I try to pm you.
Mmm... code removed... the dateline is interfering with the PM popup global.php code... need to tweak this...
filburt1
17 May 2003, 04:18
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
It's a standard PHP function, too (http://www.php.net/mysql_insert_id).
Can't believe I missed it - thanks filburt1.
Okay, to make it so that if the "PM Email notification" is ON, the PM is automatically made READ when the Email is sent to you, do this:
Open private.php, find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Above it, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Those who installed the direct PM link will have the above line already from that hack.
Then, find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Underneath, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Done.
This hack may interfere with other PM hacks. I've had to modify global.php as well. I hope it is all working now.
What did you modify in the global.php?
Isn't your code above the same code that was in the first message you posted it in?
Basically, if you have the direct PM link hack installed, this mod interferes with it. So I disabled the PM popup code when you access private.php (which you don't need anyway since you are looking at your PMs).
You find this in global.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Above this, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then, find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Below this, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
The PM code will not show up when you are at private.php, preventing the 2 hacks from interfering with each other.
Today at 02:24 PM Boofo said this in Post #48 (http://www.vbulletin.org/forum/showthread.php?postid=396016#post396016)
Isn't your code above the same code that was in the first message you posted it in?
Yes, it was. :) I took it out because I had to fix the global.php error, but put it back, when I realized the easier way to do it was keep the code the same, and just modify global.php.
Thanks for sorting this out. Great idea! ;)
Also, I have the "Improved PM Popup Start" hack installed. This should all be ok together, shouldn't it?
Not familiar with that hack, but if it's working, then it should be ok.
Smoothie
17 May 2003, 05:44
so wait, let me get this straight. if you get an email with the pm content, the code in post 41 makes it so the pm is automatically made read. Whats the code in post 44 do? Does it stop the pm pop-up from happening?
Mmm... your post numbers are different to mine... the private.php code is like you say, to make the message read if email is sent.
The global.php is OPTIONAL and only if you get a global.php error - this hack may interfere with the PM popup direct PM link hack (at least here anyway) - if so, put that piece of code in to fix it.
Smoothie
17 May 2003, 06:26
ah, ok, but here the question. If you get email with the pm content, and the code you posted makes the pm automatically read, is there a way to not get the pm popup if you have email on pm's? It seems very redundant to get the email and the pm popup. I'm not talking about changing the setting in your user cp, but if a user has pm email notification set to yes, the pm pop-up would be turned off.
With the changes as above, if the message is made read, the PM popup will not popup anyway, as there will be no new mesages. So there's no need to turn off pm popup. See?
Smoothie
17 May 2003, 08:31
ya, I see, but I am still getting the pm pop-up after I get the email.
Smoothie
17 May 2003, 11:14
hmmm, still not working right. I am still getting the messages as not being "read".
It works here. Try PMing yourself.
All of the pms now have [deny receipt] after them. Like this:
From the desk of Boofo [deny receipt]
even after logging onto the site and reading them.
This is happening on here, too. ;)
Smoothie
17 May 2003, 18:45
right, thats what I'm saying, plus, if i go to message tracking, it says the messages are still unread by receipient, and still getting the stupid pop-up.
My message tracking (on vb.org here) shows only 3 messages as not read yet but in the private message listing I have about 10 messages with the [deny receipt] still after them (all made after this hack was installed here this morning).
To fix the deny receipt problem, we have to actually specify the receipt SQL part, so do this:
Find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change to:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
That should fix it. :)
I will fix my previous post to reflect this.
Smoothie
18 May 2003, 04:46
hmm, ok, but i am still getting the pop-ups for new PM's...
Here, or at your own site?
Smoothie
18 May 2003, 07:58
at Macfora.com
Smoothie
18 May 2003, 08:04
I'm using this hack;
http://www.vbulletin.org/forum/showthread.php?s=&threadid=51963
plus this: $message in the emailsubject_pmreceived template
And you've made the changes in my post here as well?
Mmm... the popup shouldn't happen if the message is read, that's the thing... what about you, Boofo, do you have the same problem?
Smoothie
18 May 2003, 08:20
yes, I applied this code change from here;
http://www.vbulletin.org/forum/showthread.php?postid=396011#post396011
and I am still getting PM pop-ups. For some reason, the PM is not being marked as read when the email is sent.
This line
$the_pm_id = $DB_site->insert_id();
is added ABOVE this line:
// enhanced
if ($prevmessageid) {
NOT BELOW - if you put it below, the code won't work. Did you do that correctly?
Like I said, the PMs are marked READ here and at Boofo's site, so the code works.
Erwin, the code works great at my site (as well as here) now. Thanks for the fix. ;)
Smoothie, did you also add the code from this post?
http://www.vbulletin.org/forum/showthread.php?postid=396017#post396017
Smoothie
18 May 2003, 19:12
Today at 05:00 AM Boofo said this in Post #68 (http://www.vbulletin.org/forum/showthread.php?postid=396573#post396573)
Erwin, the code works great at my site (as well as here) now. Thanks for the fix. ;)
Smoothie, did you also add the code from this post?
http://www.vbulletin.org/forum/showthread.php?postid=396017#post396017
No, because in this post:
http://www.vbulletin.org/forum/showthread.php?postid=396031#post396031
Erwin says: The global.php is OPTIONAL and only if you get a global.php error - this hack may interfere with the PM popup direct PM link hack (at least here anyway) - if so, put that piece of code in to fix it. And I was not getting any errors.
Smoothie
18 May 2003, 19:13
Today at 04:01 AM Erwin said this in Post #66 (http://www.vbulletin.org/forum/showthread.php?postid=396565#post396565)
This line
$the_pm_id = $DB_site->insert_id();
is added ABOVE this line:
// enhanced
if ($prevmessageid) {
NOT BELOW - if you put it below, the code won't work. Did you do that correctly?
Yes, it was correct, but I will re-check.
Smoothie
18 May 2003, 19:14
Boofo-
You added both chunks of code? I only added the first code to private.php
Smoothie
18 May 2003, 19:37
hmmm, ok, now the message appears to be marked read, but still getting the pop-ups for a new PM.
I wasn't getting any errors either but I added both codes just to be safe. Try it and see if that fixes the pop-up problem. The pop-up will only be gone when you are in the private.php. It will still work everywhere else. ;)
Smoothie
18 May 2003, 19:55
But, if I add that code, what about users who don't have get email on new PM selected in the User CP? Will they still get pop-ups for new PM's?
That will only work if they have email notification set to on. Otherwise it works as normal. Besides, it only stops the pop-ups while you are in the private.php (your messages). You really don't need it there anyway, right? ;)
Smoothie
18 May 2003, 22:17
I guess I might not be making my problem clear. The new PM popup happens on forumhome, even though I have selected yes to the email notification for new pms, and receive them via email.
Does the code that is added to global.php stop the new PM pop-ups on forumhome, if you select to receive pms via email?
No, it only stops it if you are in your private messages. The only way to stop it on the forumhome is to turn it off in your options. Is that what you are trying to do? Turn it off on forumhome, too?
Smoothie
18 May 2003, 22:31
No, I guess I may have miss-understood what the extra code does. If we are making the PM's read once the email is sent, it makes no sense to also get a pop-up for the same PM on forumhome. I thought that was taken care of with the code changes....
Well, I just tried it and I don't get the pop-up on forumhome with the email turned on. With it turned off, I do. I also have a blinking "You've got mail" type message whenever there is a new message and it doesn't blink with email turned on, so it is working as it is supposed to. Did you use the new code (with receipt=2 in it) for the query? That code should cancel any pop-ups at all since it actually queries the db to say that message has been received. You must have something else going on somewhere.
I don't get it too. The popup should not happen if the PM is read.
The "messageread=1" should take care of that, right? It's got me baffled. Believe it or not, it works right on my site.
That's a first, huh, Erwin? Something working right on my site without having to tear it apart? LOL
Smoothie
19 May 2003, 03:49
hey Boofo, you added the code for both private.php and global.php, right?
Smoothie
19 May 2003, 05:56
K, now I'm totally lost on this. I have installed this hack:
http://www.vbulletin.org/forum/showthread.php?s=&threadid=51963
I added this code from erwins post:
http://www.vbulletin.org/forum/showthread.php?postid=396011#post396011
The code from this post I cannot find in global.php:
http://www.vbulletin.org/forum/showthread.php?postid=396017#post396017
I am getting the emails with the PM message, but some some odd reason it is marking the message read, but I still get the new PM popup.
First of all, uninstall the first hack and do the code in the following post instead. That might be your problem. ;)
http://www.vbulletin.org/forum/showthread.php?postid=385609#post385609
Look for this in the forum/global.php:
$newpmmsg=1;
instead of this:
if ($hack_pm_total > 1) {
The second code here is for the "Improved PM Popup Start" hack. The first code is from a unhacked global.php.
Smoothie
19 May 2003, 08:31
no joy. :( removed the first hack, added the code from your link, hacked global.php... Still getting those damn popups on forumhome for new PM's.
Talisman
19 May 2003, 09:02
Minor correction:
".....just put $message in the emailsubject_pmreceived template."
That's not right and it's been repeated in this thread.
You don't want to add text from the private message the subject line of the email notice they get; you have to add that to the message body, itself.
Instead --> add $message to the email_pmreceived template.
Oops... that's what I meant. :)
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.