WorkingHard Posted December 15, 2009 Share Posted December 15, 2009 should look like this: Small Image Width 100 Small Image Height Heading Image Width 57 Heading Image Height 40 Subcategory Image Width 100 Subcategory Image Height 57 Calculate Image Size true Image Required true Display Image Width 200 Display Image Height Popup Image Width 400 Popup Image Height Yes, any idea in which file or database table I should look to eliminate those tripled values?? Cheers. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 15, 2009 Share Posted December 15, 2009 Yes, any idea in which file or database table I should look to eliminate those tripled values?? Cheers. The easiest way would be to use phpMyAdmin if your host offers it. They are in the "configuration" table. Probably at the end of it. With phpMyAdmin you can browse the entries in the table, page to the end of it and remove any that have a duplicate name in the configuration_key. hope that help. There should never be a duplicate configuration_key in that table Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 15, 2009 Share Posted December 15, 2009 Hi, Has anyone managed to fuse jquery's PrettyPhoto [lightbox clone] with the Additional Images Module. PrettyPhoto is much more powerful that the prototype - Lightbox you can view prettyPhoto here I am looking into merging such, but have no idea where to start... my cart uses jquery Regs not at this time. the licensing for any package to be included in contributions here must be GPL. Although Creative Commons Attribution 2.5 allows you to use it in a similar way, it may not be a compatible licensing. See "contributions" under the forum rules link above. Quote Link to comment Share on other sites More sharing options...
leelee2023 Posted December 15, 2009 Share Posted December 15, 2009 what version are you using? Using: v2.2 RC2a of the osCommerce and 2.2.0 of this contrib I'm not sure my previous explanation said as I wanted it to. When I upload the image now and refresh the product info page, the visible image is the correct size specified within my admin section. BUT there is a whole section of white space (the dimensions of the original image uploaded) and the resized image is shown in the middle. If I then mouse over the other images and go back to the resized parent image.. this now is shown in full size and takes up the whole space.. which is a bit of a dilema! Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 15, 2009 Share Posted December 15, 2009 Using: v2.2 RC2a of the osCommerce and 2.2.0 of this contrib I'm not sure my previous explanation said as I wanted it to. When I upload the image now and refresh the product info page, the visible image is the correct size specified within my admin section. BUT there is a whole section of white space (the dimensions of the original image uploaded) and the resized image is shown in the middle. If I then mouse over the other images and go back to the resized parent image.. this now is shown in full size and takes up the whole space.. which is a bit of a dilema! PM a link to the page please Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 16, 2009 Share Posted December 16, 2009 The easiest way would be to use phpMyAdmin if your host offers it. They are in the "configuration" table. Probably at the end of it. With phpMyAdmin you can browse the entries in the table, page to the end of it and remove any that have a duplicate name in the configuration_key. hope that help. There should never be a duplicate configuration_key in that table Jackpot! Thanks a lot man, you saved my day! :thumbsup: Cheers. Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 16, 2009 Share Posted December 16, 2009 Hello, I don't know if this is possible bug related to watermark function. I'm using Background color functionality because it makes images proportional with fixed size. But if using with watermark function, watermark is shifting its position depending on the source image size. That is spoiling whole idea of having fixed images size with 'Background color' function. My suggestion is to revert the processing process. Let 'Background color' come first, then watermark position will be all the same on images that uses calculated 'Background color'. Thanks? Cheers. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 16, 2009 Share Posted December 16, 2009 Hello, I don't know if this is possible bug related to watermark function. I'm using Background color functionality because it makes images proportional with fixed size. But if using with watermark function, watermark is shifting its position depending on the source image size. That is spoiling whole idea of having fixed images size with 'Background color' function. My suggestion is to revert the processing process. Let 'Background color' come first, then watermark position will be all the same on images that uses calculated 'Background color'. Thanks? Cheers. OK, try these changes to \admin\includes\classes\alterimage.php find: var $config_disable_imagecopyresampled = false; add after: var $skip_watermark = false; find: if (!empty($maxheight)) { $this->max_height = $maxheight; } add after: $this->skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); find: if (!$skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } remove the line. find: $this->ApplyBackground(); add after: if (!$this->skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } Quote Link to comment Share on other sites More sharing options...
Guest Posted December 16, 2009 Share Posted December 16, 2009 not at this time. the licensing for any package to be included in contributions here must be GPL. Although Creative Commons Attribution 2.5 allows you to use it in a similar way, it may not be a compatible licensing. See "contributions" under the forum rules link above. It has been used already in the contrib Simple Multi Image Add-on Plus PrettyPhoto I think it could be done... Grasping the power of AI and this, ;) [the sky the limit] I would do it but need help as to which areas I should focus on... Regs Proimage Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 19, 2009 Share Posted December 19, 2009 OK, try these changes to \admin\includes\classes\alterimage.php find: var $config_disable_imagecopyresampled = false; add after: var $skip_watermark = false; find: if (!empty($maxheight)) { $this->max_height = $maxheight; } add after: $this->skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); find: if (!$skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } remove the line. find: $this->ApplyBackground(); add after: if (!$this->skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } I have tried but it is the same result as before. Watermark is 'jumping' around depending on source image size... Cheers. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 19, 2009 Share Posted December 19, 2009 I have tried but it is the same result as before. Watermark is 'jumping' around depending on source image size... Cheers. works for me, double check your work. Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 19, 2009 Share Posted December 19, 2009 (edited) works for me, double check your work. Hi,I have checked and done per your instructions. Just tell me, shall $skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); not be deleted because we added $this->skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); Maybe this causing the problem? My setting as following: Watermark: Add watermark to images true Info Watermark: Watermark image file watermark.png Info Watermark: Opacity 50 Info Watermark: Skip thumbnail true Info Watermark: Horizontal alignment right Info Watermark: Vertical alignment bottom Info Watermark: Watermark image offset (as a percent) 10 Info Product Info: Parent product image alignment center Info I will appreciate if you could send over your file version so that I can replace mine with. Thanks. Cheers. Edited December 19, 2009 by WorkingHard Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 20, 2009 Share Posted December 20, 2009 Hi,I have checked and done per your instructions. Just tell me, shall $skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); not be deleted because we added $this->skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); Maybe this causing the problem? My setting as following: Watermark: Add watermark to images true Info Watermark: Watermark image file watermark.png Info Watermark: Opacity 50 Info Watermark: Skip thumbnail true Info Watermark: Horizontal alignment right Info Watermark: Vertical alignment bottom Info Watermark: Watermark image offset (as a percent) 10 Info Product Info: Parent product image alignment center Info I will appreciate if you could send over your file version so that I can replace mine with. Thanks. Cheers. if you don't remove the line suggested in the update instructions, it will continue to add the watermark at the wrong time in the script. That is causing the issue you reported. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 20, 2009 Share Posted December 20, 2009 I have tried but it is the same result as before. Watermark is 'jumping' around depending on source image size... Cheers. I see the problem now. I added one more instruction to the bottom: find: var $config_disable_imagecopyresampled = false; add after: var $skip_watermark = false; find: if (!empty($maxheight)) { $this->max_height = $maxheight; } add after: $this->skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); find: if (!$skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } remove the line. find: $this->ApplyBackground(); add after: if (!$this->skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } find (near line 450): $this->outImageResourceID = $t_outImageResourceID; add after: $this->out_width = $this->max_width; $this->out_height = $this->max_height; Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 21, 2009 Share Posted December 21, 2009 I see the problem now. I added one more instruction to the bottom: find: var $config_disable_imagecopyresampled = false; add after: var $skip_watermark = false; find: if (!empty($maxheight)) { $this->max_height = $maxheight; } add after: $this->skip_watermark = (ADDIMAGES_ADD_WATERMARK == 'false' ? true : $skip_watermark); find: if (!$skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } remove the line. find: $this->ApplyBackground(); add after: if (!$this->skip_watermark) { $this->addWatermark(ADDIMAGES_WATERMARK_TRANSPARENCY); } find (near line 450): $this->outImageResourceID = $t_outImageResourceID; add after: $this->out_width = $this->max_width; $this->out_height = $this->max_height; Jackpot! That solved the problem. Now the watermark appears in professional state, regardless the size of source images. Cheers! Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 22, 2009 Share Posted December 22, 2009 (edited) Hello, I'm not sure if this can be directed from AI part. In short terms: Is it possible to get a nice CSS style frame around all images? Actually, it shall be done by CSS but maybe through AI part? :blink: Cheers. Edited December 22, 2009 by WorkingHard Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 22, 2009 Share Posted December 22, 2009 Hello, I'm not sure if this can be directed from AI part. In short terms: Is it possible to get a nice CSS style frame around all images? Actually, it shall be done by CSS but maybe through AI part? :blink: Cheers. in the /includes/classes/displayimages.php file you can add any CSS class needed to the follow table // start building output if (tep_not_null($product['products_image'])) { $this->groupout .= '<table border="0" cellspacing="0" cellpadding="4" align="'.$this->tablealignment.'" style="position: relative;">'."\n"; } Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 23, 2009 Share Posted December 23, 2009 in the /includes/classes/displayimages.php file you can add any CSS class needed to the follow table // start building output if (tep_not_null($product['products_image'])) { $this->groupout .= '<table border="0" cellspacing="0" cellpadding="4" align="'.$this->tablealignment.'" style="position: relative;">'."\n"; } Thank you for this tip! However, it is not responding if I enter style specific values as "border-style:solid;" or similar. I don't want border style, just a tiny line around the images. It looks more professional. Any idea how to solve this? Cheers. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 23, 2009 Share Posted December 23, 2009 (edited) Thank you for this tip! However, it is not responding if I enter style specific values as "border-style:solid;" or similar. I don't want border style, just a tiny line around the images. It looks more professional. Any idea how to solve this? Cheers. just below that in the code you should see a <td> tag being added. If you just want a line around each image only, the TD is where you want it. BTW: you might try a full border style: style="border:#FFFFFF 1px solid;" just in case there is something inherited that is making yours simply not visible. Also may need to go with a cellspacing on the table tag instead of the cellpadding. Edited December 23, 2009 by surfalot Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 29, 2009 Share Posted December 29, 2009 Hello again surfalot & community, Security question or suggestion? How much I could see, it should not be a problem for any spider or 'harvest' script to gently download all image files because it is known fact that AI is sourcing images from XXX folder. Now, this shouldn't be a issue really as all images are watermarked now, right? BUT! The SOURCE images is still there, in same folder. So my question is: Is it possible to make some setting so that source images is 'more' protected? For example, placing it at another folder or in some other way add some 'hot link' protection? Maybe I'm on wrong track? :blink: Cheers! Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted December 29, 2009 Share Posted December 29, 2009 Hello, Regarding watermark size on thumbnail images. I don't know if it is just me, but shouldn't watermark size be proportional for thumbnails too? I have a watermark size of 200px, applying it to thumbnails give strange results. ? Cheers! Quote Link to comment Share on other sites More sharing options...
NEMROD34 Posted December 29, 2009 Share Posted December 29, 2009 Hello in the installation it says: <?php // BOF: Additional Images: added: onSubmit="return check_form(new_product);" ?> <?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data" onSubmit="return check_form(this);"') . tep_hide_session_id(); ?> <?php // EOF: Additional Images ?> For me it's the line 765 But with: onSubmit="return check_form(new_product);" Or: onSubmit="return check_form(this);" I still have the same error when I add a new product: Fatal error: Call to undefined function tep_hide_session_id() in /public_html/portail/****/***/admin/categories.php on line 765 When i want édit a product : 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' p.products_image_med, p.products_image_pop, p.products_image_description, p.pro' at line 1 select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_pdfupload, p.products_price, p.products_weight, p.products_date_added,, p.products_image_med, p.products_image_pop, p.products_image_description, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.products_sold, p.manufacturers_id from products p, products_description pd where p.products_id = '826' and p.products_id = pd.products_id and pd.language_id = '1' [TEP STOP] I have be insert the .sql file in my data base I have a problem with admin/includes/functions/html_output: in the contrib : // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } // BOF: Additional Images /* if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } */ if (tep_not_null($width)) { $image .= ' width="' . tep_output_string($width) . '"'; } if (tep_not_null($height)) { $image .= ' height="' . tep_output_string($height) . '"'; } // EOF: Additional Images if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// // The HTML form submit button wrapper function // Outputs a button in the selected language In my page: // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { $image = '<img src="' . $src . '" border="0" alt="' . $alt . '"'; if ($alt) { $image .= ' title=" ' . $alt . ' "'; } // BOF: Additional Images /* if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } */ if (tep_not_null($width)) { $image .= ' width="' . tep_output_string($width) . '"'; } if (tep_not_null($height)) { $image .= ' height="' . tep_output_string($height) . '"'; } // EOF: Additional Images if ($params) { $image .= ' ' . $params; } $image .= '>'; return $image; } //// // The HTML form submit button wrapper function // Outputs a button in the selected language It's ok ? Thanks Quote Link to comment Share on other sites More sharing options...
mghay Posted December 30, 2009 Share Posted December 30, 2009 Hi, Installed V.2.2.0 OK and now getting to grips with image control in the Categories/Products and New Products - finding the later a bit unstable: all images seem to need to be specified together; if I enter one, then come back to edit another, the first one tends to disappear or is ignored. Strange. Main point of this request-for-help post: With image pop-up after 'Click to Enlarge' is selected, the window initially opens towards the top left - as specified in the javascript coding about line 88 of Products_Info - before jumping to near the centre of the screen. Question 1: Where can I specify the final position of the pop-up window (I can't see anywhere in the new javascript code in the Non Lightbox lines). I assume that disabling the position specification in the first bit of java code will stop the initial pop-up. Question 2: Is it possible to specify the opening size of the pop-up window (presumably at the same place as Q1!). Thanks, Mike Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 1, 2010 Share Posted January 1, 2010 Hello again surfalot & community, Security question or suggestion? How much I could see, it should not be a problem for any spider or 'harvest' script to gently download all image files because it is known fact that AI is sourcing images from XXX folder. Now, this shouldn't be a issue really as all images are watermarked now, right? BUT! The SOURCE images is still there, in same folder. So my question is: Is it possible to make some setting so that source images is 'more' protected? For example, placing it at another folder or in some other way add some 'hot link' protection? Maybe I'm on wrong track? :blink: Cheers! good point but someone would have to go to great lengths to write a script that will exploit this only for a relatively small number of sites. you can add hotlink protection to the root images folder with a .htaccess if you wish. Quote Link to comment Share on other sites More sharing options...
surfalot Posted January 1, 2010 Share Posted January 1, 2010 Hello, Regarding watermark size on thumbnail images. I don't know if it is just me, but shouldn't watermark size be proportional for thumbnails too? I have a watermark size of 200px, applying it to thumbnails give strange results. ? Cheers! it's just you :) I never considered a giant watermark, and didn't think many would even watermark their thumbs at all since it would make it hard to see the product. Stock photo sites don't even watermark their thumbs. 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.