JS conflict

Hello,

Is it possible to load a plug-in everywhere except the slideshow page ?
It seems that a js file conflict with my own js function.

Comments

  • acrylian Administrator, Developer
    Yes, you can check via the global `$_zp_gallery_page` on what page you are generally.
  • Ok, but I need to modify the plug-in ?
  • fretzl Administrator, Developer
    No need to modify plugins.
    Which plugin are you referring to ?
    Is the `slideshow.php` plugin enabled or not ?
    Are you trying to run your own slideshow script ?

    ...as much info as possible please ;-)
  • acrylian Administrator, Developer
    If you want to exclude loading your script on a specific page you have to modify where you load it to included a check for the page. Where that is only you know as you haven't told if it is a custom plugin or the theme (which) itself loads it.
  • As the slideshow plugin does not yet support zp_picturefill, I've created my own slideshow plug-in. I have a JS function for substitute x1 or x2 picture but there is a conflict with picturefill.
    Actually, I don't load any ZP js files (in theme-head) and load my js in theme-body.
    I just wand to "unload" zp_picturefill in the slideshow.php page.

    And yes, the slideshow.php plugin is enabled (for the slideshowlink function).

    Sorry for the delay in response, there are lot's of photos to do these days...
  • acrylian Administrator, Developer
    The cycle/cycle2 script lets you create slideshows for any HTML element it is possible to use picturefill as well. Of course JS within JS is always a bit complicated at time with rebinding. It may take time until it will support zp_picturefill at all being no included plugin. We'll see.

    You can remove functions attached to filters using `zp_remove_filter` (zp-core/functions-filter.php)

    It is generally not recommended to disable the theme_head filter loading plugins uses it and it also includes the main jQuery file Zenphoto uses for everything. The slideshow.php page is separate so you can disable loading there of course.
  • >> You can remove functions attached to filters using zp_remove_filter (zp-core/functions-filter.php)

    So I just need to use in the slideshow.php page ?

    `
    zp_apply_filter('theme_head')
    zp_remove_filter('theme_head', 'picturefilljs');
    `
  • acrylian Administrator, Developer
    Yes, that should work but you should remove the filter before it is used ;)
Sign In or Register to comment.