Advanced search  

News:

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

Pages: 1 2 3 [4]   Go Down

Author Topic: Image manipulation for cpg1.5.x  (Read 50573 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Image manipulation for cpg1.5.x
« Reply #60 on: January 28, 2010, 05:21:53 pm »

Then use the cookie as a temporary storage: write the data you need to write to the cookie. On the next pageload, read the data from the cookie and write that to the database. You end up with "delayed" storage, but the result would be the same imo.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Image manipulation for cpg1.5.x
« Reply #61 on: January 28, 2010, 05:45:16 pm »

I probably won't, sorry. I am absolutely sure that my gallery will not come beyond 18,000 files in the next ten years, so I have time untill cpg 2.7.x I think (and I love JS, but I hate php/sql).  ;)

I'll add a remark to the docs that use of cookies should be turned off if there are PIDs in the gallery > 10,000 to make sure everything works fine. If anyone is interested => feel free, this is GPL!  ;D
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Image manipulation for cpg1.5.x
« Reply #62 on: January 28, 2010, 05:52:59 pm »

Then use the cookie as a temporary storage: write the data you need to write to the cookie. On the next pageload, read the data from the cookie and write that to the database. You end up with "delayed" storage, but the result would be the same imo.
The result is a different one, if the user closes the page after image manipulation.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Image manipulation for cpg1.5.x
« Reply #63 on: January 28, 2010, 10:10:42 pm »

Released v2.2.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Image manipulation for cpg1.5.x
« Reply #64 on: January 29, 2010, 07:33:40 am »

I'll add a remark to the docs that use of cookies should be turned off if there are PIDs in the gallery > 10,000 to make sure everything works fine.
You could even add a check to the install function in codebase.php for that number of images.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Image manipulation for cpg1.5.x
« Reply #65 on: January 29, 2010, 08:16:13 am »

I slept on it. I think it's better to make the number of cookies to be used configurable, merge all data to one array and save them in packets of 300 to the cookies. This way, the limit wouldn't be PIDs < 18000, but the visitor would have to actively change the settings of 6,000 images in the gallery before a problem might occur (if number of cookies is set to 20 which is very save). Further we'd have only the number of cookies we really need (in 99% of all cases 1) instead of 1 per 100 PIDs. And we could implement a FIFO mechanism, so if the visitor clicks on the buttons of the 6,001st pic, the oldest data would get deleted. Shouldn't be too much work, and I think it's very unlikely that a visitor really modifies the settings of more than 6000 images of a gallery.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Image manipulation for cpg1.5.x
« Reply #66 on: February 17, 2010, 02:04:53 pm »

Version 2.2 attached in initial post.

Changelog:
  • Removed buttons and sliders from documents
  • Apply plugin hook only if DISPLAYIMAGE_PHP is set
Logged

Chylly Kayza

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • trying to be gentle
    • Chylly Kayza
Re: Image manipulation for cpg1.5.x
« Reply #67 on: April 22, 2011, 01:49:19 am »

Hello,

first of all, very nice plugin!

I tried to add a break between the buttons for flip vert. and flip horiz. because it breaks the table on the page where the filmstrip sits.

Can anybody help?

Thanx in advance

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Image manipulation for cpg1.5.x
« Reply #68 on: April 26, 2011, 02:04:58 pm »

Open js/image_manipulation.js, find
Code: [Select]
im_btn.innerHTML += ' <button value="'+js_vars.im_strflipv+'" id="but_flipv" onclick="im_isflipv = (im_isflipv) ? 0 : 1; '+'im_setit();" class="button" style="cursor:pointer;margin-top:4px;" type="button">'+js_vars.im_icon_flipv+js_vars.im_strflipv+'</button>';and replace with
Code: [Select]
im_btn.innerHTML += ' <br /><button value="'+js_vars.im_strflipv+'" id="but_flipv" onclick="im_isflipv = (im_isflipv) ? 0 : 1; '+'im_setit();" class="button" style="cursor:pointer;margin-top:4px;" type="button">'+js_vars.im_icon_flipv+js_vars.im_strflipv+'</button>';
Logged

Chylly Kayza

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • trying to be gentle
    • Chylly Kayza
Re: Image manipulation for cpg1.5.x
« Reply #69 on: April 26, 2011, 02:20:18 pm »

Thank you...it works!
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Image manipulation for cpg1.5.x
« Reply #70 on: July 11, 2011, 11:19:19 am »

I have attached a new version (2.3) to the first posting of this thread.

New:
Support for IE 9 in standards mode  - no more limitations in the newest Internet Explorer, because it finally supports the canvas browser element that is needed to make all features (contrast, saturation, sharpness, sepia) work. Please give me a feedback if it works like expected. For older IE versions there should be no difference.
Logged
Pages: 1 2 3 [4]   Go Up
 

Page created in 0.017 seconds with 21 queries.