![]() |
Very good idea, and well done. :) Should be standard in vB3 if you ask me. ;)
|
kentaurus, did you chnage anything in the hack yesterday? OI noticed your firest post was updated with Hack Update.
|
Quote:
|
kentaurus, found a major problem with this hack. When I reply to a message (haven't checked the forwarding out yet), it sends the attachments I have stored along with the message. On a new message, it works fine. Only on replies so far (or forwards, I haven't checked yet).
|
Ok, I've narrowed it down a bit further. It seems the attachments get added to any message that is sent out with the Quick PM Reply hack. The regular reply works fine. Any way to fix this?
|
Quote:
I'll install the Quick PM reply and see where to fix it. |
Thank you, sir. ;)
I told Erwin about it but he said he couldn't fix problems with other people's hacks. :tired: |
Quote:
|
If I had to make a choice, yours will stay. ;)
|
Quote:
I was relying on the posthash for the attachments, the quick reply has no posthash (an empty one) so the code just assumes that all attachments with an empty posthash are for that message (ie - all other attachments in the forum). I made a patch so this hack will work cooperative with the quick reply, I'll pm Erwin and see if he wants to update his hack also, either hack can be patched but I can only modify mine of course. find this: Code:
$attachcount = $DB_site->query_first(" Code:
if ($_POST['posthash']) { TXT is updated also |
Will this hurt anything for anyone who doesn't have Erwin's hack installed? Or is this ONLY to be used if you are using his hack, too?
|
Quote:
In the txt this code is included for the people that install the hack for their first time to ensure that they don't have any problems if they install the quick reply after. |
Thank you very much, sir, for the fast fix. ;)
I'm looking forward to more of your great hacks in the future. You seem to care about fixing things to work with and around other's hacks, when it is a lot easier to pass the buck, sometimes. ;) |
I hate to be the bearer of bad news, but there is a small problem now. Oh, it works great with Erwin's hack now but all of my attachments are showing as Private Message even when they aren't. ;)
|
Quote:
That is why I told before that it was really bad, because without the fix as soon as you used quick reply all the attachments in the forum would go to the private message. Right now there is no easy way to fix this, since the damage is already done... I wish I had seen that coming before. However, you can run a query to recover all the attachments in posts, this will return them to think they belong to a post and not to a private message, the only ones that can't be recovered are the ones in the private message, they already belong to the last pm that was sent. Ok, this is the scenario: attachment1 - in private message attachment2 - in private message attachment3 - in private message attachment4 - in private message after running the query attachment1 - in post xxx attachment2 - in post yyy attachment3 - in private message attachment4 - in post zzz the attachment 3 remains in a private message, but potentially not the one that it should but the last one sent via pm quick reply. The next time you use attachments in private message there will be no problem, it's just that the quick reply messed up the attachments that weren't expecting a hashless post to come along. Query: Code:
update attachment set private=0 where postid<>0 |
Thanks for the query. All seems well again. ;)
Is there any way to add a From: and Sent to: the listing of attachments under the Private Message part? It might be nice to know at a quick glance who the attachment was sent to or came from. ;) |
I have a small change (template edit). It is completely optional.
This will add a paperclip to the left of the title of the private message if the private message contains an attachment. In pm_messagelistbit find this: Code:
<a href="private.php?$session[sessionurl]do=showpm&pmid=$pm[pmid]"><if condition="$show['unread']"><strong>$pm[title]</strong><else />$pm[title]</if></a> Code:
<if condition="$pm['attach']"><img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$pm[attach]">$vbphrase[x_attachments]</phrase>" /></if> Next I will do is that From and Title for the attachments' screen. |
Only for the people that already have it installed.
This will add a link to the private message sent in the attachments screen so you can go and read to message or at least know which private message it was. Find this query in profile.php Code:
$attachments = $DB_site->query(" Code:
$attachments = $DB_site->query(" change Code:
<div><strong>$vbphrase[in_private_message]</strong></div> Code:
<div><strong>$vbphrase[in_private_message]:</strong> <a href="private.php?do=showpm&pmid=$post[pmid]">$post[title]</a></div> |
Ok, that works but it now shows each pm attachment twice in the attachments list. ;)
Have the instructions from the first post been updated with this and the paperclip code? |
Quote:
|
Quote:
|
Quote:
Quote:
|
Quote:
Quote:
Have all the changes discussed in this thread been updated in the original txt now, or do I need to go back and read all of this again? Nice hack! I'm liking this more and more now...the more I read about it. :up: |
Quote:
|
Great! Thanks! I'll be installing this one soon then. ;)
|
Quote:
|
When you click on the "Show Thumbnails" link, it doesn't show the thumbnails for private attachments. Is there a fix for this, also? ;)
|
Just installed vB3 RC3 and re-did this hack twice with no avail.
Doesn't seem to work on RC3... :(:( |
Works great on my RC3. You must have missed something somewhere. ;)
|
Well everything works fine except the attachment doesnt show up in a PM...
|
Just installed again and it didn't work.
It attaches to a PM fine. I send it to myself, open the PM, and no attachment is in the PM... |
kentaurus, are you still supporting this hack? ;)
|
Quote:
About that double attachment in the attachment screen I am still thinking if I should fix that. The attachments in private message are somehow more controversial than the common attachments... Right now I can duplicate the attachment for the attachment owner and all the members for which the attachment is sent.. that takes a lot of space in little time because a single attachment can be stored twice, or three times, or more. If I don't do that ownership of the attachment is difficult to determine. If the owner of the attachment is the one that sent the attachment then I can go to attachments -> delete this attachment and the person that received it keeps nothing. I don't think this is natural, right now if someone sends me something by mail there is no way they can delete it after being sent. If the owner of the attachment is the recipient then I have to do that store-attachments-more-than-once, and that's not nice for the db or the filesystem. I can't store it only once because a pm can be sent to multiple recipients, and then any recipient would be able to delete it leaving the rest with no attachment. This is even worse than the owner deleting it. And now, why does the attachment appears twice in the attachment screen? That is because it appears once for each of your pm with that attachments, and if you send the pm to yourself and also you keep a copy then you have 2 pm's. Then that screen will link once to the pm you recieved from yourself and once to the pm that is in the sent folder.. even if it's the same attachment. That is why I haven't fixed it yet.. I am still debating if I should. Sending a pm to yourself is not that natural anyway, unless I were using the pm as a personal notepad or something. |
Quote:
Also, did you made all the code modifications in private.php? That's usually the problem. |
nice job
|
Quote:
|
Quote:
What about the Show Thumbnails not working with pm attachments? Can that be fixed? |
Quote:
In profile.php search for this: Code:
$show['thumbnail'] = iif($post['hasthumbnail'] == 1 AND $vboptions['attachthumbs'] AND $showthumbs AND $post['postid'], 1, 0); Code:
$show['thumbnail'] = iif($post['hasthumbnail'] == 1 AND $vboptions['attachthumbs'] AND $showthumbs AND ($post['postid'] OR $post['private']), 1, 0); |
Thank you, sir. ;) Will you be updating the file in the first post with this?
|
Quote:
|
All times are GMT. The time now is 02:52 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:
|