Ciao,
questo è un argomento che è già stato trattato qui sul forum cmq ho il file a portata di mano e te lo posto...devi usare la contribution
add borders:
------------------------------------------------------------------
Add Boxes to Thumbail Images v1.2
for MS2.2 by Christian Kolos (
http://www.digital-webdesigners.)
------------------------------------------------------------------
This little distribution will add a smile line around the thumbnail pictures in your boxes (see example.gif).
The old distribution (v1.1) worked fine with IE but had some problems to display the boxes in different browsers (Mozilla, Safari...).
So here`s what to do to (if you`ve already installed "Add Boxes v1.1" just delete the old "class=shadow1"-Part and exchange it with the new):
:: Step 1:
- Edit the stylesheet.css File and add this line somewhere:
.shadow1 {border: #000000 1px solid;}
Of course you can experiment with different colors and styles (like dotted, dashed and so on) or add different styles to each box...
:: Step 2:
- Open /includes/boxes/specials.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT). '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1'). '</a>
:: Step 3:
- Open /includes/boxes/reviews.php (AGAIN - BACKUP FIRST!)
- Search for this:
$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
:: STEP 4:
- Open /includes/boxes/whats_new.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
Done. The small thumbail images in your boxes should now have a border around them.
You can easily change the look and feel of this in your stylesheet.css
UPDATE:
--------------
Of course you can do this for other modules to - for example the "new products module" or the "also purchased products" (see example2.gif). Here`s how to:
:: Step 1:
- Open /includes/modules/new_products.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
:: Step 2:
- Open /includes/modules/product_listing.php (BACKUP FIRST!)
- Search for this:
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
- And exchange it with this:
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';
:: STEP 3:
- Open /includes/modules/also_purchased_products.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
I wish this to be usefull to some people.
Christian Kolos
--