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
    Plugin is can’t be disabled on someone pages now.

    About images alignment - you can use placeholders like [+dr.style+] [+dt.class+] [+dr.align+] in templates to control alignment.

    Source image
    <img src="assets/images/sample.jpg" class="align_left" />


    Template (highslide)
    $tpl = <<<HTML
    <a href="[+dr.bigPath+]" class="highslide [+dr.class+]" onclick="return hs.expand(this, {captionId: 'caption[+dr.id+]'})">
    	<img src="[+dr.thumbPath+]" width="[+dr.thumbWidth+]" height="[+dr.thumbHeight+]" />
    </a>
    HTML;


    Result
    <a href="..." class="highslide align_left" onclick="return hs.expand(this, {captionId: 'caption1'})">
    	<img src="..." width="160" height="80" />
    </a>


    So, image class align_left was transfered from source image to your site page and you control some of image parameters with this class.
      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]
      • 15628
      • 5 Posts
      Hi,

      I tested the plugin and it’s very usefull.

      However, the plugin doesn’t seem to work with transparent PNG. The generated picture has a black background.

      There is anyone with the same trouble or having any idea to correct it?


      Regards
        • 19164
        • 1,215 Posts
        hi, may be this probles will be solved when DR will be use phpthumb library in future verions for image processing.
          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]
          • 15628
          • 5 Posts
          Thank you for answering.

          I’m using the old version for the moment. It seems to work well even though there are fewer features. I’ve just adapted it for using Smoothbox instead of slimbox/lighbox.


            • 17162
            • 27 Posts
            Hi,
            I have a small problem with Direct Resize. I’m using it on the same page with MaxyGallery, so I uncommented line $maxigallery_jscss_packs = "lightboxv2"; in lightboxv2.config.php.
            In MaxyGallery I changed language to my own, but DirectResize is still adding link in header :

            <script type="text/javascript" src="/.../assets/snippets/maxigallery/lightboxv2/js/lightbox_lang_en.js">

            In directresize.php I found the line:
            $direct->output = str_replace($head, $header."\n".$head, $direct->output);
            If I comment it, everything is fine (no link in header), but I’m not sure is this the best way to fix it smiley Could you check it out?

            Anyway, thank you for the great plugin laugh

            Lina

              • 19164
              • 1,215 Posts
              Hi.

              That what you need to do:

              1. In lightboxv2.config.php add $language = "your_language";
              2. Create file your_language.inc.php in /assets/plugins/directresize/lang (see english.inc.php as example)
              3. In this file change in $_lang[’lang’] = "en"; "en" to your language code.
              4. Now DR will be include your own language file from maxigallery
                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]
                • 17162
                • 27 Posts
                Thank you very much! Everything works great now laugh

                I have just one another (small) problem - when I installed DirectResize, thumbnails in frontend and in the Manager (in TinyMCE) were the same (thumb_somename.jpg). Now I have two thumbnail images - wysiwyg_assets--images--somename.jpg (for TinyMCE) and thumb_somename.jpg (for frontend). I like the first version with only one thumbnail.
                I don’t know what did I do to change this huh I installed new version of TinyMCE (but downgraded it to old ver). Could it be the reason?

                Thank you very much,
                Lina
                  • 19164
                  • 1,215 Posts
                  There are two different thumbs for forntend and backend and this is right. Cause backend image is marked with special watermark and has much lower quality than fronend thumbnail.
                    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]
                    • 17162
                    • 27 Posts
                    Thank you Metaller for reply.
                    Is it possible to have only one thumb version for frontend and for manager?
                    You are right I searched drgalleries folder and I do have two version of each thumb, but before I did something huh directResize was making two versions of thumbnails with the same name (thumb_somename.jpg) in different subfolders but now directResize is making two versions - one named thumb_somename.jpg and the other wysiwyg_assets--images--somename.jpg . (sounds crazy huh )

                    Thanks,
                    Lina
                      • 19164
                      • 1,215 Posts
                      Hi.

                      Not sure that understand all what you want to says. I’m working on new version, based on phpThumb and i hope there is no same trubles in future.
                        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]