Gossamer Forum
Home : Products : Links 2.0 : Discussions :

What is? Field Number of some important fields

Quote Reply
What is? Field Number of some important fields
I cant figure what the list of database fields under

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.

in links.def actually do, if anyone knows please let me know, thanks.

My next question is what exactly are these data fields in links.def used or intended for.

Hits
IsNew
IsPopular
Rating
Votes

Thanks, any light shed is appreciated.
Quote Reply
Re: What is? Field Number of some important fields In reply to
The important field variables are used throughout the Links scripts for indexing purposes. Each one points to the field number within a given record.

Hits: Stores the number of hits for a link. Updated by the build process.

isNew: Used to indicate (via Yes or No) whether a link is new based on the $db_new_cutoff setting in links.cfg. Set to Yes or No during the build process.

isPopular: Similar to isNew except it is based on the $db_popular_cutoff setting in links.cfg. Set to Yes or No during the build process.

Rating: Stores the rating the link has received. Updated during the build process.

Votes: Stores the number of votes a link has received. Updated during the build process.

I hope this helps.

[This message has been edited by Bobsie (edited July 15, 1999).]
Quote Reply
Re: What is? Field Number of some important fields In reply to
Thanks Bobsie, your posts are always appreciated.

You say

"The important field variables are used throughout the Links scripts for indexing purposes. Each one points to the field number within a given record."

What would be the criteria for adding any new database fields I create to the important field variables, should all fields be included here or just those with particular functions.

The admin drop selectors for the fields I mentioned New, Pop, etc still dont seem to have any effect on whats in the database, maybe I`m being a bit thick here but I still cant see their purpose in the admin pages, I can understand their purpose in the actual database to keep track of whats what and automated by the build process, but why have a drop selector on the admin pages which when changed makes no difference to the database values.

Thanks for your time and being patient with me on this.

Another question:
I installed your exclude categories mod and it works fine, thank you for that, however if I want to exclude a category and all its sub categories from the add pages category drop selector (as intended) is there a shortcut, rather than adding the category and every "sub category" to the @exclude_categories in links.cfg

Thanks
chmod



Quote Reply
Re: What is? Field Number of some important fields In reply to
chmod,
You can include any new field (or any of the original fields) from links.def in that list of important fields and their numbers. I always add my new fields to that section just in case I need to use them in a function later. It does no harm to list them there. Just don't remove any of the existing ones.

Phoenix
Quote Reply
Re: What is? Field Number of some important fields In reply to
Thanks Phoenix,

I`ll do as you suggest.
chmod

[This message has been edited by chmod (edited July 17, 1999).]