setOption() non-persistent working correctly?

Hi,

I am making a theme that I would like to set non-persistent theme options required by the layout. This seems to be working for me except the following option:

setOption('thumb_size',160,false)

If thumb size is set to something different in the options, it takes that setting not this setOption. It seems this option (thumb_size) is the only one not working for me (non-persistently), I have set other non-persistent options successfully. If I set to true (persistent), it does make the change in the database and works, but I prefer to not change the user setting permanently.

I am using 1.2.6 on a local setup so sorry i cannot provide a link....

Comments

  • Because of the way images are processed, Non persistent options do not work. This is because the actual script creating the image is i.php which runs separately from your theme. Thus the non persistent option has reverted by the time it runs.

    We recognized this as an issue and have changed things in the current development build (nightly build) so that the processing of these options is handled at theme time and passed to i.php. Please try the nightly build to correct this problem.
  • acrylian Administrator, Developer
    You could also achieve this by using the image functions directly for different sizes.
  • Thanks guys - makes sense, I will try the nightly...

    I do use printCustom functions a lot, I was just trying to maintain the ability for the user to cache the images via the backend. This only caches the default thumb and default full, correct? It would be great if somehow the user could cache the printCustom images...:)

    Duh - as I was reading this I realized it wouldn't matter anyway since it is not persistent....
  • acrylian Administrator, Developer
    You actually don't need to precache as it is always done if needed once anyway. See the troubleshooting, there is a diagram about that.
  • But to answer your question, any image generated by Zenphoto will also be cached.
Sign In or Register to comment.