Location: PHPKode > projects > Attachment Mod > docs/update.txt
- The following documentation is an equivalent of the phpBB Upgrade Instructions.

Upgrade from 2.3.x/2.4.x versions:

Since version 2.3.10 the attachment mod comes in three packages for easier upgrading. 
The Full package includes the attachment mod in general.
The Changed files only package includes those files changed from one release to another release.
The Patch files package includes changes from one release to another release in patch file format.

The Full package:

This package contains the original attachment mod files.


Changed files only:

This package contains a number of archives, each contains the files changed from a given release to the latest release. 
You should select the appropriate archive for your current version, e.g. if you currently have 2.4.3 you should select the 
2.4.3_to_2.4.5.zip/tar.gz file.

The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate 
location on your server, i.e. simply overwrite the existing files with the new versions.
Do not forget that if you have installed any modifications to the attachment mod these files will overwrite the originals 
possibly destroying them in the process. You will need to re-add Mods to any affected file before uploading.

As for the other upgrade procedures you should run "install/update_to_latest.php" after you have finished updating the files. 
This will update your database schema and data (if appropriate) and increment the version number.


Patch file:

The patch file is probably the best solution for those with many Mods or other changes who do not want to re-add them back to all the changed files. 
To use this you will need command line access to a standard UNIX type patch application.

A number of patch files are provided to allow you to upgrade from previous releases. 
Select the correct patch, e.g. if your current version is 2.4.3 you need the attach_mod-2.4.3_to_2.4.5.patch. Place the correct patch 
in the parent directory containing the phpBB 2 core files (i.e. index.php, viewforum.php, etc.). 
With this done you should run the following command: 

patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]

(where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB2, and where PATCH NAME is the relevant 
filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.

>If you do get failures you should look at using the Changed files only package to replace the files which failed to patch, 
please note that you will need to manually re-add any Mods to these particular files. 
Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.

You should of course delete the patch file (or files) after use. As for the other upgrade procedures you should run 
install/update_to_latest.php after you have finished updating the files. This will update your database schema and data (if appropriate) 
and increment the version number.


Please be careful to not overwrite your existing images or uploaded files.

--- STEP NUMBER 1:

Upload the Updater:

attachment_mod/install/update_to_latest.php -> install/update_to_latest.php

Maybe you have to create the install folder, since the update_to_latest.php file have to be placed
within the install folder under your phpBB2 Directory.

--- STEP NUMBER 2:

Now run the update script: http://www.yourdomain.com/phpBB2/install/update_to_latest.php
If you have problems or questions on this, please read the Attachment Mod User Guide first.

--- STEP NUMBER 3:

Upload all files to their respective Location (the directory structure is in the folder root).
For a list of changed files, please use the changed files only release (downloadable at http://www.sourceforge.net/projects/acydmods).

 attachment_mod/download.php							-> download.php
 attachment_mod/uacp.php							-> uacp.php
 attachment_mod/attach_rules.php						-> attach_rules.php
 attachment_mod/admin/admin_attach_cp.php					-> admin/admin_attach_cp.php
 attachment_mod/admin/admin_attachments.php					-> admin/admin_attachments.php
 attachment_mod/admin/admin_extensions.php					-> admin/admin_extensions.php
 attachment_mod/attach_mod/attachment_mod.php					-> attach_mod/attachment_mod.php
 attachment_mod/attach_mod/displaying.php					-> attach_mod/displaying.php
 attachment_mod/attach_mod/pm_attachments.php					-> attach_mod/pm_attachments.php
 attachment_mod/attach_mod/posting_attachments.php				-> attach_mod/posting_attachments.php
 attachment_mod/attach_mod/includes/constants.php				-> attach_mod/includes/constants.php
 attachment_mod/attach_mod/includes/functions_admin.php				-> attach_mod/includes/functions_admin.php
 attachment_mod/attach_mod/includes/functions_attach.php			-> attach_mod/includes/functions_attach.php
 attachment_mod/attach_mod/includes/functions_delete.php			-> attach_mod/includes/functions_delete.php
 attachment_mod/attach_mod/includes/functions_filetypes.php			-> attach_mod/includes/functions_filetypes.php
 attachment_mod/attach_mod/includes/functions_includes.php			-> attach_mod/includes/functions_includes.php
 attachment_mod/attach_mod/includes/functions_selects.php			-> attach_mod/includes/functions_selects.php
 attachment_mod/attach_mod/includes/functions_thumbs.php			-> attach_mod/includes/functions_thumbs.php
 attachment_mod/templates/subSilver/add_attachment_body.tpl			-> templates/subSilver/add_attachment_body.tpl
 attachment_mod/templates/subSilver/posted_attachments_body.tpl			-> templates/subSilver/posted_attachments_body.tpl
 attachment_mod/templates/subSilver/posting_attach_body.tpl			-> templates/subSilver/posting_attach_body.tpl
 attachment_mod/templates/subSilver/posting_attach_rules.tpl			-> templates/subSilver/posting_attach_rules.tpl
 attachment_mod/templates/subSilver/uacp_body.tpl				-> templates/subSilver/uacp_body.tpl
 attachment_mod/templates/subSilver/viewtopic_attach_body.tpl			-> templates/subSilver/viewtopic_attach_body.tpl
 attachment_mod/templates/subSilver/admin/attach_cat_body.tpl			-> templates/subSilver/admin/attach_cat_body.tpl
 attachment_mod/templates/subSilver/admin/attach_cp_attachments.tpl		-> templates/subSilver/admin/attach_cp_attachments.tpl
 attachment_mod/templates/subSilver/admin/attach_cp_body.tpl			-> templates/subSilver/admin/attach_cp_body.tpl
 attachment_mod/templates/subSilver/admin/attach_cp_search.tpl			-> templates/subSilver/admin/attach_cp_search.tpl
 attachment_mod/templates/subSilver/admin/attach_cp_user.tpl			-> templates/subSilver/admin/attach_cp_user.tpl
 attachment_mod/templates/subSilver/admin/attach_extension_groups.tpl		-> templates/subSilver/admin/attach_extension_groups.tpl
 attachment_mod/templates/subSilver/admin/attach_extensions.tpl			-> templates/subSilver/admin/attach_extensions.tpl
 attachment_mod/templates/subSilver/admin/attach_forbidden_extensions.tpl	-> templates/subSilver/admin/attach_forbidden_extensions.tpl
 attachment_mod/templates/subSilver/admin/attach_manage_body.tpl		-> templates/subSilver/admin/attach_manage_body.tpl
 attachment_mod/templates/subSilver/admin/attach_quota_body.tpl			-> templates/subSilver/admin/attach_quota_body.tpl
 attachment_mod/templates/subSilver/admin/attach_shadow.tpl			-> templates/subSilver/admin/attach_shadow.tpl
 attachment_mod/templates/subSilver/admin/extension_groups_permissions.tpl	-> templates/subSilver/admin/extension_groups_permissions.tpl

--- STEP NUMBER 4:

Upload the Language Files (English (German is optional)) provided with the Attachment Mod, located in attach_mod/root/language)
to your language Directory.


--- You do not need to do the following Step if you use the pre-modified files

If you are upgrading from version 2.3.5 and above, you do not have to edit any phpBB2 files, you are done now, close this file. :)

#################################################
# UPGRADE FROM 2.3.4				#
#################################################

Changed Files:	includes/usercp_viewprofile.php, admin/admin_forums.php, admin/admin_groups.php, admin/admin_users.php,
		privmsgs_body.tpl, profile_view_body.tpl, viewtopic_body.tpl, admin/group_edit_body.tpl, admin/user_edit_body.tpl

# 
#-----[ OPEN ]---------------------------------------------
# 
includes/usercp_viewprofile.php

# 
#-----[ FIND ]---------------------------------------------
# around line 175
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
display_upload_attach_box_limits($profiledata['user_id']);

# 
#-----[ 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_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 ]---------------------------------------------
# 
templates/subSilver/privmsgs_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# around line 15
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
  <tr> 

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
	<td align="right"> 
	<!-- BEGIN switch_box_size_notice -->
	<table width="175" cellspacing="1" cellpadding="2" border="0" class="bodyline">
	<tr> 
		<td colspan="3" width="175" class="row1" nowrap="nowrap"><span class="gensmall">{ATTACH_BOX_SIZE_STATUS}</span></td>
	</tr>
	<tr> 
		<td colspan="3" width="175" class="row2">
			<table cellspacing="0" cellpadding="1" border="0">
			<tr> 
				<td bgcolor="{T_TD_COLOR2}"><img src="templates/subSilver/images/spacer.gif" width="{ATTACHBOX_LIMIT_IMG_WIDTH}" height="8" alt="{ATTACH_LIMIT_PERCENT}" /></td>
			</tr>
			</table>
		</td>
	</tr>
	<tr> 
		<td width="33%" class="row1"><span class="gensmall">0%</span></td>
		<td width="34%" align="center" class="row1"><span class="gensmall">50%</span></td>
		<td width="33%" align="right" class="row1"><span class="gensmall">100%</span></td>
	</tr>
	</table>
	<!-- END switch_box_size_notice -->
	</td>

# 
#-----[ OPEN ]---------------------------------------------
# 
templates/subSilver/profile_view_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# around line 41
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
<!-- BEGIN switch_upload_limits -->
		<tr> 
			<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_UPLOAD_QUOTA}:</span></td>
			<td> 
				<table width="175" cellspacing="1" cellpadding="2" border="0" class="bodyline">
				<tr> 
					<td colspan="3" width="100%" class="row2">
						<table cellspacing="0" cellpadding="1" border="0">
						<tr> 
							<td bgcolor="{T_TD_COLOR2}"><img src="templates/subSilver/images/spacer.gif" width="{UPLOAD_LIMIT_IMG_WIDTH}" height="8" alt="{UPLOAD_LIMIT_PERCENT}" /></td>
						</tr>
						</table>
					</td>
				</tr>
				<tr> 
					<td width="33%" class="row1"><span class="gensmall">0%</span></td>
					<td width="34%" align="center" class="row1"><span class="gensmall">50%</span></td>
					<td width="33%" align="right" class="row1"><span class="gensmall">100%</span></td>
				</tr>
				</table>
				<b><span class="genmed">[{UPLOADED} / {QUOTA} / {PERCENT_FULL}]</span> </b><br />
				<span class="genmed"><a href="{U_UACP}" class="genmed">{L_UACP}</a></span></td>
			</td>
		</tr>
<!-- END switch_upload_limits -->

# 
#-----[ OPEN ]---------------------------------------------
# 
templates/subSilver/viewtopic_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# around line 39
				<td colspan="2"><span class="postbody">{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>

# 
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 39 (directly in that line)
{postrow.SIGNATURE}

# 
#-----[ IN-LINE BEFORE, ADD ]---------------------------------------
# 
</span>{postrow.ATTACHMENTS}<span class="postbody">

# 
#-----[ OPEN ]---------------------------------------------
# 
templates/subSilver/admin/group_edit_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# around line 48
	<!-- END group_edit -->

# 
#-----[ BEFORE, ADD ]---------------------------------------
# 
	<tr> 
	  <td class="row1"><span class="gen">{L_UPLOAD_QUOTA}</span></td>
	  <td class="row2">{S_SELECT_UPLOAD_QUOTA}</td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_PM_QUOTA}</span></td>
	  <td class="row2">{S_SELECT_PM_QUOTA}</td>
	</tr>

# 
#-----[ OPEN ]---------------------------------------------
# 
templates/subSilver/admin/user_edit_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# around line 267
	  <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td>
	</tr>

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
	<tr> 
	  <td class="row1"><span class="gen">{L_UPLOAD_QUOTA}</span></td>
	  <td class="row2">{S_SELECT_UPLOAD_QUOTA}</td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_PM_QUOTA}</span></td>
	  <td class="row2">{S_SELECT_PM_QUOTA}</td>
	</tr>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

Upload all modified Files and have a look at the Administration Panel, you will see some new Functions/Features.
Return current item: Attachment Mod