Gossamer Forum
Home : Products : Links 2.0 : Discussions :

affiliate html code in fields

Quote Reply
affiliate html code in fields

I would like some more information about including affiliate html code in a field.
I am aware that it is permitted to add html code, however I read somewhere that there
may be a limit to how much data the links.db file will be able to hold.

Typically, each affiliate code will be about 400 characters long:

<IMG SRC="http://service.bfast.com/...bfpage=worryhotlinks" BORDER="0" WIDTH="1" HEIGHT="1" NOSAVE >
<A HREF="http://service.bfast.com/...bfpage=worryhotlinks" TARGET="_top"><IMG SRC="http://images.bfast.com/...8x60_0703_worry5.gif" BORDER="0" WIDTH="468" HEIGHT="60" ALT=""></A>

Will the links.db be able to handle this if there are 3,000 links in the directory and there is affiliate code for each one?

An alternative solution is to make two extra fields instead of one, one would hold the affiliate URL and the other the affiliate image URL.

Affiliate URL:

Affiliate image:

I can then have the following html code in my html templates to display the banner:
<a href="<%AffiliateURL%>">
<img border="0" src="<%AffiliateImage%>"></a></font></a>

The disadvantage of the above method is that the html code sometimes has to be inserted intact.

Please give me your advice

Quote Reply
Re: [p0l0mint] affiliate html code in fields In reply to
i have a related question,

assuming that the affiliate code takes up too much space will it be a good idea for me to delete some of the fields which I will not be using from the links.def file?

There are some fields which will remain empty, because I will not have any rating or voting for links. Does it make any difference if i delete these fields or just leave them empty?

These are all the fields which I will not need

Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
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'],

Will deleting all these fields cause any problems or errors?

Do I just delete these fields from these two places in links.def and I'm all set?

# Definition of your database file.
%db_def = (

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.

thanks again for your help!