по размеру определять такое не реальноOtherDima писал(а):заливаю JPEG 200х200 пикселей
стоит меньше 250х250 превьюшки не делать
а оно делает
так как есть 200х200 и 70кб, есть 200х200 26кб, есть и меньше в кб
но я могу вместо 250-250 поставить 0-0Xpert писал(а):Что не помогает по вашему? Если картинка больше 20кБ, а 20 > 70, сами понимаете - создается миниатюра. Если размер больше указанного (250х250) - создается превьюшка.
Делал такой адд-он по заказу еще в прошлом году. СкачивайтеПрага писал(а):2) Можно ли заставить мод уменьшать оригинал изображения, а не только его превью в сообщении?
Код: Выделить всё
<!-- BEGIN cat_images -->
<img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" border="0" />
<!-- END cat_images -->
<!-- BEGIN cat_thumb_images -->
<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank"><img src="{postrow.attach.cat_thumb_images.IMG_THUMB_SRC}" alt="{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}" border="0" width="{postrow.attach.cat_thumb_images.THUMB_WIDTH}" height="{postrow.attach.cat_thumb_images.THUMB_HEIGHT}" /><small><</small></a>
<!-- END cat_thumb_images -->
Код: Выделить всё
Warning: is_dir(): Stat failed for ../files/test_file_217.mpg (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 314
Warning: is_link(): Lstat failed for (null) (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 314
Код: Выделить всё
/**
* Returns the filesize of the upload directory in human readable format
*/
function get_formatted_dirsize()
{
global $attach_config, $upload_dir, $lang;
$upload_dir_size = 0;
if (!intval($attach_config['allow_ftp_upload']))
{
if ($dirname = @opendir($upload_dir))
{
while ($file = @readdir($dirname))
{
## СЛЕДУЮЩАЯ СТРОКА - 314
if ($file != 'index.php' && $file != '.htaccess' && !is_dir($upload_dir . '/' . $file) && !is_link($upload_dir . '/' . $file))
{
$upload_dir_size += @filesize($upload_dir . '/' . $file);
}
}
@closedir($dirname);
}
else
{
$upload_dir_size = $lang['Not_available'];
return $upload_dir_size;
}
}
else
{
Код: Выделить всё
Warning: is_dir(): Stat failed for ../files/test_file_217.mpg (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 247
Warning: is_link(): Lstat failed for (null) (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 247
Код: Выделить всё
/**
* Collect all Attachments in Filesystem
*/
function collect_attachments()
{
global $upload_dir, $attach_config;
$file_attachments = array();
if (!intval($attach_config['allow_ftp_upload']))
{
if ($dir = @opendir($upload_dir))
{
while ($file = @readdir($dir))
{
## СЛЕДУЮЩАЯ СТРОКА - 247
if ($file != 'index.php' && $file != '.htaccess' && !is_dir($upload_dir . '/' . $file) && !is_link($upload_dir . '/' . $file))
{
$file_attachments[] = trim($file);
}
}
closedir($dir);
}
else
{
message_die(GENERAL_ERROR, 'Is Safe Mode Restriction in effect? The Attachment Mod seems to be unable to collect the Attachments within the upload Directory. Try to use FTP Upload to circumvent this error. Another reason could be that the directory ' . $upload_dir . ' does not exist.');
}
}
Код: Выделить всё
<br />
<b>Warning</b>: readfile(): Unable to access files/test_file_217.mpg in <b>/home/www/web1/web/download.php</b> on line <b>201</b><br />
<br />
<b>Warning</b>: readfile(files/test_file_217.mpg): failed to open stream: Value too large for defined data type in <b>/home/www/web1/web/download.php</b> on line <b>201</b><br />
Код: Выделить всё
//
// Now send the File Contents to the Browser
//
if ($gotit)
{
$size = @filesize($filename);
if ($size)
{
header("Content-length: $size");
}
readfile($filename); #### - LINE 201 - ####
}
else if (!$gotit && intval($attach_config['allow_ftp_upload']))
{
Код: Выделить всё
<!-- BEGIN cat_images -->
<img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" border="0" />
<!-- END cat_images -->