Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter TiKu

    (@tiku)

    I’ve implemented some Javascript that fixes the links after the site has loaded. So the sample from above isn’t a sample anymore. But I hope my description is enough to understand the problem.

    Regards
    TiKu

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – Thanks for the update, it would seem you sorted out the conflict with the other plugin. If you would care to share your “fix” as a Gist, pastebin, CloudUp, etc. we would be happy to review it.

    Thanks, again!

    – Cais.

    Thread Starter TiKu

    (@tiku)

    Well, it is a hack using JavaScript:

    jQuery(document).ready(function() {
    	var l = window.location.href.toLowerCase().indexOf('/subpage-');
    	if(l > -1) {
    		var base = window.location.href.substr(0, window.location.href.toLowerCase().indexOf('/', l + 1));
    		fix_navigation_links(base, false);
    	}
    });
    
    function fix_navigation_links(base_url, wait_for_elements) {
    	if(wait_for_elements && jQuery(".ngg-navigation > a[href*='/nggallery/page/']:not('.ngg-link-fixed')").length == 0) {
    		setTimeout(function() {
    			fix_navigation_links(base_url, true);
    		}, 100);
    	} else {
    		jQuery(".ngg-navigation > a[href*='/nggallery/page/']:not('.ngg-link-fixed')").each(function() {
    			var l = this.href.toLowerCase().indexOf('/nggallery/page/');
    			if(l >= 0) {
    				this.href = base_url + this.href.substr(l);
    				jQuery(this).addClass('ngg-link-fixed');
    			}
    		}).click(function() {
    			fix_navigation_links(base_url, true);
    		});
    	}
    }

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – Thanks for sharing it all the same. I’ll make a note for our developers to review it.

    – Cais.

    Thread Starter TiKu

    (@tiku)

    Cais, I noticed you did set this issue to “resolved”. In my opinion it is not really resolved. My Javascript hack is just this: a HACK. I would prefer a proper solution.

    Regards
    TiKu

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – The “hack” as you refer to it does resolve the issue you are having … and could be the best go forward method for you to continue to use.

    You are solving a specific conflict with a plugin that is not as widely used as ours. This in no way means anything more than our respective user bases may require attention in more pressing areas. It may even be prudent to suggest the Multipage author consider adding your code to their plugin.

    – Cais.

    Thread Starter TiKu

    (@tiku)

    Cais, the issue is not a classical incompatibility problem where you could argue that the other plugin is rarely used. NextGEN obviously ignores existing URL parameters. Don’t you agree that this is a bug in NextGEN?
    I developed a hack to make my website usable again. But I did not solve the bug in NextGEN. My hack only reduces the priority of a real fix. I understand that other issues might be more important. That’s okay for me. But I don’t consider the problem as resolved.

    The Multipage plugin does nothing wrong, so no need to ask them to include a hack for working around a NextGEN bug.

    Regards
    TiKu

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – It was only a suggestion to share your findings with the other plugin author … WordPress is an ever growing ecosystem and the code bases used by all of its various plugins (and themes) are almost always in flux.

    This topic has been flagged for our developers to review, I am just suggesting it would not hurt for the Multipage author(s) to review it as well.

    – Cais.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Conflicts with Multipage plugin’ is closed to new replies.