## MOD Title:
## Store phpBB3 attachments in subfolders
## MOD Description:
## 1. Store the attachments in subfolders. The subfolders can be named by month or user id
## 2. [Optional] Store the attachments with real file names and extensions
## 3. [Optional] Expose the direct physical file links instead of using the file output by php script
##
## MOD Author:
## IOsetting
## http://www.phpbbchina.com
##
## MOD Version: 1.0.1 for phpBB 3.0.6
## Installation Level: Middle
## Installation Time: 15 minutes
##
## Files To Edit:
## common.php
## download/file.php
## includes/functions_admin.php
## includes/functions_content.php
## includes/functions_posting.php
## includes/functions_privmsgs.php
## includes/functions_upload.php
##
## Included Files:
## convert_attachment.php
## includes/functions_extra.php
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##
##############################################################
## MOD History:
##
## 2009-12-29 - Version 1.0.1
## 2008-08-19 - Version 1.0.0
##
##############################################################
##
## You should test it in your test environment before using on production
## You should back up all attachments and back your database
##
##############################################################
The script for [Optional feature #2 and #3]: Rename all existing hashed files to real names:
It will rename all attached files to real file name and real extension, and update the relevant records in database. You should run this script before adding any new attachements once you get this MOD installed.
1. Copy convert_attachment.php to your forum root.
2. Open this file and change the interval settings. The number indicates how many attachments will be handled in each page execution.
Code: Select all
$interval = 10;
3. Visit it via your browser, follow the "next" links till it shows "Complete".
4. Remove convert_attachment.php when the above are done
.httaccess should be modified to compatible with optional feature #3
Download1
Download2