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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 1 Guest are viewing this topic.

Joachim Müller

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.

Timos-Welt

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

Αndré

Quote from: Joachim Müller 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.
The result is a different one, if the user closes the page after image manipulation.

Timos-Welt


Joachim Müller

Quote from: Timos-Welt on January 28, 2010, 05:45:16 PM
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.

Timos-Welt

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.

Αndré

Version 2.2 attached in initial post.

Changelog:

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

Chylly Kayza

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


Αndré

Open js/image_manipulation.js, find
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
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>';

Chylly Kayza


Timos-Welt

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.