AnnieO Posted February 27, 2003 Share Posted February 27, 2003 Is there a way to put a 1 pixel border around photos of product? I looked and looked and don't understand where the border="0" on all product is coming from. Thanks. Link to comment Share on other sites More sharing options...
Salvo Posted February 27, 2003 Share Posted February 27, 2003 Hi Just a though.. There is contribution which adds a shadow around the photo.. You might want to consider that. It is very nice, I have it and the photo look very professional.. (big photo) Salvo Link to comment Share on other sites More sharing options...
zzfritz Posted February 28, 2003 Share Posted February 28, 2003 To answer your question, the product images are emitted from default.php and product_info.php. They echo the results of calls to the function tep_image, which constructs the html <img> based on parameters to the call. There are five parameters to tep_image, of which only the first is mandatory (the file reference for the image); the second, third and fourth are ALT, WIDTH and HEIGHT. The optional fifth parameter may contain anything that can be stuck into an <img> tag just before the closing >. So, you could modify the code in default.php and product_info.php by adding "border='1'" to the parameters of the tep_image calls. Link to comment Share on other sites More sharing options...
zzfritz Posted February 28, 2003 Share Posted February 28, 2003 Oops, ignore my suggestion regarding the fifth parameter. The function tep_image actually inserts the "border='0'" (at line 81 in html_output.php,v 1.49). You could change that, but it will affect all image displays not just those of the products. Or, you could follow my original suggestion to use the fifth parameter but also add a test in tep_image that checks to see if the fifth parameter is a border tag before inserting the border=0 default. Link to comment Share on other sites More sharing options...
AnnieO Posted February 28, 2003 Author Share Posted February 28, 2003 Wo! That is interesting. I looked everywhere for where that border="0" was coming from and now I see it. :D I'm trying to figure out how to just use border for product now. Maybe there is hope. Thanks for pointing this out to me. Link to comment Share on other sites More sharing options...
AnnieO Posted February 28, 2003 Author Share Posted February 28, 2003 Thanks to zzfritz showing me how this was done, I was able to add this to my stylesheet .borders { border: solid 1px #4C4C4C } and use class="borders" to override the borders="0" What a terrific forum! Link to comment Share on other sites More sharing options...
CodeConfused Posted June 11, 2003 Share Posted June 11, 2003 Hi Just a though.. There is contribution which adds a shadow around the photo.. You might want to consider that. It is very nice, I have it and the photo look very professional.. (big photo) Salvo This sounds like a a great contribution. I couldn't find it though... Would anybody know where I can get this? Thanks much, Dan Link to comment Share on other sites More sharing options...
minglou Posted June 11, 2003 Share Posted June 11, 2003 but this change affected all images and boxes. find a way to only work with product new and product_listing_col Link to comment Share on other sites More sharing options...
CodeConfused Posted June 26, 2003 Share Posted June 26, 2003 this is what worked for me: copy the entire section for the function "tep_image" in html_output.php, and paste it underneath itself in the same file. Then rename the copied function "tep_image2", and set its hardcoded border to 1 or any other value you want. now for all images you want with a border, just rename the function calling that image to tep_image2... Link to comment Share on other sites More sharing options...
leorulz Posted June 27, 2003 Share Posted June 27, 2003 does anybody know where the contribution which adds a shadow around the photo.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.