Gossamer Forum
Home : Products : Links 2.0 : Customization :

Added new fields - but the DON'T SHOW UP in add.html ...

Quote Reply
Added new fields - but the DON'T SHOW UP in add.html ...
Hi,

for tailoring Links 2 to my needs, I added some more fields to it, like "Language" (German/English), "Keywords" and "AltCategories".

Everything's ok with the admin screen; the new fields appear and they work fine.

For whatever reason (lost my brain? Wink), I don't get them to show up on add.html, add-sucess.html... Frown

Here's a snipplet of modified code of my links.def:

Code:
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Language => [14, 'alpha', 0, 10, 1, '', ''],
AltCategories => [15, 'alpha', 0, 500, 0, '', ''],
Keywords => [16, 'alpha', '40x2', 500, 0, '', '']
);

# 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 = 'Links Database';
$html_object = 'Link';

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13;
$db_language = 14; $db_altcategories = 15; $db_keywords = 16;

# Field number to sort links by:
$db_sort_links = 1;

# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,16);

# System defaults. When adding new links or modifying links, these fields
# can not be overwritten by a user.
%add_system_fields = (
isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes'
);

# Hash of column names to possible options. If you want to use a select form
# field, you can use &build_select_field in your HTML page. This routine will
# make a <SELECT> input tag using the following values:
%db_select_fields = (
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No',
Language => 'Deutsch,Englisch'
);

What must I do to call them from add.html etc. ???

Maybe something magic....?

For example, I tried to get the AltCategories showing up by both, using <%AltCategories%> and <%altcategories%>, analog to <%Language%> and <%language%> - for the case the call is case-sensitive!

The result?:
Quote:
Unkown Tag: keywords
Unkown Tag: altcategories
Unkown Tag: language

Could you please tell me what to do?

Thanx in advance so much !!!

[This message has been edited by Kodak (edited August 24, 1999).]
Subject Author Views Date
Thread Added new fields - but the DON'T SHOW UP in add.html ... Kodak 2549 Aug 24, 1999, 12:44 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Bobsie 2492 Aug 24, 1999, 5:24 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2495 Aug 25, 1999, 6:05 AM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Alex 2495 Aug 25, 1999, 3:55 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2497 Aug 25, 1999, 4:08 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2494 Aug 25, 1999, 4:56 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2492 Aug 26, 1999, 12:34 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Bobsie 2495 Aug 26, 1999, 2:59 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2496 Aug 26, 1999, 3:29 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Bobsie 2494 Aug 26, 1999, 4:30 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2495 Aug 26, 1999, 6:15 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Bobsie 2493 Aug 27, 1999, 12:36 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2495 Aug 29, 1999, 10:49 AM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Eliot 2494 Aug 29, 1999, 12:09 PM
Post Re: Added new fields - but the DON'T SHOW UP in add.html ...
Kodak 2491 Aug 29, 1999, 2:28 PM