The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need some help with code
I am trying to add a field to input a 16 digit number and all I am getting back is 10 digits.
I have the user table set up so that I have the type set up for the bob row at char(20). I have the plugin set for profile_updateprofile hook as Code:
$vbulletin->input->clean_array_gpc('p', array( 'bob' => TYPE_INT, )); $userdata->set('bob', $vbulletin->GPC['bob']); Code:
$this->validfields['bob'] = array(TYPE_INT, REQ_NO); Code:
<tr><td>Bob Address: (No Spaces) <br /> <input type="text" class="bginput" name="bob" value="$bbuserinfo[bob]" size="50" maxlength="200" dir="ltr" /></td> </tr> so that I can put in a 16 or larger number and not have it cut off? Thanks, Parker |
#2
|
||||
|
||||
The maximum number allowed in an INT field is "2147483647" (or "4294967295", depending) which is only 10 digits. I think you may want to use a BIGINT or a VARCHAR for your number. (ref: http://dev.mysql.com/doc/refman/5.0/...ric-types.html)
|
#3
|
|||
|
|||
Thanks Lynne. I figured it out. I needed to use TYPE_STR instead of INT.
|
#4
|
|||
|
|||
You better use TYPE_NOHTML so $bbuserinfo['bob'] is not open to XSS issues.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|