![]() |
Delete PM sent before user reads it
Update:
27th May 2005 - Counters update on deletion. PM is now authenticated to user. |
Whoops, wrong forum. lol. Will get a mod to move it.
|
when i saw it in the vB2 section i was like "why not for vB3? :(" then i seen it's just in the wrong area ;)
been looking for this.... thanks :) |
wow, this is awesome. i wish this existed for email. damn there's been a lot of emails to ex girlfriends i wish i could have deleted through yahoo..........
|
It's a good idea. :)
|
3 installs, and none to tell there is a major bug in it... funny how guys click easily.. lol
good hack PIE... but your "WHERE" in the queries are sticked with the rest, so the queries are not correct... and why this first query about the pmreceipt ?! it's not used elsewhere in this hack... |
Quote:
|
Quote:
[high]* nexialys lurk at Boofo with a strange look... are you laughing at me ?![/high] |
Quote:
Laughing at you? hahahahahahahaha No way, sir. ;) |
Quote:
|
Quote:
|
Quote:
And what do you not like about my query? I have to admit i just copied the code from PHPMYADMIN as I was being lazy. Thanks everyone by the way for the kind words. Quote:
|
@pie... it's not i don't like the query, but it's badly written:
PHP Code:
PHP Code:
|
Quote:
|
Quote:
|
Would there be a way to show us exactky what edits need to be made to the pm_receiptsbit template for those that have been altered from the original instead of just replacing the template?
|
I will sort that A.S.A.P.
|
Updated
|
How about adding a userid to the query! Sure it would be difficult to know who has unread PM(s), but all one has to do is start sending requests with PM ids and they can delete all unread PM(s) even ones that are not theirs! Then you should also check the request, because allowing what you allow, can end up with anyone reading any table they want or even delete your whole database! Nice idea, but it needs to be made secure!
Sonia |
This is a nice idea, but the trouble is to many have email when pm, so if they get a email saying so and so pmed them, they will go to their pm box and find nothing.
That is the only draw back stoping me from using it. |
Quote:
|
the best way would be to have a dropdown with multiple choices where you select the users that need to be deleted from the list of receiving the pm ... so if there is only one receiver, the dropdown will be a single choice... if we choose nobody, no pm will be deleted...
|
Quote:
Quote:
Quote:
|
A couple of points:
1) The delete function LEAVES the tracking notice in your tracking folder. How can that be removed at the same time? (After all, you don't need the tracking notice anymore). 2) You create the following phrase: Phrase Type: Private Messaging Varname: was_deleted Text: You deleted it! but in your EVAL statement, you use: eval(print_standard_redirect('deleted_private_mess ages_successfully')); Thus never referencing that phrase.... |
Quote:
|
Quote:
|
Ok, in the meantime, while pie works on the authenticate_sender_before_delete scheme, I added a quick fix to it. It's simple.. It replaces the entire request routine and here it is:
PHP Code:
|
To replace the "Delete Their PM!" link if the PM has already been deleted by the sender, do the following:
In private.php, find PHP Code:
PHP Code:
HTML Code:
<td class="alt2"><span class="smallfont"><if condition="$show['readpm']">$receipt[read_date] <span class="time">$receipt[read_time]</span><else /><em>$vbphrase[unread_date]<br /><if condition="$receipt[deleted] == '0'"><a href="private.php?$sesion[sessionurl]do=unsend&pm=$receipt[receiptid]">$vbphrase[deleteunread]</a><else />$vbphrase[was_deleted]</if></em></if></td> |
You saying you want an Undelete?
|
No, i noticed now if a user deletes the PM WITHOUT reading it, the receipt should be processed as "confirmed" and not have the "delete their pm" availability anymore. :)
|
Question.
Ok I installed the hack and it seems to be working well. But I have a q. When you send a pm, then delete it before they read it, it still shows up in the navabar as the user having a new pm. This is what it looks like: Welcome, Test User. You last visited: Today at 12:53 PM Private Messages: 1 Unread, Total 1. I can't seem to find away to clear that up. Any suggestions? |
Yup and I tried to finally found a fix:
change the original file edit to this: FILE EDITS: private.php **find PHP Code:
PHP Code:
Code:
UPDATE user SET pmunread=pmunread-1 WHERE userid='<<recipient>>'; HTH cheers |
Thank you EVER so much! :)
|
Nice one BeePee. :D
The $pm variable should however be sanitized to prevent a possible SQL injection. replace: PHP Code:
PHP Code:
|
Thanks m8 ;)
|
while doing the template edits I get this error in 3.0.6:
Quote:
Code:
eval('$devnull = "' . $template . '";'); |
does anyone know what the problem is? I find it odd that I am the first one to encounter this error, since I am adding this hack to a new forum without any other hacks installed. Is this a 3.0.6 incompatibilty issue?
|
What editor did you use to change the files?
|
Quote:
|
Please post a few lines before and after the line you posted above.
|
All times are GMT. The time now is 01:25 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:
|