The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom fields in new thread
I'd like to add a custom field to new threads.
So far I have this. I execute this SQL Query: Code:
ALTER TABLE table ADD ( var VARCHAR(10) not null default '' ) Table is the name of the vb thread table and var is the name of the field I'm adding. In the template I add this: Code:
<div style="padding:$stylevar[formspacer]px"> <div> <input type="text" class="bginput" size="10" name="var" value="" id="var" tabindex="1" /> $vbphrase[var_name]</div> newpost_process Code:
if ($type == 'thread') { $dataman->setr('var', $post['var']); } newthread_post_start Code:
$vbulletin->input->clean_array_gpc('p', array('var' => TYPE_STR)); $newpost['var'] =& $vbulletin->GPC['var']; threadfpdata_start Code:
$this->validfields['var'] = array(TYPE_STR, REQ_NO); I think I need to add a new plugin to global_start but I'm not sure. How do I call it? |
#2
|
||||
|
||||
Is this supposed to display only in the postbit?
|
#3
|
|||
|
|||
yes, in postbit
|
#4
|
|||
|
|||
and maybe in showthread
|
#5
|
|||
|
|||
Try $threadinfo[var] or $thread[var] in the postbit one of them might work.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|