Allows users to attach files to posts, partially based on Attachment Mod by Frank Hagstrom.
New table attach_files.
| Field | Type | Default | Description |
|---|---|---|---|
| id | INT(10) | Auto-increment attachment ID. | |
| owner_id | INT(10) | The user who downloaded the attachment. | |
| post_id | INT(10) | ID of the post the file was attached to. | |
| topic_id | INT(10) | Topic ID of post the file was attached to. | |
| filename | VARCHAR(255) | Name of the the file. | |
| file_ext | VARCHAR(64) | Extension of the file. | |
| file_mime_type | VARCHAR(64) | MIME-type of the file. | |
| file_path | TEXT | Path to the file. | |
| download_counter | INT(10) | 0 | Downloads count of the file. |
| uploaded_at | INT(10) | Time when the attachment was uploaded. | |
| secure_str | VARCHAR(32) | NULL | This string allows to limit count of attachments per post in post's writing. |
Additional fields in the “groups” table.
| Field | Type | Default | Description |
|---|---|---|---|
| g_pun_attachment_allow_download | TINYINT(1) | 1 | Permission of users group to download file. |
| g_pun_attachment_allow_upload | TINYINT(1) | 1 | Permission of users group to upload file. |
| g_pun_attachment_allow_delete | TINYINT(1) | 0 | Permission of users group to delete files. |
| g_pun_attachment_allow_delete_own | TINYINT(1) | 1 | Permission of users group to delete own files. |
| g_pun_attachment_upload_max_size | TINYINT(1) | 2000000 | Maximum size of file for uploading (in bytes). |
| g_pun_attachment_files_per_post | TINYINT(3) | 1 | Maximum count of attachments per post. |
| g_pun_attachment_disallowed_extensions | VARCHAR(64) | Extensions of files allowed for uploading (comma separated). |
Additional config values in the “config” table.
| conf_name | conf_value (default) |
|---|---|
| attach_always_deny | html,htm,php,php3,php4,exe,com,bat |
| attach_basefolder | extensions/pun_attachment/attachments |
| attach_create_orphans | 1 |
| attach_icon_folder | <FORUM_URL>/extensions/pun_attachment/img/ |
| attach_icon_extension | txt,doc,pdf,wav,mp3,ogg,avi,mpg,mpeg,png,jpg,jpeg,gif |
| attach_icon_name | text.png,doc.png,doc.png,audio.png,audio.png,audio.png,video.png,video.png,video.png,image.png,image.png,image.png,image.png |
| attach_subfolder | Generates upon the installation. |
| attach_use_icon | 1 |
| attach_disp_small | 1 |
| attach_small_height | 60 |
| attach_small_width | 60 |
| attach_disable_attach | 0 |
Notice: Undefined variable: attach_info in …\edit.php(345) : eval()'d code on line 53The error occurred on line 333 in …/pun_attachment/include/attach_func.php Database reported: Table 'site_db.posts' doesn't exist (Errno: 1146).[file]image.gif[/file]