You are here:  » Changing Font Hyperlinks to Image Hyperlinks

Support Forum



Changing Font Hyperlinks to Image Hyperlinks

Submitted by thepricesite on Wed, 2007-02-14 15:38 in

Hi David,
With xmas/holidays - not had a chance to get online! So getting back into it!

I would like to change the font hyperlinks with an image for example

http://www.thepricesite.co.uk/search.php?q=digital+camera&minPrice=&maxPrice=
Where it says 'Compare prices' i would like to use a compareprices.gif which hyperlinks to the prices. Likewise, i would like to do this for the 'More Information' and 'Visit Store' hyperlinks.

Any ideas? I hope i made sense here?

Regards,

Michael

Submitted by support on Wed, 2007-02-14 15:49

Hi Michael,

Quite a few users do this, it's relatively straight forward.

All you have to do is find the code where the text is written, and replace it with an IMG tag, remembering to use border='0' so that youre image does not have a blue hyperlink border.

For example, in html/searchresults.php you will find:

<?php print translate("Compare Prices"); ?>

Replace all of this (including the PHP tags) with:

<img border='0' src='/images/compareprices.gif' />

"More Information" is in the same file a couple of lines below; and the "Visit Store" link is in html/prices.php.

The above is assuming that you're putting your images in the existing /image directory, and your Price Tapestry installation is not in a sub-directory...

Hope this helps!
Cheers,
David.

Submitted by thepricesite on Wed, 2007-02-14 16:04

Thats great i shall give it a try this afternoon :)

Is there anything smart that could also be done with the "ALT" feature also? Would this add any value?

Michael @ ThePriceSite

Submitted by support on Wed, 2007-02-14 16:06

Yes - infact I should have included the alt tag in my example. For accessability, you should include an alt tag with the original font name of the link; for example;

<img border='0' src='/images/compareprices.gif' alt='Compare Prices' />

Well spotted..!
Cheers,
David.