We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Sorry Perrine, though I pointed to that thread I gave it a flash look and it didn’t print in my brain that you already did that tongue

    Thanks for the pointer !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 19164
      • 1,215 Posts
      Incorrect parms count in
      if($uselightbox) $replace[0][$n] = preg_replace('/<img[^>]*alt=[\"\']([^\"\']*)[\"\'][^>]*src=[\"\']{0,1}([^\"\'\ >]*)[^>]*>/', $replace[0][$n]);
        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 Jul 24, 2007, 01:15 PM

        Incorrect parms count in
        if($uselightbox) $replace[0][$n] = preg_replace('/<img[^>]*alt=[\"\']([^\"\']*)[\"\'][^>]*src=[\"\']{0,1}([^\"\'\ >]*)[^>]*>/', $replace[0][$n]);


        replace it with this to get it work:

        if($uselightbox) $replace[0][$n] = preg_replace('/<img[^>]*alt=[\"\']([^\"\']*)[\"\'][^>]*src=[\"\']{0,1}([^\"\'\ >]*)[^>]*>/', '<a href="$2" rel="lightbox" title="$1">'.$replace[0][$n].'</a>', $replace[0][$n]);
        
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media

          • 11474
          • 1 Posts
          Hi! I’ve implemented the plugging, but when I enter the site, it throws an error.
          « MODx Parse Error »
          MODx encountered the following error while attempting to parse the requested resource:
          « PHP Parse Error »
           
          PHP error debug
            Error: 	Wrong parameter count for preg_replace()	 
            Error type/ Nr.: 	Warning - 2	 
            File: 	C:\AppServ\www\prueba\manager\includes\document.parser.class.inc.php(742) : eval()'d code	 
            Line: 	40


          - Place the assets/images/img.php script in your assets/images/ folder.
          - Copy the assets/plugins/imgResizer.php script into a new plugin.
          - put the plugging to fire on OnWebPagePrerender event.

          What am I doing wrong?

          Thanks in advantage!!!
            • 33002
            • 17 Posts
            Probably the wrong PHP version. If your server runs PHP5 try using PHP4 instead or vice versa. The call of preg_replace() is different in PHP5.
              ...whatever...
              • 7129
              • 3 Posts
              two issues:

              *) you should really point out that a OnWebPagePrerender event shoudl be used. I thought that something like that must be turned on and found only at the end of this thread wink this belong to the installation notes.

              *) on my page there are two images with same source but different width. first comes image in original size (200px) and then the same image in smaller width(100px). this plugin shows as original image the squeezed image with 200px width. in other words the 100px image is shown in width of 200px on place of the original image. If the two images have different source this problem does not occur.

                • 32645
                • 377 Posts
                Forgive me -- but how are you meant to use this?

                Let’s say:

                1. you have a Template Variable (TV) where the user picks out an image to attach to the page, and presses save.
                2. It auto-generates the thumbnail

                But ... how do you include the now thumbnailed template variable image into your page?

                This doesn’t work as it includes the full site path ...

                .thumb_[*tv_vehicle_picture*]
                


                Please answer this question - how do you include the thumbnailed version of an image via TV?
                  • 10313
                  • 375 Posts
                  Hohoho!

                  How can I prevent imgResizer to resize one given GIF? I have a logo (with the correct size already) with transparent background, and imgResizer (resp. the used imageing functions) switches transparent to black wich is not suitable in my case.

                  Any ideas very welcome smiley

                  Have a nice christmas everybody
                  Martin

                  PS: Just found DirectResize, I’ll test that.