Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

1.1b2: HTML_Templates.pm bug

Quote Reply
1.1b2: HTML_Templates.pm bug
in HTML_Templates.pm

Code:
my $breakpoint = int (($#names+1) / $LINKS{build_category_columns}) + ( (($#names+1) % $LINKS{build_category_columns}) ? 1 : 0);

ok.. let's just say there are 12 names and then you want 5 columns..

$#names+1 would be 12..
$LINKS{build_category_columns} would be 5

so it's like saying

Code:
my $breakpoint = int (12 / 5) + ( (12 % 5) ? 1 : 0);

now simplify..

Code:
my $breakpoint = 3;

well let's see...

Code:
1.4.7.10
2.5.8.11
3.6.9.12

that's only 4 columns..

ok.. so what if MODULUS wasn't in the matimaticas (spanish Smile)..

Code:
my $breakpoint = 2;

let's see

Code:
1.3.5.7.9.11
2.4.6.8.10.12

now that's 6 columns..

hehe.. alex.. i don't think this is possible Smile

jerry

[This message has been edited by widgetz (edited November 10, 1999).]
Quote Reply
Re: 1.1b2: HTML_Templates.pm bug In reply to
i think starting from 5.. it won't work..

it seems if there are at least 2 times the columns it won't work..

let's see.. 11 cats and 5 columns..
Code:
my $breakpoint = int (11 / 5) + ( (11 % 5) ? 1 : 0);

which comes out as (3)..

Code:
1.4.7.10
2.5.8.11
3.6.9

a bit too little there..

so i guess you have to say in Links.pm that it can only be set from 1-4?

unless you can somehow get it to do this (with little code that is)..

Code:
1.4.7. 9.11
2.5.8.10
3.6

Smile

jerry