Gossamer Forum
Home : Products : Links 2.0 : Customization :

Need help with related category code

Quote Reply
Need help with related category code
Well, in the last several hours I've messed around with:
nph_build.cgi
Trying to create an onmouseover for all of the links troughout my site.

I just want the link or category name displayed in the status bar. For the most part I've been successful.

Now for the problem -

The "related" link now shows up in both the page and status bar as follows:

Hardware : Motherboards : Socket 423

Here is the code wich produces this monster:
NEW CODE IN RED and replaced code hidden via "#" of course.

Code:
# We set up all the variables people can use in &site_html.pl.
($description, $related, $meta_name, $meta_keywords, $header, $footer) = @{$category{$cat}}[2..7];

# Calculate the related entries and put in a <LI> list.
@related = split(/\Q$db_delim\E/, $related); $related = "";
foreach $relation (@related) {
$related_name_escaped = &urlencode ($relation);
$related_clean = &build_clean ($relation);
$related .= qq|<li><a href="$build_root_url/$related_name_escaped/$build_index" onmouseover=" window.status='$related_clean'; return true" onmouseout="window.status=''; return true">$related_clean</a></li>|;

# $related .= qq|<li><a href="$build_root_url/|;
# $related .= &urlencode($relation);
# $related .= qq|/$build_index">|;
# $related .= &build_clean($relation);
# $related .= "</a></li>";
}
http://www.kiva.net/...erboards/Socket_478/

Any help her would be great!
Thanks

beetleman
beetlemanTongue

Marcus L. Griswold
Quote Reply
Re: [beetleman] Need help with related category code In reply to
Try using $related_name_escaped rather than $related_clean.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Chewbaca] Need help with related category code In reply to
Eliot,

Thanks for the tip, but the problem is too large to fix without a lot of work!

"Related Categories:" points to text in category.db and then inserts that text into the URL after $build_root_url to complete the link.

Only took me three days of staring at the same page of code to realize this.
--->But then again Perl isn't really my specialty.

Thanks anyway,

beetleman
beetlemanTongue

Marcus L. Griswold