![]() |
|
How to use a custom zp_apply_filter('theme_head') - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: How to use a custom zp_apply_filter('theme_head') (/thread-9532.html) |
How to use a custom zp_apply_filter('theme_head') - tunafish - 2012-02-05 Ok I am optimizing my website.. How can I change I guess I have to use a custom Question is.. where should I do this. Also would like to know if this is a good idea after all. I guess ZP guarantees compability with the install and the current version, so updating ZP and it might not work with the Jquery version if I forget to update? How to use a custom zp_apply_filter('theme_head') - acrylian - 2012-02-05 First, the jQuery we ship is the one that we test all jQuery dependent official plugins with (we use it on the backend as well). So if you choose to load always the latest some things might not work. We once upgrade to fast which especially on the backend broke a lot of things as the plugins used had not been updated. Once we even had to search for a new solution at all. But that was primarily backend. While required on the backend it is not directly on a theme besides some plugins. Actually there is no way to disable loading of jQuery on the theme unless you remove the theme_head filter. If you do you might also loose other functionality as all extra scripts and other stuff are loaded via that (the backend is of course not affected). But otherwise you would load jQuery double. I doubt that that single jquery file really causes load times issues as it is cached by the browser anyway. I know placing stuff on several hosts is a recommendation for site speed up but actually it is alway external servers like ads, embedded vides and such that seem to slow down sites. How to use a custom zp_apply_filter('theme_head') - tunafish - 2012-02-05 Yeah I thought so, I leave it up to ZP. How to use a custom zp_apply_filter('theme_head') - acrylian - 2012-02-05 Those 100kb will have to be loaded no matter from where...;-) The reason it is recommend to put parts of a site on high traffic sites is that browser have a limit of http request per domain/server (as you probably know) you can exceed that way. I however have sent sbilliard a mail to discuss an option to not load the base jQuery stuff optionally (so theme authors can choose if they really need to). So maybe we add that some time. How to use a custom zp_apply_filter('theme_head') - sbillard - 2012-02-05 You should look at http://www.zenphoto.org/news/headConsolidator. You could modify it to substitute your jQuery load for Zenphoto's. Of cousre all the caviats that acrylian mentioned still apply. How to use a custom zp_apply_filter('theme_head') - tunafish - 2012-02-06 Sweet! I'll check it out, thanks sbillard! |