We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    Can direct resize only create thumbs for for a specific TV? My purpose is to keep editors from uploading images that are too wide but I only need it for a specific TV.
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 19164
      • 1,215 Posts
      If I understand, you can do it like this:

      First,  specify some class for images from this TV: <img src="[*myTV*] class="mytv" />

      Then use set of configurations binded to this class:
      $dr_local["bind_config_to_css_selector"]["mytv_config"] = ".mytv";


      At last, apply any parameters to images with this class:
      $dr_local["thumbonly"]["mytv_config"] = true;


      You need DR rev 5 or later to use css bindings.
        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]
        • 7231
        • 4,205 Posts
        Thanks, the association by class is a cool feature. I was thinking that i could control the file dimensions on upload, but I see that the "thumbs" are generated on output.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 19164
          • 1,215 Posts
          Quote from: dev_cw at Feb 13, 2009, 06:34 AM

          the association by class is a cool feature
          In fact, you can use css selector in this parameter, not only by class: div#myclass or div > p and etc.
            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]
            • 27749
            • 53 Posts
            :o ABSOLUTELY GREAT!
              • 7231
              • 4,205 Posts
              Can we have multiple configurations? Like .myImg and then .otherImg and have each one have custom setup?
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 19164
                • 1,215 Posts
                Yes. You can use unlimited numbers of configurations with different names. Sets of configurations can binds to images by physical image path, css selector, document template or label.
                  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]
                  • 1611
                  • 591 Posts
                  It’s really cool! I’m gonna try this great plugin in my sites!
                    • 23849
                    • 223 Posts
                    Hi All,

                    Love the plugin and it’s worked on most of my sites, but I’m having issues with a site that has version 0.9.6.2 of modx installed. I’ve definitely installed the plugin correctly, but whenever it is enabled I get this modx parse error:

                    « MODx Parse Error »
                    MODx encountered the following error while attempting to parse the requested resource:
                    « PHP Parse Error »

                    PHP error debug
                    Error: array_combine() [function.array-combine]: Both parameters should have at least 1 element
                    Error type/ Nr.: Warning - 2
                    File: /home/missvt/public_html/assets/plugins/directresize/directResize.php
                    Line: 546
                    Line 546 source: $result_style = array_combine($match[1],$match[2]);

                    Parser timing
                    MySQL: 0.0024 s (4 Requests)
                    PHP: 0.0196 s
                    Total: 0.0220 s

                    Any Ideas?
                      Nick Hoag
                      Creative Partner
                      The FutureForward

                      http://thefutureforward.com
                      • 19164
                      • 1,215 Posts
                      Hi. This issue was fixed in revision 3 (http://code.google.com/p/directresize-modx/source/detail?r=3)

                      Please update DR.

                      Attachment in first post was updated to last revision.
                        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]