dreamscape Posted April 9, 2003 Author Posted April 9, 2003 after working with several people on different problems they were having, Dynamic MoPics v2.0 is here! Why jump to version 2.0? The code has been very much optimized for much much faster parsing time. v2.0 also conatins all previous bug fixes in versions 1.0 - 1.21 MAX_DISPLAY_THUMBS is now obsolete. you are only limited by how many extra thumbs u think you can handle making ;) The display code will only be run based on how many extra thumbs it finds rather than MAX_DISPLAY_THUMBS. *Note* if upgrading, just overwrite the popup_image and dynamic_mopics files http://www.oscommerce.com/community/contributions,1114 and make sure you have the same defines for configure.php Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
chrisyeung168 Posted April 10, 2003 Posted April 10, 2003 Hello dreamscape, I have installed your Mod, it is cool, but i still got 2 problems, please help to shoot it out, thanks: The first one, I tried many times to put my main thumb pictures in the images/thumbs directory, and when i set the product info, I choose the images/thumbs/image.jpg for the thumb pic, but it don't work, only when i put the image.jpg under the image directory instead inside the thumbs directory, and also, I need to set the configure.php to turn if off. define('IN_IMAGE_BIGIMAGES','images_big/'); //directory inside catalog/images where your big images are stored define('IN_IMAGE_THUMBS', 'thumbs/'); //directory inside catalog/images where you mopic thumbs are stored.. define('MAIN_THUMB_IN_SUBDIR', false); //if you store your main thumb in the above directory set this true. if its in the main image dir, set it false define('THUMBS_PER_ROW', '5'); define('MORE_PICS_EXT', '_screen'); define('BIG_PIC_EXT', ''); // this is if you name your big thumb like IMAGE_big.jpg, you would put '_big' here. otherwise leave it blank define('THUMB_IMAGE_TYPE', 'jpg'); //the extention for the extra thumbnail images (jpg, gif, bmp, png, etc...) define('BIG_IMAGE_TYPE', 'jpg'); //the extention for your big images (jpg, gif,) 2. Another problem is the screenshot squence, the thumb pictures squence seems to be alright, but when i click to get the big image, it will show the next big image instead of the current one, as a result, when i click the final thumb, it shows nothing, what happened to it? please help by the way, I have pm my testing site for you to have a look, thanks a lot! Quote
dreamscape Posted April 10, 2003 Author Posted April 10, 2003 you are correct... if your main thumb is in the main image directory, then you would set 'MAIN_THUMB_IN_SUBDIR' to false... also to get it to the thumb directory in admin, you would get it to thumbs/image.jpg and NOT images/thumbs/image.jpg as OSC adds in the images/ when it calls images. so the pics, that is a small mistake on my part in v2. I placed a line in the wrong spot, causing the large image to be the next in line, rather than its thumb. I am uploading a fix now. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
dreamscape Posted April 10, 2003 Author Posted April 10, 2003 it is done: http://www.oscommerce.com/community/contributions,1114 Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
chrisyeung168 Posted April 10, 2003 Posted April 10, 2003 also to get it to the thumb directory in admin, you would get it to thumbs/image.jpg and NOT images/thumbs/image.jpg as OSC adds in the images/ when it calls images. so, anyways to let the osc to call the main thumb image in the images/thumbs/ instead under /images/? since it would be more organized to place all the small main thumbs inside a folder rather than put them in the image folder, there are already too many pictures in the image folder, once if i have many products, there will have many main thumbs inside the image directory, too difficult to manage, by the way, I have gone to your site and see that your main thumb image is also put under the images/thumbs/ directory, how to do so? could you help? many thanks!!! :wink: Quote
dreamscape Posted April 10, 2003 Author Posted April 10, 2003 just as I said... in admin, in the image field type in thumbs/image.jpg Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
chrisyeung168 Posted April 11, 2003 Posted April 11, 2003 just as I said... in admin, in the image field type in thumbs/image.jpg dreamscape, I tried to put the main thumbs picture under the image/thumbs/ directory, and set the option in configure.php to true, I found there is a little bit strange behaviour... in admin, when i type in the path such as thumbs/image.jpg in the product info, click preview, I found the the picture can't be show up, I go inside the /image/thumbs/ to check the file, I saw the the image.jpg file size become zero, I tried many times and the behaviour insist. Finally, I find a way to set it and the pictures show up this time without any problem, that is, I typed in the path thumbs/image.jpg first in the product info, and then finished the insert of the product, after that, then copied the image.jpg main thumb into the /image/thumbs/, only in the way, so I can run it without any problem, anyway, why there is such a strange behaviour? Quote
dreamscape Posted April 11, 2003 Author Posted April 11, 2003 the strange behavior is OSC and not to due with anything I've written... if you try to type a path to the image in admin (like thumbs/image.jpg), OSC will overwrite the file with a 0kb file of the same name, and you must re-upload your image... this is a problem with OSC. since I upload all of my images myself anyways, I have just chmodded to images directory so that OSC cannot write to it and therefore cannot overwrite my images with a 0kb file :) Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
moyashi Posted April 12, 2003 Posted April 12, 2003 :roll: ugh, tell me about this. I get hit by this image problem every so often and it could be annoying if the user is depending on a webbrowser to upload images. I wonder if anybody has reported this as a bug yet? Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::
cpv1st Posted April 23, 2003 Posted April 23, 2003 when i go to the admin side and i type in thumbs/image.jpg the pop up works just fine but the thumb does not display on the site.....wierd....now when i use the admin to upload the thumb that i want shown ....it will display but the pop will not ...it will not even show that message..? Quote I am just a newbee....
dreamscape Posted April 23, 2003 Author Posted April 23, 2003 when i go to the admin side and i type in thumbs/image.jpg the pop up works just fine but the thumb does not display on the site did u read the above??? are u getting a red X for the thumb? FTP to the site and look in images/thumbs and look at the image.jpg file... is it there?? is it 0KB in size?? if so, that is OSC being its ugly self. I would recommend CHMODing the images direcotry to 644 with this contribution so that OSC cannot overwrite your images with blank 0K files. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
cpv1st Posted April 23, 2003 Posted April 23, 2003 Step 4: open catalog product_info.php Place this where you would like the MoPics to show up: <tr> <td> <?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> </td> </tr> i am not sure where to put this bit of code ....does it matter chris Quote I am just a newbee....
dreamscape Posted April 23, 2003 Author Posted April 23, 2003 ....does it matter chris no... and thats really the point... it designed as a drop in module pretty much... where-ever in your page you want the mopics to appear just put in: <?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> ... I put it around the tr and td tags because that is how the OSC main page section is split up, each part is in a tr and td, so i just included them so that its easier to drop it in below like the product description... but basically just put the include where u'd like the extra images to show up. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
cpv1st Posted April 23, 2003 Posted April 23, 2003 <noscript><?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . 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>'; ?> <tr> <td> <?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> </td> </tr> </noscript> i put it here this is about lines 105 or 106 or so...... does it matter....oh and now i get what you are saying about the chmod.. sometimes i am a little slower than most....but i show up eventually...but anyway does it matter where this code is placed...thanks for the great mod....and your site is awsome..... :lol: Quote I am just a newbee....
cpv1st Posted April 23, 2003 Posted April 23, 2003 sorry you are too fast....... :oops: Quote I am just a newbee....
dreamscape Posted April 23, 2003 Author Posted April 23, 2003 if you are placing it there: <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . 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>'; ?> <tr> <td> <?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> </td> </tr> </noscript> take the tr's and td's out since it is gonna be in the same tr and td as the regular image. if u want it there, place it like this: <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . 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 include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> hope that helps Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
cpv1st Posted April 23, 2003 Posted April 23, 2003 you are tops....man i gotta hand it to you...it works like a charm.....you see the code so much clearer than i do....i stare at it for a while before i really see whats going on........it works great...i wonder why osc writes over my jpg.....? oh well thanks again for the great mod chris :D Quote I am just a newbee....
cpv1st Posted April 23, 2003 Posted April 23, 2003 it didnt work like this <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . 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 include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> but it worked like this <noscript><?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . 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>'; ?> <?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?> </noscript> thought i would just put that out there for anyone interested...i know you dont need this info josh...but just in case some one else might need to configure this great mod. Quote I am just a newbee....
dreamscape Posted April 23, 2003 Author Posted April 23, 2003 yeah definately... I'd love to see the mod in action on your site, if you could PM me a link. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Guest Posted January 9, 2004 Posted January 9, 2004 HI, I got the contribution working however my color swatches seem to be blown up. Is there a way to make the thumbs smaller. Also how do i get the popup window for them to go, these are color swatches that don't need to be a popup. Thanks Paris Quote
dreamscape Posted January 9, 2004 Author Posted January 9, 2004 HI, I got the contribution working however my color swatches seem to be blown up. Is there a way to make the thumbs smaller. Also how do i get the popup window for them to go, these are color swatches that don't need to be a popup. Thanks Paris check in admin->configuration->images at the Small Image Width and Small Image Height. If you set these to nothing (blank), the images will be the correct size. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Guest Posted January 10, 2004 Posted January 10, 2004 (edited) Hi, I just tried that and the whole front page images went rather large. So i can't set the small images to 0. Do you know of any other ways of doing so. Thank you Paris Edited January 10, 2004 by Paris_Hayes Quote
Guest Posted January 10, 2004 Posted January 10, 2004 Never mind my programmer got it working for me. He had to go and hand code the size. Thanks Paris Quote
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.
Note: Your post will require moderator approval before it will be visible.