################################################################# ## MOD Title: File Attachment Mod v2 ## MOD Author: Acyd Burn < N/A > (Meik Sievertsen) http://www.opentools.de ## MOD Description: ## This Mod adds the ability to attach files in phpBB2. ## This Version is Tested and works with phpBB 2.0.6/2.0.7/2.0.8/2.0.9 and 2.0.10. ## This Version will NOT work with phpBB2 Modules designed for *Nuke Portals or phpBB2 Ports. ## MOD Version: 2.3.10 ## ## Installation Level: Intermediate ## Installation Time: 30-60 Minutes ## Files To Edit (30): common.php, faq.php, modcp.php, posting.php, privmsg.php, ## viewforum.php, viewtopic.php, admin/admin_forumauth.php, admin/admin_ug_auth.php, admin/admin_forums.php, ## admin/admin_groups.php, admin/admin_users.php, includes/auth.php, includes/functions.php, includes/functions_admin.php, ## includes/prune.php, includes/topic_review.php, includes/usercp_viewprofile.php, modcp_body.tpl, posting_body.tpl, ## posting_preview.tpl, posting_topic_review.tpl, privmsgs_body.tpl, privmsgs_preview.tpl, privmsgs_read_body.tpl, ## profile_view_body.tpl, viewforum_body.tpl, viewtopic_body.tpl, admin/group_edit_body.tpl, admin/user_edit_body.tpl ## Lines(!) To Add: 115 ## Included Files: many many files ############################################################## ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## If you want to update from previous versions please read the documentation in docs/update. ## ## Please follow the Installation Instructions as strict as you can. ## ## The Attachment Mod User Guide (docs/user_guide.html) is very helpful if you have problems. ## The User Guide describes this Mod Template Format too, if you are not familiar with Mods, you should read ## the User Guide before installing this Mod. ## ## This Mod was tested with the following databases: ## MySql, MSSQL, PostgreSQL (only Version 7.0.3 tested) ## ## A forword: ## If you use a plain phpBB2 Board (not modded) and do not want to edit your phpBB2 files, you ## are able to use pre-edited files, located at the contrib directory. ## Even if you use the pre-edited files, you have to follow all Steps (not the file-editing of course) ## listed here. ## ## Additionally, you should read the Attachment Mod User Guide if you are unfamiliar with installing Modifications. ## ## ## Features: ## - Full Permissions System ## You are able to set Download Permissions, Upload Permissions and Extension Groups per Forum Permissions. ## - Able to add comments to Attachments ## - Automatic Deletion of Attachments if Posts got deleted (manual Delete, pruning, within the Moderator Control Panel or the User Attachment Control Panel) ## - Editing of existing Attachments. ## Able to Delete/Add/Change Comment and Update Attachments while editing Posts. ## - even if the local path for Attachments is changed in admin, all previous posted attachments will be displayed correctly ## - category support - special behaviour instead of just presenting a link ## - Special Behaviour on Images: ## Thumbnail Support ## Image Link Presentation depending on Dimensions ## Inline Images ## - Stream Files directly within Posts. Supported Types: ## aif, aifc, aiff, asf, asx, au, avi, ivf, m3u, mid, midi, mlv, mp2, mp3, mp2v, mpa, mpe, mpeg, mpg, mpv2, rmi, snd, wav, wax, wm, wma, wmx, wmv, wvx ## - Play Flash Files within Posts. Support for compressed Flash MX Files. ## - little image definable for displaying in front of Attachments and Threads containing Attachments. ## Able to define an Image for Forum View and for every Extension Group. ## - Maximum Upload Size definable. ## Maximum Upload Size per Extension Group definable. ## - Multiple attachments in one post ## maximum number of attachments per post definable ## - multiple attachments in one PM ## maximum number of attachments per PM definable ## - Attachment Quotas: ## - Overall Attachment Quota ## - User Attachment Quotas ## - Group Attachment Quotas ## - Quotas are definable for PM Boxes and Upload ## - download counter ## - Download Method selectable for every Extension Group ## This is very useful for Datatypes needing a 'real' link, for example real media files ## - three Upload Methods: ## - Normal Upload ## - FTP Upload ## - FTP Remote Upload ## - Able to display Attachments in Preview Window ## - Able to display Attachments in Review Window ## - User Attachment Control Panel ## - Attachment Limit Box within Private Message Box ## - Attachment Upload Stats in Users Profile ## ## - Special Admin Modules: ## - Manage Forbidden Extensions ## - Manage allowed Extensions (Delete, Add, Assign new group) ## - Manage Extension Groups ## - Manage Special Categories ## - Synchronize Attachments ## - Delete Shadow Attachments (those Attachments not deleted with posts, for what reason ever) ## - a complete Attachment Control Panel (with an integrated search feature) ## - much more. To sum it up, a fully customizable Attachment Feature for your Board. ## ## - Language Packs: ## for up-to-date Language Packs and Informations please visit http://www.opentools.de ## (if someone is willing to translate the Attachment Mod to other Languages, please have a visit at the Language Pack Forum at www.opentools.de) ## ## - database-support: mysql, mysql4, mssql, mssql-odbc, postgresql ## ## Credits: ## ## Thanks to all people translating this Mod into their language and offering their work. ## Also a big thank you to those supporting this Mod and offering help to those having problems. ## ## Additional: ## [ FAQ ] - torgeir andrew waterhouse ## ## Special Thanks to: ## Neil Mickelson, SHS`, Water, Kail, DareDevil, vHiker, morpheus2matrix and all People contributing their time and effort to this Mod. ## ## ## ## The following sites also contain the latest version of this MOD: ## ## http://www.opentools.de ## http://sourceforge.net/projects/acydmods ## http://www.phpbb.com/mods ## ## Full support for this MOD can be obtained at: ## http://www.opentools.de ## ## This MOD is released under the GPL License. ############################################################## ## MOD History: ## ## 2004-08-01 - Version 2.3.10 ## - fixed vulnerability in uacp.php (deleting attachments) ## - fixed bug in attach_rules.php - wrong filesize display ## - updated pre-edited files to be compatible with phpBB 2.0.10 ## - auth rules only checked for auth_attachments and auth_download ## - dropped addons directory (let the creator more freedom to maintain his work) ## - change thumbnail creation (new algorythm to calculate image sizes) ## - real GD2 support, fixing some issues ## - more small fixes here and there... mostly pointed out by users ## ## 2003-09-02 - Version 2.3.9 - repackage ## - fixed little bug preventing comments to show correctly ## - fully EasyMod compatible (hopefully) ## ## 2003-08-30 - Version 2.3.9 ## - Fixed possible XSS vulneribility - FX ## - Fixed Bug: filename (input field) got not deleted after adding a file ## - Changed default quota priority from group/user to user/group ## - Added GD2 compatibility switch to Special Categories Screen ## - Added version number to Attachment Mod ACP Controls ## - Updated pre-modded files to phpBB 2.0.6 ## - Fixed non-saving of configuration variables if cache folder is there and not writable ## - Admins are no longer able to attach files to Private Messages, if this is disabled board wide ## - deleted all occurrences of attach_sql_query calls - mainly for compatibility ## - deleted attachment explain code - attachment debug addon is no longer available (please remove this from your board) ## - updated slideshow addon (if you update, please replace your old slideshow.php with the new one) ## ## 2003-06-19 - Version 2.3.8 ## - Fixed security bug - able to execute code on the client side ## - Removed: auth_read permissions to be set with auth_download ## - Fixed bug: thumbnail creation ## - Fixed bug: download with Mozilla ## - "Delete no longer used thumbnails" added to Synchronize Attachments Screen ## ## 2003-03-09 - Version 2.3.7 ## - hopefully fixed issues with the admin panel and hoster unable to correctly setup apache+php ## - added post id (and user id) sync to the Attachment Synchronization Panel ## - fixed user id assignment bugs within editing posts ## - adjusted thumbnail functions to be more error-proof. ## - fixed wrong display and deletion of Private Message Attachments within the User ACP. ## - changed header order in download.php and send content-length ## - add cryptic filename support (you have to manually enable this one within the posting_attachments.php file) ## - integrated the download_secure mechanism into the download.php file (commented out) ## - fixed bug with zlib.output_compression enabled (within PHP or Apache) ## - fixed general ob_gz_handler() issues with compressed files. Now re-compressing should not occur. ## - added Slideshow/Photogallery (available as Addon) - vHiker (see addons/slideshow_mod/install.txt) ## ## ## for the complete Revision History, please check the revision.txt file. ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # # Here starts the Installation, follow the steps very close. # # # STEP NUMBER I: Uploading all new Files # # Copy/Upload all files to their respective Location (the directory structure is in the folder root) # The left side shows the location of the file you should have after decompressing the package, # the right side shows the location the file must be copied to, it is always the phpBB Root path (where the config.php file is stored at). # # attach_mod/root/download.php -> download.php # attach_mod/root/uacp.php -> uacp.php # attach_mod/root/attach_rules.php -> attach_rules.php # attach_mod/root/admin/admin_attach_cp.php -> admin/admin_attach_cp.php # attach_mod/root/admin/admin_attachments.php -> admin/admin_attachments.php # attach_mod/root/admin/admin_extensions.php -> admin/admin_extensions.php # attach_mod/root/attach_mod/attachment_mod.php -> attach_mod/attachment_mod.php # attach_mod/root/attach_mod/displaying.php -> attach_mod/displaying.php # attach_mod/root/attach_mod/index.htm -> attach_mod/index.htm # attach_mod/root/attach_mod/pm_attachments.php -> attach_mod/pm_attachments.php # attach_mod/root/attach_mod/posting_attachments.php -> attach_mod/posting_attachments.php # attach_mod/root/attach_mod/includes/constants.php -> attach_mod/includes/constants.php # attach_mod/root/attach_mod/includes/functions_admin.php -> attach_mod/includes/functions_admin.php # attach_mod/root/attach_mod/includes/functions_attach.php -> attach_mod/includes/functions_attach.php # attach_mod/root/attach_mod/includes/functions_delete.php -> attach_mod/includes/functions_delete.php # attach_mod/root/attach_mod/includes/functions_filetypes.php -> attach_mod/includes/functions_filetypes.php # attach_mod/root/attach_mod/includes/functions_includes.php -> attach_mod/includes/functions_includes.php # attach_mod/root/attach_mod/includes/functions_selects.php -> attach_mod/includes/functions_selects.php # attach_mod/root/attach_mod/includes/functions_thumbs.php -> attach_mod/includes/functions_thumbs.php # attach_mod/root/attach_mod/includes/index.htm -> attach_mod/includes/index.htm # attach_mod/root/files/index.php -> files/index.php # attach_mod/root/images/icon_clip.gif -> images/icon_clip.gif # attach_mod/root/images/icon_disk.gif -> images/icon_disk.gif # attach_mod/root/images/icon_disk_gray.gif -> images/icon_disk_gray.gif # attach_mod/root/templates/subSilver/add_attachment_body.tpl -> templates/subSilver/add_attachment_body.tpl # attach_mod/root/templates/subSilver/posted_attachments_body.tpl -> templates/subSilver/posted_attachments_body.tpl # attach_mod/root/templates/subSilver/posting_attach_body.tpl -> templates/subSilver/posting_attach_body.tpl # attach_mod/root/templates/subSilver/posting_attach_rules.tpl -> templates/subSilver/posting_attach_rules.tpl # attach_mod/root/templates/subSilver/uacp_body.tpl -> templates/subSilver/uacp_body.tpl # attach_mod/root/templates/subSilver/viewtopic_attach_body.tpl -> templates/subSilver/viewtopic_attach_body.tpl # attach_mod/root/templates/subSilver/admin/attach_cat_body.tpl -> templates/subSilver/admin/attach_cat_body.tpl # attach_mod/root/templates/subSilver/admin/attach_cp_attachments.tpl -> templates/subSilver/admin/attach_cp_attachments.tpl # attach_mod/root/templates/subSilver/admin/attach_cp_body.tpl -> templates/subSilver/admin/attach_cp_body.tpl # attach_mod/root/templates/subSilver/admin/attach_cp_search.tpl -> templates/subSilver/admin/attach_cp_search.tpl # attach_mod/root/templates/subSilver/admin/attach_cp_user.tpl -> templates/subSilver/admin/attach_cp_user.tpl # attach_mod/root/templates/subSilver/admin/attach_extension_groups.tpl -> templates/subSilver/admin/attach_extension_groups.tpl # attach_mod/root/templates/subSilver/admin/attach_extensions.tpl -> templates/subSilver/admin/attach_extensions.tpl # attach_mod/root/templates/subSilver/admin/attach_forbidden_extensions.tpl -> templates/subSilver/admin/attach_forbidden_extensions.tpl # attach_mod/root/templates/subSilver/admin/attach_manage_body.tpl -> templates/subSilver/admin/attach_manage_body.tpl # attach_mod/root/templates/subSilver/admin/attach_quota_body.tpl -> templates/subSilver/admin/attach_quota_body.tpl # attach_mod/root/templates/subSilver/admin/attach_shadow.tpl -> templates/subSilver/admin/attach_shadow.tpl # attach_mod/root/templates/subSilver/admin/extension_groups_permissions.tpl -> templates/subSilver/admin/extension_groups_permissions.tpl # attach_mod/root/language/lang_english/lang_admin_attach.php -> language/lang_english/lang_admin_attach.php # attach_mod/root/language/lang_english/lang_faq_attach.php -> language/lang_english/lang_faq_attach.php # attach_mod/root/language/lang_english/lang_main_attach.php -> language/lang_english/lang_main_attach.php # attach_mod/root/install/mod_table_inst.php -> install/mod_table_inst.php # attach_mod/root/install/schemas/attach_mysql_basic.sql -> install/schemas/attach_mysql_basic.sql # attach_mod/root/install/schemas/attach_mysql_schema.sql -> install/schemas/attach_mysql_schema.sql # attach_mod/root/install/schemas/attach_mssql_basic.sql -> install/schemas/attach_mssql_basic.sql # attach_mod/root/install/schemas/attach_mssql_schema.sql -> install/schemas/attach_mssql_schema.sql # attach_mod/root/install/schemas/attach_postgres_basic.sql -> install/schemas/attach_postgres_basic.sql # attach_mod/root/install/schemas/attach_postgres_schema.sql -> install/schemas/attach_postgres_schema.sql # # #-----[ COPY ]--------------------------- # This is for EasyMod and Mod Template compliance copy attach_mod/root/download.php to download.php copy attach_mod/root/uacp.php to uacp.php copy attach_mod/root/attach_rules.php to attach_rules.php copy attach_mod/root/admin/admin_attach_cp.php to admin/admin_attach_cp.php copy attach_mod/root/admin/admin_attachments.php to admin/admin_attachments.php copy attach_mod/root/admin/admin_extensions.php to admin/admin_extensions.php copy attach_mod/root/attach_mod/attachment_mod.php to attach_mod/attachment_mod.php copy attach_mod/root/attach_mod/displaying.php to attach_mod/displaying.php copy attach_mod/root/attach_mod/index.htm to attach_mod/index.htm copy attach_mod/root/attach_mod/pm_attachments.php to attach_mod/pm_attachments.php copy attach_mod/root/attach_mod/posting_attachments.php to attach_mod/posting_attachments.php copy attach_mod/root/attach_mod/includes/constants.php to attach_mod/includes/constants.php copy attach_mod/root/attach_mod/includes/functions_admin.php to attach_mod/includes/functions_admin.php copy attach_mod/root/attach_mod/includes/functions_attach.php to attach_mod/includes/functions_attach.php copy attach_mod/root/attach_mod/includes/functions_delete.php to attach_mod/includes/functions_delete.php copy attach_mod/root/attach_mod/includes/functions_filetypes.php to attach_mod/includes/functions_filetypes.php copy attach_mod/root/attach_mod/includes/functions_includes.php to attach_mod/includes/functions_includes.php copy attach_mod/root/attach_mod/includes/functions_selects.php to attach_mod/includes/functions_selects.php copy attach_mod/root/attach_mod/includes/functions_thumbs.php to attach_mod/includes/functions_thumbs.php copy attach_mod/root/attach_mod/includes/index.htm to attach_mod/includes/index.htm copy attach_mod/root/files/index.php to files/index.php copy attach_mod/root/images/icon_clip.gif to images/icon_clip.gif copy attach_mod/root/images/icon_disk.gif to images/icon_disk.gif copy attach_mod/root/images/icon_disk_gray.gif to images/icon_disk_gray.gif copy attach_mod/root/templates/subSilver/add_attachment_body.tpl to templates/subSilver/add_attachment_body.tpl copy attach_mod/root/templates/subSilver/posted_attachments_body.tpl to templates/subSilver/posted_attachments_body.tpl copy attach_mod/root/templates/subSilver/posting_attach_body.tpl to templates/subSilver/posting_attach_body.tpl copy attach_mod/root/templates/subSilver/posting_attach_rules.tpl to templates/subSilver/posting_attach_rules.tpl copy attach_mod/root/templates/subSilver/uacp_body.tpl to templates/subSilver/uacp_body.tpl copy attach_mod/root/templates/subSilver/viewtopic_attach_body.tpl to templates/subSilver/viewtopic_attach_body.tpl copy attach_mod/root/templates/subSilver/admin/attach_cat_body.tpl to templates/subSilver/admin/attach_cat_body.tpl copy attach_mod/root/templates/subSilver/admin/attach_cp_attachments.tpl to templates/subSilver/admin/attach_cp_attachments.tpl copy attach_mod/root/templates/subSilver/admin/attach_cp_body.tpl to templates/subSilver/admin/attach_cp_body.tpl copy attach_mod/root/templates/subSilver/admin/attach_cp_search.tpl to templates/subSilver/admin/attach_cp_search.tpl copy attach_mod/root/templates/subSilver/admin/attach_cp_user.tpl to templates/subSilver/admin/attach_cp_user.tpl copy attach_mod/root/templates/subSilver/admin/attach_extension_groups.tpl to templates/subSilver/admin/attach_extension_groups.tpl copy attach_mod/root/templates/subSilver/admin/attach_extensions.tpl to templates/subSilver/admin/attach_extensions.tpl copy attach_mod/root/templates/subSilver/admin/attach_forbidden_extensions.tpl to templates/subSilver/admin/attach_forbidden_extensions.tpl copy attach_mod/root/templates/subSilver/admin/attach_manage_body.tpl to templates/subSilver/admin/attach_manage_body.tpl copy attach_mod/root/templates/subSilver/admin/attach_quota_body.tpl to templates/subSilver/admin/attach_quota_body.tpl copy attach_mod/root/templates/subSilver/admin/attach_shadow.tpl to templates/subSilver/admin/attach_shadow.tpl copy attach_mod/root/templates/subSilver/admin/extension_groups_permissions.tpl to templates/subSilver/admin/extension_groups_permissions.tpl copy attach_mod/root/language/lang_english/lang_admin_attach.php to language/lang_english/lang_admin_attach.php copy attach_mod/root/language/lang_english/lang_faq_attach.php to language/lang_english/lang_faq_attach.php copy attach_mod/root/language/lang_english/lang_main_attach.php to language/lang_english/lang_main_attach.php copy attach_mod/root/install/mod_table_inst.php to install/mod_table_inst.php copy attach_mod/root/install/schemas/attach_mysql_basic.sql to install/schemas/attach_mysql_basic.sql copy attach_mod/root/install/schemas/attach_mysql_schema.sql to install/schemas/attach_mysql_schema.sql copy attach_mod/root/install/schemas/attach_mssql_basic.sql to install/schemas/attach_mssql_basic.sql copy attach_mod/root/install/schemas/attach_mssql_schema.sql to install/schemas/attach_mssql_schema.sql copy attach_mod/root/install/schemas/attach_postgres_basic.sql to install/schemas/attach_postgres_basic.sql copy attach_mod/root/install/schemas/attach_postgres_schema.sql to install/schemas/attach_postgres_schema.sql # # If you want/have another language, please visit http://www.opentools.de, and download your # Language if it is available. If you have a multi-national board you may want to upload all language files. # Please make sure you download the Language Pack for at least Version 2.3.9 of the Attachment Mod. # # # STEP NUMBER II: Installing the Attachment Mod (Database) # # You should have uploaded the install folder (above), which is only needed for running the database installer. # # Upload the Schema Files (those files ending in .sql) in ASCII Mode (This is the Layout and Data for your Database): # # # Now we want to create the tables, therefore we run mod_table_inst.php (http://www.yoursite.com/phpBB2/install/mod_table_inst.php) # Please be sure to enter the correct URL, the mod_table_inst.php file has to be placed within the install folder. # If it is not within the install folder, you get errors. # # After the mod_table_inst.php file was executed successfully, you can/should delete the complete install folder. # # # For Uninstallation (this file will delete all of your Attachments): # Upload attach_mod/scripts/mod_table_uninst.php -> mod_table_uninst.php # Run the script and delete it after execution # # # If you don't want to edit the Files by hand, you are free to use the following methods: # # 1) You are able to use the pre-edited files (found in the contrib-directory). # # If you use the pre-edited files, you can skip this Step Number III. # Directly continue with Step Number IV. # # 2) Using the Patch File (located at the scripts directory) # # Please refer to docs/using_patchfile.txt on how to use the patch file. # If you use the patch file, you can skip this Step Number III. # Directly continue with Step Number IV. # # # STEP NUMBER III: Modifying existing phpBB2 Files # # Now you have to alter existing phpBB2 files, read the instructions carefully and make sure you find the right lines. # The Line Numbers are only a hint, most times they are not correct, especially if you have Mods installed. # The Line Numbers are taken from phpBB 2.0.10 # # # #-----[ OPEN ]--------------------------------------------- # common.php # #-----[ FIND ]--------------------------------------------- # around line 211 $board_config[$row['config_name']] = $row['config_value']; } # #-----[ AFTER, ADD ]-------------------------------------- # After the closing brace include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx); # #-----[ OPEN ]--------------------------------------------- # faq.php # #-----[ FIND ]--------------------------------------------- # around line 62 include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx); # #-----[ AFTER, ADD ]--------------------------------------- # attach_faq_include($lang_file); # #-----[ OPEN ]--------------------------------------------- # modcp.php # #-----[ FIND ]--------------------------------------------- # around line 338 remove_search_post($post_id_sql); # #-----[ AFTER, ADD ]--------------------------------------- # delete_attachment(explode(', ', $post_id_sql)); # #-----[ FIND ]--------------------------------------------- # around line 1184 'TOPIC_ID' => $topic_id, # #-----[ AFTER, ADD ]--------------------------------------- # 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']), # #-----[ OPEN ]--------------------------------------------- # posting.php # #-----[ FIND ]--------------------------------------------- # around line 412 $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] ); # #-----[ AFTER, ADD ]--------------------------------------- # execute_posting_attachment_handling(); # #-----[ FIND ]--------------------------------------------- # around line 570 update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); } # #-----[ AFTER, ADD ]--------------------------------------- # the Line have to be added AFTER the closing brace $attachment_mod['posting']->insert_attachment($post_id); # #-----[ FIND ]--------------------------------------------- # around line 704 'preview' => 'posting_preview.tpl') ); # #-----[ AFTER, ADD ]--------------------------------------- # the Line have to be added AFTER the ');' $attachment_mod['posting']->preview_attachments(); # #-----[ OPEN ]--------------------------------------------- # privmsg.php # #-----[ FIND ]--------------------------------------------- # around line 131 // ---------- // Start main # #-----[ BEFORE, ADD ]-------------------------------------- # execute_privmsgs_attachment_handling($mode); # #-----[ FIND ]--------------------------------------------- # around line 350 // // Pick a folder, any folder, so long as it's one below ... # #-----[ BEFORE, ADD ]-------------------------------------- # $attachment_mod['pm']->duplicate_attachment_pm($privmsg['privmsgs_attachment'], $privmsg['privmsgs_id'], $privmsg_sent_id); # #-----[ FIND ]--------------------------------------------- # around line 490 $user_id_to = $privmsg['user_id_2']; # #-----[ AFTER, ADD ]--------------------------------------- # init_display_pm_attachments($privmsg['privmsgs_attachment']); # #-----[ FIND ]--------------------------------------------- # around line 742 unset($delete_type); } # #-----[ AFTER, ADD ]--------------------------------------- # the Line have to be added AFTER the closing brace $attachment_mod['pm']->delete_all_pm_attachments($mark_list); # #-----[ FIND ]--------------------------------------------- # around line 1284 if ( $mode != 'edit' ) { // // Add to the users new pm counter // # #-----[ BEFORE, ADD ]--------------------------------------- # The Line have to be added BEFORE 'if ( $mode != 'edit' )' $attachment_mod['pm']->insert_attachment_pm($privmsg_id); # #-----[ FIND ]--------------------------------------------- # around line 1585 "preview" => 'privmsgs_preview.tpl') ); # #-----[ AFTER, ADD ]--------------------------------------- # The Line have to be added AFTER the ');' $attachment_mod['pm']->preview_attachments(); # #-----[ FIND ]--------------------------------------------- # around line 2127 'DATE' => $msg_date, # #-----[ AFTER, ADD ]--------------------------------------- # 'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id), # #-----[ OPEN ]--------------------------------------------- # viewforum.php # #-----[ FIND ]--------------------------------------------- # around line 370 $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '
'; # #-----[ AFTER, ADD ]--------------------------------------- # attach_build_auth_levels($is_auth, $s_auth_can); # #-----[ FIND ]--------------------------------------------- # around line 648 'NEWEST_POST_IMG' => $newest_post_img, # #-----[ AFTER, ADD ]--------------------------------------- # 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), # #-----[ OPEN ]--------------------------------------------- # viewtopic.php # #-----[ FIND ]--------------------------------------------- # around line 151 AND f.forum_id = t.forum_id $order_sql"; # #-----[ AFTER, ADD ]--------------------------------------- # attach_setup_viewtopic_auth($order_sql, $sql); # #-----[ FIND ]--------------------------------------------- # around line 585 $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '
'; # #-----[ AFTER, ADD ]--------------------------------------- # attach_build_auth_levels($is_auth, $s_auth_can); # #-----[ FIND ]--------------------------------------------- # around line 815 // // Update the topic view counter # #-----[ BEFORE, ADD ]--------------------------------------- # init_display_post_attachments($forum_topic_data['topic_attachment']); # #-----[ FIND ]--------------------------------------------- # around line 1210 'U_POST_ID' => $postrow[$i]['post_id']) ); # #-----[ AFTER, ADD ]--------------------------------------- # The Line have to be added AFTER the ');' display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']); # #-----[ OPEN ]--------------------------------------------- # admin/admin_forumauth.php # #-----[ FIND ]--------------------------------------------- # around line 72 $forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN); # #-----[ AFTER, ADD ]--------------------------------------- # attach_setup_forum_auth($simple_auth_ary, $forum_auth_fields, $field_names); # #-----[ OPEN ]--------------------------------------------- # admin/admin_forums.php # #-----[ FIND ]--------------------------------------------- # around line 52 // // Mode setting # #-----[ BEFORE, ADD ]--------------------------------------- # $forum_auth_ary['auth_attachments'] = AUTH_REG; $forum_auth_ary['auth_download'] = AUTH_REG; # #-----[ OPEN ]--------------------------------------------- # admin/admin_groups.php # #-----[ FIND ]--------------------------------------------- # around line 59 if ( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) ) # #-----[ BEFORE, ADD ]--------------------------------------- # attachment_quota_settings('group', $HTTP_POST_VARS['group_update'], $mode); # #-----[ OPEN ]--------------------------------------------- # admin/admin_ug_auth.php # #-----[ FIND ]--------------------------------------------- # around line 91 // --------------- // Start Functions # #-----[ BEFORE, ADD ]--------------------------------------- # attach_setup_usergroup_auth($forum_auth_fields, $auth_field_match, $field_names); # #-----[ OPEN ]--------------------------------------------- # admin/admin_users.php # #-----[ FIND ]--------------------------------------------- # around line 62 // // Ok, the profile has been modified and submitted, let's update # #-----[ BEFORE, ADD ]--------------------------------------- # attachment_quota_settings('user', $HTTP_POST_VARS['submit'], $mode); # #-----[ OPEN ]--------------------------------------------- # includes/auth.php # #-----[ FIND ]--------------------------------------------- # around line 105 case AUTH_ATTACH: break; default: break; } # #-----[ AFTER, ADD ]--------------------------------------- # the Line have to be added AFTER the closing brace attach_setup_basic_auth($type, $auth_fields, $a_sql); # #-----[ OPEN ]--------------------------------------------- # includes/functions.php # #-----[ FIND ]--------------------------------------------- # around line 256 // // Set up style # #-----[ BEFORE, ADD ]--------------------------------------- # include_attach_lang(); # #-----[ OPEN ]--------------------------------------------- # includes/functions_admin.php # #-----[ FIND ]--------------------------------------------- # around line 146 message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql); } } # #-----[ AFTER, ADD ]--------------------------------------- # After the last closing brace, before the break; attachment_sync_topic($id); # #-----[ OPEN ]--------------------------------------------- # includes/prune.php # #-----[ FIND ]--------------------------------------------- # around line 113 remove_search_post($sql_post); # #-----[ AFTER, ADD ]--------------------------------------- # prune_attachments($sql_post); # #-----[ OPEN ]--------------------------------------------- # includes/topic_review.php # #-----[ FIND ]--------------------------------------------- # around line 43 WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; # #-----[ AFTER, ADD ]--------------------------------------- # $tmp = ''; attach_setup_viewtopic_auth($tmp, $sql); # #-----[ FIND ]--------------------------------------------- # around line 120 // // Okay, let's do the loop, yeah come on baby let's do the loop // and it goes like this ... # #-----[ BEFORE, ADD ]--------------------------------------- # init_display_review_attachments($is_auth); # #-----[ FIND ]--------------------------------------------- # around line 203 'L_MINI_POST_ALT' => $mini_post_alt) ); # #-----[ AFTER, ADD ]--------------------------------------- # the Line have to be added AFTER the ');' display_review_attachments($row['post_id'], $row['post_attachment'], $is_auth); # #-----[ OPEN ]--------------------------------------------- # includes/usercp_viewprofile.php # #-----[ FIND ]--------------------------------------------- # around line 170 include($phpbb_root_path . 'includes/page_header.'.$phpEx); # #-----[ AFTER, ADD ]--------------------------------------- # display_upload_attach_box_limits($profiledata['user_id']); # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/modcp_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 27  {topicrow.TOPIC_TYPE}{topicrow.TOPIC_TITLE} #-----[ IN-LINE FIND ]--------------------------------------------- # around line 27 (directly in that line) {topicrow.TOPIC_TYPE} # #-----[ IN-LINE BEFORE, ADD ]--------------------------------------- # {topicrow.TOPIC_ATTACHMENT_IMG} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/posting_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 258
# #-----[ REPLACE WITH ]--------------------------------------- # # #-----[ FIND ]--------------------------------------------- # around line 462 {POLLBOX} # #-----[ BEFORE, ADD ]--------------------------------------- # {ATTACHBOX} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/posting_preview.tpl # #-----[ FIND ]--------------------------------------------- # around line 13 {MESSAGE} # #-----[ AFTER, ADD ]--------------------------------------- # {ATTACHMENTS} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/posting_topic_review.tpl # #-----[ FIND ]--------------------------------------------- # around line 26 {postrow.MESSAGE} # #-----[ IN-LINE FIND ]--------------------------------------------- # around line 26 (directly in that line) {postrow.MESSAGE} # #-----[ IN-LINE AFTER, ADD ]--------------------------------------- # {postrow.ATTACHMENTS} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/privmsgs_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 15 # #-----[ AFTER, ADD ]--------------------------------------- # # #-----[ FIND ]--------------------------------------------- # around line 106 # #-----[ IN-LINE FIND ]--------------------------------------------- # around line 106 (directly in that line)  {listrow.SUBJECT} # #-----[ IN-LINE BEFORE, ADD ]--------------------------------------- # {listrow.PRIVMSG_ATTACHMENTS_IMG} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/privmsgs_preview.tpl # #-----[ FIND ]--------------------------------------------- # around line 23 # #-----[ REPLACE WITH ]--------------------------------------- # Do not form one line out of this, a template statement has to be on one seperate line # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/privmsgs_read_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 47 # #-----[ REPLACE WITH ]--------------------------------------- # Do not form one line out of this, a template statement has to be on one seperate line # #-----[ FIND ]--------------------------------------------- # around line 74 # #-----[ AFTER, ADD ]--------------------------------------- # Do not form one line out of this, a template statement has to be on one seperate line   # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/profile_view_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 41 # #-----[ AFTER, ADD ]--------------------------------------- # # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/viewforum_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 26 # #-----[ IN-LINE FIND ]--------------------------------------------- # around line 39 (directly in that line) {postrow.SIGNATURE} # #-----[ IN-LINE BEFORE, ADD ]--------------------------------------- # {postrow.ATTACHMENTS} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/admin/group_edit_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 48 # #-----[ BEFORE, ADD ]--------------------------------------- # # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/admin/user_edit_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 267 # #-----[ AFTER, ADD ]--------------------------------------- # # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # # STEP NUMBER IV: Additional Instructions # # In this installation i have put three little icons (icon_disk.gif, icon_disk_gray.gif, icon_clip.gif) for attachments into. # Put it to your images, or whereever you want. # # The standard path for your files is 'files' and the standard upload image is images/icon_clip.gif. # If you want to change it, go to your Administration Panel under Attachments->Management. # # You'll have to create the upload path and chmod it to 777 (or change the owner to you httpd-servers owner) to upload files if # you don't use the ftp upload feature. # if you have only plain ftp-access change the 'Attribute' of your files-directory to rwxrwxrwx. # # If you are using the ftp-upload feature, enter the relevant information in Attachments->Management. # The password is stored in plaintext into the database. You don't have to chmod the directory (ftp-path). # # it would be wise that you put the provided index.php to this directory to prevent directory indexing. # # Before you make anything, i suggest you go to your Administration Panel->Attachments->Management and prove # that uploading is working with the Test Upload button. ;) # # CONFIG CACHING # # If you want the Attachment Mod config table to be cached (reduce of one query on all phpBB2 Pages), you # have to create a directory 'cache' within your phpBB2 root folder. # This directory have to be chmodded to 777 (see above instructions on how to do this). # # EoM
{ATTACH_BOX_SIZE_STATUS}
{ATTACH_LIMIT_PERCENT}
0% 50% 100%
 {listrow.SUBJECT}{MESSAGE}{MESSAGE} {ATTACHMENTS} {MESSAGE}{MESSAGE} {ATTACHMENTS} {INTERESTS}
{L_UPLOAD_QUOTA}:
{UPLOAD_LIMIT_PERCENT}
0% 50% 100%
[{UPLOADED} / {QUOTA} / {PERCENT_FULL}]
{L_UACP}
{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}{topicrow.TOPIC_TITLE}
# #-----[ IN-LINE FIND ]--------------------------------------------- # around line 26 (directly in that line) {topicrow.NEWEST_POST_IMG} # #-----[ IN-LINE AFTER, ADD ]--------------------------------------- # {topicrow.TOPIC_ATTACHMENT_IMG} # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/viewtopic_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 39
{postrow.MESSAGE}{postrow.SIGNATURE}{postrow.EDITED_MESSAGE}
{L_UPLOAD_QUOTA} {S_SELECT_UPLOAD_QUOTA}
{L_PM_QUOTA} {S_SELECT_PM_QUOTA}
{L_SPECIAL_EXPLAIN}
{L_UPLOAD_QUOTA} {S_SELECT_UPLOAD_QUOTA}
{L_PM_QUOTA} {S_SELECT_PM_QUOTA}