We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26931
    • 2,314 Posts
    Hi there,

    one little question smiley when pictures get deleted ( from website content & image-folder ), the cached pictures will still remain in the phpthumb cache-folder, right? or is there a configuration to delete the cached pictures (& the folders containing them)?

    thanks, j
      • 19164
      • 1,215 Posts
      Hi, look into phpThumb config file. There are some cache options.
        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]
        • 26931
        • 2,314 Posts
        Hi, look into phpThumb config file. There are some cache options.

        smiley thanks, j
          • 26931
          • 2,314 Posts
          Hi,

          here’s a DirectResize0.9-Config, that uses an older version of slimbox (v.1.57), so that it runs smoothly with MODx’es (0.9.6.3) built in Mootools Version 1.11...it’s set up, assuming you already use AxasSearch, and therefore no additional Mootools-file will be inserted, if you wish to, you could easily add it to the config, the mootools-file is in the folder.

          Now you can use AjaxSearch, QuickEdit & Slimbox at the same time, using just one js-framework file in the header.

          maybe this is useful to someone (or maybe this doesn’t make sense at all smiley ), j

          www.kunane.com/modx/DR09-slimbox-mootools1.11-config.zip

          p.s. how can i attach files in forum-posts? is this funktion disabled, or am i missing something?
          *edit: okay, attaching files is disabled at the moment for security reasons...
            • 4414
            • 63 Posts
            Hi Metaller,

            I encountered a problem when resizing pictures: Some pics show an ugly black line on the left side after resize. This line is part of the resized picture as it is still visible when I download the pic.

            Any idea what might cause this problem?

            Best regards,

            Stefan

            Edit: This seems to be a problem of PHPThumb: http://www.webmasterworld.com/php/3851917.htm
            Is there anything I can do about it?
              • 4414
              • 63 Posts
              Hi Metaller,

              I get a php parse error on some of my pages that seems to be connected to DirectResize. This did not happen before, and I have no clue what it means. Hope you can me help out here:
              « 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: 	/var/www/modx-de/assets/plugins/directresize/directResize.php	 
                Line: 	546	 
                Line 546 source: 	$result = array_combine($match[1],$match[3]); 

              The parse error refers to this function in directResize.php:
              function _getSourceImgAttr()
              	{
              		preg_match_all("/(src|height|width|alt|title|class|valign|align|style|hspace|vspace|border)\s*=\s*(['\"])(.*?)\\2/i", $this->current["img_tag"], $match);
              
              		$result =  array_combine($match[1],$match[3]);
              
              		if ($result["style"])
              		{
              			preg_match_all("/(width|height)\s*:\s*([0-9]+)px/i", $result["style"], $match);
              			if (!empty($match[1])) $result_style =  array_combine($match[1],$match[2]);
              			if (is_array($result_style)) $result = array_merge($result, $result_style);
              		}
              		return $result;
              	}

              Best regards,

              Stefan

                • 4414
                • 63 Posts
                Hi Metaller,

                I realized the parse error mentioned above occurred after having added a new snippet to my template. When I took a closer look at it I realized it had some syntax errors. Once I removed the snippet, everything worked fine again.

                I apologize for "accusing" DirectResize of being the source of this parse error smiley

                Have a nice weekend!

                Stefan
                  • 4414
                  • 63 Posts
                  Hi Metaller,

                  Today I moved my modx installation to a live server. Everything went fine with the exception of DirectResize that I cannot get to work. phpthumb/cache and all of its subfolders are writable (777) and I copied image.php to the folder modx.
                  In your readme file you say image.php has to be placed in the root. However, I am not quite sure if you mean the root of the modx installation or the root of the server. On localhost I just copied image.php into the modx folder (/var/www/modx) and it worked fine, but on the server the paths are different. Therefore I am not quite sure where to put image.php. Hope you can help me.

                  These are the paths on my server:
                  MODX_BASE_PATH /is/htdocs/xxx/www/modx/
                  MODX_BASE_URL /

                  Thanks in advance for your help!

                  Best regards,

                  Stefan
                    • 19164
                    • 1,215 Posts
                    Hi, try to put it anywhere you can smiley

                    In fact, in all my projects modx was installed on server root and I don’t now how it will work in other cases.
                      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]
                      • 26931
                      • 2,314 Posts
                      In fact, in all my projects modx was installed on server root and I don’t now how it will work in other cases.

                      it works in subdirectories too smiley