Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Adding Category Field Problem

Quote Reply
Adding Category Field Problem
I've added several new fields to my category.def file and made the required changes in nph-build.cgi and site_html_templates.pl. I now have fields numbered 0-16 but only the first 12 are functional. The information contained in fields 13,14,15,16 is all being combined into field 13 when I build my pages. The admin shows them as seperate fields and they seem to be properly delimited in the categories.db file.

Is there a limit of 13 fields or did I mess something up or forget to change something?

Thanks for any advice. My changes were as follows:

category.def
-----
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
Description => [2, 'alpha', '40x3', 650, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Title' => [4, 'alpha', '40x3', 200, 0, '', ''],
'Meta Description' => [5, 'alpha', '40x3', 200, 0, '', ''],
'Meta Keywords' => [6, 'alpha', '40x3', 500, 0, '', ''],
'Meta Notes1' => [7, 'alpha', '40x3', 200, 0, '', ''],
'Meta Notes2' => [8, 'alpha', '40x3', 200, 0, '', ''],
'Page Title' => [9, 'alpha', 40, 75, 0, '', ''],
Navigation => [10, 'alpha', '40x3', 500, 0, '', ''],
Comparison => [11, 'alpha', '40x3', 500, 0, '', ''],
EXTRA1 => [12, 'alpha', '40x3', 400, 0, '', ''],
EXTRA2 => [13, 'alpha', '40x3', 400, 0, '', ''],
EXTRA3 => [14, 'alpha', '40x3', 400, 0, '', ''],
EXTRA4 => [15, 'alpha', '40x3', 400, 0, '', ''],
EXTRA5 => [16, 'alpha', '40x3', 400, 0, '', '']
);


nph-build.cgi
-----
local ($description, $related, $meta_title, $meta_description, $meta_keywords, $meta_notes1, $meta_notes2, $page_title, $navigation, $next, $prev, $comparison, $extra1, $extra2, $extra3, $extra4, $extra5);

and

($description, $related, $meta_title, $meta_description, $meta_keywords, $meta_notes1, $meta_notes2, $page_title, $navigation, $comparison, $extra1, $extra2, $extra3, $extra4, $extra5) = @{$category{$cat}}[2..16];


site_html_templates.pl
-----
return &load_template ( 'category.html', {
date => $date,
time => $time,
category => $category,
links => $links,
title_linked => $title_linked,
title => $title,
total => $total,
grand_total => $grand_total,
category_name => $category_name,
category_name_escaped => $category_name_escaped,
category_clean => $category_clean,
description => $description,
meta_title => $meta_title,
meta_keywords => $meta_keywords,
meta_description => $meta_description,
meta_notes1 => $meta_notes1,
meta_notes2 => $meta_notes2,
page_title => $page_title,
navigation => $navigation,
prev => $prev,
next => $next,
related => $related,
build_links_per_page => $build_links_per_page,
%globals,
comparison => $comparison,
extra1 => $extra1,
extra2 => $extra2,
extra3 => $extra3,
extra4 => $extra4,
extra5 => $extra5
} );
}
Subject Author Views Date
Thread Adding Category Field Problem biglion 4744 Jan 4, 2005, 3:02 PM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4651 Jan 4, 2005, 4:35 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4606 Jan 4, 2005, 4:49 PM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4623 Jan 4, 2005, 5:30 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4611 Jan 4, 2005, 7:43 PM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4613 Jan 4, 2005, 8:24 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4601 Jan 5, 2005, 6:45 AM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4612 Jan 5, 2005, 10:09 AM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4614 Jan 5, 2005, 11:26 AM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4586 Jan 5, 2005, 5:01 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4605 Jan 6, 2005, 7:39 AM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4598 Jan 6, 2005, 10:35 AM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4594 Jan 6, 2005, 11:08 AM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4611 Jan 6, 2005, 12:14 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4584 Jan 6, 2005, 12:39 PM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4568 Jan 6, 2005, 12:52 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4586 Jan 6, 2005, 1:14 PM
Thread Re: [biglion] Adding Category Field Problem
PerlFlunkie 4625 Jan 6, 2005, 1:40 PM
Thread Re: [PerlFlunkie] Adding Category Field Problem
biglion 4584 Jan 6, 2005, 2:00 PM
Post Re: [biglion] Adding Category Field Problem
biglion 4551 Jan 13, 2005, 11:01 AM