
06-21-2010, 06:21 PM
|
|
|
Join Date: Sep 2008
Location: UK, Scuny
Posts: 1,337
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by bananalive
Form Hook: Before Submit:
PHP Code:
if (empty($postattach))
{
$currentattaches = $db->query_read("
SELECT dateline, filename, attachmentid
FROM " . TABLE_PREFIX . "attachment
WHERE posthash = '" . $db->escape_string($posthash) . "'
AND userid = " . $vbulletin->userinfo['userid']
);
while ($attach = $db->fetch_array($currentattaches))
{
$postattach["$attach[attachmentid]"] = $attach;
$attachcount++;
$formoutput = str_replace('[attach]'.$attachcount.'[/attach]','[attach]'.$attach['attachmentid'].'[/attach]',$formoutput);
}
}
Then use this in Custom Form Output:
|
Thank you so muchy <3
|