Gossamer Forum
Home : Products : Links 2.0 : Customization :

maxlength for category keywords and description

Quote Reply
maxlength for category keywords and description
hi, i searched the forum for this but i can't find the answer...

how can i change the maxlength for category keywords and description, in add category?

there is the html_record_form in db_util.pl where this: $db_lengths{$field} defines the maxlength but where is it defined????

thank you for your help!
Quote Reply
Re: [jayman] maxlength for category keywords and description In reply to
Are you in the right forum: Link2, not SQL?

I ask because there is no stock category for keywords. For the description, look in links.def:

Code:

# Database Definition: LINKS
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],


That red 500 is the word limit. Change it as desired. If by keywords you meant the category name, change the 150 as desired.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] maxlength for category keywords and description In reply to
hi perlflunkie and thank you for your help!

Unfortunately that's not what i need,

what i need to change the maxlength of, is the meta keywords and description box in the add categoy section of admin.

Clearly, in admin panel, add category, Meta Description box and Meta Keywords box the maxlength is too small.

thank you for your help!
Quote Reply
Re: [jayman] maxlength for category keywords and description In reply to
OK, look in category.def:

Code:
# Database Definition: CATEGORIES
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],



The 40s are the size of the text box on the form, and the 75s are the max character length.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] maxlength for category keywords and description In reply to
thank's alot perlflunkie!

i've been workin with links2 for a long time now, i don't know how i missed this oubvious solution.....

thank you!