Gossamer Forum
Home : Products : Links 2.0 : Customization :

Changed links.def and now detailed pages build as Yes

Quote Reply
Changed links.def and now detailed pages build as Yes
I have changed my database format to this:

# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
About => [2, 'alpha', 40, 75, 1, '', ''],
Month => [3, 'alpha', 0, 150, 1, '', ''],
Introduction => [4, 'alpha', 0, 150, 1, '', ''],
Article => [5, 'alpha', '40x3', 500, 0, '', ''],
Source => [6, 'alpha', 40, 75, 1, '', ''],
Date => [7, 'date', 15, 15, 1, \&get_date, '']

);

# Database file to use -- defined in links.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'News Room';
$html_object = 'Article';

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 3; $db_introduction = 4; $db_about = 2;
$db_hits = 8; $db_source = 6; $db_title = 1;
$db_modified = 7;

(the rest is the same)

and now when i build my detailed pages all the database entries ID's change to Yes
so instead of having 4.html i have Yes.html and for every new entry it just keeps writing to Yes.html!!!!

what is up with that?!

Regards

Gian
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
You have to use the upgrade.pl file to automatically add the | and default value to your database file.

Search this forum for "upgrade.pl", "upgrade.cgi", or upgrade. There are at least two Threads that provide explicit instructions for adding fields to the links.def file and links.db file.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
I dont understand? why would i have to upgrade i am using version 2.0 of links
and i follwed the mod stated in the resource center..i havent added an entries yet i am just testing right now

Regards,

Gian
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
The upgrade file, which is a stand alone script ADDS the | and default values for new fields added in the links.def file. The name of the file is misleading, but it "upgrades" your database file with new fields added in the links.def file.

Does this make sense now?

If you want the copy of the "upgrade.cgi" file, email me at eliot@anthrotech.com and I will send it to you.

If you are referring to the FAQ on adding fields to the links.def file...the one important step missing in that FAQ is HOW to add the | delimiter character with default values to an EXISTING LINKS.DB file.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 11, 1999).]

[This message has been edited by Eliot (edited September 11, 1999).]
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
Yes it does....thanks eliot
i just took a look abd did a search for upgrade.pl and upgrade but nuthing came up....hmmmmmm
what is it exactly that i will be doing to this file?


Regards,

Gian
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
You configure the file by adding a few values for a few variables. Then you save it as .cgi or .pl, upload it to your browser, then chmod the file to 755. Then you execute it via your browser or telnet shell account.

Voila...the default value for the field and | are automatically added to your database. Right now your database is not aligned properly and that is why you are getting YES for your records.

Again, if you want the script, email me.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
ohhhhhhhhh OKAY!
well now i am truly lost!
is there a post that goes into depth with this?

Thanks

Gian
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
I have reads lots about adding fields and stuff... and just thought you may be interested how i play with the links.db file. I use no scripts or anything... i only use excel and word.

Basically...

1. import links.db into word.
2. When you do you have to click on delimited in the options
3. The in the OTHER box put the |
4. Press ok.

now you get a column organized database. You can add columuns.. use copy and paste and basically do what you want.. add links easily.. sort by categories so you can look at your links better etc.

Now to put back into link.db file

1. Click save as and save as a TAB DELIMITED file
2. Open word.
Select the tap, do CTRL C
3. Search and Replace
4. Find do CTRL V and replace put in |
5. Press go and wait a bit :-)

you could use another program but i found wordpro kept on crashing and was a lot lot slower but other text editors may be good.

That is about it. I find it real easy to edit in excel and found it useful. Most of this info was taken from about 2 or 3 almagimated threads and i hope it helps.

Of couse this does not help you altering the database file bit

------------------
-------------------------
http://www.freeontheweb.com/
Reviewed and rated resources for webmasters
-------------------------
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
padders......my friend
at 11:23 in the morning that is the crazyiest thing i have ever heard but full respect to you for getting it to work!
i think i will try it when my eyelids arent on the floor!

Thanks though!

Gian

[This message has been edited by Gian (edited September 11, 1999).]
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
Since you are definitely confused, why don't you read the following Threads, which basically discuss the same suggestions I have provided:

http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002723.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/001543.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/001635.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/001090.html

BTW: The last three Threads were found with using "upgrade.pl" and "upgrade.cgi" as I originally suggested.
Wink

The last thread is what you need to find the "upgrade.pl" file. The second thread actually outlines and discusses the SAME problem as you have come accross!

Wink

I REALLY hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 11, 1999).]

[This message has been edited by Eliot (edited September 11, 1999).]

[This message has been edited by Eliot (edited September 11, 1999).]
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
Eliot!
Thanks man! These links have been of great help!

I must have overlooked thoes resluts last night.

To tell you the truth i was really out of it! Wink

Thanks

Gian
Quote Reply
Re: Changed links.def and now detailed pages build as Yes In reply to
Good!

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us