View Full Version : link directly to PM in PM-Email-Notification
tkeil69575
04-21-2003, 10:00 PM
This small hack will allow you to insert two links into the email notification that is sent out when you receive a new pm.
It add the correct PM ID so that the user can go directly to the pm received or if he wishes directly to the anwser form for the pm received.
if you include the answer link it might be usefull to include the pm message text in the email. Do this by just adding $message in your template.
1 change in private.php
and one template change.
have fun.
tina
Kars10
04-22-2003, 12:10 PM
Cool, exactly what i was looking for!! :D
Thanks Tina
* Kars10 klicks install!
Bison
04-22-2003, 04:32 PM
Well, this satisfies me!
Now I have them both (Thread notification w/message & PM Noticication w/message)!
Boofo
04-22-2003, 06:40 PM
If you add this:
$the_pm_id = $DB_site->insert_id();
right below this:
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignature,iconid,messageread ,folderid,receipt) VALUES (NULL,$touserinfo[userid],$touserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($title))."','".addslashes($message)."',".time().",'$signature','$iconid',0,0,$receipt)");
and put this as a link to the private message, you can save making a new query. ;)
$bburl/private.php?action=show&privatemessageid=$the_pm_id
tkeil69575
04-23-2003, 10:39 AM
hi boofo,
thanks for the input ;)
I always thought accessing the databank was the same thing - doesnt make much difference if your reading from it or writing to it an extra time. correct me if im wrong.
greets
tina
mwhoob
04-23-2003, 01:14 PM
can see screen shot
tkeil69575
04-23-2003, 01:28 PM
hi mwhoob,
no screenshot - its just two links in an email. im sure you can imagine how that will look.
greets tina
Boofo
04-23-2003, 06:05 PM
Today at 05:39 AM tkeil69575 said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=385882#post385882)
hi boofo,
thanks for the input ;)
I always thought accessing the databank was the same thing - doesnt make much difference if your reading from it or writing to it an extra time. correct me if im wrong.
greets
tina
The code I quoted was from a hack that TWTCommish did a while back. Anytime I can save a query, I usually do it that way. Either way will work fine, though. ;)
msimplay
05-12-2003, 01:22 PM
i like hacks to be made for 2.3 or updated cuz am on Vb 2.30 release 3
Erwin
05-13-2003, 12:05 AM
Use TWTCommish's version which doesn't use a query like Boofo said. We use it here too. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.