Предложение:
Сделать, чтоб можно было добавлять аттачменты в редактирование поста. Нашел как-то сделать на pcforum.ru:
Код:
***********************************************************************
***********************************************************************
**** ****
**** ADD ATTACHMENT ON EDIT POST HACK version 1.1 - by Tommy Boy ****
**** ****
***********************************************************************
***********************************************************************
Description:
--------------------------------------------------------------------------------
After installing this hack, you will be able to post new attachment when
editing posts, even if these posts did not have a prior attachment.
--------------------------------------------------------------------------------
Open editpost.php, and look for:
--------------------------------------------------------------------------------
require("./global.php");
--------------------------------------------------------------------------------
Before it, add:
--------------------------------------------------------------------------------
$templatesused.=",newpost_attachment"; // Add attachment on edit post hack
--------------------------------------------------------------------------------
Still in editpost.php, look for: [vBulletin 2.2.4 and up ONLY!]
--------------------------------------------------------------------------------
if (function_exists('ini_get')) {
if (ini_get('file_uploads')) {
$enctype = 'enctype="multipart/form-data"';
}
} else if (get_cfg_var('file_uploads')) {
$enctype = 'enctype="multipart/form-data"';
}
--------------------------------------------------------------------------------
Move this block a few lines up, just after this line:
--------------------------------------------------------------------------------
$enctype = '';
--------------------------------------------------------------------------------
Still in editpost.php, look for:
--------------------------------------------------------------------------------
eval("\$editattachment = \"".gettemplate("editpost_attachment")."\";");
}
--------------------------------------------------------------------------------
After it, add:
--------------------------------------------------------------------------------
// Add attachment on edit post hack (start)
else
{
$maxattachsize_temp = getmaxattachsize ();
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
}
// Add attachment on edit post hack (end)
--------------------------------------------------------------------------------
Still in editpost.php, look for:
--------------------------------------------------------------------------------
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
}
}
}
--------------------------------------------------------------------------------
After it, add:
--------------------------------------------------------------------------------
// Add attachment on edit post hack (start)
elseif (trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="")
{
$attachmentid=acceptupload($foruminfo);
$attachmentsql=",attachmentid='$attachmentid'";
}
// Add attachment on edit post hack (end)
--------------------------------------------------------------------------------