WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN-ImageFlow] onClick Option Does Not Work (8 posts)

  1. atlohi
    Member
    Posted 3 years ago #

    I cannot get the onClick functionality to work at all. This is apparently related to a problem with the way the domReady script is processing the options stored in the database, with the backslashes not being stripped. The option to use Highslide, for instance, results in the following code:

    domReady(function() {
    var instance1 = new ImageFlow();
    instance1.init({
    ImageFlowID:'ImageFlow_1'
    imagesHeight: 0.50
    onClick: 'function() { return hs.expand(this,{ src: this.getAttribute(\'longdesc\')})};'
    opacity: true
    reflections: false
    reflectionGET: '&bgc=ffffff'

    The problem seems to be in the (\'longdesc\'). In any case when the images are clicked on, nothing at all happens. My limited knowledge of Javascript just isn't up to solving this issue right now. I'd like to use the plugin, but I want my visitors to be able to click on the pictures.

    http://wordpress.org/extend/plugins/nextgen-imageflow/

  2. phazei
    Member
    Posted 3 years ago #

    same issue here

  3. phazei
    Member
    Posted 3 years ago #

    Actually, the issue is the quotes around:
    onClick: 'function() {}'

    it should be

    onClick: function() {}

  4. dmanskiman
    Member
    Posted 3 years ago #

    I have the same problem! I think the extra quotes are screwing up the reflection background color variable as well, because it's displaying the default black even though I specified ffffff in the setup screen. I really would like to use this version of this plugin, because it supports displaying images based on a nextgen gallery tag. The ShabuShabu is starting to charge money to use their forums, so does anybody have anyother suggestions?

  5. dizarter
    Member
    Posted 3 years ago #

    For all the people still having trouble with this, here is the solution that worked for me. This is how I managed to get ImageFlow working with HighSlide onClick.

    Open /wp-content/plugins/nextgen-imageflow/admin/install.php

    Change line 16 with this

    $ngg_if_options['ngg_if_onClick'] = "function() { return hs.expand(this,{ src: this.getAttribute('longdesc')}); }";

    Open /wp-content/plugins/nextgen-imageflow/lib/functions.php

    Change line 94 with this
    $out .= "\n\t\t\t".', onClick: '. $ngg_if_options['ngg_if_onClick'] .'';

    Now go to ImageFlow admin pages, click on "Setup" and then on "Reset settings".

    Now when you go back to General Settings OnClick behaviour should read

    function() { return hs.expand(this,{ src: this.getAttribute('longdesc')}); }

    which is correct (no extra \)

    Hope that helps!

  6. lefgozerdesign
    Member
    Posted 3 years ago #

    he dizarter

    can you help me out with this?

  7. tengard
    Member
    Posted 3 years ago #

    Just replace line 94 of wp-content/plugins/nextgen-imageflow/lib/functions.php with:

    $out .= "\n\t\t\t" . ', onClick: function() { return hs.expand(this,{ src: this.getAttribute(' . '\'longdesc\'' . ')});}';

    Then set the 'onClick Behavior' setting of ImageFlow General Settings to a value of 'other'. ( You can use any text, other then the default of 'function() { document.location = this.url; }')

    Should be all you need. It worked for me.

  8. lefgozerdesign
    Member
    Posted 3 years ago #

    he tengard can you help me out i donĀ“t get it, may you have it ready and working an you can post it?

Topic Closed

This topic has been closed to new replies.

About this Topic