Wow...
I was aware that the Smarty math functions had some performance concerns, but I didn't know they used eval....
Ok, this is actually coming from some really simple lines in the usergallery template files:
plugin_usergallery_imagedisplay.tpl:
Code: Select all
<img class="gallery_thumb" {if $plugin_usergallery_file.dimensions_width > 480}width="480px" height="{math equation="round((480/x) * y)" x=$plugin_usergallery_file.dimensions_width y=$plugin_usergallery_file.dimensions_height }px"{else}width="{$plugin_usergallery_file.dimensions_width}px" height="{$plugin_usergallery_file.dimensions_height}px"{/if}
plugin_usergallery.tpl:
Five lines; you can search for "math equation" to find them.
You can probably take a quick look through them and figure out which are unnecessary for your specific install. They are mostly to control image scaling and column control, I think.
The lines are all doing some really basic math stuff that I can probably push into php if I can get a little time. I'll try to do it over the next few days.
Thanks for pointing that out! I'll post when I get them updated.