![]() |
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: PHP Code:
PHP Code:
Then, find: PHP Code:
PHP Code:
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: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Quote:
|
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.
|
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. |
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?
|
ya, I see, but I am still getting the pm pop-up after I get the email.
|
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. ;) |
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: PHP Code:
PHP Code:
|
I will fix my previous post to reflect this.
|
hmm, ok, but i am still getting the pop-ups for new PM's...
|
Here, or at your own site?
|
at Macfora.com
|
I'm using this hack;
https://vborg.vbsupport.ru/showthrea...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? |
yes, I applied this code change from here;
https://vborg.vbsupport.ru/showthrea...011#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? https://vborg.vbsupport.ru/showthrea...017#post396017 |
Quote:
https://vborg.vbsupport.ru/showthrea...031#post396031 Erwin says: Quote:
|
Quote:
|
Boofo-
You added both chunks of code? I only added the first code to private.php |
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. ;)
|
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? ;)
|
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?
|
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.
|
All times are GMT. The time now is 02:09 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|