![]() |
ok this works fine for me in 3.0.1 BUT, when i load a PM with a attachment, takes forever, like a full 2 minutes to load the PM
thats the only problem, other PMs load very fast, almost instantly |
when i used it on 3.0.1 i got an error
An error occurred while attempting to execute your query. The following information was returned. error number: 1064 error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; ALTER TABLE pmtext add attach int not null; ALTER TABLE att anyone know how to fix it? |
aren't privat messages privat and only for the users themselfs?
|
a private message is from one person to another this hack can be used in this sorta of case user 1 made a new wallpaper and he wants to show his friend user 2. Instead of making a thread user 1 goes and makes a pm with the image attahment so that way the only two people who will see it are user 1 and user 2.
Also on your sites portal you seem to have latest thread replies twince once on the left hand colum and once under the latest news. justing pointing out. |
I can't find either of these pieces of code in private.php. I'm running 3.0.3.
Quote:
Quote:
|
snobbymom, in that last piece of code just replace foruminfo with attachmentinfo everywhere you see it in the edit.
As for the " $postid = ..." I'm wondering the same thing myself. Its possible that that edit could be skipped. Otherwise all of the edits are fairly straightforward even if they dont match the new 3.0.3 code exactly. Can anyone get this working in 3.0.3? |
Oh, guess what? I got this working for VB 3.0.3! :)
Took me an hour, but I got it! :) A working demo of it is at http://www.generazn.com. I will post a fix for this hack very soon. :) |
Okay, here is the fix! :)
First, Open attachment.php: Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
THAT'S IT! YOU'RE DONE! It should be working now. If not, let me know because it is working for me. :) |
Props to RobinHood! up and working on my forums, no problems thus far! man does this hack take a while to install though!
|
I'm having problems with your code RobinHood, it seems to break the permissions of normal attachments, i.e. no one can view them now.
|
Quote:
Change: PHP Code:
PHP Code:
|
Quote:
I have done what you said to do above and it still doesnt work |
Something I just realized
It breaks all the thumbnails and images that were uploaded before the pm hack was installed. But if I upload a new image on the forum it works fine. Basically all my old attachments show up as red x's and give a no permission when clicked. But if I add a new attachment to a thread then it works fine |
Quote:
It still does it with what you posted in your lsat post as well |
Yea same here, it breaks all previously uploaded attechments to the forum (thumbs and permissions to view).
|
Quote:
Start with a fresh attachment.php (or one without the modifications for pms) Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Hope this helps. |
It worked!!!
Thanks |
Good job, the simplest solution is always the best, huh?
|
Quote:
|
I am sorry, but can someone summarize all the steps I need to do to get it work? Or does the file in the first post contain complete solution?
Thank you. |
Quote:
|
Quote:
|
the same problem occurs with the attachments for calendar hack. the same missing $postid code etc...
Ive posted a message there as well |
This Hack concept sounds sensational. But I am having a problem with the install. I have got down to the section where I need to modify the attachment.php file and I have been asked to find:
PHP Code:
PHP Code:
|
Many others are in the same boat :) Its not in the 3.0.3 code, this current hack is designed for 3.0.0 and 3.0.1...but with relatively small changes you should be able to get it too work in 3.0.3.
The problem gets worse when your trying to implement the calendar hack as well because modify identical bits of code, which i sort of had working apart from the fact the attachment disappears after a while :)...a couple others have had the same problem here...Im using 3.0.3. We really need a genius to come along and sort it all out for us. Unfortunately im not that genius :) |
Quote:
|
Yup hopefully more hack writers will use the HTL script, so it will be easy to adminster hacks...
Dont loose hope though i im pretty sure this particular hack will be modified for 3.0.3 soon... |
Quote:
|
do you think if we just revert the clean up file it would work temporarily at least to avoid pm attachments being deleted. they would probably build up but couldnt we manually clear them out once in a while?
|
Quote:
I would probably leave it like this as if attachments are auto deleted you will get lots of complaint PMs about "where have my attachments gone?" As for the build up, This is something users need to control (unless you have restrictions on your web space). Just set the attachment allowance to a lower number, then users will need to delete older (or less important ) attachments before they can include new ones. |
Quote:
|
believe me, the attachments are being deleted even when the pm is still there. I have informed my users to not delete any messages to test what is happening. no one has deleted their messages, and the attachments are still dissappearing.
|
I have determined from my testing that the attachments are being deleted shortly after they have been viewed, not when the user deletes the PM. Also, if I send another user a PM attachment and then look at what i sent them in my sent items folder before the recipient has even looked at it, it is usually deleted before they view it unless they look at it quick enough b4 it gets cleaned out by thr cron file. so wether the sender or the recipient views the attachment once it has been sent, it will be deleted shortly thereafter. back to my original question: can i temporarily fix this by reverting my cleanup file? i don't really care if the attachments aren't being deleted in the mean time until someone comes up with a fix for this. let me know
|
I'm really really sorry about not upgrading this hack, I have it upgraded in my forum and there are a couple modifications that have to be made to make it compatible with 3.0.3. theArchitect sent me a pm today and I headed here to upgrade my hack as fast as I could :)
I originally designed this hack for RC3 and upgraded it until gold, but I haven't had time lately to upgrade my hacks (or to document them). Anyway, I'll attach in the first post the upgraded txt for the 3.0.3 vbulletin. About the cron job. Hourly all the orphan attachments (that is the attachments that were uploaded but the post was never commited) are deleted. When my hack is not installed then an attachment in the pm counts as a not commited attachment (that are the replacements in the cleanup2.php file). That is new behaviour in 3.0.3, in earlier versions they checked the posthash instead of the postid. That would mean that if you upgraded to 3.0.3 and didn't upgrade the hack you might've lost your private attachments. You'd need to edit the files (or at least the cleanup2.php, then upgrade to 3.0.3 for your attachments to be safe. |
Quote:
However I am having a problem with the install. I have rechecked my work but am getting the following error message when I try and upload an attachment: Invalid Post specified. If you followed a valid link, please notify the webmaster I also recieved a DB error report: Code:
Database error in vBulletin 3.0.3: |
Quote:
|
Quote:
So I ran the entire install process on a different board and everything seems to be working fine. I guess I will just have to put it down to another vB X File. But thankyou for your help. |
Quote:
|
Yes, it should cure that problem. However for that you need only to modify the cleanup2.php file in your includes/cron directory (with the instructions in the hack)
Only attachment.php and cleanup2.php have heavy modifications, you might want to check only those if it is already installed and working. |
I would LOVE to have this mod for 3.0.3. Any chance of this in the near future?
|
All times are GMT. The time now is 12:33 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:
|