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

    I have a website I've developed that I've installed the following 'DirectResize' plugin on.

    http://modx.com/extras/package/directresizerevo

    The site is built on MODx Revolution and was working perfectly with this module as I intended it too. However, the client has made a few slight alterations to one of the pages and a section of images on that page now enlarge when they are clicked on even though they shouldn't.

    Basically, the page in question has small thumbnails with associated companies logos on. When the logo is clicked, it used to take you to the associates website. Now when the logo is clicked, it tries to enlarge the image (which is doesn't succeed with as they are so small).

    The HTML looks exactly the same as the ones that don't resize, eg:

    <a href="http://www.associateswebsitehere.com" target="_blank"><img src="link/to/image/here.jpg" alt="description here" /></a>
    


    What I need to know is, is there a way that I can set this plugin to not work on certain images? Does anyone know what is involved in doing this or how I would get it to ignore resizing certain areas?

    Any help would be appreciated.

    Kind Regards
    Lewis
      • 11103
      • 5 Posts
      It works for all images that are in the image path folder (default: assets/images). One way to control what images get directresize treatment is to change this path to something like 'assets/images/directresize'. You can change this path in the DirectResize default properties panel.

      Now my issue is: I would like to have the direct resize script & css loaded only for pages that display images contained in this folder... Anyone have a solution for that? ; )
        • 34049
        • 28 Posts
        Hi, thanks for responding to the query, sorry I missed the original posting.

        As for setting it up so the script and css is only loaded on pages where there is an image is to be re-sized. I've added it as a feature request on github, https://github.com/apcherry/directresize/issues/6.

        I think it should be a fairly simple job but I can't promise anything for a week or so as I have a few other high priority jobs to get done. I've got a few other tweaks and fixes to upload so hopefully I might have something out this month.

        Regards

        Adrian Cherry
          • 11103
          • 5 Posts
          Awesome : ) Thanks
            • 34049
            • 28 Posts
            As usual other things got in the way, however I've just released version 1.3 of the DirectResize plugin, the main task was to only load the stylesheet and javascript on the pages where there was an image to resize. That's been done along with a few other tweaks.

            Detailed updates.


            • Fixed issue 6 : style sheets and javascript only added on the pages where there is an image to resize.
            • Fixed issue 5 : opacity calculation returns 0.80 not 0,80 for locales where the comma is used for the decimal separator.
            • prettyPhoto updated to version 3.1.4
            • tested with Revo 2.2.2-pl (issue 4)
            • Feature issue 2 : for highslide can now position the caption and long captions can be automatically placed in the righthand panel
            • Feature 1 : can now define a directory to exclude images from being resized.


            I hope this helps - again any issues then please let me know or log them on github
            https://github.com/apcherry/directresize

            Regards

            Adrian