Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Creating custom fields

Quote Reply
Creating custom fields
Help creating new fields with LSQL 1.13!
I want to add fields to the db. I want to be able to call them to the detailed page...
In the admin-> category-> add field. (am I in the right place?)
Could someone describe what each entry asks for, and what it does?
Column,Type,Form Length,Max Length,Not Null,Default Value,Validation,Index Weight

Seems like adding custom fields is pretty common. I would be nice to have a "how to" for this, with a brief walk through for us "almost newbies". Like
1. do this
2. do this
3. add this
4. see this

If it is already listed somewhere could you please provide the link, because I must have overlooked it.
TIA

Quote Reply
Re: Creating custom fields In reply to
I think this has been posted before.... but for the record:


Column: Fieldname, will become the <%tag%> in the form

Type: Int, Text, etc.

Form Length: How long a box do you want in the admin area auto display

Max Length: How many characters do you want LINKS to allow input (this test occurs _BEFORE_ the MySQL database "ok's" the data.

Not Null: Confusing. "NULL" --- allow empty fiels. "NOT NULL" - require a value

Default Value: What value do you want LINKS to put in the box if you don't enter a value (and when you create the field ... if this is set at creation time, _ALL_ created fields will have this value. If you set this _AFTER_ the field is created, only fields created from that point on will have that value.)

Validation: A regex that LINKS uses to verify the input from your user for that field -- such as making sure a phone number is all numbers, or a US zip is 5 or 9 (10) characters long. (nnnnn or nnnnn-nnnn)

Index Weight: zero if you want the index scripts to avoid this field. Non-zero if you want searches to use this field and assign a relative value to the words found in that field eg: Title 5 and url 2 means that you are giving more weight to the search term if it's found in the title, rather than the url. -- you must Re-index after changes to these values!.




PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Creating custom fields In reply to
Thanks! That seems pretty straightforward.

BTW -
About the weight.. Do the values all have to be different? I.E. You have 9 fields 4 are set to 0. Do the rest have to be set as 1,2,3,4,5 in the order of importance?

Quote Reply
Re: Creating custom fields In reply to
No.

The weights for the entire record are added to give a 'ranking' to the record.

It's just how you decide you want to index your site.

I use keywords=5, title=2, url=2, description=1

But that is me.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ