This seems fairly straightforward but I guess I'm messing something up.
1. I've added 'expenditure' to the 'post' table.
2. I'd like to be able to to add/update this field when replies to a thread are made.
newpost_process
PHP Code:
if ($type == 'thread')
{
$dataman->setr('expenditure', $post['expenditure']);
}
newreply_post_start
PHP Code:
$vbulletin->input->clean_gpc('p', 'expenditure', TYPE_STR);
$newpost['expenditure'] = $vbulletin->GPC['expenditure'];
newreply_start
PHP Code:
$this->validfields['expenditure'] = array(TYPE_STR, REQ_NO);
newreply template
PHP Code:
<input type="text" name="expenditure" />
When I look at my post table, there's no values being added to expenditures. I also tried:
PHP Code:
$expenditure = $vbulletin->input->clean_gpc('p', "expenditure", TYPE_STR);
$vbulletin->post['expenditure'] += $expenditure;
Where am I going wrong?