Gossamer Forum
Home : Products : Links 2.0 : Customization :

Adding a Third Icon

Quote Reply
Adding a Third Icon
Is there any way to easily add a third icon (NEW & POP)? Or at the very least, bold certain links?

[This message has been edited by kenya (edited February 06, 2000).]
Quote Reply
Re: Adding a Third Icon In reply to
Yea...Search this forum and the Discussion Forum for adding new fields and icons. I posted codes in the Discussion Forum two weeks ago that directly addresses your request.

And this has been discussed other times in this forum!

Also, refer to the FAQ in the Resource Center that discusses adding another field into your existing database.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
Thanks again, Eliot. I think I found what I was looking for.

As in my previous message, I guess I can just add three new fields to accomplish what I am after rather than worrying about overriding the NEW & POP commands. I looked in the areas where you stated. Is there any place that precisely lists how to add these to the links.def? I took a look at it and with the little bit of programming I know, I'm a little lost.

All of the items I would be adding would be drop down Yes, No's that would display an image. I know how to get it to display and add it into the forms, just not add the feature in the links.def page.
Quote Reply
Re: Adding a Third Icon In reply to
Uh...AS I MENTIONED before...there is a FAQ in the Resource Center that discusses adding fields in the LINKS.DEF file and also into your existing LINKS.DB file!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
Sorry to waste your time, then. I did look in the FAQ and I guess to me, I couldn't figure it out. That's why I posted my second question. Thanks, anyway.
Quote Reply
Re: Adding a Third Icon In reply to
What didn't you figure out? What don't you understand about it? Please be more specific about the difficulties you are having with the FAQ.

Re-writing codes for the sake of re-writing them is a waste of time. However, if you can provide more specific problems you are having with the FAQ, then we can better assist you.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
Ok, I have just started all over again. I have gone by the Resource FAQ and added three new fields. These will be graphic images much like the New and Pop images but only I will control the visibility of them by an On/Off drop down.... as long as I can get it to work.

This is what I added in the links.def file. They are to be drop downs.
isEmail => [13, 'alpha', 0, 5, 1, 'No', 'No|Yes']
isWebSite => [13, 'alpha', 0, 5, 1, 'No', 'No|Yes']
isSelectMember => [13, 'alpha', 0, 10, 1, 'No', 'No|Yes']


Now, the bottom of the page states that that is all there is to it [url=http://www.gossamer-threads.com/scripts/resources/Detailed/162.html]See here[/url].

Can I just go ahead and start using it like this and reference the fields as others are throughout the site?

Thanks, again.


[This message has been edited by kenya (edited February 06, 2000).]
Quote Reply
Re: Adding a Third Icon In reply to
Uh...Here are you mistakes:

1) You have to increment the field numbers, like the following:

Code:
isEmail => [13, 'alpha', 0, 5, 1, 'No', 'No|Yes']
isWebSite => [14, 'alpha', 0, 5, 1, 'No', 'No|Yes']
isSelectMember => [15, 'alpha', 0, 10, 1, 'No', 'No|Yes']

2) My recommendation is that you add one field at time in your links.def file. Then run the upgrade.pl file that Bobsie wrote (which is located in many Threads in these forums) to add the field to your existing links.db file.

3) Then you will have to add some codes to your sub site_html_link routine to make the YES/NO values work properly. I just posted codes for this in another Thread today in this forum. Search for isLinked.

4) Then you will have to use the following tags in your link.html file:

Code:
<%if isEmail%>
<img src="http://www.yourdomain.com/images/email.gif" alt="Email">
<%endif%>

AND

Code:
<%if isWebSite%>
<img src="http://www.yourdomain.com/images/website.gif" alt="WebSite">
<%endif%>

AND

Code:
<%if isSelectMember%>
<img src="http://www.yourdomain.com/images/select.gif" alt="Select Member">
<%endif%>

Of course, change all the references to http://www.yourdomain.com/images/ to the path where your images are located and then change the file names and extensions to the appropriate file names and extensions for these images.

REALLY hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
Well, I have to be close. Thanks for the help. I did change those numbers.

I am getting this error when I try to enter the admin page even though I have everything looking the same in the links.def file.

CGI ERROR
==========================================
Error Message : fatal error: syntax error at cgi-bin/links/admin/links.def line 37, near "isEmail"
syntax error at cgi-bin/links/admin/links.def line 77, near "isEmail"
syntax error at cgi-bin/links/admin/links.def line 89, near "isEmail"


Any ideas?
Quote Reply
Re: Adding a Third Icon In reply to
Yea, add commas to the codes, like the following:

Code:
isEmail => [13, 'alpha', 0, 5, 1, 'No', 'No|Yes'],
isWebSite => [14, 'alpha', 0, 5, 1, 'No', 'No|Yes'],
isSelectMember => [15, 'alpha', 0, 10, 1, 'No', 'No|Yes']

Sorry...forgot to use the KISS Method (Keep It Simple S tupid).

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
YEA BABY! There we go. Thanks a much!

Geez, that was eyeball breaking. Got it to work. I owe it all to you.
Quote Reply
Re: Adding a Third Icon In reply to
THanks....but the credit really goes to those that have documented issues in the FAQ section and in this forum.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
Eliot, I have done what you said to do. Added the coding in the sub site_html and the appropriate coding to call the image from the link.html.

However, it is not working. I am using the templates. Could this be the reason?

Quote Reply
Re: Adding a Third Icon In reply to
Did you neglect to read one of my posts:

Code:
($rec{'isEmail'} eq 'Yes') ? ($rec{'isEmail'} = 1) : (delete $rec{'isEmail
'});


AND

Code:
($rec{'isWebSite'} eq 'Yes') ? ($rec{'isWebSite'} = 1) : (delete $rec{'isWebSite
'});

AND

Code:
($rec{'isSelectMember'} eq 'Yes') ? ($rec{'isSelectMember'} = 1) : (delete $rec{'isSelectMember'});

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
I thank you for your help. I was not lazy as I stated in my previous post that I did put them in the file you spoke of. I did not however, put them in my template file as I had asked.

Thanks, again.
Quote Reply
Re: Adding a Third Icon In reply to
Ok. I am about to smash my computer in utter frustration. I have read and re-read all of your posts. I have verified all information is correct na dproperly inserted in the right place.

Except it is not working... Frown

I have tried changing the Use Templates = 0/1 in the links.cfg to 0 to ignore templates and everything displays properly there. But when the setting is at 1, nothing will appear. Not even broken images links, I have viewed source, nothing is there and the POP & NEW isn't even displaying.

I am ready to be blasted but seriously, really do not know where I am going wrong. Before I changed the link.html to the image calls, I had letters set-up (without the proper coding in the sub site_html_link in my site_html_templates.pl - so they would always display) and they displayed then.

This is what I have:

in links.def:

Code:
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
isEmail => [14, 'alpha', 0, 5, 0, 'No', ''],
isWebSite => [15, 'alpha', 0, 5, 0, 'No', ''],
isSelect => [16, 'alpha', 0, 5, 0, 'No', '']


in the sub site_html_link in my site_html_templates.pl file:

Code:
# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});
($rec{'isSelect'} eq 'Yes') ? ($rec{'isSelect'} = 1) : (delete $rec{'isSelect'});
($rec{'isWebSite'} eq 'Yes') ? ($rec{'isWebSite'} = 1) : (delete $rec{'isWebSite'});
($rec{'isEmail'} eq 'Yes') ? ($rec{'isEmail'} = 1) : (delete $rec{'isEmail'});

and in my link.html file I have:

Code:
<%if isSelect%><img src="http://www.mysite.com/links/images/select.gif" alt="Email" WIDTH="15" HEIGHT="15"><%endif%>
<%if isWebSite%><img src="http://www.mysite.com/links/images/website.gif" alt="Web Site" WIDTH="15" HEIGHT="15"><%endif%>
<%if isEmail%><img src="http://www.mysite.com/links/images/email.gif" alt="Email" WIDTH="15" HEIGHT="15"><%endif%>
<%if isNew%><img src="http://www.mysite.com/links/images/select.gif" alt="Select Member" WIDTH="15" HEIGHT="15"><%endif%>
<%if isPopular%><img src="http://www.mysite.com/links/images/popular.gif" alt="Popular" WIDTH="15" HEIGHT="15"><%endif%>


[This message has been edited by kenya (edited February 08, 2000).]
Quote Reply
Re: Adding a Third Icon In reply to
Welp...I don't know why the codes are NOT working. They work just fine in my site and in other people's sites.

I think that you have placed the codes in the wrong place in the site_html_templates.pl file or you are NOT using the exact tags I wrote in the link.html file.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Adding a Third Icon In reply to
Am I to assume that I have done everything correct since there is no reply. Would really appreciate some help with this. Thanks.
Quote Reply
Re: Adding a Third Icon In reply to
Eliot, I am searching for everything related to this subject that you stated. Still trying to find my error. You mentioned to do a search for isLinked... I have several times but the search returns nothing. Is this phrased another way.

I viewed your site and I see you have done something similar to what I am looking for and really like it. Is there a way that I have to call the general variables from the template files?
Quote Reply
Re: Adding a Third Icon In reply to
Never mind. Finally got it!

Somehow when I was notepadding the file, the line returns were missing. Never would have thought that would cause it.

Sorry to waste your time.

Love all the hacks you have on your site. Incredible!
Quote Reply
Re: Adding a Third Icon In reply to
Good...glad you figured it out...BTW: Most of my site is MODDED not hacked...there is a difference.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------