@KK,
I have many places where I need to fetch only securefile editable from a page with many other editables. Optimizing my current setup, I feel like using skip_custom_fields parameter for cms:pages, to save some seconds of page load and keep ability of using securefile.
I see that it's complicated to make an exception for cms:pages in Couch code, because securefile is a custom field. But I can't evaluate complexity of adding masterpage and page parameters to show_securefile tag.
Since there are no such parameters now, I would use php code to complete my task. I have managed to get encoded value of securefile field directly with cms:get_custom_field. It gives me a string like this:
So, above string includes base64-encoded values. Could you help with some piece of php code to correctly decode this into readable state? I would use my existing solution to get the filename as in here viewtopic.php?f=2&t=10417
Or, better, maybe there are some internal Couch-functions, that could be called somehow to decode the above and set in context regular variables of securefile?
It would really improve some heavy pages. I have used all other available tweaks and only this one is left.
I have many places where I need to fetch only securefile editable from a page with many other editables. Optimizing my current setup, I feel like using skip_custom_fields parameter for cms:pages, to save some seconds of page load and keep ability of using securefile.
I see that it's complicated to make an exception for cms:pages in Couch code, because securefile is a custom field. But I can't evaluate complexity of adding masterpage and page parameters to show_securefile tag.
Since there are no such parameters now, I would use php code to complete my task. I have managed to get encoded value of securefile field directly with cms:get_custom_field. It gives me a string like this:
a:4:{s:7:"file_id";s:4:"MTcy";s:9:"file_name";s:12:"bG9nby5wbmc=";s:8:"file_ext";s:4:"cG5n";s:9:"file_size";s:8:"NTMyNw==";}
So, above string includes base64-encoded values. Could you help with some piece of php code to correctly decode this into readable state? I would use my existing solution to get the filename as in here viewtopic.php?f=2&t=10417
Or, better, maybe there are some internal Couch-functions, that could be called somehow to decode the above and set in context regular variables of securefile?
It would really improve some heavy pages. I have used all other available tweaks and only this one is left.