Gossamer Forum
Home : Products : Links 2.0 : Discussions :

special link, top of list and bold?

Quote Reply
special link, top of list and bold?
I hope that this, too, hasn't been covered before. But, I was wondering if there was any way to make special links (particularly those in-site) appear at top and perhaps bold, similar to the way Yahoo does. For example, if you go to Yahoo and then the "News and Media" area, the top bold link is "Yahoo! News"...
Quote Reply
Re: special link, top of list and bold? In reply to
Yes, it has...Check out this Thread:

http://www.gossamer-threads.com/...um3/HTML/003110.html

Also, you might want to try searching the Modification Forum for modifications to LINKS scripts.

Wink

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: special link, top of list and bold? In reply to
Hmm... maybe I'm missing something here, but that thread (as a few that I've seen) seems to deal only with creating links to categories. Do those links also appear at top, and bold? It's my understanding that they're simply like any other link, only with the @ symbol and pointing to another category.
Quote Reply
Re: special link, top of list and bold? In reply to
ok.. i would say.. make another field with the name isSpecial

don't forget to make $db_isSpecial also..

in build_stats in nph-build.cgi:

Code:
push (@{$links{$category}}, @values) if (!$staggered_mode);

change that to

Code:
($values[$db_isSpecial] eq "Yes") ?
(push (@{$slinks{$category}}, @values) if (!$staggered_mode)) :
(push (@{$links{$category}}, @values) if (!$staggered_mode));

then you'll add something like this in build_category_pages

Code:
$slinks = "";
for ($i = 0; $i < $#{$slinks{$cat}}; $i++) {
%tmp = &array_to_hash ($i, @{$slinks{$cat}});
$slinks .= &site_html_link (%tmp);
}

there might be more than one place you have to put that.. otherwise.. i would just say to put it below:

Code:
if ($#{$subcategories{$cat}} >= 0) {
$category = &site_html_print_cat (@{$subcategories{$cat}});
}
else {
$category = "";
}

then in site_html_category_pages

you'd add

Code:
slinks => $slinks,

and in the template.. category.html

Code:
<%slinks%>

jerry
Quote Reply
Re: special link, top of list and bold? In reply to
Looks like the codes may work, Jerry. But I would edit one thing...

To create a truly special link to look like:

@MyCars

I would use a different template. So, the following line of codes:

Code:
$slinks .= &site_html_link (%tmp);

should be something like the following:

Code:
$slinks .= &site_special_html_link (%tmp);

Then you should add a new sub-routine in your site_html_templates.pl file. This should be called sub site_special_html_link. It should point to a new template called something like special.html. Then in this new template, you could use the following codes:

Code:
<a href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>

OR

Code:
<a href="<%URL%>"><%Title%></a>

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us