Topic: Attachments
Well I was planning on writing this mod during the summer, but if someone already have started, then I'll rather wait (I have a feeling that I read somewhere that someone was going to do this, or is it only in my imagination?)
But if noone has started this I'll start it at the middle of next month (will go away 11days, with no contact to the computer).
Ok it's progressing nicely
Changelog:
26th july
* Attachment rules is functional. If you're allowed to post an attachment, the attach and browse button is showed.* Rules is as of now 'hardcoded' in the forum, and admin page will be added to handle this in the future.
* Both uploads and downloads is functional. Images is viewed in browser.
10th aug
*Improved the visibility on the page, now shows filesize, and number of downloads.*Fixed so that png files is viewed in the browser instead of downloaded.
11th aug
*Have fiddeled with the admin part, it now lists all the attachments, and links back to posts etc. so it's easy to alter.*Admin Edit attachment now works (need to be an admin to have the ability to alter the info in the attachment)
12th aug
* Fixed so it's possible to delete attachments, only from the admin menu at the moment.* Made the attachment administration menu avaible, (only for admins, as it's more admin stuff there, moderators will have the delete option in each post-edit)
14th aug
* Altering forum attachment rights now functional. So now all admins can alter what the max uploadsize is, and who can ul/dl the files.* If you delete the post the attachment will also be deleted, This will not work for Threads, so if the post is the first in the thread, all posts will get deleted, but the attachments will remain, so it's possible to have attachments saved if something would be deleted by mistake (it's bad enough if someone deletes a post, and might loose 1 file, but loosing hundreds isn't as fun) ... these will be possible to delete by using the 'list/delete orphans in the admin interface'.
* In the post edit you now have the option to delete the attachment. Moderators can delete posts here.
15th aug
* Fixed a bug in delete.php where I only could delete posts with attachments, this was due to using the wrong variablename. (I did try the delete only on posts with attachments )16th aug
* Listing orphans now work, one has the option to either edit it (so one can link it to a new post), delete it, or just let it lay there unused.* Fixed a bug where the listing of all attachments had pages for more attachments than listed when orphans existed.
* Added the possibility to optimize the attachment tables, to be used if one has deleted alot of messages.
17th aug
* Refined the attachment admin menu, looks better with a menu with buttons instead of ordinary links.* Clear all orphans now working.
* Other small fixes
18th aug
*Displays an icon next to the attachment when viewing a thread, icon is dependent on the mimecode for that document. The icons need further work though21th aug
* Been fiddling with filetypes, how to allow and disallow them (that's what have taken so long!), isn't as easy as it might be at a first glance, but I think I've come up with a working solution.
First there's an array within a php file with a list of extrentions that's always disallowed, BIG security risk if you allow all files for everyone! (but is ignored for admins, hey, if they're admins, you do trust them, right? ). Furthermore you can for every forum specify the files you want to allow, and then only those will be allowed(not overriding the always deny list). If you leave the files field empty, it will allow all files(except those always denied of course). Puh ... it was truly a hard thing to write... and I still have a few lines of admin pages to do for it also* Admin interface now updated to handle the file allows, and it works like a charm
* The icons next to the attachment is now dependent on if you want to see images or not. So it's possible not to have them.
21th aug
* Fixed a small bug where it was only possible to delete one orphan at a time.
25th aug
* Edit posts now allows you to replace the attachment you already have there, or to add a new attachment if there wasn't one there in the first place.
7th sept
* Added alot of new stuff throughout the time since I last updated this changelog, alot was small fixes and stuff, have now made new screenshots, showing how the 1.0 release will look like.
7th nov
* After a very busy period, I managed to wrap it out for an official release! Click here to go to release thread.
And here are a few pics how it looks atm.
The posts: (there will be more than one icontype avaible + a template)
http://stingray.campus.luth.se/attachme … wtopic.png
Admin menu:
http://stingray.campus.luth.se/attachme … h_menu.png
Admin menu, list all attachments:
http://stingray.campus.luth.se/attachme … h_list.png
Admin menu, edit an attachment:
http://stingray.campus.luth.se/attachme … h_edit.png
Admin menu, edit forums:
http://stingray.campus.luth.se/attachme … forums.png
Admin menu, alter attachment rules for forum:
http://stingray.campus.luth.se/attachme … _rules.png
Post a new reply:
http://stingray.campus.luth.se/attachme … s/post.png
Edit a message without attachment, but attachments allowed:
http://stingray.campus.luth.se/attachme … it_new.png
Edit a message with attachment, attachments allowed:
http://stingray.campus.luth.se/attachme … t_with.png
When viewing images, it's popped up in a PunBB page(was a blank page before)
http://stingray.campus.luth.se/attachme … geview.png