We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1611
    • 591 Posts
    @Bytesource
    May be you should specify tpl_lightbox without <a> tags.

    But I think it’ll be only workaround, it seems there is a bug here. Will listen Metaller comment.
      • 4414
      • 63 Posts
      Hi Andrey,

      Then let’s wait for Metaller wink
        • 4414
        • 63 Posts
        Hi,

        I finally found out why DirectResize seemed to ignore my configuration file. In Resources/Manage Resources/Plugins/DirectResize --> Configuration I mistakenly placed a space character before the actual value (thumb in my case), which lead DirectResize to ignore my config file.

        Now that this problem is solved, I would like to ask another question. Is it possible to replace the rather long number in the following example with a shorter one or - even better - the docID of the document in which the image appears? I would also like to be able to remove thumb_ prefix.

        Example:
        (src="images/d4d193353c1a502688ba59c3e36aa2f0/thumb_test.jpg")

        As all images on my site have a distinct file name, I do not need a long number, and removing the prefix would make my images better searchable in Google image search. I am sure these values can be set somewhere in the configurations.

        As always, any suggestions are highly appreciated!

        Best regards,

        Stefan
          • 19164
          • 1,215 Posts
          Hello all. Great that you can solve first problem.


          We can’t to remove this number. This long number is a md5 hash from long list of parameters for phpThumb that genereates this image. It used for friendly URLs in DR.

          You can turn off FURL for Direct resize, but in this case your images will be looked like this

          http://mysite.com/image.php?&src=assets/images/my_image.jpg&h=166&w=249&fltr[]=crop|0|0|32|31&fltr[]=wmt|Watermark%3A+%5EFkkb|5||FFFFFF|assets/olympix.ttf|100||0|111111|80|x&f=jpg&sia=thumb_my_image.jpg&hash=d703aab8dfc241203a9f1f804e557ec4

          All parameters for phpThumb is goes in URL and this strange number is best that i can do. May be later I will replace md5 with crc32 and this number will be a little shorter.
            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]
            • 4414
            • 63 Posts
            Quote from: Bytesource at May 17, 2009, 09:23 AM

            I finally found out why DirectResize seemed to ignore my configuration file.
            Unfortunately not. Now whenever I open a document in the modx manager the following warning pops up:

            DirectResize - OnDocFormPrerender
            An error occurred while loading. Please see the event log for more information


            In the event log at Reports/System Events I then found the following logs for DirectResize - Plugin:

            • Use of undefined constant which_editor - assumed ’which_editor’
            • Use of undefined constant DIRECTRESIZE_PATH - assumed ’DIRECTRESIZE_PATH’

            Apart from these error messages, DirectResize seems to work as usual. However, there is definitely something wrong here, otherwise I would not get a warning every time I open or save a document.

            Any idea what might be the problem?

            Best regards,

            Stefan

            Edit:
            When I go to Resources/Manage Resources/Plugins/DirectResize --> Configuration and remove the content DirectResize &config = Configuration; string;thumb the error messages stop and DirectResize seems to just use the default configuration set in directResize.php

            The name of my configuration file is thumb.config.php.
            <?php
            
            $dr_global["path"] = "assets/images/sovonex";
            
            $dr_local["tpl_thumb"]["all"] = "[+dr.shortcut.source2thumb+]";
            
            $dr_local["thumbonly"]["all"] = true;
            
            $dr_local["thumb_quality"]["all"] = 95;
            
            ?>


            Could it be that there is something wrong with the file name (upper/lower case error) or the content (my command of php is quite limited so I just did some copy&paste here)?

              • 19164
              • 1,215 Posts
              Content in Resources/Manage Resources/Plugins/DirectResize --> Configuration

              is DirectResize &config = Configuration; string;thumb OR &config = Configuration; string;thumb ?

              1st string is wrong.
                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]
                • 4414
                • 63 Posts
                Hi Metaller,

                I copied this string from the English readme file at http://translate.google.com/translate?hl=ru&sl=ru&tl=en&u=http://modx.metaller.ru/assets/plugins/directresize/docs/readme_ru.html (see "Setting") and replaced the value thickbox with thumb.

                Edit: I made a mistake in my previous message by highlighting DirectResize. In fact all I copied to Resources/Manage Resources/Plugins/DirectResize --> Configuration was &config = Configuration; string;tumb

                But with this I get all these error messages.

                Could this be a bug?

                Best regards,

                Stefan

                  • 19164
                  • 1,215 Posts
                  I can’t to reproduce your problem on my local computer. I use your config thumb.config.php and this configuration string &config = Configuration; string;thumb and all working good.

                  Is &config = Configuration; string;tumb a typo?
                    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]
                    • 4414
                    • 63 Posts
                    It was a typo - but only in the message above. I already rechecked: in modx the value is correct.
                      • 27437
                      • 49 Posts
                      Hmmm, 0.9 beta

                      I try to get this to work... I followed the instructions:

                      * 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:

                      did the htaccess thing...

                      But i cant get i to work...

                      When i edit a document(tinymce) i think i should press the image button, select an image, select a new width and save the document..
                      (can someone confirm this is the way it should work??)

                      But nothing happens.. My source code doesn’s show a link and i dont thumbs in drgalleries or cache...

                      What am i doing wrong?

                      running: osx, mamp, php 5.x