Hi
Currently, I try to adapt my theme to zenphoto 1.4.5.
But I have a serious trouble : gallefiffic script doesn't work anymore.
I have tested too with zpGalleriffic of gjr and the problem is the same.
any idea, where the problem could be ?
for me, it's a critical issue (2 themes couldn't be upgrade to 1.4.5 release)
The galleriffic script probably is not compatible with the latest jQuery we use on 1.4.5.
THe http://www.twospy.com/galleriffic/ says still compatible with jQuery 1.3.2. Looking at the linked Google code repo on that site the last update was in 2009! It was likely to happen some time since ZP 1.4.5 has 1.9.1 on board.
Try if this one helps:
http://blog.jquery.com/2013/02/16/jquery-migrate-1-1-1-released/
We use that with the jCarousel plugin which is also not compatible otherwise.
This migrate plugin will be in included in next release of zenphoto ?
The suggested method of including it is to include the following where in your scripts where needed (see acrylian's link for details):
``
jcarousel_thumb_nav.php is the only Zenphoto script (we know of) that requires the migration. It outputs this from its theme_head filter. We are working on a replacement for this plugin, since it seems not to be being updated. But the replacement is not likely to be ready for 1.4.5.
With jcaroussel you add migrate plugin by theme_head filter ?
I will have a look on it .
Maybe we should make the migrate plugin a simple plugin of its own so no one needs to include it twice?
The replacement will be this one: https://github.com/zenphoto/zenphoto/issues/349
Since it is the successor of the script of our slideshow as well it might take over both the slideshow plugin and the jCarousel one and provide options what to use. It can even use both combine for example the image page (similar like galleriffic) Otherwise we would have to work with plugins being dependent on others.
Sadly time issue kept me to start on it in time.
They just released an update of the migrate plugin:
http://blog.jquery.com/2013/05/08/jquery-migrate-1-2-1-released/
Probably we should not make this a plugin. It is not needed in general and should be loaded only where there are js scripts that require it. Thus the decision is with the useage.
We have no need to follow updates as the one we load does make our script work. However for other scripts that may be different.
But in that case jcarousel should not load it by itself, shouldn't it? jCarousel is normally used on the image.php page. What if someone has other scripts that require it and loads it in the theme. He would load it two times as we have no official way to prevent that (besides the consolidator plugin which is optional and probably not really known)
Thus the idea of a plugin.
I installed the migrate plugin and galleriffic works again.
Thanks for the tip.
I agree with the remark of acrylian: there should be a plugin that allows you to load the jquery migrate script.
otherwise, there are risks to load the script several times (for example, via the jcaroussel plugin and theme via zpArdoise).
with that, each tool (plugin, theme) which need of the script can activate the plugin.
considers that zpArdoise theme is distributed, and it needs migrate script, but I do not have a lot of means to verify that the migration script is already loaded or not, and avoid several loading of script.
I may do a test to see if the jcaroussel plugin is enabled or not, but it's really not very clean.
This migration code is nothing to do with Zenphoto in general, it is maybe required if a theme is using scripts that have not been updated to the current requirements of jQuery. A normal user will have no clue that the migration script is required so will not enable a plugin if it existed.
Only the theme developer will know that the migration is required so must deal with getting the script loaded (be it plugin or simply the one line of code that is required.)
A plugin is simply overkill for one line of code that only the theme developer knows is needed.
of course I agree, add the jquery migrate script in my theme is very easy to do.
BUT, what can happen with several loading of this script (loaded by jcarroussel plugin and by zpArdoise) ?
could be some js conflict ?
if script should loaded once, one way is to have a plugin to add the line in the header, and everything needs the script uses plugin (I do that with colorbox with my theme : whatever this plugin is allowed or not, I enable it in themeoptions)
That is actually my point. Even if there are no conflicts you are loading one file unnecessarily.
Since we have no js/css registering like WP has, there is no except this optional (unsupported) plugin does mimic that registering:
https://github.com/zenphoto/Unsupported/tree/master/plugins/headConsolidator