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

    I recently discovered some weird behaviour of my installation of DirectResize plugin v0.9.0 rev 2.

    Here’s my config:

    $dr_global["path"] = "
    assets/images/
    ";
    
    $dr_local["bind_config_to_css_selector"]["big"] = "img.big";
    $dr_local["thumb_resize_method"] = 3;
    
    $dr_local["tpl_thumb"]["all"] = <<<HTML
    [+dr.shortcut.source2thumb+]
    HTML;
    
    $dr_local["tpl_lightbox"]["all"] = <<<HTML
    	[+dr.shortcut.tpl_thumb+]
    HTML;
    
    $dr_local["tpl_lightbox"]["big"] = <<<HTML
    <a href="[+dr.big.src+]" title="[+dr.source.title+]" class="fancybox">
    	[+dr.shortcut.tpl_thumb+]
    </a>
    HTML;
    


    On frontend, everything works as expected. In backend, TinyMCE shows the string "drcss_big" in the title field of the imageadv-plugin. If the title field already has a value, "drcss_big" is concatenated at the end of the existing title. This behaviour is quite, um let’s say "annoying" to the editor people.

    I suppose the following lines in directResize.php to be responsible for this:
    foreach($this->drconfig["bind_config_to_css_selector"] as $cname => $path)
    {
        foreach($html->find($path) as $img_tag)
        if ($path) $img_tag->attr["title"] = $img_tag->attr["title"] ? $img_tag->attr["title"]." drcss_".$cname : "drcss_".$cname;
    }
    


    Any hints to repair this?
    TIA