Jump to content
Sign in to follow this  
pbpools

Light box Hack for More Pics

Recommended Posts

After about 5 hours this is what I have come up this! YOU NEED TO BACK UP BACK UP

I downloaded latests lightbox version also. I am sure the code could be cleaned up but It is working on my site so far.

 

 

DEMO

 

1, for popup_image1, popup_image2, popup_image3, popup_image4, popup_image5, popup_image6 add this

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

 

2, for the product_info.php

 

find this:

 

find this:
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE1, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage1'], 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_subimage1']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage1'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>


<?php
   }
?>

<?php
   if (tep_not_null($product_info['products_subimage2'])) {
?>

             <td align="left" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE2, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage2'], 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_subimage2']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage2'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>

<?php
   }
?>
<?php
   if (tep_not_null($product_info['products_subimage3'])) {
?>

             <td align="left" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE3, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage3'], 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_subimage2']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage2'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>
           </tr>

<?php
   }
?>

<?php
   if (tep_not_null($product_info['products_subimage4'])) {
?>
           <tr>
             <td align="left" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE4, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage4'], 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_subimage4']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage4'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>

<?php
   }
?>
<?php
   if (tep_not_null($product_info['products_subimage5'])) {
?>

             <td align="left" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE5, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage5'], 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_subimage5']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage5'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>

<?php
   }
?>
<?php
   if (tep_not_null($product_info['products_subimage6'])) {
?>

             <td align="left" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE6, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage6'], 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_subimage6']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage6'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

 

Replace with this:

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage1']) . '" rel="lightbox[roadtrip]image #2">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage1'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage1']) . '" 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>
             </td>


<?php
   }
?>

<?php
   if (tep_not_null($product_info['products_subimage2'])) {
?>

             <td align="left" class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage2']) . '" rel="lightbox[roadtrip]image #2">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage2'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage2']) . '" target="blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image2'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>

<?php
   }
?>
<?php
   if (tep_not_null($product_info['products_subimage3'])) {
?>

             <td align="left" class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage3']) . '" rel="lightbox[roadtrip]image #2">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage3'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage3']) . '" target="blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image3'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>
           </tr>

<?php
   }
?>

<?php
   if (tep_not_null($product_info['products_subimage4'])) {
?>
           <tr>
             <td align="left" class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage4']) . '" rel="lightbox[roadtrip]image #2">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage4'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage4']) . '" target="blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image4'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>

<?php
   }
?>
<?php
   if (tep_not_null($product_info['products_subimage5'])) {
?>

             <td align="left" class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage5']) . '" rel="lightbox[roadtrip]image #2">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage5'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage5']) . '" target="blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image5'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>

<?php
   }
?>
<?php
   if (tep_not_null($product_info['products_subimage6'])) {
?>

             <td align="left" class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage6']) . '" rel="lightbox[roadtrip]image #2">' . tep_image(DIR_WS_IMAGES . $product_info['products_subimage6'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_subimage6']) . '" target="blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image6'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

 

 

Use at own risk. But do enjoy or modify!

Share this post


Link to post
Share on other sites

sounds interesting...


I love oscommerce and OS software! I'm not a programmer, I'm only a learning boy and a translator :) I love full contribution packages!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×