Attach files to posts and pages
Author: Trustmaster
Submitted by: Trustmaster
Date: 2008-06-04 14:54
Comments: (4)
Ratings:
 
This plugin tightly integrates one of the most wanted functions for Seditio Framework.

Features:
1. Attach files to pages and forum posts.
2. Does not use PFS.
3. Multiple attachments per post.
4. Size limits set in Seditio user groups configuration.
5. Thumbnails for attached images.
6. Paper clip button in topic list to show all attachments in topic.
7. Preview image in page category listing for automated showcases.
8. 100% skinnable, internationalization support.
9. Seditio permissions system used (Read/Write/Admin).
10. Verbose error output.
11. Disk/database cleanup utility.
12. A lot of customizable settings.
13. Personal attachments management.
14. Gmail-like interface support and examples.

Requirements:
1. File uploads support on in webserver configuration.

Installation:
1. Put the «attach» plugin into your Seditio plugins folder.
2. Log into your Admin panel and install «File Attachments» plugin.
3. Go to Admin => Configuration => «attach» and configure the plugin for your needs.
4. Make sure the directory you specified in configuration is writable for PHP.
5. Go to Admin => Tools => File Attachments and click «Install» to install the database table required by plugin.
6. Edit your skin files. You can find the list of all available tags on plugin installation page (admin.php?m=plug&a=details&pl=attach). There are example pieces of TPL files in the bundled «example_tpl» folder.
7. Don't forget that all the forms in forums.editpost.tpl, forums.newtopic.tpl, forums.posts.tpl, page.add.tpl and page.edit.tpl MUST have an attribute enctype="multipart/form-data".
8. You can also edit a popup template in «plugins/attach/tpl/attach.tpl» or you can create your own template in «skins/YOUR_SKIN/plugin.standalone.attach.tpl».
9. Have fun!

Update:
1.0.2-1.0.3
1.Just update files in «plugins/attach», reinstall and reconfigure plugin.
1.0.1-1.0.2
1.Update your «plugins/attach» with the files supplied.
2.Remove static «value» attribute from attachment caption input tag in forums.newtopic.tpl, forums.posts.tpl and page.add.tpl. See «example_tpl» files.
1.0.0-1.0.1
1.Update your «plugins/attach» with the files supplied.
2.Go to Admin => Plugins => File Attachments and run Install.
3.Configure your plugin instance. Notice the new «Enable files in user subdirectories» option.
4.Modify your template files. See «example_tpl» and Admin => Plugins => File Attachments.

Important details:
1. You should run the «Clean up» tool in Admin => Tools => File Attachments from times to times, because plugin can't automatically remove attachments when whole topics or categories are removed (it does it when single posts or pages are removed). This tool removes attachments which belong to posts which don't exist anymore.
2. When you edit a post, there are several options for each upload field:
- You can change titles only (default).
- If you want to replace an existing attachment with a new file, you should choose a file by clicking the «Browse» button. Then check the «Replace» checkbox. In this case the previous file will be replaced gently. If you check both «Replace» and «Delete» boxes, this will remove an original file and add a new one, so the cache update is forced.
- You can delete an existing attachment by checking the «Delete» checkbox.
- You can add more attachments if there are vacant attachment rows left.
3. Don't forget to set single file size limit and total file space for each user group in Admin => Users => {Target group}.
4. Don't forget to set correct permissions in Admin => Plugins => File Attachments => Rights (admin.php?m=rightsbyitem&ic=plug&io=attach). «R» means viewing and downloading files, «W» means adding your own attachments, «A» means editing attachments owned by others.
5. The «Preview image» feature for list.php means that the thumbnail of the first image attached to a page will be shown in category listing as a «preview image» which is good for skin shops and other automated showcases.

Known issues:
1. If using «Auto Joining Posts» plugin, when the poster is the same as the previous in topic, the post gets joined to the previous one and files are not attached. So, to attach the files in this case a poster needs to edit the previous post instead of bumping a new one.
2. «Autovalidation» plugin seems to be broken with this one. So there is a complete replacement integrated into this plugin and a configuration option to switch it on or off.
3. Some custom rewrite corehacks conflict with attachment error message transmission.

Better interface:
This plugin is 100% skinnable and customizable but still you may think that all these massive file boxes look ugly in comparison with vBulletin or IPB windows, boxes and AJAX. In Seditio we know another fast, easy and handy way to achieve similar goals. For example, we can make handy Gmail-like interface for our attachment boxes. Here is a HOWTO:

1. All you need is located in «example_tpl/gmail-style» folder. These are just a few modifications to the template files: no coding or corehacks needed.
2. Open «gmail-style.js». You can put it to your skin folder and include this script file, or you can paste it in <script></script> of your header.tpl. However, this script should be included in your pages as you usually include JavaScript code in your template.
3. Modify forums.editpost.tpl, forums.newtopic.tpl, forums.posts.tpl, page.add.tpl, page.edit.tpl as shown in «example_tpl/gmail-style». Pay attention for divs and «Attach file» link.

Changelog:
1.0.3
- Better support for showcase preview images in list (useful for catalogues).
- Eliminated image XSS possibilities.
- Fixed a bug with custom attachment titles.
1.0.2
- A few bugfixes.
- Original filenames added as caption by default.
- Admin infotool for attachments by ID.
1.0.1
- User subfolders feature (backwards compatible).
- Anti-bump conflict fixes.
- Added «Personal attachments space» management, see the new tags and TPL examples. You may add links to personal attachments in any page/template: plug.php?o=attach&uid=USER_ID.
- Improvements in attachment control and various fixes.
- Gmail-like interface support and examples.



Download : File Attachments 1.0.3
Size: 140KB, downloaded 314 times
Copyright © 2008 Domain.Com. All Rights Reserved.
Page created in 0.132 seconds