We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4610
    • 24 Posts
    Please forgive my stupidity here as I’m new to modx but I’m going to be using shadowbox on the front end of a site i’m currently developing for a client.

    I want my client to be able to upload a thumbnail and a full size image and to insert the thumbnail into the page using the tinyMCE editor. I eventually want to end up with HTML ike this

    <a id="247_pic" href="images/247glass_large.jpg">
        <img src="images/247glass_small.jpg" alt="247 Glass Control Screenshot" />
    </a>


    Inserting the thumbnail is no problem using tinyMCE but trying to surround the img tage with an anchor tag who’s href attribute is the larger image is baffling me. Clicking on the image a pressing "insert/edit link" doesn’t work because the editor window that comes up won’t let me select an image as the link destination. I also don’t want my client to have to type in the HTML themselves.

    There must be a solution?

      • 26931
      • 2,314 Posts
      Hi there,

      Direct Resize will make inserting images with a lightbox veryvery easy! -> http://modxcms.com/forums/index.php/topic,19236
      you can configure it to use Shadowbox

      j
        • 4610
        • 24 Posts
        Thanks for that smiley

        The thing is though, there’s no problem with creating thumbnails separately and all I really want to know is why won’t modx allow me to turn an image into a link to another image. That is simply all that is required to achieve the HTML in my first post and make shadowbox work. No need for additional plugins complicating matters.
          • 26931
          • 2,314 Posts
          okay, i know what you mean...

          when i insert an image and want to link it to a bigger image, i’m just able to browse the "assets/files" folder ... a solution is provided in this thread -> http://modxcms.com/forums/index.php?topic=13450.0

          hope that helps, j
            • 4610
            • 24 Posts
            Thats absolutely brilliant thanks. Working perfectly now.

            I’m utterly baffled though as to why something as simple and everyday required as that requires hacking the modx code to achieve. Is it a bug?
              • 26931
              • 2,314 Posts
              good it works now, yeah i guess it shouldn’t be like that...

              well, it’s not really hacking MODx, since TinyMCE & MCPUK are not MODx but a plugin for a third party software

              j
                • 26931
                • 2,314 Posts
                ...made a new thread in the "MCPuck File Browser" part of the forum

                -> http://modxcms.com/forums/index.php/topic,37896.msg228659.html
                  • 4610
                  • 24 Posts
                  Quote from: sharkbait at Jul 21, 2009, 11:39 AM


                  well, it’s not really hacking MODx, since TinyMCE & MCPUK are not MODx but a plugin for a third party software

                  j

                  Ah right, of course. I didn’t really look to see what I was editing, was in such a hurry. Thanks again.