We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17162
    • 27 Posts
    Metaller, it doesn’t matter. I don’t have problems with DirectResize. Actually I LOVE it! grin

    Thanks,
    Lina
      • 30100
      • 58 Posts
      Is it possible to add some code that deletes the old <a> tags when you reedit a page with <img> tags. Now if I reedit a page and changes the size of a image the old thumb becomes the original image and a new tumb is created for the old tumb. Allso if I delete an image from TinyMCE the <a> tags is not cleaned up but remains until I delete them from the html code. Would be two greate futures.

      I would create a plugin that does those things when the editor is initialized, I guess it would be OnRichTextEditorInit, if I knew how...

      Is there some documentation on plugin creation?

      Thanks for an otherwise excellent plugin!
        • 19164
        • 1,215 Posts
        You can take any of plugin as example and try to make your own.
          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]
          • 33719
          • 33 Posts
          Hi,

          Thanks for this nice plugin.

          I have 3 problems :
          1 - it works fine if i don’t check event ’OnDocFormPrerender’ (because if i do, the image is not when i reedit the content, save, then reedit the document).
          But that’s not very important because unchecking OnDocFormPrerender resolved the prob.

          2 - (the real problem), all the alt artributs are lost (did not appear on the front size, but still here in manager)

          3 - title attribut get truncated after a
          '
          (simple quote)



          -------------------------------------------------- Edit ------------------------------------------------------------v

          Prob 3 is ok, i changed lines 582, 586, 587 on directResize;php
          		foreach ($HTMLattr as $attr_k => $attr_v)
          		{
          			preg_match("/(".$attr_v.") *= *[\"][^\"]*[\"]/",$tpl,$array);// preg_match("/(".$attr_v.") *= *[\"|'][^\"']*[\"']/",$tpl,$array);	
          			if (!empty($array[0]))
          			{
          				$tmp = eregi_replace($attr_k." *= *[\"]","",$array[0]); // $tmp = eregi_replace($attr_k." *= *[\"|']","",$array[0]); 
          				$tmp = eregi_replace("[\"]*","",$tmp); // $tmp = eregi_replace("[\"']*","",$tmp);
          				$tpldata[$attr_k] = trim($tmp);
          				
          			}
          		}
          
            • 19164
            • 1,215 Posts
            I check it and alt attribute is present on the front. What is your config template?
              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]
              • 33719
              • 33 Posts
              yeah, ok, thanks for the tip, i understand more how it works now .

              in configs/slimbox.config.php
              $tpl = <<<HTML
              <a href="[+dr.bigPath+]" rel="lightbox" title="[+dr.title+]">
              	<img src="[+dr.thumbPath+]" width="[+dr.thumbWidth+]" height="[+dr.thumbHeight+]" alt="[+dr.alt+]"/>
              </a>
              HTML;

              there was no alt defined, i added it.
                • 21026
                • 53 Posts
                Hi there!

                I have trouble using DirectResize. I have phx placeholder in the img tag, and when i save the doc, the "+" are erased.
                here is my code:
                <img src="[+phx:tv=`[*parent*]?photo_equipe`+]" class="drlightbox" width="400" height="300"  />
                


                it’s become that after saving the doc
                <img src="[ phx:tv=`[*parent*]?photo_equipe` ]" class="drlightbox" width="400" height="300"  />
                


                Am i doing something wrong, or is it a bug huh
                  • 19164
                  • 1,215 Posts
                  Yes, it’s a bug thats already fixed in new version.

                  In \assets\plugins\directresize\directResize.php delete this line

                  799 $lien_img = urldecode($lien_img);

                    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]
                    • 21026
                    • 53 Posts
                    Thanks a lot Metaller,

                    It works perfectly!!! grin
                      • 27680
                      • 23 Posts
                      Hi all,

                      I’m using DirectResize (which is truly fantastic!), and I’m using HighSlide to display images and their enlargements.

                      Can anyone advise me how I display a title/caption for the small thumbnail image, and also how I can display the same information on the enlargement?

                      Thanks in advance for your time and help.

                      Cheers