Gossamer Forum
Home : Products : Links 2.0 : Customization :

On Mouse Over - Related Categories - How To

Quote Reply
On Mouse Over - Related Categories - How To
Help Please.

Okay, I changed line No. 1 of links.html (template)
From:
<ul><li><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>>
<%Title%></a>

To:
<ul><li><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"onmouseover=" window.status='<%Title%>'; return true" onmouseout="window.status=''; return true">
<%Title%></a>

And Line No. 403 of site_html_templates.pl
From:
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

To:
$output .= qq|<dl><dt><strong><a class="link" href="$url" onmouseover=" window.status='$category_name'; return true" onmouseout="window.status=''; return true">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

But the Status Bar still reads the URL of the categories and subcategories when the mouse is over them while they are listed as related or search results.

As this is my beta or test site, please forgive the untidy appearence of the following link to provide a visual reference to the problem.

http://www.kiva.net/...erboards/Socket_478/

Place the mouse over the link to the related category and you'll see the full URL where all other category links except search results only show the "active" subcategory name.

Please help me located the line or lines of code to change in order to add the onmouseover anchor to the problem areas.

Also, is it possible to set up the <%related%> tag to use a new template like the <%link%> tab uses links.html if so, how do I do it?

Thank you for any help offered!

beetleman
beetlemanTongue

Marcus L. Griswold

Last edited by:

beetleman: Oct 31, 2001, 6:43 PM
Quote Reply
Re: [beetleman] On Mouse Over - Related Categories - How To In reply to
Well, in the last several hours I messed around with:
nph_build.cgi
search.cgi
etc...

Was able to display the desired text in the status bar of the browser when I placed the mouse over the categories listed on the "SEARCH RESULTS PAGE", "WHAT'S COOL PAGE", WHAT'S NEW PAGE", "TOP RATED PAGE", and in a limited fashion on the "CATEGORIES PAGES - RELATED".

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
Post deleted by beetleman In reply to