News:

Looking for documentation? Take a look on our wiki

Main Menu

Question to developers, because I'm willing to help

Started by salobon, June 02, 2009, 03:45:16 AM

Previous topic - Next topic

salobon

There is one question that I have, because couldn't figure it out from the code after 3 days and nights of debugging and killing myself, pulling off all my hair ;D

I noticed that with PSHOP_IMG_RESIZE_ENABLE on (dynamic thumb resize ON) script creates thumb every time you enter product edit panel (of course only first time, but if you delete it though ftp it will be created again). I tried to track down the issue and it looks like file is created after last function in joomla:
echo JResponse::toString($mainframe->getCfg('gzip'));, I mean on return but before destruction of all variables and objects.
Have no Idea how it happens but if there is a guess from any of "core" guys, I could easily get it fixed because don't want to leave the thing unfinished while spending so much time on it.

So again, the question is: HOW thumb can be created (it literary it appearing in /resize folder) exactly after Joomla prints out the page to browser?
If you are willing to help, but I didn't expalin it right here, please ask any questions you might have...
thank you
Salobon

aravot

How image creation is handled seems buggy we haven't found a solution/looked deep into it.

example additional image thumbnail doesn't work with 'Dynamic image' disabled.

Need to test all thumbnail creation scenarios before looking for a fix, if you can help us it would be great

salobon

can you explain me the exact purpose of this feature?
I mean you can create thumbs even without it... right? when you upload full images t a product.
So why do we need this thing?
And what parts are using it?
If you know this of the top of your head then tell me, if not, I'll figure it out.

Salobon


salobon

You mean it won't make the thumb on server, only will resize picture on demand. Correct?
Isn't it too much for server to open 10-20 full images to create 10-20 thumbs on category browse page?
Or I didn't get it right?


salobon

Ok
I think I figured that out.
Just to clarify the answer to my previous question: the purpose of dynamic thumb creation as aravot have said is for those that don't want to do that manually or don't want to use a function that exists in product image upload tab...
My concern was that script would resize big images every time you load the page, but the truth is, it creates thumbs only once! after it checked that the one in folder is not the most recent thumb. So once script resizes that thumb, it will be loaded by browser directly from there on...
I'm working right now on correcting the double thumb creation and will post fix in bug-tracker.
Salobon

P.S. I noticed that soeren has added a script to "Try to delete the resized image if the original file is newer" which is awesome if someone tries to update images via ftp.