Quote:
Originally Posted by ullo
"This forum does not allow attachments, therefore attachment ignored."
But i have allowed all attachment for all forums. What is the solution ?
|
It has been described earlier somwhere. If it was here or a thread for a rescent version of vB or not, I don't know but I think that worked out for me.
You need an old functions_image.php
In functions_nntp.php, disable this text (around line 887 or something):
PHP Code:
if (!$attachtypes[$extension] OR !$attachtypes[$extension]['enabled'])
{
logging($extension . " extensions are not accepted, as currently set up in the control panel.");
}
else
{
$extensionok = true;
}
After that text I also added this (I don't know if that's necessary):
PHP Code:
// Always accepting attachments... [tornevall]
$extensionok = true;
I never got my thumbnails work with the default code so I hade to change saveintodb to:
PHP Code:
function saveintodb($i, $thumbnail, $filesize, $date, $postid)
{
global $vbulletin, $db, $nntp;
$message =& $nntp['message'];
// save with thumbs into the db
$filesize = $filesize + 0;
if ($vbulletin->options['attachthumbs']) {$okthumb = 1;}
// Another modification [Tornevall]
$okthumb = 1;
if ($okthumb == 1)
{
$db->query("INSERT INTO " . TABLE_PREFIX . "attachment SET dateline = '$date',
filename = '" . addslashes($message['attachment' . $i]['headers']['filename']) . "',
filedata = '" . $db->escape_string($message['attachment' . $i]['body']) . "', visible = 1,
thumbnail = '" . $db->escape_string($thumbnail['filedata']) . "',
thumbnail_dateline = " . $thumbnail['dateline'] . ",
thumbnail_filesize = " . $thumbnail['filesize'] . ",
filesize = $filesize,
postid = $postid");
//logging("inserted with thumb");
}
else //and without
{
$db->query("INSERT INTO " . TABLE_PREFIX . "attachment SET dateline = '$date',
filename = '" . addslashes($message['attachment' . $i]['headers']['filename']) . "',
filedata = '" . $db->escape_string($message['attachment' . $i]['body']) . "', visible = 1,
filesize = $filesize,
postid = $postid");
//logging("inserted without thumb");
}
//logging("insertion complete");
}
... to always accept attachments.
Something like that. Those "Tornevall"-things is made for myself to find the code easier in case of patching, etc.