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

Re: Error: search.cgi - Range iterator outside integer

Quote Reply
Re: Error: search.cgi - Range iterator outside integer In reply to
YES ... problem sorted (fingers-crossed!!) Smile

I'd previously played around for hours trying to link just the last part of the category and ended up building an additional sub to link the last directory using (pop @dirs)

After testing a few backup copies I found the problem had been there ever since I did the mod (ooppss ...) I've now removed the sub altogether and used the following changes to achieve it:

Code:
sub search_build_linked_title {
# --------------------------------------------------------
# Returns a string of the current category broken up
# by section, with each part linked to the respective section.
#
my $input = shift;
my (@dirs, $dir, $output, $path);

@dirs = split (/\//, $input);


# Builds all but the last directory, without a hyper-link

for (0 .. $#dirs - 1){
$path = "/" . &build_clean_name( join "/", @dirs[0 .. $_] );
$output .= qq| $dirs[$_]  >|;
}


# Builds the last directory, hyper-linked

for ($#dirs){
$path = "/" . &build_clean_name( join "/", @dirs[0 .. $_] );
$output .= qq| <A HREF="$LINKS{build_root_url}$path/">$dirs[$#dirs]</A>|;
}

return $output;
}
Thanks pugdog - your advice about $#dirs gave me the idea to get it working Smile

All the best
Shaun
Subject Author Views Date
Thread Error: search.cgi - Range iterator outside integer qango 5497 Sep 12, 2000, 2:39 PM
Thread Re: Error: search.cgi - Range iterator outside integer
pugdog 5278 Sep 12, 2000, 2:48 PM
Thread Re: Error: search.cgi - Range iterator outside integer
qango 5382 Sep 12, 2000, 2:57 PM
Thread Re: Error: search.cgi - Range iterator outside integer
pugdog 5279 Sep 12, 2000, 3:09 PM
Thread Re: Error: search.cgi - Range iterator outside integer
qango 5256 Sep 12, 2000, 3:14 PM
Thread Re: Error: search.cgi - Range iterator outside integer
qango 5350 Sep 12, 2000, 4:27 PM
Thread Re: Error: search.cgi - Range iterator outside integer
pugdog 5238 Sep 12, 2000, 5:49 PM
Thread Re: Error: search.cgi - Range iterator outside integer
pugdog 5264 Sep 12, 2000, 6:05 PM
Thread Re: Error: search.cgi - Range iterator outside integer
qango 5238 Sep 13, 2000, 1:38 AM
Post Re: Error: search.cgi - Range iterator outside integer
pugdog 5244 Sep 13, 2000, 11:40 AM