Attachment mod

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20315
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 15 jan 2006, 17:55

heb je common.php goed aangepast?

Twinkel
Berichten: 70
Lid geworden op: 01 jan 2006, 21:39

Bericht door Twinkel » 15 jan 2006, 17:58

heb verder nog niks aangepast, zoek me rot omdat ik weet dat ik iets zal moeten veranderen....

Twinkel
Berichten: 70
Lid geworden op: 01 jan 2006, 21:39

Bericht door Twinkel » 15 jan 2006, 17:59

Code: Selecteer alles

<?php
/***************************************************************************
 *                                common.php
 *                            -------------------
 *   begin                : Saturday, Feb 23, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: common.php,v 1.74.2.22 2005/12/30 09:51:01 acydburn Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

//
error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

// The following code (unsetting globals)
// Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files

// PHP5 with register_long_arrays off?
if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
	$HTTP_POST_VARS = $_POST;
	$HTTP_GET_VARS = $_GET;
	$HTTP_SERVER_VARS = $_SERVER;
	$HTTP_COOKIE_VARS = $_COOKIE;
	$HTTP_ENV_VARS = $_ENV;
	$HTTP_POST_FILES = $_FILES;

	// _SESSION is the only superglobal which is conditionally set
	if (isset($_SESSION))
	{
		$HTTP_SESSION_VARS = $_SESSION;
	}
}

// Protect against GLOBALS tricks
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
	die("Hacking attempt");
}

// Protect against HTTP_SESSION_VARS tricks
if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS))
{
	die("Hacking attempt");
}

if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
	// PHP4+ path
	$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');

	// Not only will array_merge give a warning if a parameter
	// is not an array, it will actually fail. So we check if
	// HTTP_SESSION_VARS has been initialised.
	if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS))
	{
		$HTTP_SESSION_VARS = array();
	}

	// Merge all into one extremely huge array; unset
	// this later
	$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES);

	unset($input['input']);
	unset($input['not_unset']);

	while (list($var,) = @each($input))
	{
		if (!in_array($var, $not_unset))
		{
			unset($$var);
		}
	}

	unset($input);
}

//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
	if( is_array($HTTP_GET_VARS) )
	{
		while( list($k, $v) = each($HTTP_GET_VARS) )
		{
			if( is_array($HTTP_GET_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
				{
					$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_GET_VARS[$k]);
			}
			else
			{
				$HTTP_GET_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_GET_VARS);
	}

	if( is_array($HTTP_POST_VARS) )
	{
		while( list($k, $v) = each($HTTP_POST_VARS) )
		{
			if( is_array($HTTP_POST_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
				{
					$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_POST_VARS[$k]);
			}
			else
			{
				$HTTP_POST_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_POST_VARS);
	}

	if( is_array($HTTP_COOKIE_VARS) )
	{
		while( list($k, $v) = each($HTTP_COOKIE_VARS) )
		{
			if( is_array($HTTP_COOKIE_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
				{
					$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_COOKIE_VARS[$k]);
			}
			else
			{
				$HTTP_COOKIE_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_COOKIE_VARS);
	}
}

//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$gen_simple_header = FALSE;

include($phpbb_root_path . 'config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
	header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx);
	exit;
}

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);

// We do not need this any longer, unset for safety purposes
unset($dbpasswd);

//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$user_ip = encode_ip($client_ip);

//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
	FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$board_config[$row['config_name']] = $row['config_value'];
}

if (file_exists('install') || file_exists('contrib'))
{
	message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}

//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

?>
Dit is wat ik in common heb staan

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20315
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 15 jan 2006, 18:24

Je moet natuurlijk wel gewoon de mod installeren, zie ook http://www.phpbb.nl/kb.php?mode=article&k=24

Twinkel
Berichten: 70
Lid geworden op: 01 jan 2006, 21:39

Bericht door Twinkel » 15 jan 2006, 18:41

Heb gedaan wat hier staat

Code: Selecteer alles

################################################################# 
## 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 has been tested and works with phpBB 2.0.19.
##	This Version will NOT work with phpBB2 Modules designed for *Nuke Portals or phpBB2 Ports.
## MOD Version: 2.4.1
## 
## 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 
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
############################################################## 
## Author Notes: 
## 
## Complete feature list: docs/features.txt
## The user guide: docs/user_guide.html
##
## Some tips:
## - I suggest reading the user guide first if you haven't installed any Mods before.
## - Please note that this Mod is NOT written to be EasyMod compatible (i haven't tested it).
## - Please follow the installation instructions as strict as you can.
##
##
## UPDATING/UPGRADING:
##
## Please skip to the NEW INSTALLATION part if you want to install the 
## attachment mod for the first time or want to setup a new installation.
##
## Please read the docs/update.txt document for update/upgrade instructions.
## 
##
## NEW INSTALLATION:
##
## You are able to choose between two installation types, depending on your setup:
## 
## -> Using the pre-modified files:
##	
##	This method is recommended for those having a vanilla (plain, not modded) phpBB Installation.
##	With this method you do not need to adjust your phpBB files at all, only running the installer
##	and uploading all files - including the pre-modified files - is required.
##
##	If you think this is the correct method for you, please follow the following steps listet in:
##		docs/install_using_premod_files.txt
##	to install the attachment mod.
##	
##	BTW, it is save to close this file now if you use this method. ;)
##
##
##
## -> Using the mod instructions:
##
##	This method is recommended for those already having applied mods to their phpBB Installation.
##
##	If you think this is the correct method for you, please read further.
## 
## 
## 
## 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.
##
## 
## 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/
## Please Note that i am not able to contribute to the Attachment Mod topic at phpbb.com (http://www.phpbb.com/phpBB/viewtopic.php?t=74505)
## 
############################################################## 
## MOD History: 
##
##	2005-12-30 - Version 2.4.1
##		- fixed doubled sql_freeresult in functions_selects.php
##		- fix extension admin panel (unable to update extensions)
##		- changed tmp dir for ftp download in safe mod from temp directory in upload directory to upload directory
##
##	2005-11-24 - Version 2.4.0a
##		- fixed a call to sql_build_array (wrong function used) in attach_mod/includes/functions_admin.php
##			this is producing a php error message within the user administration panel (editing user details)
##		- this version is a repackage, therefore the "a" at the end (nothing else changed, update path and everything else is the same)
##
##	2005-11-21 - Version 2.4.0
##		- using olympus' system of retrieving and storing values
##		- using function for sql escaping
##		- installer now checks for upload directory
##		- fixing multiple call to database in installer
##		- fixing sort_multi_array to correctly decide if sorting is based on numeric or string
##		- taking open basedir restriction into account if checking for image size
##		- making creation of temporary thumbnail file more unique if ftp upload is used (thanks to Douglas Hoffman)
##		- fixing viewing of no longer viewable/denied attachments for admins (alcaeus)
##		- display correct filename on download
##		- added optional language variables (Sync_topics, Sync_posts and Sync_thumbnails)
##
##	Please read the docs/changelog.txt document for a complete changelog.
##
##############################################################
## 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 closely.
#

# 
# STEP NUMBER I: Uploading all new Files
#
# Copy/Upload all files to their respective Location
# 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).
# Alternatively just decompress/upload the contents within the attachment_mod folder directly to your phpBB folder.
#
# 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/index.htm						-> attach_mod/index.htm
# 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/attach_mod/includes/index.htm					-> attach_mod/includes/index.htm
# attachment_mod/files/index.php						-> files/index.php
# attachment_mod/images/icon_clip.gif						-> images/icon_clip.gif
# attachment_mod/images/icon_disk.gif						-> images/icon_disk.gif
# attachment_mod/images/icon_disk_gray.gif					-> images/icon_disk_gray.gif
# 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
# attachment_mod/language/lang_english/lang_admin_attach.php			-> language/lang_english/lang_admin_attach.php
# attachment_mod/language/lang_english/lang_faq_attach.php			-> language/lang_english/lang_faq_attach.php
# attachment_mod/language/lang_english/lang_main_attach.php			-> language/lang_english/lang_main_attach.php
# attachment_mod/install/install.php						-> install/install.php
# attachment_mod/install/schemas/attach_mysql_basic.sql				-> install/schemas/attach_mysql_basic.sql
# attachment_mod/install/schemas/attach_mysql_schema.sql			-> install/schemas/attach_mysql_schema.sql
# attachment_mod/install/schemas/attach_mssql_basic.sql				-> install/schemas/attach_mssql_basic.sql
# attachment_mod/install/schemas/attach_mssql_schema.sql			-> install/schemas/attach_mssql_schema.sql
# attachment_mod/install/schemas/attach_postgres_basic.sql			-> install/schemas/attach_postgres_basic.sql
# attachment_mod/install/schemas/attach_postgres_schema.sql			-> 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-lingual 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.
# Make sure you uploaded 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 the install.php file (http://www.yoursite.com/phpBB2/install/install.php)
# Please be sure to enter the correct URL (replacing www.yoursite.com with your sites URL), 
# the install.php file has to be placed within the install folder. If it is not within the install folder, you WILL get errors.
#
# After the install.php file hass been executed successfully, you should remove the complete install folder.
#
#
#


#
# 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 correct lines.
# The Line Numbers are only a hint, most of the time they are not correct, especially if you have Mods installed.
#
# 

# 
#-----[ OPEN ]--------------------------------------------- 
# 
common.php

#
#-----[ FIND ]---------------------------------------------
# around line 218
	$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 348
				remove_search_post($post_id_sql);

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
				delete_attachment(explode(', ', $post_id_sql));

# 
#-----[ FIND ]---------------------------------------------
# around line 1222
				'TOPIC_ID' => $topic_id,

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
				'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']),

# 
#-----[ OPEN ]---------------------------------------------
# 
posting.php

# 
#-----[ FIND ]---------------------------------------------
# around line 422
$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 580
			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 715
			'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 750
			$mark_list[] = $row['privmsgs_id'];
		}

		unset($delete_type);

# 
#-----[ AFTER, ADD ]--------------------------------------- 
# 
		$attachment_mod['pm']->delete_all_pm_attachments($mark_list);

#
#-----[ FIND ]---------------------------------------------
# around line 1319
		if ( $mode != 'edit' )
		{
			//
			// Add to the users new pm counter
			//

# 
#-----[ BEFORE, ADD ]--------------------------------------- 
# The Line has to be added BEFORE 'if ( $mode != 'edit' )'
		$attachment_mod['pm']->insert_attachment_pm($privmsg_id);

#
#-----[ FIND ]---------------------------------------------
# around line 1624
			"preview" => 'privmsgs_preview.tpl')
		);

# 
#-----[ AFTER, ADD ]--------------------------------------- 
# The Line have to be added AFTER the ');'
		$attachment_mod['pm']->preview_attachments();

#
#-----[ FIND ]---------------------------------------------
# around line 2169
			'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'] ) . '<br />';

# 
#-----[ 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 152
		AND f.forum_id = t.forum_id
		$order_sql";

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
attach_setup_viewtopic_auth($order_sql, $sql);

# 
#-----[ FIND ]---------------------------------------------
# around line 587
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
attach_build_auth_levels($is_auth, $s_auth_can);

# 
#-----[ FIND ]---------------------------------------------
# around line 817
//
// Update the topic view counter

# 
#-----[ BEFORE, ADD ]---------------------------------------
# 
init_display_post_attachments($forum_topic_data['topic_attachment']);

# 
#-----[ FIND ]---------------------------------------------
# around line 1209
		'U_POST_ID' => $postrow[$i]['post_id'])
	);

# 
#-----[ AFTER, ADD ]---------------------------------------
# The Line have to be added AFTER the ');' and BEFORE the '}' (without single quotes)
	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 319
	//
	// Set up style

# 
#-----[ BEFORE, ADD ]---------------------------------------
# 
	include_attach_lang();

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

# 
#-----[ FIND ]---------------------------------------------
# around line 184
			}
			break;
	}
	
	return true;

# 
#-----[ BEFORE, ADD ]---------------------------------------
#
				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 175
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 
	  <td class="row1">&nbsp;<span class="topictitle">{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span></td>

# 
#-----[ 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
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">

# 
#-----[ REPLACE WITH ]---------------------------------------
# 
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>

# 
#-----[ FIND ]---------------------------------------------
# around line 462
	{POLLBOX} 

# 
#-----[ BEFORE, ADD ]---------------------------------------
# 
	{ATTACHBOX}

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

# 
#-----[ FIND ]---------------------------------------------
# around line 13
					<span class="postbody">{MESSAGE}</span>

# 
#-----[ AFTER, ADD ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
					<!-- BEGIN postrow -->
					{ATTACHMENTS}
					<!-- END postrow -->

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

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

# 
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 26 (directly in that line)
{postrow.MESSAGE}</span>

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------------
# 
{postrow.ATTACHMENTS}

# 
#-----[ 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>

# 
#-----[ FIND ]---------------------------------------------
# around line 106
	  <td width="55%" valign="middle" class="{listrow.ROW_CLASS}"><span class="topictitle">&nbsp;<a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}</a></span></td>

# 
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 106 (directly in that line)
<span class="topictitle">&nbsp;<a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}

# 
#-----[ IN-LINE BEFORE, ADD ]---------------------------------------
# 
{listrow.PRIVMSG_ATTACHMENTS_IMG}

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

# 
#-----[ FIND ]---------------------------------------------
# around line 23
	<td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span></td>

# 
#-----[ REPLACE WITH ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
	<td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span>
	<!-- BEGIN postrow -->
	{ATTACHMENTS}
	<!-- END postrow -->
	</td>

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

# 
#-----[ FIND ]---------------------------------------------
# around line 47
	  <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td>

# 
#-----[ REPLACE WITH ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
	  <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span>
<!-- BEGIN postrow -->
	{ATTACHMENTS}
<!-- END postrow -->
	  </td>

# 
#-----[ FIND ]---------------------------------------------
# around line 74
		<input type="submit" name="delete" value="{L_DELETE_MSG}" class="liteoption" />

# 
#-----[ AFTER, ADD ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
<!-- BEGIN switch_attachments -->
		&nbsp; 
		<input type="submit" name="pm_delete_attach" value="{L_DELETE_ATTACHMENTS}" class="liteoption" />
<!-- END switch_attachments -->

# 
#-----[ 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/viewforum_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# around line 26
	  <td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />

# 
#-----[ 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
				<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 ]------------------------------------------ 
# 

#
# STEP NUMBER IV: Additional Instructions
#
# 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 and change it under Attachments->Management.
#
# If the installer told you to make the upload path writeable, you have to chmod it to 777 
# (or change the owner to you httpd-servers owner) to upload files if you do not use the ftp upload feature.
# if you only have 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 within the database. You don't have to chmod the directory (ftp-path).
#
# it would be wise if you put the provided index.php to this directory to prevent directory indexing if this 
# has been enabled at your server.
#
# 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 
[/code][/quote]

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20315
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 15 jan 2006, 18:43

Dan moet het gewoon werken ;)

Twinkel
Berichten: 70
Lid geworden op: 01 jan 2006, 21:39

Bericht door Twinkel » 15 jan 2006, 18:50

Ben tot stap 2 gekomen zoals ik hierboven al een paar keer zei :wink: Liep vast op jouw linkje, kon het bestand niet vinden en wist dus niet meer wat ik moest doen.

Twinkel
Berichten: 70
Lid geworden op: 01 jan 2006, 21:39

Bericht door Twinkel » 15 jan 2006, 20:17

tis gelukt :lol:

Gesloten