Member
Member
protum   2008-05-20, 01:42
#1

I love being able to size images and thumbs by height with printCustomSizedImageMaxHeight and with the other custom functions, but would really love to be able to precache my albums, sizing from height. Can you think of any modifications to the code I could make to be able to do that, or to change the "Image Size" field in the administration to dictate a max height which would then dictate the precaching?

I'll try to do this myself, but maybe someone more familiar with the code has some shortcuts?

Thanks

Member
Member
protum   2008-05-20, 02:33
#2

Well I've poked around some, and the quick way to do this would be to replace the getimagethumb() and getdefaultsizedimage() in cache-images.php with the custom size functions for each. Then using the same custom functions with the same parameters in album.php and image.php and they would benefit from the pre-cache, i think.....hope....

Hard way: make some checkboxes in the theme options section that say "size by height?", store these in some new fields in the db, throw some conditionals into the getdefaultsizedimage functions etc, make i.php obey and probably 100 other things im not considering and voila...but yeah consider this a feature request :-)

Administrator
Administrator
acrylian   2008-05-20, 08:17
#3

If you use customsizeimage function and you visit the site, the images are cached. Indeed there is no way for customsizedimage functions to do that within the admin.

Just to add: printCustomSizedImageMaxHeight is currently being reworked (and will be probably deprecated in the next version) and I have plans to incorporate that functionality somehow into the defaultimage behaviour, so that you can set width and height for sized images via the admin.

Member
Member
protum   2008-05-20, 13:42
#4

i know images are cached if you visit the page the images are on, but if a lot of galleries with large images are uploaded i want to be able precache (by height) so the user doesnt have to wait a while for images to be processed and load if not cached...

well, good to hear it's already in the works, thanks for the reply...

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.