DavidIQ / ReIMG

phpBB extension for resizing posted images on the client side using JavaScript and a selection of lightbox-style libraries.

Home Page:https://www.davidiq.com

Repository from Github https://github.comDavidIQ/ReIMGRepository from Github https://github.comDavidIQ/ReIMG

Add an "on mouse over" feature for Highslide JS or Litebox

DavidIQ opened this issue · comments

This is the basic implementation to be replaced with an actual config option.
In includes/functions.php:

     function reimg_properties()
     {
        global $config;
        return 'class="reimg" onload="reimg(this);" onerror="reimg(this);" ' . (($config['reimg_zoom'] == '_highslide') ? 'onmouseover="return hs.expand(this);" ' : '');
     }

In reimg_content.html:
After hs.lang.restoreTitle = "{LA_RESTORE_TITLE}";

     hs.Expander.prototype.onMouseOut = function (sender) {
        sender.close();
     };

It would be better to do in reimg.js
Instead of this:
if (typeof(img.addEventListener) != "undefined") // DOM
{
img.addEventListener("click", reimg_zoomIn, false);
}
else if (typeof(img.attachEvent) != "undefined") // MSIE
{
img.attachEvent("onclick", reimg_zoomIn);
}
this:
if (typeof(img.addEventListener) != "undefined") // DOM
{
img.addEventListener("click", reimg_zoomIn, false);
img.addEventListener("mouseover", reimg_zoomIn, false);
}
else if (typeof(img.attachEvent) != "undefined") // MSIE
{
img.attachEvent("onclick", reimg_zoomIn);
img.attachEvent("onmouseover", reimg_zoomIn);
}

Need to add a variable there to indicate it should add the listeners or not. The "onMouseOut" option needs to be researched a bit more as to placement.

I don't think I like this idea afterall. Closing.