Image manipulation for cpg1.5.x - Page 2 Image manipulation for cpg1.5.x - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Image manipulation for cpg1.5.x

Started by Timos-Welt, December 16, 2009, 02:23:34 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

François Keller

french lang file attached
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Timos-Welt

Thanks François!

v1.1 adds french localization and HTML docs

Joachim Müller

Added various improvements to version 1.3 of the plugin in the subversion repository.
Timo, please let me know what you think of my edits.
Cheers


Αndré

Version 1.3 doesn't display the status of the toggle buttons (they became red in earlier versions).

Timos-Welt

Settings on config page cannot be saved with v1.3.
Toggle button borders don't work anymore (Andre already said this).
The icon thing is really nice.

Timos-Welt

Quote from: Timos-Welt on January 08, 2010, 08:11:02 PM
Settings on config page cannot be saved with v1.3.

False alarm, this works as it should. One has to uninstall 1.2 first before installing 1.3.

V1.4 (see first post) fixes the toggle button issue.

Joachim Müller

Thanks for your feedback. I have added some more gimmicks; attached is v1.5, which features some more improvements including to toggle each control individually (this is what I wanted to achieve in the first place for my personal needs). This replaces the compatibility mode setting (which I found confusing in the first place). Anyway, in the end the compatibility mode sort-of survived: the proper JS lib is included depending on the admin's preferences and the visitor's browser.
During development of a plugin it's mandatory to uninstall, then perform the SVN checkout, then re-install.
Thanks for resolving the issues you brought up.

Timos-Welt

V1.5 is really nice.

We often assess the importance of keeping things as small as possible very differently (and in the end one reason for compatibility mode was to keep the JS files as small as possible). I am really glad that you kept it 'under the hood' - it saves 5,6 Kbyte of stuff to load.

V1.6 adds the missing icons for the LED sliders. Was a bit 'tricky' to make this work. ;-)

Timos-Welt


Αndré

v1.7 includes a bug ;) Instead of the sharpness image 'undefined' is displayed. See attachment.

Timos-Welt


Timos-Welt

Indeed bug. Will be fixed with 1.8.

Timos-Welt


Αndré

Okay works now (nice sword 8)).

You use <button>s as labels for the sliders. Nothing happens if you click on that buttons (neither in my local testbed nor in your online testbed). Will these buttons get a function in a future release? If not, I suggest not to use buttons, as people like me click madly on that buttons and wonder why nothing happens ;D

phill104

It is a mistake to think you can solve any major problems just with potatoes.

Timos-Welt

It must be buttons to make it work.

Αndré

That's not true. It works very well if you replace
function im_makeled(im_buttonstring,im_idstring,im_valstring,im_iconblub)
{
    var im_tempstr = '';
    if (im_buttonstring)
    {
        im_tempstr += '<button class="admin_menu" style="border:none;background-color:transparent;background-image:none;">'+im_buttonstring+' '+im_iconblub+' &#150; </button><span></span>';
        for(var im_i=-9;im_i<10;im_i++)
        {
            im_tempstr += '<a style="height:10px;border-bottom-width:1px;border-left-width:1px;border-top-width:1px;border-right-width:0px;border-style:solid;text-decoration:none;border-color:#222233;cursor:pointer" id="'+im_idstring+im_i+'" onclick="'+im_valstring+' = parseInt(this.id.substr(4)); im_setit();">&nbsp;</a>';
        }
        im_tempstr += '<a style="height:10px;border-width:1px;border-style:solid;text-decoration:none;border-color:#222233;cursor:pointer" id="'+im_idstring+'10" onclick="'+im_valstring+' = parseInt(this.id.substr(4)); im_setit();">&nbsp;</a>';
        im_tempstr += '<button class="admin_menu" style="border:none;background-color:transparent;background-image:none;"> + '+im_iconblub+' '+im_buttonstring+'</button><br />';
       
    }
    return im_tempstr;
}

with
function im_makeled(im_buttonstring,im_idstring,im_valstring,im_iconblub)
{
    var im_tempstr = '';
    if (im_buttonstring)
    {
        im_tempstr += '<span class="admin_menu" style="border:none;background-color:transparent;background-image:none;">'+im_buttonstring+' '+im_iconblub+' &#150; </span><span></span>';
        for(var im_i=-9;im_i<10;im_i++)
        {
            im_tempstr += '<a style="height:10px;border-bottom-width:1px;border-left-width:1px;border-top-width:1px;border-right-width:0px;border-style:solid;text-decoration:none;border-color:#222233;cursor:pointer" id="'+im_idstring+im_i+'" onclick="'+im_valstring+' = parseInt(this.id.substr(4)); im_setit();">&nbsp;</a>';
        }
        im_tempstr += '<a style="height:10px;border-width:1px;border-style:solid;text-decoration:none;border-color:#222233;cursor:pointer" id="'+im_idstring+'10" onclick="'+im_valstring+' = parseInt(this.id.substr(4)); im_setit();">&nbsp;</a>';
        im_tempstr += '<span class="admin_menu" style="border:none;background-color:transparent;background-image:none;"> + '+im_iconblub+' '+im_buttonstring+'</span><br />';
       
    }
    return im_tempstr;
}

Timos-Welt

Please test very carefully in all browsers. In some FF and Opera versions the effects havent been applied in one step but one after each other with screen redraws inbetween using span instead of buttons. That's as well the reason for the empty span tag. If your change works everywhere, feel free to commit it!

Αndré

#38
Quote from: Timos-Welt on January 14, 2010, 02:20:26 PM
In some FF and Opera versions the effects havent been applied in one step but one after each other with screen redraws inbetween
I can confirm that behavior, but cannot replicate it reliably. But it exists in the current version, too. I've tested it on my local testbed and my gallery. It seems that it occurs after a page reload (ctrl+shift+r in Firefox). Your online testbed currently returns a blank page, so I cannot test it there.

I'll try to investigate.


Edit: just tested at your production gallery. Problems also occurs there if I press ctrl+shift+r in Firefox.

Αndré

Okay here is what I found out using v1.8.

View an intermediate sized picture. Everything works fine.
Then (using Firefox) press ctrl+shift+r or ctrl+f5 (with that shortcuts you reload the page without loading data from the cache). Now the different effects will be applied after each other.
Now press f5 or call the page again. Everything works fine.

I cannot replicate that behavior in Chrome, as I don't know the correct shortcuts or the bug doesn't exist there.