HelleM Posted January 2, 2007 Share Posted January 2, 2007 sorry helleM, looks like you have modified this way beyond my scope to provide help. The auto-thumbnail contribs do things to code that makes the specific changes you want a nightmare. Anything I would suggest would most likely be futile and not produce the result you are looking for. Hi Surfalot I got it *ss* - I grouped the images in admin and in product_info.php I changed this; $mopics_image_width = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH*1.5:''); $mopics_image_height = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT*1.5:''); That way, my small images are a little bigger than when you see them in the right or left column. The site is still running like a test site, but if you want too, you can see how it looks from here: Test site page with more picts I know this next question may be out of this Forum, but is it possible to make the image preview a bit smaller when I finish edit a products and hit "Preview" the images on that next page are full size and it easily becomes messy? You know what I mean? Helle :-) Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 2, 2007 Author Share Posted January 2, 2007 sure it's possible. just have to locate the code in /admin/categories.php and hard-code the size. Quote Link to comment Share on other sites More sharing options...
HelleM Posted January 3, 2007 Share Posted January 3, 2007 Hi again Well, the More Picts code say SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, I tried to fighure out how to "divide" the size like SMALL_IMAGE_WIDTH/3 But it didn't work though. Is there a special way to divide in PHP? Helle :-) Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 3, 2007 Author Share Posted January 3, 2007 Hi againWell, the More Picts code say SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, I tried to fighure out how to "divide" the size like SMALL_IMAGE_WIDTH/3 But it didn't work though. Is there a special way to divide in PHP? Helle :-) so you found this line: } elseif ($action == 'new_product_preview') { then shortly thereafter, this one: <td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?></td> changing SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT here should do it. maybe try this: floor(((int)SMALL_IMAGE_WIDTH)/3) Quote Link to comment Share on other sites More sharing options...
JackieNicole Posted January 4, 2007 Share Posted January 4, 2007 Hi.. I've installed the morepics... works great.. except how do I get my main image back to being a tumbnail.... its displaying the full size image.. see...Product Page Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 4, 2007 Author Share Posted January 4, 2007 have you seen the settings in your admin -> configuration -> More Pics ? Quote Link to comment Share on other sites More sharing options...
HelleM Posted January 4, 2007 Share Posted January 4, 2007 so you found this line: } elseif ($action == 'new_product_preview') { then shortly thereafter, this one: <td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?></td> changing SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT here should do it. maybe try this: floor(((int)SMALL_IMAGE_WIDTH)/3) Unfortunately it doesn't work. Can you think of any other ideas *please* Helle :-) Quote Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2007 Share Posted January 7, 2007 are you getting an error message? I'm not sure what other info that would help besides having your host watch the apache error log when you try an upload, then act on that. Maybe the server has an upload limit for the HTTPd. I got it working.. I use the kdiff program and reloaded and it worked. thank you noppie Quote Link to comment Share on other sites More sharing options...
Rachael w. Posted January 8, 2007 Share Posted January 8, 2007 Has anyone tried this contrib (below) with the more pics yet? (its pretty new) I had hoped it would be my solution to the lightbox issue but I also have image magic installed and didnt get past the first step (html_output). http://www.oscommerce.com/community/contributions,4776 Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 10, 2007 Author Share Posted January 10, 2007 Unfortunately it doesn't work. Can you think of any other ideas *please* Helle :-) what is the SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT set to in your admin -> images? Quote Link to comment Share on other sites More sharing options...
HelleM Posted January 10, 2007 Share Posted January 10, 2007 Hi Surfalot Small Images are set to 120 - height is set to nothing <?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?> Helle Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 11, 2007 Author Share Posted January 11, 2007 Hi Surfalot Small Images are set to 120 - height is set to nothing <?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?> Helle tep_image() function on the admin side doesn't handle having one of the dimensions empty. You would have to modify the decision in that function. (/admin/includes/functions/html_output.php) if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } Quote Link to comment Share on other sites More sharing options...
HelleM Posted January 11, 2007 Share Posted January 11, 2007 Thanks Surfalot for clearing that up. I didn't know that - at all ! Helle :-) Quote Link to comment Share on other sites More sharing options...
jasonabc Posted January 11, 2007 Share Posted January 11, 2007 Hi - great contribution - use it all the time ;-) I have the latest version of MoPics installed on several stores. A few of my Mac (Safari) using clients have been reporting that the popup doesn't open full size? It opens really small and they have to click and drag the bottom corner of the window to see the whole image. Any ideas how to fix this? thanks Jason Quote Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
surfalot Posted January 12, 2007 Author Share Posted January 12, 2007 (edited) that is a bug in the original osCommerce code. it uses javascript to determine the size of the image and adjust the box size when it loads. the only way to avoid this is to find out what javascript safari supports for that and alter the code in the /catalog/popup_image.php. Or preset the box size in the javascript popup code. Edited January 12, 2007 by surfalot Quote Link to comment Share on other sites More sharing options...
msole Posted January 14, 2007 Share Posted January 14, 2007 (edited) in phpMyAdmin, click on the little "SQL" link image. Copy all the text from the database_additions.txt file into the Run SQL query window, click go. that's all there is to that. I just upload the following in the database_additions into my phpMyAdmin. But This error occur... Error SQL query: ALTER TABLE `products` ADD `products_subimage1` VARCHAR( 64 ) AFTER `products_image` ; MySQL said: #1060 - Duplicate column name 'products_subimage1' I think it was the mistake i did before, where i only upload ALTER TABLE `products` ADD `products_subimage1` VARCHAR(64) AFTER `products_image`; ALTER TABLE `products` ADD `products_subimage2` VARCHAR(64) AFTER `products_subimage1`; ALTER TABLE `products` ADD `products_subimage3` VARCHAR(64) AFTER `products_subimage2`; ALTER TABLE `products` ADD `products_subimage4` VARCHAR(64) AFTER `products_subimage3`; ALTER TABLE `products` ADD `products_subimage5` VARCHAR(64) AFTER `products_subimage4`; ALTER TABLE `products` ADD `products_subimage6` VARCHAR(64) AFTER `products_subimage5`; where can I remove that ? Edited January 14, 2007 by msole Quote Link to comment Share on other sites More sharing options...
msole Posted January 14, 2007 Share Posted January 14, 2007 (edited) please ignore the commet above. I just upload copy & paste everything in database_additions into Run SQL query/queries on database in my phpMyAdmin. Your SQL query has been executed successfullySQL query This is the correct way ? If so, where do i start from ? After uploading all the files & database in phpMyAdmin. Edited January 14, 2007 by msole Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 15, 2007 Author Share Posted January 15, 2007 you should see 6 additional image upload locations in your product edit page in your shop admin. Quote Link to comment Share on other sites More sharing options...
stenhamra Posted January 15, 2007 Share Posted January 15, 2007 Hello, Installed osCommerce earlier for a friend of mine, and found this application for adding more than one image very interesting. I did try to follow the steps in the readme file, but something must have gone wrong... Whenever I do try to enter the admin menu, I get this error message: Parse error: syntax error, unexpected '}' in /home/stdbils/public_html/test/admin/categories.php on line 1050 For what I can see, this is my line 1050: <?php } $cPath_back = ''; if (sizeof($cPath_array) > 0) { for ($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) { if (empty($cPath_back)) { $cPath_back .= $cPath_array[$i]; } else { $cPath_back .= '_' . $cPath_array[$i]; } } } $cPath_back = (tep_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : ''; ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo TEXT_CATEGORIES . ' ' . $categories_count . '<br>' . TEXT_PRODUCTS . ' ' . $products_count; ?></td> <td align="right" class="smallText"><?php if (sizeof($cPath_array) > 0) echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, $cPath_back . 'cID=' . $current_category_id) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; if (!isset($HTTP_GET_VARS['search'])) echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_category') . '">' . tep_image_button('button_new_category.gif', IMAGE_NEW_CATEGORY) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_product') . '">' . tep_image_button('button_new_product.gif', IMAGE_NEW_PRODUCT) . '</a>'; ?> </td> With the "}" at the top as line 1050. When I enter the Admin index page, I am presented with this error-message at the top: if (tep_db_num_rows($tax_query)) { $tax_multiplier = 0; while ($tax = tep_db_fetch_array($tax_query)) { $tax_multiplier += $tax['tax_rate']; } return $tax_multiplier; } else { return 0; } } function tep_call_function($function, $parameter, $object = '') { if ($object == '') { return call_user_func($function, $parameter); } elseif (PHP_VERSION < 4) { return call_user_method($function, $object, $parameter); } else { return call_user_func(array($object, $function), $parameter); } } function tep_get_zone_class_title($zone_class_id) { if ($zone_class_id == '0') { return TEXT_NONE; } else { $classes_query = tep_db_query("select geo_zone_name from " . TABLE_GEO_ZONES . " where geo_zone_id = '" . (int)$zone_class_id . "'"); $classes = tep_db_fetch_array($classes_query); return $classes['geo_zone_name']; } } function tep_cfg_pull_down_zone_classes($zone_class_id, $key = '') { $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value'); $zone_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); $zone_class_query = tep_db_query("select geo_zone_id, geo_zone_name from " . TABLE_GEO_ZONES . " order by geo_zone_name"); while ($zone_class = tep_db_fetch_array($zone_class_query)) { $zone_class_array[] = array('id' => $zone_class['geo_zone_id'], 'text' => $zone_class['geo_zone_name']); } return tep_draw_pull_down_menu($name, $zone_class_array, $zone_class_id); } function tep_cfg_pull_down_order_statuses($order_status_id, $key = '') { global $languages_id; $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value'); $statuses_array = array(array('id' => '0', 'text' => TEXT_DEFAULT)); $statuses_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "' order by orders_status_name"); while ($statuses = tep_db_fetch_array($statuses_query)) { $statuses_array[] = array('id' => $statuses['orders_status_id'], 'text' => $statuses['orders_status_name']); } return tep_draw_pull_down_menu($name, $statuses_array, $order_status_id); } function tep_get_order_status_name($order_status_id, $language_id = '') { global $languages_id; if ($order_status_id < 1) return TEXT_DEFAULT; if (!is_numeric($language_id)) $language_id = $languages_id; $status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . (int)$order_status_id . "' and language_id = '" . (int)$language_id . "'"); $status = tep_db_fetch_array($status_query); return $status['orders_status_name']; } //// // Return a random value function tep_rand($min = null, $max = null) { static $seeded; if (!$seeded) { mt_srand((double)microtime()*1000000); $seeded = true; } if (isset($min) && isset($max)) { if ($min >= $max) { return $min; } else { return mt_rand($min, $max); } } else { return mt_rand(); } } // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n) function tep_convert_linefeeds($from, $to, $string) { if ((PHP_VERSION < "4.0.5") && is_array($from)) { return ereg_replace('(' . implode('|', $from) . ')', $to, $string); } else { return str_replace($from, $to, $string); } } function tep_string_to_int($string) { return (int)$string; } //// // Parse and secure the cPath parameter values function tep_parse_category_path($cPath) { // make sure the category IDs are integers $cPath_array = array_map('tep_string_to_int', explode('_', $cPath)); // make sure no duplicate category IDs exist which could lock the server in a loop $tmp_array = array(); $n = sizeof($cPath_array); for ($i=0; $i<$n; $i++) { if (!in_array($cPath_array[$i], $tmp_array)) { $tmp_array[] = $cPath_array[$i]; } } return $tmp_array; } ?> Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/stdbils/public_html/test/admin/includes/functions/general.php:1325) in /home/stdbils/public_html/test/admin/includes/functions/sessions.php on line 67 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/stdbils/public_html/test/admin/includes/functions/general.php:1325) in /home/stdbils/public_html/test/admin/includes/functions/sessions.php on line 67 I had the page up and working, before I started to mess with this application.. ;) Any inputs or guidance to how I can get it to work agaain, preferably with the multi products image application active, will be highly appreciated! I am not familiar with php programming etc.. Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 20, 2007 Author Share Posted January 20, 2007 Ouch, if you are not familiar with PHP, installing contributions would not be a good path for you. Unfortunately that kind of error is not easy to simply point out. What it means is you have made a mistake somewhere above that point when integrating the changes for this contribution. I would restore the files and try again with a good comparison program like WinDiff or Beyond Compare. Quote Link to comment Share on other sites More sharing options...
Stevesupreme Posted January 23, 2007 Share Posted January 23, 2007 Hi, i have installed the conrib. the function with adding the 6 pics in admin menue. when i go to the catalog and klick on one produkt i get this error message: Fatal error: Cannot redeclare tep_show_category() (previously declared in /www/htdocs/w007df69/catalog/includes/header.php:136) in /www/htdocs/w007df69/catalog/includes/boxes/categories.php on line 13 maybe i forgot something? please help me you can write me as well in icq: 69079199 please answer asap i need help ( regards steve Quote Link to comment Share on other sites More sharing options...
shingooo Posted January 27, 2007 Share Posted January 27, 2007 Hi there, I've just installed mopics contrib onto my site. The problem is that the scaled down thumbnails look well distorted. The large image is 300x300 and i've set the small image size in admin as 100 x 100. I know Surfalot has added a quick fix but what I don;t understand is that how the thumbnail images with the appended "_s" is uploaded to the site. Is it done through admin? Thanks Michael Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 27, 2007 Author Share Posted January 27, 2007 Hi, i have installed the conrib. the function with adding the 6 pics in admin menue. when i go to the catalog and klick on one produkt i get this error message: Fatal error: Cannot redeclare tep_show_category() (previously declared in /www/htdocs/w007df69/catalog/includes/header.php:136) in /www/htdocs/w007df69/catalog/includes/boxes/categories.php on line 13 maybe i forgot something? please help me you can write me as well in icq: 69079199 please answer asap i need help ( regards steve tep_show_category() is in your shop code twice, or possibly the file it is in is included twice. in the basic osC shop it is defined in: \catalog\includes\boxes\categories.php you can add this around the function in that file and it will only allow the shop to load the function once. this will not actually fix the original problem, but merely fix the symptom. if (!function_exists(tep_show_category)) { function tep_show_category($counter) { ... etc } } Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 27, 2007 Author Share Posted January 27, 2007 I know Surfalot has added a quick fix but what I don;t understand is that how the thumbnail images with the appended "_s" is uploaded to the site. Is it done through admin? upload them to the same place your other images get uploaded to. The default place is /catalog/images/ (you shop may not be in the /catalog/ directory. Quote Link to comment Share on other sites More sharing options...
shingooo Posted January 28, 2007 Share Posted January 28, 2007 upload them to the same place your other images get uploaded to. The default place is /catalog/images/ (you shop may not be in the /catalog/ directory. Thanks! Is it possible to do it through admin? The site is for a friend and I don't think he is able to upload straight.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.