MOD should take less than 5 minutes to do manually.
Files to edit are
posting.php
styles/prosilver/template/posting_attach_body.html
If a filesize has been explicitly set for a file type through the ACP it will use that value. If that value has been left at zero to denote no limit, it will use the servers' uploaded file size limit instead.
NOTE: Don't forget to
Purge Cachevia the ACP after making these file edits.
----[ OPEN ]----
styles/prosilver/template/posting_attach_body.html
----[ FIND ]----
<p>{L_ADD_ATTACHMENT_EXPLAIN}</p>
----[ AFTER ADD ]----
<p>{L_ALLOWED} {L_EXTENSION}:<!-- BEGIN allowed_extension --><!-- IF not allowed_extension.FIRST -->,<!-- ENDIF --> <acronym style="cursor:help;" title="{L_ALLOWED} {L_FILESIZE}: {allowed_extension.FILESIZE} {L_KB}">{allowed_extension.EXTENSION}</acronym><!-- END allowed_extension --></p>
----[ OPEN ]----
posting.php
----[ FIND ]----
// Attachment entry
----[ BEFORE ADD ]----
// Allowed extension list
$allowed_extensions = $cache->obtain_attach_extensions($forum_id);
unset($allowed_extensions['_allowed_']);
ksort($allowed_extensions);
$first_extension = true;
foreach($allowed_extensions as $ext => $vals)
{
if($vals['max_filesize'] == 0)
{
$vals['max_filesize'] = min(
eval('return ' . str_replace(array('k','m','g'), array('*1024','*1048576','*1073741824'), strtolower(trim(ini_get('upload_max_filesize')))) . ';'),
eval('return ' . str_replace(array('k','m','g'), array('*1024','*1048576','*1073741824'), strtolower(trim(ini_get('post_max_size')))) . ';')
);
}
$template->assign_block_vars('allowed_extension', array(
'FILESIZE' => number_format($vals['max_filesize'] / 1024, 2),
'EXTENSION' => $ext,
'FIRST' => $first_extension)
);
$first_extension = false;
}
----[ OPEN ]----
includes/ucp/ucp_pm.php
----[ FIND ]----
global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $config
----[ AFTER ADD ]----
, $cache
----[ FIND ]----
compose_pm($id, $mode, $action);
----[ AFTER ADD]----
// Allowed extension list
$allowed_extensions = $cache->obtain_attach_extensions(false);
unset($allowed_extensions['_allowed_']);
ksort($allowed_extensions);
$first_extension = true;
foreach($allowed_extensions as $ext => $vals)
{
if($vals['max_filesize'] == 0)
{
$vals['max_filesize'] = min(
eval('return ' . str_replace(array('k','m','g'), array('*1024','*1048576','*1073741824'), strtolower(trim(ini_get('upload_max_filesize')))) . ';'),
eval('return ' . str_replace(array('k','m','g'), array('*1024','*1048576','*1073741824'), strtolower(trim(ini_get('post_max_size')))) . ';')
);
}
$template->assign_block_vars('allowed_extension', array(
'FILESIZE' => number_format($vals['max_filesize'] / 1024, 2),
'EXTENSION' => $ext,
'FIRST' => $first_extension)
);
$first_extension = false;
}
----[ SAVE/CLOSE ALL FILES ]----
EoM