News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Suggestion: SUB-Folders for Attachements??

Started by andrei23, May 11, 2011, 09:06:18 PM

Previous topic - Next topic

andrei23

 
Hi There,

I'm running SMF 1.1.12 (please don't tell me to migrate to 2... simply too much data, and the upgrades from 10 to 11 and then 12 didn't inspire much confidence), and I've run across something I'm amazed your developers didn't think of:

Why are ALL attachments from all posts simply dumped into the same /attachments folder?  Hosted Linux servers apparently have a limit of 1024 files per individual folder.  A much better idea (I think) would be to create a separate SUB-folder for each forum category.  Please, please consider it?

In the meantime, I need to think of a way to get my entire company back on it's feet.  We're dead in the water.  They simply SHUT ME DOWN, no warning, no nothing.  So much for "99% up-time".  >:(  Of course, having ACCESS to my files (either via web/forum or FTP) would be a huge help to starting the clean-up effort!

Until I can migrate to a more advanced forum platform, I guess I'll have to make a "no uploads" policy, force everyone to use external links.  Sad for the users.

Oh, and I know it is "open source" software, but that doesn't mean it cannot be great.  (And I've actually made donations on more than one occasion.)


青山 素子

Quote from: andrei23 on May 11, 2011, 09:06:18 PM
I'm running SMF 1.1.12 (please don't tell me to migrate to 2... simply too much data, and the upgrades from 10 to 11 and then 12 didn't inspire much confidence), and I've run across something I'm amazed your developers didn't think of:

Why are ALL attachments from all posts simply dumped into the same /attachments folder?

Back in the 1.x days, attachments weren't used as heavily, so there weren't many problems.

2.0 and above support multiple attachment directories, but the feature won't find its way into 1.1.x unless someone codes a modification for the feature as the 1.1 branch is for maintenance fixes only.


Quote from: andrei23 on May 11, 2011, 09:06:18 PM
Hosted Linux servers apparently have a limit of 1024 files per individual folder.

No, they don't. Some hosts impose weird limits in an attempt to limit use without imposing "limits". Even ancient old ext2 will support 1.3 × 10^20 files per directory (in theory). I believe ReiserFS, XFS, JFS and ZFS don't have a limit on the number of files in a directory. Heck, FAT32 will support 65535 files in a directory, although that's probably not wise.


Quote from: andrei23 on May 11, 2011, 09:06:18 PM
A much better idea (I think) would be to create a separate SUB-folder for each forum category.  Please, please consider it?

What happens when you move a topic that has attachments from one category to another?


Quote from: andrei23 on May 11, 2011, 09:06:18 PM
In the meantime, I need to think of a way to get my entire company back on it's feet.  We're dead in the water.  They simply SHUT ME DOWN, no warning, no nothing.  So much for "99% up-time".  >:(  Of course, having ACCESS to my files (either via web/forum or FTP) would be a huge help to starting the clean-up effort!

Contact the company. They should be able to give you access to the files in one way or another.


Quote from: andrei23 on May 11, 2011, 09:06:18 PM
Until I can migrate to a more advanced forum platform, I guess I'll have to make a "no uploads" policy, force everyone to use external links.  Sad for the users.

Oh, and I know it is "open source" software, but that doesn't mean it cannot be great.  (And I've actually made donations on more than one occasion.)

See above about 1.1 being on maintenance. The feature will not be officially backported by the team. A modification is the only option, but that's unlikely given the age of the 1.1 codebase.


One lesson learned: Don't run a company on a value hoster. If your business depends on the site, get proper hosting with a proper, signed, SLA.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


andrei23

What happens when you move a topic that has attachments from one category to another?

A re-direct link, just it does with text messages?  I'm not a programmer, just offering a suggestion from a user's standpoint.  I suppose you could do it exactly the way 2 does it?

Is a 1.1.11 to 2 migration possible?  Complicated?  Will I be able to  keep my bells & whistles (like custom "badges" for people based on # of posts, or group membership)?  I remember the upgrade from 10 to 11 was pretty hairy, that's what's kept away from 2.

One lesson learned: Don't run a company on a value hoster.

Gee, thanks for the sympathy.   ???  GoDaddy, being THE largest hosting provider in the world, I thought I was buying into robust, not "value".  But, agree, I should have listened to my web guy who wanted to put our own server in-house, and not rely on external services.

Well, for anyone reading... stay clear of GoDaddy!   :)

青山 素子

Quote from: andrei23 on May 11, 2011, 09:54:10 PM
What happens when you move a topic that has attachments from one category to another?

A re-direct link, just it does with text messages?  I'm not a programmer, just offering a suggestion from a user's standpoint.  I suppose you could do it exactly the way 2 does it?

I'm talking about the idea of storing attachments based on the location of a post with which they are associated. Once you move posts like that, you either lose the mapping, or have to start juggling files. Neither is a really good idea. My personal preference is to do similar to a mailspool where there are nested directories and ordered by filename hash.


Quote from: andrei23 on May 11, 2011, 09:54:10 PM
Is a 1.1.11 to 2 migration possible?

Yes, via upgrade.php and the large upgrade package.


Quote from: andrei23 on May 11, 2011, 09:54:10 PM
Complicated?

Depends, but not more so than the average manual upgrade between 1.1 versions. Of course, making backups is always a good idea.


Quote from: andrei23 on May 11, 2011, 09:54:10 PM
Will I be able to  keep my bells & whistles (like custom "badges" for people based on # of posts, or group membership)?  I remember the upgrade from 10 to 11 was pretty hairy, that's what's kept away from 2.

Anything you did in SMF proper will be retained. Features changed/enhanced via modifications will not carry over and you'll either need to use an updated version of that modification or a modification that offers the same functionality. For most people, it will be fairly boring.


Quote from: andrei23 on May 11, 2011, 09:54:10 PM
One lesson learned: Don't run a company on a value hoster.

Gee, thanks for the sympathy.   ???  GoDaddy, being THE largest hosting provider in the world, I thought I was buying into robust, not "value".  But, agree, I should have listened to my web guy who wanted to put our own server in-house, and not rely on external services.

Yeah, GoDaddy operates on the "stuff into as tight a place as possible" principle. General rule is that if the service offers "unlimited" resources, it's usually a scam and there's a catch. Big doesn't always equal good.

External hosts are quite fine, I encourage you to do some research before purchasing hosting. I'm not sure if I'm allowed to in here, but I know the place I work at for my day job offers quite nice plans for businesses. Not cheap, but the service isn't cut-rate. I'm sure there are plenty of other hosting companies that do the same.

In-house is fine if you have the experience on your payroll, but it also carries a lot of risk and time investment for updates, patching, monitoring, etc. It's not for everyone, and I'd only recommend it if your core business happens to include the running of servers.


Quote from: andrei23 on May 11, 2011, 09:54:10 PM
Well, for anyone reading... stay clear of GoDaddy!   :)

So true.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


andrei23

 
Thank you SO much for your assistance, 青山 素子 - truly appreciated.

I understand regarding making recommendations in a public forum.  If it is okay with your policies, you can always send me a link in PM, and if not I understand completely.

Regarding migration, I don't think I have ever done it "manually", there was always a patch which I downloaded and ran from within SMF which did most of the work.  There were some some issues with one of the files not running after the upgrade (going from 10 to 11), and after a bit of digging in this forum I found the offending lines of code and simply copied & pasted the version 10 lines into the version 11 files and that fixed it.  But, for a non-programmer like me, that was pretty hairy.   :)

We do not use any custom mods or anything like that (and we actually like your default theme) - more so replacing some of the graphical images to suit our website's topic theme.  As long as version 2 uses the same filenames for things it should be fine, and if not I suppose I found it the first time, so should be able to do so again.

So version 2 does a better job of managing attachments, and doesn't put them all into the same directory, correct?

Thank you again.

青山 素子

Quote from: andrei23 on May 12, 2011, 12:45:15 AM
I understand regarding making recommendations in a public forum.  If it is okay with your policies, you can always send me a link in PM, and if not I understand completely.

Since you asked, I'll do so.


Quote from: andrei23 on May 12, 2011, 12:45:15 AM
Regarding migration, I don't think I have ever done it "manually", there was always a patch which I downloaded and ran from within SMF which did most of the work.  There were some some issues with one of the files not running after the upgrade (going from 10 to 11), and after a bit of digging in this forum I found the offending lines of code and simply copied & pasted the version 10 lines into the version 11 files and that fixed it.  But, for a non-programmer like me, that was pretty hairy.   :)

Yeah, it's not like that. You'd get a new, clean, set of files and overwrite the old ones completely. Then you load /upgrade.php and follow the steps. It works fairly well, but I advise doing a test run before doing so in production. I'm a server admin for a living, so I tend to do a lot of this kind of deployment stuff.


Quote from: andrei23 on May 12, 2011, 12:45:15 AM
We do not use any custom mods or anything like that (and we actually like your default theme) - more so replacing some of the graphical images to suit our website's topic theme.  As long as version 2 uses the same filenames for things it should be fine, and if not I suppose I found it the first time, so should be able to do so again.

Okay, you'll be better off than most then. The package manager package list should be sparse then, other than the update packages.


Quote from: andrei23 on May 12, 2011, 12:45:15 AM
So version 2 does a better job of managing attachments, and doesn't put them all into the same directory, correct?

Well... It still uses a single folder by default, but you can add additional folders as needed. There are some tips on cleaning up the attachments in the boards around here.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: