[ABD]Store phpBB3 attachments in subfolders

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
jokoba
Registered User
Posts: 49
Joined: Tue Jan 05, 2010 9:10 am

[ABD]Store phpBB3 attachments in subfolders

Post by jokoba »

##############################################################
## 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;
[You should back up all attachments and back your database before this step]
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
Last edited by jokoba on Tue Feb 02, 2010 10:41 am, edited 2 times in total.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18490
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón

Re: [RC]Store phpBB3 attachments in subfolders

Post by DavidIQ »

Please only provide the download links and any additional needed information. The actual instructions should not be posted in the post. I've changed your post to reflect the above. Thanks.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
jokoba
Registered User
Posts: 49
Joined: Tue Jan 05, 2010 9:10 am

Re: [RC]Store phpBB3 attachments in subfolders

Post by jokoba »

Thanks and sorry for that :)
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC]Store phpBB3 attachments in subfolders

Post by IPB_Refugee »

Hello jokoba,

nice idea, because having several thousands attachments in one folder may slow down the board (that's maybe even worth a bug report).
Store the attachments in subfolders. The subfolders can be named by month or user id
Does that mean, that new subolders will be created automatically every month? E.g.:

files/2010-02/
files/2010-03/
files/2010-04/

And every posted attachment will be stored in the correct subfolder automatically? And is there a script that puts already existing attachments in the correct subfolders austomatically? E.g.:

files/2005-12/
files/2007-01/

Regards
Wolfgang
gamecharmer
Registered User
Posts: 62
Joined: Sat Dec 30, 2006 7:46 am

Re: [RC]Store phpBB3 attachments in subfolders

Post by gamecharmer »

Any update on this? This will be an excellent mod!
Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: [RC]Store phpBB3 attachments in subfolders

Post by Bramster. »

Did this mod ever make it ?

My host is complaining there are too many files in my attachement directorie and a good mod like this might be the solution I am looking for
User avatar
KeithR
Former Team Member
Posts: 750
Joined: Mon Jun 16, 2008 6:59 pm
Location: Manchester, UK
Name: Keith R

Re: [RC]Store phpBB3 attachments in subfolders

Post by KeithR »

This topic has been marked as [ABD] - Abandoned as the mod author has not been active since 19 Apr 2010. If the MOD author wishes to continue development, please PM anyone on the MOD Team to request this topic be unlocked.

Thank you,

On behalf of:

The phpBB Modifications Team

KeithR

Return to “[3.0.x] Abandoned MODs”