Jump to content
Sign in to follow this  
mwstinson

support thread for Lightbox v1.0 contribution

Recommended Posts

I cant download the package, it says "Contribution not found", can anyone re-upload it please?

 

Love it when the mods do that :-"

 

Find Lightbox here

 

There wasn't much to it anyway.

 

The README from the contrib

 

Lightbox v2.0

Written 7-11-06

by Matthew Stinson

www.rcprivatelabel.com

 

############################################################

#

This contribution outlines implementation of Lightbox 2.0 #

by Lokesh Dhakar. I take no credit for reating this cool #

tool. And only offer support on how to implement it with #

osCommerce. This is currently working on osc 2.2. you can #

see it in action at www.mwswebmaster.com/test/ #

#

############################################################

 

First upload the files that are included with this contrib to the root directory of your catalog.

Typically the catalog directory.

 

############################################################

 

Secondly you will add the following code between the <head> and </head> to any page that you want to use the script on.

Typically on catalog/product_info.php

 

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

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

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

 

 

############################################################

 

thirdly if you want to use this contrib on the catalog/product_info.php page you will change

 

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

document.write('<?php echo '<a href="java script: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>

 

 

with

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" rel="lightbox">' . 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>

<?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>

 

############################################################

 

lastly

add contents of lightbox.css to the bottom of catalog/stylesheet.css

 

############################################################

 

to use this function on any other images you will Add rel="lightbox" attribute to any link tag to activate the lightbox.

For example: <a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

Optional: Use the title attribute if you want to show a caption.

 

 

for more details look at the how to file to see directions from the creator.


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Anyone already succeeded with useing movies/video's?

I've seen it work here : http://digg.com/videos/ but still not found out how it's done.


Building great webshops for customers with opensource backoffice application for a robotic accounting solution including POS
Migrating osC 2.x webshops to Phoenix
osCommerce dedicated hosting/colocation + turnkey solutions + building addons per request

Share this post


Link to post
Share on other sites

Great Contribution, no doubt. But it seems I ran into a problem after installing it. Google started to index my site with the lightbox images only as html-sites (I have Chemos SEO Urls installed), instead of the proper product_info.php. From there you get nowhere if you're not clever enough to browse one level higher to see at least the startpage from the shop.

You can see what I mean when you take a look at site:www.tomsbox.at

It seems that it would be better to prevent Google following this Links.

What do you think?

Share this post


Link to post
Share on other sites
Heee heeeee I succeeded !!! THANK YOU 1000 TIMES Iggi coz your questions helped me a lot to understand the answer LOL LOL !!

 

All credits goes to "mwstinson" for lightbox and the guys who devlopped More Pics 6

 

Finaly ive done it I will probably set a module by combing this great lightbox module and the More pics 6 module and i will upload it soon to the contributons.

 

Hee heee i'm very happy guys !!! This is my 1st real php script modification.

 

Now You ALL KNOW THAT WE CAN USE LIGHTBOX 2 WITH AN EXTRA IMAGE MODULE (MORE PICS 6)

 

I saw a lot of users were looking for this feature heee heee now its done !!!

 

Have a look my site : http://srilankanauto.com

 

Hello matrix_france, I am working on Mac and do not know if this is the reason, but on Safari, IE it's not working, on Opera and firefox no problems could you explain me step by step the change you do on produt_info.php?

Thank you

Cordialy Le Styx.

PS: Sorry for my very bad english, from Bordeaux, France :-" .

Share this post


Link to post
Share on other sites
Heee heeeee I succeeded !!! THANK YOU 1000 TIMES Iggi coz your questions helped me a lot to understand the answer LOL LOL !!

 

All credits goes to "mwstinson" for lightbox and the guys who devlopped More Pics 6

 

Finaly ive done it I will probably set a module by combing this great lightbox module and the More pics 6 module and i will upload it soon to the contributons.

 

Hee heee i'm very happy guys !!! This is my 1st real php script modification.

 

Now You ALL KNOW THAT WE CAN USE LIGHTBOX 2 WITH AN EXTRA IMAGE MODULE (MORE PICS 6)

 

I saw a lot of users were looking for this feature heee heee now its done !!!

 

Have a look my site : http://srilankanauto.com

 

Hello matrix_france, I am working on Mac and do not know if this is the reason, but on Safari, IE it's not working, on Opera and firefox no problems could you explain me step by step the change you do on produt_info.php?

Thank you

Cordialy Le Styx.

PS: Sorry for my very bad english, from Bordeaux, France :-" .

Share this post


Link to post
Share on other sites

Hi there,

 

i wondered if anyone has managed to get this working with image magic? I like the way lightbox presents the images, but I want to be able to watermark our images.

 

Any ideas?

 

Cheers

 

Dave

Share this post


Link to post
Share on other sites

Lightbox 2.03.3 : how to make it close by clicking on the image

 

Here is a way to to make the lightbox close when you click the image, if you are not displaying multiple images.

http://cssbeauty.com/skillshare/discussion/1325/

All credit to JohnRiv.

 

Add this line of code to lightbox.js:

 

objImageContainer.onclick = function() { myLightbox.end(); }

 

at the end of the "initialize" function (before the closing "}," on line 307)

 

You may also want to change the mouse pointer to a hand when you hover over the image so people know it's clickable, so add this CSS to lightbox.css:

 

#imageContainer {

cursor: pointer;

}

#

 

Enjoy!

EricK

Share this post


Link to post
Share on other sites

Hi,

Trying iggy's approach to getting ultraPics and Lightbox 2 to work, however when i change the code to match that of yours i get:

"unexpected $end on line ???", this line is the last line in the script and there is nothing on it!

What do i need to do?

Thanks

Share this post


Link to post
Share on other sites
Hi,

Trying iggy's approach to getting ultraPics and Lightbox 2 to work, however when i change the code to match that of yours i get:

"unexpected $end on line ???", this line is the last line in the script and there is nothing on it!

What do i need to do?

Thanks

 

If there's nothing on that line you can safely delete it. I'm thinking it's an errant line character or something.

 

Can you post the few lines above it? And let us know if that works :thumbsup:

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Hi,

when i delete the end line it just moves the line number to the next one up (which is now the end one!)

this only happens when i change the code to match yours!.

Would it help if i post all of my code?

Share this post


Link to post
Share on other sites
If there's nothing on that line you can safely delete it. I'm thinking it's an errant line character or something.

 

Can you post the few lines above it? And let us know if that works :thumbsup:

 

Iggy

 

Post the error with the line number and the code. You may have missed a bracket somewhere is what I'm thinking.

 

Iggy

Edited by Iggy

Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Hi,

Here is my whole code

After looking at some forums this error is common if you miss some curly brackets and will always show as the last line....

Your assistance is very appreciated

Thanks

Kyle

 

<?php
/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 $product_check_query = tep_db_query("select count(*) as total 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 . "'");
 $product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript">
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
</script>

<script type="text/javascript" src="lb2/js/prototype.js"></script>
<script type="text/javascript" src="lb2/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lb2/js/lightbox.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {
?>
  <tr>
	<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 } else {
//BOF UltraPics
//BOF Original
/*
$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, 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 Original
$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 UltraPics
$product_info = tep_db_fetch_array($product_info_query);

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
  $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}

if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
  $products_name = $product_info['products_name'];
}
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
		<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main">
<!--BOF UltraPics-->

<?php
if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" cellspacing="0" cellpadding="2" align="right">
		<tr>
		  <td align="center" class="smallText">

<!-- // 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 if (($product_info['products_image_lrg'] !='') && ($product_info['products_image_med'] !='')) { ?>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_lrg']) . '" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_med'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<?php } elseif (($product_info['products_image_lrg'] =='') && ($product_info['products_image_med'] !='')) { ?>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_med']) . '" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_med'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<?php } elseif (($product_info['products_image_lrg'] !='') && ($product_info['products_image'] !='')) { ?>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_lrg']) . '" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<?php } elseif (($product_info['products_image_med'] =='') && ($product_info['products_image_lrg'] =='')) { ?>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

		  </td>
		</tr>
	  </table>



<?php
}
?>


	  <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>
	  <table border="0" cellspacing="0" cellpadding="2">
		<tr>
		  <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
		</tr>
<?php
  $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
  while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
	$products_options_array = array();
	$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
	while ($products_options = tep_db_fetch_array($products_options_query)) {
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
	  if ($products_options['options_values_price'] != '0') {
		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	  }
	}

	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
	} else {
	  $selected_attribute = false;
	}
?>
		<tr>
		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
		</tr>
<?php
  }
?>
	  </table>
<?php
}
?>
	</td>
  </tr>

<?php
// BOF MaxiDVD: Modified For Ultimate Images Pack!
if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }
// BOF MaxiDVD: Modified For Ultimate Images Pack!
; ?>


  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
  <tr>
	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}

if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
	<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
  <tr>
	<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
  </tr>
<?php
} else {
?>
  <tr>
	<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
  </tr>
<?php
}
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
  echo tep_cache_also_purchased(3600);
} else {
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
}
?>
	</td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites
Hi,

Here is my whole code

After looking at some forums this error is common if you miss some curly brackets and will always show as the last line....

Your assistance is very appreciated

Thanks

Kyle

 

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Hrrm,

 

Not sure exactly what's munged there but you can quick and dirty it and then go back and hunt the problem down by adding a closing brace at the end.

 

<br>
<?php } ?>
</body>
</html>

 

Hope that helps,

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Interestingly enough, i still get that error!

Parse error: syntax error, unexpected $end in /home/wstech/public_html/catalog/product_info.php on line 597

 

Any other ideas?

Share this post


Link to post
Share on other sites
Interestingly enough, i still get that error!

Parse error: syntax error, unexpected $end in /home/wstech/public_html/catalog/product_info.php on line 597

 

Any other ideas?

 

I'm afraid not. I copied your product_info to a copy of my store and it parsed OK with the bracket at the end. I'm afraid you're going to have to do some experimenting. One thing you might do is add more brackets and see if that will let it parse without error.

 

Once you have an idea how many are unclosed you can track back up the file from there (or leave it be but better to get a handle on what's actually happening there).

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Ah-ha, 2 seemed to do the job!

 

but now im getting: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/wstech/public_html/catalog/includes/functions/database.php:13) in /home/wstech/public_html/catalog/includes/functions/database.php on line 25

 

This code will add the next and prev. buttons correct?

Edited by smithkyle1992

Share this post


Link to post
Share on other sites
Ah-ha, 2 seemed to do the job!

 

but now im getting: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/wstech/public_html/catalog/includes/functions/database.php:13) in /home/wstech/public_html/catalog/includes/functions/database.php on line 25

 

This code will add the next and prev. buttons correct?

 

That's the fun of adding multiple contribs :rolleyes: Off- hand I don't know. About the only thing to do is chase the errors line by line till they're resolved. This one is what it says; two of the same statements. Find line 25 and try deleting it.

 

I like to keep one of those squeeze toys around Captain Queeg style for moments like you're having :lol:

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Got it :D

 

you needed a curly bracket on the end of this line:

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';<b>}</B> ?>

 

The other error was me having the code on the page twice (woops!)

 

Is there a way to get the next and prev. buttons to work to scroll through the images for a product?

Share this post


Link to post
Share on other sites

For the ppl that got this to work with STS what did you do? I dwonlaoded the version for STS but all my images arer still the regular pop-ups thanks.


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites

Hello guys,

 

I'm the webmaster of www.babyhuys.com, and today I discovered the 'lightbox' feature! I tried to add it to my webshop (based on OSCommerce) but i can't get it to work. In product_info.php I put the

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

and I also replaced the part for the image popup with

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" rel="lightbox">' . 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>
<?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>

 

But somehow the image still opens in the same window! It doesn't matter what I do, it just won't open with Lightbox.

 

See for example: http://www.babyhuyswebshop.nl/product_info...products_id=908 (but it doesn't really matter which product you choose)

 

Does any of you guys have a solution, or have the same problem?

 

It would help me very much!

 

 

Kind regards,

 

Tommy

Share this post


Link to post
Share on other sites

Same question.. I have stock osCommerce 2.2rc1 and STS v4.5.3 installed and cannot get the sts version of this mod to work. This is a simple modification per the instructions. Can anyone lend a helping hand?

Edited by depressd

Share this post


Link to post
Share on other sites

I have installed the LIGHTBOX IMAGE FOR STS and I am having same problem everyone else is- when you click on image, it just opens in new window. Cant figure out what I am missing- js links are there and in correct directory (I think/hope). Directions stated to amend sts_template.html- is this correct? Should it be another template such as product_info.php.html? Tried that anyway but didnt work :'(

I do not have more pics contribution either (which seems to be what all the threads are about).

 

I then went to the source

Lightbox2

 

In the support section, it suggests:

 

It doesn't work at all. The image opens up in a new page. What's wrong?

This is commonly caused by a conflict between scripts. Check your body tag and look for an onload attribute. Example:

<body onload="MM_preloadImages(‘/images/menu_on.gif’)…;">

A quick fix to this problem is to append the initLightbox() to the onload attribute as so:

<body onload="MM_preloadImages(‘/images/menu_on.gif’)…;initLightbox()">

 

I have tried to find code similar to this but to no avail- if anyone out there has an light they can shed on the subject, I would be most grateful!!!!!

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  

×