Jump to content
Sign in to follow this  
albertsavage

Ultrapics + Lightbox 2.03.3

Recommended Posts

First thing's first... use a codebox when posting your code. It makes it easier to copy and review your code, as well as makes sure there are no errors when I post it back to you.

 

I think that what you're trying to do is make the additional thumbs disappear, right?

 

I'm not sure exactly how all of the variables work, but you could try this as a code hack:

 

Replace all "ULT_THUMB_IMAGE_WIDTH" with "1" and replace all "ULT_THUMB_IMAGE_HEIGHT" with "1" as well.

 

Essentially, I think that should make your thumbs near to nothing. I'm not sure what would happen if you replaced it with 0, but that might be worth it as well... no spaces or anything, just hidden pictures. What you were doing was good because it helps the page load faster, but the admin controls the display of the small pictures on the page to whatever the admin size is. Alternatively to changing to code (a hack), you could try changing the size in admin (image sizes), but I'm not sure where else these might be used. There's more than one way to skin this cat for sure.

 

What you're trying to do changes the dynamics a little bit, but it's a neat idea. I looked at it and it worked well, just there's all of that dead space as you said.

 

OK, since I wrote this, I would try things in this order:

 

1. Change it in admin to see how it impacts your site. I think this is the "additional thumb width" and "additional thumb height" options. (I'm worried this also impacts the first image, but hopefully not), so proceed to #2 if it doesn't work.

2. Hack the file and replace with 0's.

3. Hack the file and replace with 1's.

 

There are several variants on this approach, I just listed the most straightforward. There are literally about 10 different ways you could use admin/hack to get it to be right.

 

Good luck

 

Hi Albert,

 

Firstly I am so sorry for not using a code box, I didn't know they existed, but I do now :-). I have tried everything you suggested in the order you suggested and in every combination I can think of, but to no avail.

 

Thank you so much, I really do appreciate you answering my posts and wanting to help me out. I don't really want to bother you anymore, but if you do think of anything or see any other posts that could pertain to my issue then please let me know, as this is driving me crazy. If anyone else has come across this problem and fixed it, please let me know.

 

Thanks Again - B.

Share this post


Link to post
Share on other sites
Hi Albert,

 

Firstly I am so sorry for not using a code box, I didn't know they existed, but I do now :-). I have tried everything you suggested in the order you suggested and in every combination I can think of, but to no avail.

 

Thank you so much, I really do appreciate you answering my posts and wanting to help me out. I don't really want to bother you anymore, but if you do think of anything or see any other posts that could pertain to my issue then please let me know, as this is driving me crazy. If anyone else has come across this problem and fixed it, please let me know.

 

Thanks Again - B.

 

ok Belinda,

 

You're going to be happy with this, as I took time out to work through it and test the solution. Keep in mind, this is a hack, and not for everyone, only those who want to do what you want to do...

 

There are 6 things that need to be replaced with 1 in your additional_images.php file

 

Find the following:

ULT_THUMB_IMAGE_WIDTH

ULT_THUMB_IMAGE_HEIGHT

$image_width

$image_height

LARGE_IMAGE_WIDTH

LARGE_IMAGE_HEIGHT

 

and replace them all with 1. There should be 6 instances of each of them. Keep a backup of your file before changing them. This will make the pictures 1 pixel by 1 pixel. I found out you can't use 0. Even tested that.

 

Like I said, I tested it on my test site, so that should do what you want it to do.

Edited by albertsavage

Share this post


Link to post
Share on other sites
well, I'm the father... my wife is the one with the hard job. Unfortunately, no trips to Beijing are in the cards. Thanks for the invite.

 

I haven't used STS. Personally, I wanted pages that look differently (product page only has 2 columns, while other pages have 3, etc) We considered STS at one point, as well as perhaps having a professionally developed site may be in the cards in the future. We have heavily modified our OSC site at this point with all of the contributions, so our next step would be a big one. Let me know how you like STS.

 

I created a secure testsite using the method you describe (copying folders and changing configure files). Just keep in mind that if you use fixed file references (www.yoursite.com/catalog/etc), you need to remember those if you make a copy, as opposed to a referenced location (../catalog/etc).

 

Thanks for the compliments to the site. It's not perfect, but nothing ever is.

STS ever make my mind disturbed for I don't familiar with PHP and embedded html before. I tried to edit footer.php etc. and found it is not so hard as it is. The second, catalog/index.php maybe won't be my default homepage later. So I decide to make the minor changes directly.

 

I want to add www.mysite.com/about.php www.mysite.com/sitemap.php in the mainpage, which would be www.mysite.com/catalog/index.php and redirect www.mysite.com to it, or, create a new index.php in root. So issues come when I do SEO, who is the site to push out, www.mysite.com or www.mysite.com/catalog/index.php?

Share this post


Link to post
Share on other sites
ok Belinda,

 

You're going to be happy with this, as I took time out to work through it and test the solution. Keep in mind, this is a hack, and not for everyone, only those who want to do what you want to do...

 

There are 6 things that need to be replaced with 1 in your additional_images.php file

 

Find the following:

ULT_THUMB_IMAGE_WIDTH

ULT_THUMB_IMAGE_HEIGHT

$image_width

$image_height

LARGE_IMAGE_WIDTH

LARGE_IMAGE_HEIGHT

 

and replace them all with 1. There should be 6 instances of each of them. Keep a backup of your file before changing them. This will make the pictures 1 pixel by 1 pixel. I found out you can't use 0. Even tested that.

 

Like I said, I tested it on my test site, so that should do what you want it to do.

 

 

Hi Albert,

 

Woohoo!! I am not just happy I am totally ecstatic. THANK you SO much for all your help; it is doing exactly what I wanted it to and the page looks great now. I really appreciate your tenacity – You are definitely one of the good ones :thumbsup:

 

Thank Again and lots of luck to you!! - Belinda

Share this post


Link to post
Share on other sites

Hello,

 

I just installed lightbox 2.03.3 but its not working. I dont see any change in the admin section... I also get this error when I press a product:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/content/o/i/w/oiwarugallery/html/catalog/includes/functions/compatibility.php:18) in /home/content/o/i/w/oiwarugallery/html/catalog/includes/functions/compatibility.php on line 18

 

Please hep..

Share this post


Link to post
Share on other sites
Hello,

 

I just installed lightbox 2.03.3 but its not working. I dont see any change in the admin section... I also get this error when I press a product:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/content/o/i/w/oiwarugallery/html/catalog/includes/functions/compatibility.php:18) in /home/content/o/i/w/oiwarugallery/html/catalog/includes/functions/compatibility.php on line 18

 

Please hep..

1. Was your Ultrapics working correctly before that?

2. Did you follow the instructions as written?

 

We don't even touch the compatability.php file mentioned, so I wonder whether that was working right in the first place. Give a little more explanation as to what you did.

 

BTW, there is no change in the ADMIN section. It isnt' any kind of mod that changes admin.

Share this post


Link to post
Share on other sites

ok so i replaced the original files and started again and this is the error i get now

 

Parse error: parse error, unexpected '}' in /home/content/o/i/w/oiwarugallery/html/catalog/product_info.php on line 238

 

Nopes it wasnt working before..

I followed the instructions as best as i could..

 

I never touched that files either...

Share this post


Link to post
Share on other sites

This is what my product php file look like

 

 

<?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 © 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; ?>">

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

<?php /*Added for lightbox */ ?>

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

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

<?php /*End of Added for lightbox */ ?>

</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 {

$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 . "'");

$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">

<?php

if (tep_not_null($product_info['products_image'])) {

?>

<table border="0" cellspacing="0" cellpadding="2" align="right">

<tr>

<td align="center" class="smallText">

?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[product]" title="' . $product_info['products_name'] . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_med'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', 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[product]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_med'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', 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[product]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', 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[product]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', 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>

<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

Fannu,

 

if you want me to look at your file, please use a codebox. I can then use a file compare program and see where yours is different from mine. As it is, the leading spaces in your file do not come through and I am left scratching my head.

 

First off, the assumption that my change assumes is that Ultrapics is already running on your shop. If Ultrapics is not running, it won't help to change mine.

 

Secondly, my modification only touches 2 existing files and does so nonintrusively. The error that you're experiencing appears in a totally different part of the file, so I can't really shed any light on it at this time.

Share this post


Link to post
Share on other sites

oh i think i found the problem.. i tried to do it without getting the the ultrapics to work...

ultrapics are working.. however i could not find this line in mh products_info.php file

 

function setcolor(obj,percentage,prop){

obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)";

}

</script>

 

any help would be appreciated

Share this post


Link to post
Share on other sites

OK

 

I have added both light box and ultraimage and it works great.. however i would like it to show in columns like the way its in your store... but i dont think i get how to change this..

Share this post


Link to post
Share on other sites
OK

 

I have added both light box and ultraimage and it works great.. however i would like it to show in columns like the way its in your store... but i dont think i get how to change this..

 

Look at this entry:

http://forums.oscommerce.com/index.php?s=&...t&p=1163084

 

Use the first file definition for all 6 in one column.

 

You can place the column through the require additional_images.php statement by your first image.

 

See this post:

 

http://forums.oscommerce.com/index.php?s=&...t&p=1160494

Share this post


Link to post
Share on other sites

Question: When un-installing UP+LB2.03.3, do I need to do something about the SQL script?

 

I wrote over all of the files with the back-ups that I saved. Do I need to do something about the SQL script that I ran into my database? I have no experience with SQL script and was wondering if that is going to cause problems down the road.

Share this post


Link to post
Share on other sites
Question: When un-installing UP+LB2.03.3, do I need to do something about the SQL script?

 

I wrote over all of the files with the back-ups that I saved. Do I need to do something about the SQL script that I ran into my database? I have no experience with SQL script and was wondering if that is going to cause problems down the road.

 

Mike, not sure I understand your question. the lightbox that was added just replaces the popup. If you're uninstalling ultrapics, then you'll need to revert to earlier files. If you overwrote them, I'm not sure how to help on that. You could always go back through the installation instructions one by one and replace the text with the original.

 

The SQL scripts are really just to add 2 things: configuration options, and add fields to tables. Neither of those should hurt you as they should only add to the database, not subtract from it or modify it.

Share this post


Link to post
Share on other sites
The SQL scripts are really just to add 2 things: configuration options, and add fields to tables. Neither of those should hurt you as they should only add to the database, not subtract from it or modify it.

 

That part of your answer, answers my question. Thank you!

Share this post


Link to post
Share on other sites

Gday Albert - looks like a great mod so thanks up front!

 

I am trying to install it & seem to have managed it partially....but having trouble with part of it.

 

My store has a few mods already so I used a file compare program to get the admin side working - which amazingly enough seems to be good! I'm not sure about the formatting of the preview page for the additional images...but anyway.

 

The product.info file is prooving a problem to get right for the likes of me.

 

When I click on an item - the image appears correctly - but if you click on it - it goes to a DIR of the image directory - not the lightbox of the actual photo.

Any additional photos are not clickable.

 

In the admin preview it puts two blank images next to the first one & shows the additional down the bottom under the description...I don't know if this indicates a problem

 

 

I have MRSP so my code is a bit different but can't after hours of trying, figure out what is wrong... Any help would be appreciated.

 

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

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 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 $header_tags[products_name]; ?></title>
<meta name="description" content="<?php echo $header_tags[desc_tag]; ?>">
<meta name="keywords" content="<?php echo $header_tags[keywords_tag]; ?>">

<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>
</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 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_msrp, 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!
   $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 . "'");

   $products_price = '<table class="PriceList" border="0" width="100%" cellspacing="0" cellpadding="0">';
           $new_price = tep_get_products_special_price($product_info['products_id']);
           if ($product_info['products_msrp'] > $product_info['products_price'])
             $products_price .= '<tr><td>' . TEXT_PRODUCTS_MSRP . '</td><td class="oldPrice" align=right>' . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';
           $products_price .= '<tr><td>' . TEXT_PRODUCTS_OUR_PRICE . '</td>';
           if ($new_price != '')
             {$products_price .= '<td class="oldPrice"';}
           else
             {$products_price .= '<td';}
           $products_price .= ' align=right>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';
           if ($new_price != '')
             {$products_price .= '<tr class="productSpecialPrice"><td>' . TEXT_PRODUCTS_SALE . '</td><td align=right>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';}
           if ($product_info['products_msrp'] > $product_info['products_price'])
             {if ($new_price != '')
               {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';}
             else
               {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] -  $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';}}
           else
             {if ($new_price != '')
               {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_price'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';}}
           $products_price .= '</table>';

   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 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">
<?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 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'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>
<!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //-->

             </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'); ?>

 

 

If anyone wants my admin/categories.php file (that combines MSRP & this Ultrapics & Lightbox) let me know I will post it. I can't offer support for it as I am relying on others to get this all working... Quite frankly I am amazed that I got it to work!

Edited by bonzabuy

Share this post


Link to post
Share on other sites

Hello @ll,

 

im a real OSCommerce NewBee... I Have a lot of questions - and best would be to start with my first one.

 

I have installed LightBoxed_UltraPics_2.04 - everything seems to work fine, accept the fact that my small thumbnail won´t link to the big one.

 

 

If you click on the thumb of the picture on this link:

http://s203916802.online.de/catalog/product_info.php?cPath=21_31&products_id=47

 

only the http://s203916802.online.de/catalog/images/small-big-1.jpg picture was opened.

I also uploaded http://s203916802.online.de/catalog/images/big-1.jpg as Big Product IMage - but i won´t be linked!

 

Has anybody a clue why?

 

Regards!

Share this post


Link to post
Share on other sites

Hi all,

 

I've done the changes that UltraPics 2.04.1 LightBox version Small update says, in product_info.php

and now i'm trying to get the latest 2.05 added, but i can't figure out in what file i shall make theese changes. Anyone here who can tell me?

 

I guess it's in product_info.php as the update before, but i can't find the this code anywhere in that file.

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

Share this post


Link to post
Share on other sites

According to my problem in the post above, i solved it. I just read the instructions for 2.04 and i figured it all out.

Sorry for double post, i couldn't find any 'Edit'-button for my reply above.

Share this post


Link to post
Share on other sites

I am getting a error message when I go into the back office to add products to my page. I just did the install of lightbox and ultrapics.

 

1054 - Unknown column 'products_image_med' in 'where clause'

 

select count(*) as total from products where products_image='' or products_image_med='' or products_image_lrg=''

 

This is the error message I am getting, Any help would be great.

Share this post


Link to post
Share on other sites
I am getting a error message when I go into the back office to add products to my page. I just did the install of lightbox and ultrapics.

 

1054 - Unknown column 'products_image_med' in 'where clause'

 

select count(*) as total from products where products_image='' or products_image_med='' or products_image_lrg=''

 

This is the error message I am getting, Any help would be great.

 

Never mind I figured it out, I ran the sql Script in the wrong database on the server. Been a long day....

Share this post


Link to post
Share on other sites

Hi all. this thread made interesting read and manage to solve many issues i had with installation of both ultrapics and now lightbox on a template given to me.

 

One problem i can't solve is the next/prev lightbox buttons to navigate between the additional pictures. Each picture opens ok in lightbox so I guess its not a fault with the css,product_info but lies with either popup_image or the additional_images

 

my tester site is http://www.whiteyonline.com/osc/product_in...products_id=132

 

can anyone help please?

Share this post


Link to post
Share on other sites

Hi!

I wonder if someone have a qlue how to implement lightbox and enlarge popup window in product_listing.php??

 

Someone have tryed that?

 

Regards Tony

Share this post


Link to post
Share on other sites

Hi all,

 

I am having these 2 problems, and i really hope someone can assist me on that problem.

 

1) After i click on the "Enlarge" button, the black color screen only cover 3/4 of my screen. have any idea why? Or where can i configure it?

 

2) After i click on the "Enlarge" button in review page, i saw my product id being repeated twice. Why is that so? Would you be able to enlighten me?

 

Heres my testing site: http://www.crushw.com/catalog/product_revi...;products_id=32

 

Thanks for the help.

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  

×