SMF Development > Bug Reports

MWAHAHAHA! I found one!

<< < (2/3) > >>

Antechinus:
Ok, I wont forget it. :P

emanuele:
Okay, yet another edit: we already have the "size" attribute for the field, why don't we use that one instead?

Antechinus:
EH? You mean for the Sources array or you mean in the varchar itself? Either way, I agree. Go for it. :D

Earlier I was thinking that if anyone wanted to change it, having it in the file might be more accessible from some people. Then I thought about it a bit more, and realised editing Sources files is a nightmare for n00bz anyway and it may well be less frightening if they just rock on down to phpMyAdmin and change the varchar.

emanuele:
What I mean is that in the definition of the "field", for example:

--- Code: --- 'website_title' => array(
'type' => 'text',
'label' => $txt['website_title'],
'subtext' => $txt['include_website_url'],
'size' => 50,
'permission' => 'profile_extra',
'link_with' => 'website',
),

--- End code ---
there is already a 'size' attribute.
This 'size' is used to define the input box size, the only reason I didn't yet apply the change is that this size will affect many fields at the same time (including passwords).
I would avoid adding yet another attribute just to set the limits of the field, so I'm wondering if it is better to continue use the size for the input box and set the limits to the double of that amount (i.e. website title has size 50, it will be cut at 100 chars) or use the size to define the string limit and set the size of the input box to the half of it (i.e. set size for website_title to 100 and then cut the $_POST to 100 and draw the input at 50 (=100/2))

...for compatibility the first is better I think.

Antechinus:
:D Hoenstly, I'd just add a bloody limit to the fields that need them and be done with it. 32 is more than enough for a custom title IMO.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version