Gossamer Forum
Home : Products : DBMan : Customization :

list categoties mod

Quote Reply
list categoties mod
Hello forum...
ran into a bit of trouble installing the list categories ver #11 txt mod. straight cut and paste job and some how methinks my paste and cut got messed up Wink
the first category is returned and prints out ok, hyperlink points to sub view_subcats, click to advance to next page and nothing returns for sub category

change made are listed herehttp://www.alpsonline.com/category.txt


thanx in advance
5thEdition
Quote Reply
Re: [5thEdition] list categoties mod In reply to
I haven't worked with this mod, but here's a two thoughts:

- simplification: instead of going through @db_cols to get $fieldnum/$fieldnum1 etc., you can simply use code of this structure:

$fieldnum = $db_def{'Course'}[0]; if ($fieldnum) { $found = 1;}

$fieldnum2 = $db_def{'MIB'}[0]; if ($fieldnum2) { $found2 = 1;}

- In sub html_view_subcats, you have a line "++$count_cat{$fields[$fieldnum2]}", but then later, you are checking the values of %count. Change $count_cat to $count, and see what happens then. You might have to declare "my %count;" at the beginning of sub html_view_subcats, though.
kellner
Quote Reply
Re: [kellner] list categories mod In reply to
ty kellner
Changing $count_cat to $count made the mod work.

the original line was part of the mod.
$count_cat{$fields[$fieldnum2]}