We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19164
    • 1,215 Posts
    There is a new version of DirectResize with PHPThumb.

    Version in attachment 0.9.0 rev 6. This is beta! Current revision in SVN is rev 6.

    Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code.

    Required PHP 5.

    What’s new:

    * Images processed and cached by PHPThumb
    * Many new parameters, more flexible customizing
    * Sets of configurations binded to specific paths and document templates. You can use different parameters on different sets of images.
    * Friendly URLs for images
    * New js-libraries inside - jQuery thickbox, Fancybox, nyroModal. Others updated to new versions.
    * and more

    Docs

    Sorry, but full docs avaiable only on russian at this moment. There is a short discription. You can use google-translated version by http://modx.metaller.ru/assets/plugins/directresize/docs/readme_ru.html" target="_blank" rel="nofollow">this link. But better to look for russian original readme in assets/plugins/directresize/docs/readme_ru.html for examples. Google has some format errors with preformated text.

    Installation:

    * Unpack all files and folders from root folder in the archive to root of your site. Subfolder directresize will be copied to assets/plugins/, phpthumb will be copied to assets/snippets/ and file image.php will be copied to the root of your site.
    * Create new plugin called DirectResize and paste the contents of directResize.plugin.txt to it
    * On the "System event" tab check OnWebPagePrerender, OnBeforeDocFormSave, OnDocFormPrerender
    * Copy and Paste the following into "Plugin configuration" on the Configuration tab
    &config=Configuration;string;thickbox
    * Set writing perms to assets/snippets/phpthumb/cache/
    * Configure friendly URL in .htaccess in the root folder:
    Uncomment
    RewriteEngine On
    RewriteBase /

    After that, but before
    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    insert
    # DirectResize  Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^images/([a-z0-9]{32})/.*\.(png|gif|jpe{0,1}g)$ assets/plugins/directresize/furl.php?q=$1 [NC,L,QSA]


    * optional - configure PHPThumb in assets/snippets/phpthumb/phpThumb.config.php

    Upgrading from 0.8

    Sorry, there is no backward compatibility.

    Links, bugs, issues

    Project on google code: http://code.google.com/p/directresize-modx/

    SVN-repo (web-browser or SVN-programm): http://directresize-modx.googlecode.com/svn/trunk/

    Issues : http://code.google.com/p/directresize-modx/issues/

    If you have a problem with downloading file from here, you can download it from google code downloads
      DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

      Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

      [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
      • 23050
      • 1,842 Posts
      Hi Metaller and thank you for this update !

      I try to resize images from remote server but can’t figure out how to do. Hum only thing to do is to specify the remote adress in $allow_from parameter embarrassed (I read too fast ^^)

      I get images from a RSS feed with Feedx and the image is not resized... but I don’t know if I have to use a particular parameter ?
      Also tried to resize image without Feedx (ie only inserting img tag in content) : image is not resized.


      Very nice update smiley

      Edit : by the way, just tested with an image hosted on my server : works fine ! Really nice highslide effect wink
        • 23050
        • 1,842 Posts
        I’m still working on the RSS feed to display images with DR.

        I have, let’s say, 3 articles (a, b, c) with 3 images in each article. I want to display these 3 articles in the same document. Remote adresses for these images are:

        domain.tld/aaa/1.jpg
        domain.tld/aaa/2.jpg
        domain.tld/aaa/3.jpg

        domain.tld/bbb/1.jpg
        domain.tld/bbb/2.jpg
        domain.tld/bbb/3.jpg

        domain.tld/ccc/1.jpg
        domain.tld/ccc/2.jpg
        domain.tld/ccc/3.jpg

        So when resizing, DR creates thumb_1.jpg, thumb_2.jpg and thumb_3.jpg but it doesn’t take into account the /aaa/, /bbb/, /ccc/ folders. So images for article 2 and 3 are the same like the ones of article 1.

        Am I clear ?

        Strange issue to manage I guess :/
          • 19164
          • 1,215 Posts
          only thing to do is to specify the remote adress in $allow_from parameter
          i think that this parameter is important and mandatory, becouse without it plugin will be processed all images that we are not want to (design images for example)

          I think to add an additional parameter for allowing to use all remote resources without need to list them all.

          Or you can list all forbidden folders (with design images for example) in $deny_from parameter. All other resources will be allowed. You can use $deny_from or $allow_from parameters in each case

          About your 2nd post - its realy bug with duplicate names in the same document. I’ll fix it. Bugfix in the fitst.
            DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

            Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

            [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
            • 33071
            • 31 Posts
            Hello,


            I’m currently trying to use maxiGallery and Direct resize and it seems that both are using the same phpclass:
            On uploading new picture, I get this error:
            Fatal error: Cannot redeclare class thumbnail in /home.10.29/finitech/www/assets/plugins/directresize/includes/Thumbnail.class.php on line 68


            However, all images are processed correctly.

            Any trick to avoid this ?

            Thanks in advance.

              • 19164
              • 1,215 Posts
              Hi. Thanks for your report. See for bugfix in the first message.
                DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

                Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

                [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
                • 19164
                • 1,215 Posts
                Small bugfix with label name "lightbox".
                  DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

                  Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

                  [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
                  • 19164
                  • 1,215 Posts
                  Bugfix with "Fatal error: Call to undefined function: size()" message.
                    DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

                    Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

                    [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
                    • 1876
                    • 835 Posts
                    Hi

                    Do we need to download both directresize080en.zip and direcresize_bugfix.zip ?
                      • 25483
                      • 741 Posts
                      What do I have to set in the config file if I don’t want to stretch out images?

                      I have a place on my site where I want to have a maximum WIDTH for the images, but smaller images now get resized to the maximum width.
                        with regards,

                        Ronald Lokers
                        'Front-end developer' @ h2o Media