Version: 1.00, by Scott MacVicar
Developer Last Online: Mar 2016
Version: 2.2.x
Rating:
Released: 01-20-2002
Last Update: Never
Installs: 12
Is in Beta Stage
No support by the author.
This is a hack which allows you to save the attachments as files and not within the database. The main problem with this was the fact that it posed certain security issues, these have been tackled by doing the following
Placing the folder below document root
Using random hashes to name the file
Changing the file extension to .file
Never divulging the path to the file
This is a beta hack, it has been tested on a development board. I have had insufficent time to fully complete the attachment importer, this removes the files from the database and creates them as physical files in the attachment folder. I will post this as soon as possible.
Looking forward to your feedback.
Scott
To install this hack upload this file to the admin directory and then view it in your browser.
All the changes that Jawelin suggested have been applied, thanks man
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
@SaintDog
I wrote this hack on a windows2000 server and it worked fine on it, also tested it on a linux system and a raq, havent had any problems. Tested them both with and without safe mode enabled in php, again no problems.
@epic
you haven't set the path to move the files to in the options part of the control panel. There is a large paragraph at the bottom of the hack file, read this and do what it says.
Will this maintain the permission for each attachment in a private forum? I.E. if an attachment is posted in the moderators forum - will registered users still be able to see it?
Originally posted by PPN @SaintDog
I wrote this hack on a windows2000 server and it worked fine on it, also tested it on a linux system and a raq, havent had any problems. Tested them both with and without safe mode enabled in php, again no problems.
@epic
you haven't set the path to move the files to in the options part of the control panel. There is a large paragraph at the bottom of the hack file, read this and do what it says.
Please download the file and re-apply the hack there was many changes in all of the editing as well as alot of new bits to allow for editing and upload of new attachments.
I've created an installer file using the installer by Bane and Tubedogg to allow for easy changes to the sql database and an easier way to view what changes have to be made to the php files.
This is the exact same as the text file that was up earlier just it is in php form.
INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `value`, `description`, `optioncode`, `displayorder`) VALUES ('', '27', 'Attachment File Directory', '$attachpath', '/home/username/attachments', 'The directory where attachments will be stored, below the document root is recommended.', '', '1');
to
Code:
INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `value`, `description`, `optioncode`, `displayorder`) VALUES ('', '27', 'Attachment File Directory', 'attachpath', '/home/username/attachments', 'The directory where attachments will be stored, below the document root is recommended.', '', '1');
2??open admin/functions.php
change
Code:
global $safeupload,$tmppath, $allowduplicates, $allowimgsizefailure;
to
Code:
global $safeupload,$attachpath,$tmppath, $allowduplicates, $allowimgsizefailure;
But there something wrong
When i delete the attachment in post,i find the filefolder's file(.file)could not be deleted.how to solve?
epic you are using an old version of this hack which had some problems, if you had read the reply to your post it says please download the new file and install the hack again, I'll remind you that this is a beta hack so the format is constantly changing.
Its at a semi stable version just not, when you edit posts you can change attachment and it alters the files as well as the moderation of attachment is allowed.