Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Lengthing URL Field for Adding Links

Quote Reply
Lengthing URL Field for Adding Links
How to I lengthen the number of characters allowed in a URL when adding a link? Many of the URL's I try to add get cut off because they are too long.
Quote Reply
Re: [eeyipes] Lengthing URL Field for Adding Links In reply to
How long are the url's?

I think the url column is varchar so anything over 255 characters will be chopped off my mysql rather than Links SQL
Quote Reply
Re: [eeyipes] Lengthing URL Field for Adding Links In reply to
in your links.def

Code:
URL => [2, 'alpha', 80, 125, 1, 'http://', '^http|news|mailto|ftp'],


the 80 will be the size of the text box in the Admin center and the 125 will be the maximun number of characters allowed within that box.

In your add/modify html pages

Code:
add: <INPUT TYPE=text NAME=URL VALUE="http://" SIZE=80 maxlength=125>
modify: <INPUT TYPE=text NAME=URL VALUE="<%URL%>" SIZE=80 maxlength=125>


set the maxlength to 125 or whatever numbers you choose.


but you may have other issues going on besides the above.


The size of the text boxes in the links.def and html pages ( 80 in the above example ) do not have to be the same. But the maxlength in the html pages should be the size of the maxlength defined in the links.def file ( 125 in the above example ).


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [eeyipes] Lengthing URL Field for Adding Links In reply to
In Links 2 you just need to change the values for the URL field in the database definition section of the links.cfg file.

The first number is the size of the text input box displayed, and the second is the maximum allowable length.

I believe the defaults are 40 and 75 respectively.