Author Topic: osC AddonsUltraPics - MS2 Image Addon Pack!  (Read 765 times)

0 Members and 1 Guest are viewing this topic.

NewsBot

  • The osCommerce University News Bot
  • Administrator
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1024
  • Karma: 0
    • View Profile
osC AddonsUltraPics - MS2 Image Addon Pack!
« Reply #1 on: January 10, 2008, 12:00:06 AM »
UltraPics - MS2 Image Addon Pack!
     


After receiving many requests I must clarify on the update posted on Dec18, 2007 by me.

This update is good for all your review pages so here it is again:



To add lightbox effect to your review pages including:

1. product_reviews.php

2. product_reviews_info.php

3. product_reviews_write.php



do the followings in each file:





FIND:



$product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image,



p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " .



TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and



p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");



REPLACE WITH:



// BOF MaxiDVD: Modified For Ultimate Images Pack!

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description,



p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg,



p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2,



p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4,



p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6,



pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available,



p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where



p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id =



p.products_id and pd.language_id = '" . (int)$languages_id . "'");

// EOF MaxiDVD: Modified For Ultimate Images Pack!



FIND:



<link rel="stylesheet" type="text/css" href="stylesheet.css">



ADD BELOW:



<link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />

<script type="text/javascript" src="js/prototype.js"></script>

<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>

<script type="text/javascript" src="js/lightbox.js"></script>



FIND:



<script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE,



'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'],



addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5"



vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' .



tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'],



SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' .



TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>



REPLACE WITH:



<!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //-->

<?php

if ($product_info['products_image_med']!='') {

$new_image = $product_info['products_image_med'];

$image_width = MEDIUM_IMAGE_WIDTH;

$image_height = MEDIUM_IMAGE_HEIGHT;

} else {

$new_image = $product_info['products_image'];

$image_width = SMALL_IMAGE_WIDTH;

$image_height = SMALL_IMAGE_HEIGHT;}?>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_med']) . '"



rel="lightbox" title="'. $product_info['products_name'] . $product_info['products_model'] . '">' . tep_image



(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'],



ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' .



tep_image_button('image_enlarge.gif') . '</a>'; ?>





<!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //-->



That's it. Enjoy.



This is not a full package.

You need UltraPics 2.04 LightBox version first then perform UltraPics 2.04.1 LightBox version update then this update to take full advantage of this great add-on.



nimz



ps: file attached contains this info.


     

http://addons.oscommerce.com/info/1642
     
================================
This post was created by the osCommerce University News Bot.  Feel free to reply, attach polls, etc -- but do not hold the osCommerce University responsible for the content of the post itself.  PM the Administrator for SPAM, thanks!