We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25483
    • 741 Posts
    Can I use DirectResize with a Template Variable??

    I have a TV with a user selected logo which should be resized to a maximum width, but it doesn’t work... It will just stretch or shrink the image :S
      with regards,

      Ronald Lokers
      'Front-end developer' @ h2o Media

      • 19164
      • 1,215 Posts
      @Dimmy I think you can use drthumbonly label for this.

      @MediaGuy DR working good with TV. Read about $allow_from parm in manual. May be this is your problem.
        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]
        • 25483
        • 741 Posts
        Quote from: Metaller at Aug 25, 2008, 06:17 AM

        @Dimmy I think you can use drthumbonly label for this.

        @MediaGuy DR working good with TV. Read about $allow_from parm in manual. May be this is your problem.

        Hmz... I can’t get it working...

        I want to use it on this page: hxxp://www.scoutingmhg.nl/sponsoren/pixelrp.html

        And this is the config I use:
        <?
        // Use the following syntax $param = 'value';
        // You can use DIRECTRESIZE_PATH as full path to plugin folder  
        
        $resize_method = 0;
        $allow_from_allremote = 1;
        $thumb_default_sizemode = 4;
        ?>


        What I want is that it resizes the logo to fit inside the 200x200px retangle. So that I don’t have to resize the logo’s my self.
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media

          • 19164
          • 1,215 Posts
          It seems that plugin is not working. It it correctly installed, all events checked, config file selected? Post here all code from config file.
            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]
            • 25483
            • 741 Posts
            Quote from: Metaller at Aug 25, 2008, 07:27 AM

            It seems that plugin is not working. It it correctly installed, all events checked, config file selected? Post here all code from config file.

            What I posted above is the complete config file smiley

            And I checked everything... So I will try to reinstall it maybe something went wrong with uploading!

            [edit]
            Uploading DirectResize again didn’t help, but after looking at the highslide configuration I changed my config file to this one:
            <?
            // Use the following syntax $param = 'value';
            // You can use DIRECTRESIZE_PATH as full path to plugin folder  
            
            // This is the template to markup your thumbnails. See readme for possible placeholders.
            $tpl = <<<HTML
            	<img src="[+dr.thumbPath+]" width="[+dr.thumbWidth+]" height="[+dr.thumbHeight+]" />
            HTML;
            $lightbox_mode = 2;
            $allow_from="assets/images";
            $allow_from_allremote = 1;
            $resize_method = 3;
            ?>


            Now it works like a charm smiley
              with regards,

              Ronald Lokers
              'Front-end developer' @ h2o Media

              • 25373
              • 13 Posts
              Hello,

              dr makes a huge problem for me here.
              The output it generates overwrites what i specify in TinyMCE.

              for example:
              html sourcecode from tiny:
              <div>
              <img align="right" height="80" src="assets/images/image.jpg" width="80" />A whole bunch of Text, where an image is aligned right next to it, and the text floats around the left side of the image.
              </div>


              result: the image is properly aligned to the right side of the text.

              html sourcecode from website:
              <div>
              <a title="" rel="lightbox" href="assets/images/image.jpg">
              <img width="80" height="80" src="assets/drgalleries/1/image.jpg"/
              </a>
              A whole bunch of Text, where an image is aligned right next to it, and the text floats around the left side of the image.
              </div>


              result: the image is aligned to the left side of the text. No chance to make it look the same as with an not-dr-processed image.

              What I want is, that i can float an image to the right in a text using dr.

              Any ideas?

              thanks
              Alex
                • 19164
                • 1,215 Posts
                Hello. Just read manual about template placeholders. You can use [+dr.align+] placeholder to move align from source image to site genereted code.
                  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]
                  • 25373
                  • 13 Posts
                  hello,

                  thanks!

                  i did already read through, stll it is a riddle to me, where do i create the templates, and how to i apply them to an image.

                  the manual refers to: (section Parameters, $tpl)
                  assets/plugins/directresize/templates/lightboxv2.html

                  but there is no templates folder in assets/plugins/directresize/

                  I want to use slimbox.

                  as a feature request for the future: can you make it as default to preserve original image tags?

                  thanks a lot for your efforts!

                  rgds
                  Alex
                    • 7455
                    • 2,204 Posts
                    its in the configs instead of the template folder tempate folder doen not exist template =configs
                      follow me on twitter: @dimmy01
                      • 19164
                      • 1,215 Posts
                      Yes, template folder is an old version legacy. All parameters is in config file.
                        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]