## ## ## Mod title: Attachment Mod ## ## Mod version: 2.0.1 ## Works on PunBB: 1.2.5 ## Release date: 2005-04-28 ## Author: Frank Hagstrom (frank.hagstrom+punbb@gmail.com) ## ## Description: This mod will add the ability for attachments beeing ## posted in PunBB 1.2.5 ## ## Affected files: delete.php ## edit.php ## moderate.php ## post.php ## viewtopic.php ## ## Affects DB: Yes ## ## Notes: This is the second Attachment Mod I have written. The ## earlier mod used the database to store the binary data, ## for a huge amount of files, this might start getting hard ## to make backups etc. of. (first mod was intended for few ## files, not gigabytes of data, but I have come closer and ## closer to this, and would like to be able to keep it on ## files instead.) ## ## To be able to get attachments, one need to enable upload ## of files in PHP, and set the max_file_size (and some ## other variables, so read documentation after installing ## the mod) ## There's now no longer any need of having large buffers ## for the database, so these can be returned to the values ## one had before installing the first mod (if you have that ## installed, but I guess you should do that after the files ## has been converted to disk files) ## ## There's also no need for editing php files to set options, ## these are set in the Administration interface, located in ## the Plugins menu. These are cached and should therefore be ## at least just as quick (perhaps quicker as they're ## combined with the forum config), so it's easier to ## administrate the mod now, adding icons, and such. ## ## Another great new thing done is that you only have to ## backup each file once, as there will never be two files ## with the same name in a directory. So one only need to ## download the new files from the subfolders, old deleted ## files will be emptied (0 bytes), but still be in the ## folders to keep new attachments to get the same name. As ## if they would, one would need to download all files during ## backup procedure. ## ## And as a further upgrade, posts are no longer limited to ## one attachment per post. I still have a limit of one file ## per opportunity (i.e. one on post creation, rest on edit), ## but the admin set the limit of max files per post, a per ## group and per forum basis. ## ## I strongly suggest you read the whole documentation ## before start using the mod, the documentation is in the ## Administration interface. Or at the very least the first ## chapter! ## ## ## ## **** PREPARATIONS NEEDED TO BE DONE FIRST! **** ## ## 1. Backup! ## 2. Create a directory where you want the attachments to ## be stored. (Suggestion is somewhere the browser does ## NOT reach, if not bruteforcing to find files is ## possible) ## 3. Make sure php is allowed to create files and ## directories in the above directory. ## ## Written by Frank H ## on: 2005-04-12 17:11 ## ## DISCLAIMER: Please note that "mods" are not officially supported by ## PunBB. Installation of this modification is done at your ## own risk. Backup your forum database and any and all ## applicable files before proceeding. ## ##