Full service web hosting, great prices and support. Starts at $1.99/month!

View Poll Results: Any use to you?

Voters
8. You may not vote on this poll
  • Yes

    5 62.50%
  • No

    2 25.00%
  • I have no idea!

    1 12.50%
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43

Thread: Enhanced Dynamic MoPics & Images stored in directories

  1. #1
    osCMax Development Team

    Enhanced Dynamic MoPics & Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Lightbulb Enhanced Dynamic MoPics & Images stored in directories

    This thread has been started following on from an installation thread. It now seems more appropriate to continue here.

    Below is a portion of the installation text file, to explain the purpose of the patch. This patch includes the mod. from mithereal (in the 'sticky' post).

    Raison D'Etre
    Structure the way images are stored on the server.
    Reduce bandwidth, particularly on the home page and category views.
    (Most importantly?) Speed up the rendering of web pages for end-users and still provide detailed images.

    Functionality
    Store fullsize images in images/images_big; store thumbnails (reduced-size) in images/thumbs. Do the same for additional images for the same product. eg.
    widget.jpg 40Kb --> /images/images_big/
    widget.jpg 10Kb --> /images/thumbs/
    widget_1.jpg 35Kb --> /images/images_big/
    widget_1.jpg 9Kb --> /images/thumbs/
    widget_2.jpg 37Kb --> /images/images_big/
    widget_2.jpg 9.5Kb --> /images/thumbs/

    Where no additional product images exist, the standard "Other Images..." box will not appear - as per mod. by osCMax forum member 'mithereal'.
    For product images, it is optional to include additional fullsize images, it's possible just to show a series of thumbnails. In this case, no 'click to enlarge' will appear.

    The Admin console will allow an upload/display of both the thumbnail and full-size images. A current limitation is that the same filename should be used for both - not normally an issue but some may prefer the use of a prefix/suffix of 'thumb', for example.

    Additionally, Category images are now correctly stored in the images/categories directory. Move/copy any existing category images into this directory. New additions via the Admin. Console will populate into the correct sub-directory.
    I'm experiencing issues in uploading an attachment (using Firefox 3.5b4 on WinXP), so for the time being the latest patch is available in the downloads section of my website, shown below.

    There are a couple of outstanding details to remedy, which should be easily resolved in the near future.

    EJ
    [for reference: previous thread Product info image not showing

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  2. #2
    judoka
    Guest


    Default Re: Enhanced Dynamic MoPics & Images stored in directories

    Thank you ridexbuilder I just download the new 2.0.2h patch and I will try it as soon as I get a chance either today or tomorrow morning, and I will get right back to you.

  3. #3
    osCMax Development Team

    Enhanced Dynamic MoPics & Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: Enhanced Dynamic MoPics & Images stored in directories

    First when I get to the product discription page the click to enlarge images doesn't show because it is looking for the images in the main images directory ex: localhost/catalog/images/5478.jpg
    Check the contents of templates/yourtemplate/content/product_info.tpl.php - look for this section....

    PHP Code:
    <?php
            
    //// BEGIN:  Added for Dynamic MoPics v3.000
        
    if (tep_not_null($product_info['products_image'])) {
    ?>
              <table border="0" cellspacing="0" cellpadding="2" align="right">
                <tr>
                  <td align="center" class="smallText">
    <?php
                $image_lg 
    mopics_get_imagebase($product_info['products_image'], DIR_WS_IMAGES DYNAMIC_MOPICS_BIGIMAGES_DIR);
                if (
    $lg_image_ext mopics_file_exists($image_lgDYNAMIC_MOPICS_BIG_IMAGE_TYPES)) {
                    
    $image_size = @getimagesize($image_lg '.' $lg_image_ext);
    ?>

    <script language="javascript" type="text/javascript"><!--
    document.write('<a href="javascript:popupImage('<?php echo tep_href_link(FILENAME_POPUP_IMAGE'pID=' $product_info['products_id'] . '&type=' $lg_image_ext); ?>','<?php echo ((int)$image_size[1] + 30); ?>','<?php echo ((int)$image_size[0] + 5); ?>');"><?php echo tep_image(DIR_WS_IMAGES DYNAMIC_MOPICS_THUMBS_DIR $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE?></span></a>');
    //--></script>
    <noscript>
    <a href="<?php echo tep_href_link($image_lg '.' $lg_image_ext); ?>" target="_blank"><?php echo tep_image(DIR_WS_IMAGES DYNAMIC_MOPICS_THUMBS_DIR $product_info['products_image'], stripslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE?></span></a>
    </noscript>
    <?php
                
    } else {
              echo 
    tep_image(DIR_WS_IMAGES DYNAMIC_MOPICS_THUMBS_DIR $product_info['products_image'], stripslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
                }
    ?>
    Or just do a copy & paste job - after backing up your file.
    Last edited by ridexbuilder; 04-29-2009 at 02:34 PM. Reason: Typo! (again) I get worse :-(

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  4. #4
    osCMax Development Team

    Enhanced Dynamic MoPics &amp; Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: Enhanced Dynamic MoPics & Images stored in directories

    I notice is that the review, add to wish list and add to cart buttons images that are being display are not the one from my template but from the fallback template.
    I wonder if it is a 'buggy' version of product_info.tpl.php that I have, as the button image path show up as follows.

    /catalog/includes/languages/english/images/buttons/button_reviews.gif

    There is no BTS type of reference to the images. This is entirely independent of the changes that I've made but looks like the cause of the issue. Can someone confirm the 'standard' lines of code are as follows?:

    PHP Code:
            <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_REVIEWStep_get_all_get_params()) . '">' tep_image_button('button_reviews.gif'IMAGE_BUTTON_REVIEWS) . '</a>'?></td>
                    <!-- Wish List 3.5 Start -->
                    <td align="center"><?php echo tep_image_submit('button_wishlist.gif''Add to Wishlist''name="wishlist" value="wishlist"'); ?></td>
                    <!-- Wish List 3.5 End   -->
                    <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>
    Thanks

    EJ

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  5. #5
    judoka
    Guest


    Default Re: Enhanced Dynamic MoPics & Images stored in directories

    Hi ridexbuilder, I just try your new 2.0.2h patch and it went from good (2.0.2g) to bad (2.0.2h) now about 98% of the images have disappear. Now on the first page none of the images are showing because the path now is as follows;

    http://localhost/catalog/images/categories/image.jpg

    Notice the /categories/ folder, there is no categories folder.

    than when I click on one of those missing images it goes to the second page where again none of the images are showing because it also is looking for the images following the same path, (http://localhost/catalog/images/categories/image.jpg).

    Now if I click on one of those missing images it goes to the third page and the images are there because now it is looking for the images in the correct path of;

    http://localhost/catalog/images/thumbs/image.jpg

    Now if I click on one of those product images it goes to the product discription page but the whole right column is missing and I am getting the following error message,

    Parse error: syntax error, unexpected '}' in C:wampwwwcatalogincludesmodulesdynamic_mopics.php on line 115

    As for the click to enlarge image it is present but it is being pull from the following path;

    http://localhost/catalog/images/image.jpg and not from the correct path of http://localhost/catalog/images/thumbs/image.jpg

    And when I click on the "click to enlarge" images I am getting the following error message;

    Warning: require(includes/languages//popup_image.php) [function.require]: failed to open stream: No such file or directory in C:wampwwwcatalogpopup_image.php on line 24

    Fatal error: require() [function.require]: Failed opening required 'includes/languages//popup_image.php' (include_path='.;Chp5pear') in C:wampwwwcatalogpopup_image.php on line 24

    Notice the double // before pop_image.php I think this could be why I am getting this error message when I click the "click to enlarge" image.

    Also on the buttom of the home page I am getting the following error messages;

    Warning: fopen(C:/wamp/www/catalog//cache/_catalog_index.php_<osCsid>__.cache) [function.fopen]: failed to open stream: Invalid argument in C:wampwwwcatalogincludesclassespage_cache.php on line 261

    Warning: fwrite(): supplied argument is not a valid stream resource in C:wampwwwcatalogincludesclassespage_cache.php on line 262

    Warning: fclose(): supplied argument is not a valid stream resource in C:wampwwwcatalogincludesclassespage_cache.php on line 263

    Again if you notice on the first error message there is a double // before the cache/ and there is a _ before the catalog_index.php_<osCsid>__.cache. This could be the reason for these error message. I hope this helps.

    I'm going to switch back to the 2.0.2g so the I can try the codes you have on your last two posts.

  6. #6
    judoka
    Guest


    Default Re: Enhanced Dynamic MoPics & Images stored in directories

    Quote Originally Posted by ridexbuilder View Post
    Check the contents of templates/yourtemplate/content/product_info.tpl.php - look for this section....

    PHP Code:
    <?php
            
    //// BEGIN:  Added for Dynamic MoPics v3.000
        
    if (tep_not_null($product_info['products_image'])) {
    ?>
              <table border="0" cellspacing="0" cellpadding="2" align="right">
                <tr>
                  <td align="center" class="smallText">
    <?php
                $image_lg 
    mopics_get_imagebase($product_info['products_image'], DIR_WS_IMAGES DYNAMIC_MOPICS_BIGIMAGES_DIR);
                if (
    $lg_image_ext mopics_file_exists($image_lgDYNAMIC_MOPICS_BIG_IMAGE_TYPES)) {
                    
    $image_size = @getimagesize($image_lg '.' $lg_image_ext);
    ?>

    <script language="javascript" type="text/javascript"><!--
    document.write('<a href="javascript:popupImage('<?php echo tep_href_link(FILENAME_POPUP_IMAGE'pID=' $product_info['products_id'] . '&type=' $lg_image_ext); ?>','<?php echo ((int)$image_size[1] + 30); ?>','<?php echo ((int)$image_size[0] + 5); ?>');"><?php echo tep_image(DIR_WS_IMAGES DYNAMIC_MOPICS_THUMBS_DIR $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE?></span></a>');
    //--></script>
    <noscript>
    <a href="<?php echo tep_href_link($image_lg '.' $lg_image_ext); ?>" target="_blank"><?php echo tep_image(DIR_WS_IMAGES DYNAMIC_MOPICS_THUMBS_DIR $product_info['products_image'], stripslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE?></span></a>
    </noscript>
    <?php
                
    } else {
              echo 
    tep_image(DIR_WS_IMAGES DYNAMIC_MOPICS_THUMBS_DIR $product_info['products_image'], stripslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
                }
    ?>
    Or just do a copy & paste job - after backing up your file.
    this did not work. I even try putting back on the original templates/yourtemplate/content/product_info.tpl.php and the path is still looking in the main images directory. I'm now going to try your second posted fix above to fix the review, add to wish list and add to cart buttons images.

  7. #7
    osCMax Development Team

    Enhanced Dynamic MoPics &amp; Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Arrow Re: Enhanced Dynamic MoPics & Images stored in directories

    Hi Judoka,
    Sorry to hear of your problems. Your installation must be fundamentally different to mine for things to go so horribly wrong!

    With my installations, there has always been a(n unused) categories sub-directory, hence the 'inspiration' to use it.

    In Admin, Dynamic MoPics - abbreviated settings:
    B.I.D. images_big/
    T.I.D. thumbs/
    M.T.I.T.I.D. false
    E.I.P imagebase_{1}
    C.I.D. categories/

    I'll try to do a complete re-installation in a development environment. It will be osCmax v2.0.2, followed immediately by v2.0.2h. This should provide a baseline to work from. You might like to try the same - though it should be noted that I don't (deliberately) run in a WAMP environment - preferring to run real programs on a real OS

    includes/languages//popup_image.php - the language is missing, for some reason.

    FYI:
    As for the click to enlarge image it is present but it is being pull from the following path;

    http://localhost/catalog/images/image.jpg and not from the correct path of http://localhost/catalog/images/thumbs/image.jpg
    The correct path would be http://localhost/catalog/images_big/image.jpg

    I really do advise trying a 'fresh' installation into a different area and/or sign up for free hosting account and put it on a Linux server.

    EJ

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  8. #8
    osCMax Development Team

    Enhanced Dynamic MoPics &amp; Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: Enhanced Dynamic MoPics & Images stored in directories

    I'm now going to try your second posted fix above to fix the review, add to wish list and add to cart buttons images.
    You need to slooooow down. This is not a posted fix but a request for information from others.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  9. #9
    osCMax Development Team

    Enhanced Dynamic MoPics &amp; Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Post Re: Enhanced Dynamic MoPics & Images stored in directories

    New installation of oscMax v2.0.2 done - I can confirm that it does have an images/categories directory by default (as well as images_big & thumbs).

    I've added patch 2.0.2h - yes there's a wee problem with the categories image - they're not being uploaded to the category directory for some reason - I will investigate. It should be straightforward to fix.

    Product images seem correct in product info, reviews and wishlist.
    Note that I did discover one potential issue: Windows appended "JPG" to the end of an image - case matters! Once renamed to "jpg" everything was fine.


    [As previously noted: buttons do NOT reference any BTS templates]

    For the time being, progress can be monitored at ejsolutions Development :


    EJ
    Last edited by ridexbuilder; 04-30-2009 at 02:00 PM. Reason: URL added

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  10. #10
    osCMax Development Team

    Enhanced Dynamic MoPics &amp; Images stored in directories

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Post Re: Enhanced Dynamic MoPics & Images stored in directories

    Patch 'i' posted: additional file products_new.tpl.php that was missed in 'h' (thought it was included in the official v2.0.2)
    Category pics now show on website - Admin doesn't show category images but that will need to be resolved another day

    EJ



    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

Page 1 of 5 123 ... LastLast

Similar Threads

  1. Get rid of dynamic mopics
    By mskitti in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 12-20-2008, 05:12 AM
  2. Dynamic MoPics
    By metalman923 in forum osCmax v2 Installation issues
    Replies: 3
    Last Post: 11-11-2007, 08:48 AM
  3. Dynamic MoPics
    By i2Paq in forum osCmax v2 Installation issues
    Replies: 8
    Last Post: 10-16-2007, 07:44 AM
  4. Dynamic Mopics - Now you see me - Now you don't
    By cameroti in forum osCMax v2 Features Discussion
    Replies: 10
    Last Post: 12-15-2005, 12:59 PM
  5. how to use dynamic mopics? i want to put more than 1 pic
    By Anonymous in forum osCMax v1.7 General Mods Discussion
    Replies: 3
    Last Post: 07-25-2004, 01:14 PM

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •