Gossamer Forum
Home : Products : Links 2.0 : Customization :

How can I Bold or Enhance Selected Links?

Quote Reply
How can I Bold or Enhance Selected Links?
Is there a way I can select links that have been added? I would like to either give selected websites a bold listing or priority placement.

Other than that It is all done and what a great program I must say. I want to thank everyone who has replied to past posts for all there help. The site can be viewed at:
http://www.1st-artsandcrafts.com

Sincerely
Keith
Quote Reply
Re: How can I Bold or Enhance Selected Links? In reply to
Ok follow me on this one:

1. open links.def
2. create field called isEnhanced in %db_def = (
Something similar to this should be good:
Code:
isEnhanced => [15, 'alpha', 0, 5, 0, 'No', '']

The number doesn't have to be 15 it can be whatever number is next.
Note: if you make this the last entry copy it as is, if you add it somewhere other than the last entry it has to have a comma , after the ]

3. go to this section:
# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
and add this:
Code:
$db_isenhanced = 15;

4. then go to this section:
%db_select_fields = (
and do the following:
Code:
isEnhanced => 'Yes,No'

Note: Again, if you make this the last entry copy it as is, if you add it somewhere other than the last entry it has to have a comma , after the '

You are now finished w/ links.def
Now Open site_html_templates.pl (if you are not using templates you should still get the idea somewhat.

1. Find the site_html_link sub routine.
2. Find my %rec = @_;
3. Add this:
Code:
($rec{'isEnhanced'} eq 'Yes') ? ($rec{'isEnhanced'} = 1) : (delete $rec{'isEnhanced'});
below my %rec = @_;
4. Open the link.html template
5. Then add this to the beginning of the html code:
Code:
<%if isEnhanced%>
<b>
<%endif%>

That should do it.

So now when you are in the admin validating or adding a link you should have the option to select a link as being enhanced or not.
If it is enhanced it will add the bold <b> tag to that particular listing.

E-mail me if you have any further problems.

bye for now.

[This message has been edited by hellraida (edited March 06, 1999).]
Quote Reply
Re: How can I Bold or Enhance Selected Links? In reply to
Thanks for the info hellraida, but I am not that adept with cgi. I am very new to cgi and know just enough to be dangerous. What I have done is when I add links I just use <B></B> around their title and it bolds it. Check it out at: www.1st-artsandcrafts.com

Sincerley

Keith

------------------
www.1st-artsandcrafts.com
Quote Reply
Re: How can I Bold or Enhance Selected Links? In reply to
Hi,
yeah that would work too. :-)

bye for now.