![]() |
I installed this hack on 2.2.9 AND have the hack that allows people to add attachments on editpost an ran into a small problem.
with a combination of this code from this hack and also the add attachment on edit post I was unable to add a 'new' attachment when editing a post. No problem replacing an attachment or deleting an attachment that was placed in the post via newthread or newreply. Therefore I cam up with following few lines that fixed the problem in editpost.php add this bit of code: -------------------------- if ($attachment != '' and $attachmentaction < ' ') { $attachmentaction = "new"; $postinfo[attachmentid] = 999; } ----------------------- before: ----------------------- if ($postinfo[attachmentid]!=0) { // check attachment status // keep, delete, update ----------------------- Don't worry about the $postinfo[attachmentid] being set to 999 because a new ID is calculated later in in the code by calculating the next available key value in the attachment table primary index. |
hey Scott, one small question...
why didin't you just use attachmentid as the file name? - jeff |
by the way - this is a great hack. My attachments table had grown to over 400 mb alone. I never liked the idea of keeping binary data (blobs) in a sql server table.
I have also created my own hack to use mogrify to automatically reduce the size of uploaded images and avatars on my forum and my users love my site. They have no idea about how their attachments are stored but it's pleasing to me to have them as separate files instead of cluttering up my database. :) |
about 8 million people asked this question
no one answered yet but how do you fix this??? "Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/hhapdotcom/www/airplay/admin/attachment_install.php on line 333" its in the IMPORT portion. |
Installed on 2.2.9 and working well. Thanks
|
my problem
Parse error: parse error, unexpected '}' in /home/xxx/public_html/forums/admin/functions.php on line 1819 here are the lines around there PHP Code:
|
the whole forums are not working now... going to the main oage i get this errors
Parse error: parse error, unexpected '}' in /home/xxx/public_html/forums/admin/functions.php on line 1819 Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/forums/admin/functions.php:1819) in /home/xxx/public_html/forums/admin/functions.php on line 1573 Fatal error: Call to undefined function: makelogincode() in /home/xxx/public_html/forums/global.php on line 371 |
You've applied some part of the hack wrong :)
You have an extra } somewhere - miSt |
Quote:
|
One thing i noticed:
During the installation, set your attachments folder RELATIVE TO THE ADMIN FOLDER, then import the files and then set it relative to your root folder. That will probably fix the above error, assuming the folder is chmodded correctly. |
On a new vb 2.3.0 all is working OK, but
If I attach a file, then edit and add a new attachement, on my ftp i can see 2 files. The old file is not deleted ! |
It seems that suport for 2.3.0 is missing :(
|
Scott missed adding removeattachment() in a few places in editpost.php ;)
|
@rake
Solutions ? :D |
The user who uses the Advanced Attachmentbox v1.0
HACK: functions.php FIND: $DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,visible,has h) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($attachment_name)."','$v isible','$attachment_hash')"); and replace it with: $DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,visible,hash) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($attachment_name)."','$filesize','$visible','$attachment_hash')"); Open Showthread.php Search for this (2 times on a unhacked vB, Line 55 , 410): attachment.counter and replace it with: attachment.counter,attachment.filedata AS attachsize displays the filesize of the attachments :rolleyes: |
Is it possible to get an explanation of what happens during the installation process. Obviously files are going to get saved as attachments, but it doesn't say anything other than that on the thread or instructions. Specifically it would be good to know:
Thanks for any help. |
1. Yes. Attachment are ported during the installation process.
2 and 3. Only the [data] is stored in files. Other information related to attachments is still stored in the database. |
Thx for the reply rake. However, can you specify what folder these attachment files are stored upon installation / after installation?
|
just installed it on my 230 board with no problems thanks for a great hack
rob |
Quote:
Any news on this for the beta 3? |
As I'm only testing I've empted the attachment table and wiped the line in the post table also, hopefully we can get the conversion for the next version?
Thanks. |
Any idea when a conversion script to get a production board's attachments into the new vB3 format will be released?
I'd imagine that, even in beta, that this should be something that could be written now (not much chance of a change in data format during the beta process, right?) |
Quote:
|
|
THANK YOU. :)
|
Does this limit file size uploads? What I mean is do you still have to edit PHP to accept larger file size uploads? I'd like my members to be able to attach videos up to 20MB's or more.
|
Ok, I must have missed something. I have attempted to follow the path of redemption, and get my attachments working under my VB3.0 beta test. I am one of the hundreds that enjoy the attachments as files hack.
I really, really like what I have seen so far of VB3.0, but I gota beat this 1000 pound gorrilla where the attachments as files hacks is concerned. Any ideas? If any one wants a look, let me know, as I have it locked down to stay in compliance with the "no public" rule :) |
Hello BB .. have you enabled attachments as files in the VB3 backend?
Im gonna run this on my dev board then upgrade it to VB3 later. I really wanna run it over at Short-media. Been live for two weeks and the forums db is over 300mb already :ermm: Il let ya know how I get on. You are still on VB 2.3.0 aren't you? |
I installed the hack and all my dl are 0kb any insite?
|
Quote:
Then, if that part WORKS right, you can go thru the part that moves them BACK to files via the attachment manager functions. But, neither worked, for me. And I kind of figgured that, if it didn't display them properly and showed all zero file sizes when the attachments had been moved back to DB. When I used the VB3 admincp "backend" (as you are calling it, I have no idea what you meant) to move them back out, of course that failed too. 0 + 0 = 0. The attachments folder in vb 2.3.0 (yes, I got the attachments as files hack working there, too) is close to 1GB in size. Any real insight into this matter would be very helpful. |
Was wondering if this hack is kinda like what vb3 does now? It saves attachments as files and your database size will be greatly reduced correct? But Diskspace will be increase??
The main benefit that i can see and want is ease of transfering to a new server without dealing with the attachments in the database. Let me know. |
Oh my god, you do not know what this hack has done to my forum! THANK YOU SO MUCH!
I had to disable attachments due to such a large database, anyways, this is a miracle hack!! Very good work! Best Hack Ever Made!!! :banana: :banana: :banana: |
After some problems initially the hack now works on my 2.3.0 test site & I have tried attach, edit & delete attachments.
Although I delete an attachment in a post, or delete the whole post itself, the file attachment still remains in the /home/mystuff/attachments folder Why does it not delete the attachments at the same time as the thread? Have I missed something in editing another file? Thanks john |
any idea when the attachments as files hack will be ready for vb3?
|
Im just wondering if this is even worth installing alot of people have had errors so is it worth installing
|
This is a excelent hack, but I need to uninstall it and placed files back into the data base to upgrade to vB 3.0 Beta 4 on my development site.
Is there a easy way ? |
Quote:
|
WOOOOOTTT!!!
FIxed as of Beta 5 for me !! W000TTT!! PARTY ON !! :) ( i know, it doesn't take much for me) |
Quote:
Thanks for the information BB that it works with beta 5. |
Quote:
Be SURE to follow the instructions closely, and be patient. MY issue was that even thou I altered the attachpath variable to be the CORRECT value, the cache was still point back to the place I restored it FROM (an invalid path). So, I flushed cache, and ran again, and log and behold, it worked just fine. So....here is what I did.
Next up? Pushing them BACK out to the file system, along with the Av's! PARTY on VB!! I'm renewing today! Totally pleased, am I! |
All times are GMT. The time now is 01:11 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:
|