Quote:
Originally Posted by HMBeaty
I believe it would be: includes/functions_newpost.php
|
thanks. I have the following code as a plugin which adds two extra input fields during new post. Stored in "price" and "saleprice", it also calculate the third value "pct".
I would like to store them into db with the thread of the postbits. Could you help me figure it out? Thanks
Code:
$vbulletin->input->clean_array_gpc('p', array(
'saleprice' => TYPE_uinit,
'price' => TYPE_uinit));
$price = $vbulletin->GPC['price'];
$saleprice = $vbulletin->GPC['saleprice'];
vB_Template::preRegister('newthread', array('price' => $price, 'saleprice' => $saleprice));
$pct = intval((1-($vbulletin->GPC['saleprice'] / $vbulletin->GPC['price']))*100 );
$vbulletin->GPC['subject'] .= " for $".$vbulletin->GPC['saleprice'] .", {$pct}% off (orig.$" . $vbulletin->GPC['price'] . ")";
i see this
Code:
function build_new_post($type = 'thread', $foruminfo, $threadinfo, $postinfo, &$post, &$errors)
and should i add my variable to it?