Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 9 Years, 1 Week ago moving from phpbb3 to.....?
#1
Solved: 9 Years, 1 Week ago
Hi all,

Our current host is not happy with our 100,000 plus attachment files in one folder of our phpbb3 forum.

We are looking to convert to a forum that supports an attachment sub-directory scheme.

Does MyBB have this feature, or will all attachments be in one folder again?

Thanks

Pim
#2
Solved: 9 Years, 1 Week ago
Attachments are stored by their month in the uploads directory. Smile
No longer involved in the MyBB project.
#3
Solved: 9 Years, 1 Week ago
Awesome! That was the answer I was hoping for.

Happy Thanksgiving!

Pim

(2012-11-22, 04:40 AM)Nathan Malcolm Wrote: Attachments are stored by their month in the uploads directory. Smile
#4
Solved: 9 Years, 1 Week ago
Ok.....I've used the merge tool with an old phpbb3 forum.

Merging seemed to go flawlessly, but when I checked, all attachments were dumped in one directory, and not in a sub-directory scheme as hoped.

Attachments from new post are stored in a month (201211) sub-directory, which is great.

When doing the merge with the intended forum (the one with 100,000 attachments in one directory) the attachments will once again be dumped in one directory, and therefore not solve anything Sad

Am I missing somehting?

Thanks

Pim
#5
Solved: 9 Years, 1 Week ago
This user has been denied support. This user has been denied support.
MyBB supports both (or anything you like as long as you put it in the attachments table that way), maybe that's why the merge system doesn't do the folders thing outright...?

The question is whether phpBB stores the time the attachment was uploaded (so you know which year/month to use for the folder), and whether the merge system carries that information over to the MyBB attachments table (dateuploaded column). If so you could create the month folders and update the attachname/thumbnail columns with a script (that moves files and updates database tables). The database update could probably be done with a single query using MySQL's date/time formatting options (not considering possible timezone issues).

Alternatively you could change the code that handles attachments in the merge system, and redo the merge. I haven't looked at the code so I don't know how hard it would be.

OK from looking at the merge system code, it seems that the merge system simply uses an old method to store attachments. No subfolders, no random string in the filenames, thus access control to these attachments can be circumvented. Also it doesn't look like it puts the dateuploaded into the attachments table even though the information is available and used to build the filename. (but this is a guess, from reading the code, I haven't actually tried it).

It could be fixed with a few changes to the merge system. Look at the merge/boards/phpbb3/attachments.php file, convert_data() (for the intended filename) and after_insert() functions (for actually creating the subfolders and putting the files in there).


Forum Jump:


Users browsing this thread: 1 Guest(s)