Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Limit # of words in Category Description

Quote Reply
Limit # of words in Category Description
Is there any way to limit the #of words in the Category description.

I also want to limit the # of words while displaying on to pages.

Any help would be appreciated!

Thanks
Sanjiv R. Malkan
MultiMedia Communications, Inc.
http://www.malkan.com
Quote Reply
Re: [malkan] Limit # of words in Category Description In reply to
Links 2 sets "Description" by number of characters not "words".

To set the max # chars you need to edit, in your favorite text editor, the category.def (defination) and links.def file.

Sarting at line 19 you'll see the following 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, '', ''],
Header => [6, 'alpha', 40, 75, 0, '', ''],
Footer => [7, 'alpha', 40, 75, 0, '', '']
);


Although links.def has a few more lines of code for other requirements the line you are intrested in is the "Description" line. 40x3 is the size of the description window, 40 chars. wide by 3 rows high. This is the Description box shown when Adding or Modifing a category or link. The next number "500" is the max number of characters allowed in the box. Make the changes as appropriate, save the file(s) and upload.


Web Rat
Davez Webz
Sure Links A Lot