Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Developing Attachments 2.0
For all people who are interested: I've started Developing Attachments 2.0!
A brief history
When I started on Attachments 1, I was a Lussumo n00b... Although I had quite an understanding about the Framework, I overlooked many functions and posibilities. When I released it, it was working quite well. You could upload some files, and voila, they were displayed beneath the comment. But then people requested to be able to display images. So ithcy, jakob and Shino started customizing. I've added their contributions to the extension, but soon people wanted other features: lightbox, thickbox, secure paths, and so on.... In the process I wasn't paying attention anymore to Mark's philosophy: keeping it simple.
The future
So, what's gonna be new about Attachments 2.0? Well, I've started from the ground up and decided to think: how would Mark do it? :P
People want different things with their uploaded files: some want thumbnails, others want to just display the images. And some people want lightbox, and other want to resize images. How can you create an extension with keeping all these wishes in mind?
AttachmentFormatter
Let me introduce the AttachmentFormatter. The Attachment extension will be plain and simple: just an extension to upload files to your comments. Nothing more, nothing less. But here comes the AttachmentFormatter: you will be able to create your own extensions for my extension (still following? :P). The AttachmentFormatter will process files based on their file-extension. This way you can handle files differently. There will be events like: "OnSave", "OnDelete", "OnDisplay", "OnDownload", etc. These Formatters can be selected in the settings tab, just like with normal extensions. This way, the Attachments extension can be everyting you ever wanted
Other cool stuff
I've also been thinking about how things were being processed. In Attachments 1 I did a search for files on every comment that was displayed. So 50 comments would start 50 filesystem searches. I've changed that. When the CommentGrid is loaded, it will load the AttachmentManager which will do a search in the uploadpath that's based on the DiscussionID. Storing attachments in a discussion subdir allows the AttachmentManager to get the files much faster. Also, you won't end up with 100,000 files in one folder.
Well... that's it for now. I will keep you posted on how I'm progressing with the development. If you have any suggestions, feel free to add them to this discussion!
A brief history
When I started on Attachments 1, I was a Lussumo n00b... Although I had quite an understanding about the Framework, I overlooked many functions and posibilities. When I released it, it was working quite well. You could upload some files, and voila, they were displayed beneath the comment. But then people requested to be able to display images. So ithcy, jakob and Shino started customizing. I've added their contributions to the extension, but soon people wanted other features: lightbox, thickbox, secure paths, and so on.... In the process I wasn't paying attention anymore to Mark's philosophy: keeping it simple.
The future
So, what's gonna be new about Attachments 2.0? Well, I've started from the ground up and decided to think: how would Mark do it? :P
People want different things with their uploaded files: some want thumbnails, others want to just display the images. And some people want lightbox, and other want to resize images. How can you create an extension with keeping all these wishes in mind?
AttachmentFormatter
Let me introduce the AttachmentFormatter. The Attachment extension will be plain and simple: just an extension to upload files to your comments. Nothing more, nothing less. But here comes the AttachmentFormatter: you will be able to create your own extensions for my extension (still following? :P). The AttachmentFormatter will process files based on their file-extension. This way you can handle files differently. There will be events like: "OnSave", "OnDelete", "OnDisplay", "OnDownload", etc. These Formatters can be selected in the settings tab, just like with normal extensions. This way, the Attachments extension can be everyting you ever wanted
Other cool stuff
I've also been thinking about how things were being processed. In Attachments 1 I did a search for files on every comment that was displayed. So 50 comments would start 50 filesystem searches. I've changed that. When the CommentGrid is loaded, it will load the AttachmentManager which will do a search in the uploadpath that's based on the DiscussionID. Storing attachments in a discussion subdir allows the AttachmentManager to get the files much faster. Also, you won't end up with 100,000 files in one folder.
Well... that's it for now. I will keep you posted on how I'm progressing with the development. If you have any suggestions, feel free to add them to this discussion!
0
This discussion has been closed.
Comments
If there are going to be lots of options, I think the simple thumbnail version should be the standard option - low mess and low overhead page loads that don't exclude slower connections.
Similar to what Wallphone said: is there any sensible way to make attribute images not only to the discussion but also to the user? I'm sure the user gallery wish is somewhere down the line and uploading stuff twice seems unnecessary from a user point of view.
I'm still running an earlier version before you changed path processing, so I think your simplify-clarify approach is good!!
If you need a hand anywhere, just say so!
That way you could style a paperclip icon next to the discussion as appropriate.
Is this all you do?