• Resolved LoreGI13

    (@loregi13)


    Hi,
    I have this issue: I updated the NextGEN Gallery by Photocrati from Versione 2.0.66.37 to actual 2.0.74, but having problems with my simple viewer gallery: suddenly all SimpleViewer gallery disappeared.
    I have a lot of gallery in my website so, once restored the previous version of database, I decided to cancel the NextGEN Gallery plug-in in order to avoid having a plug-in in conflict with simple viewer.
    Problem is: even if I cancel NextGEN Gallery , Simple Viewer galleries disappears! (I tried first to de-activate the NextGEN Gallery and cancel plug-in from WP Admin panel , and then removing the folder from ftp)…
    I don’t know what to do I would prefer not to have a plug-in I cannot update …
    Does it make any sense to you?

    http://goo.gl/8eEDyC

    Thank-you
    Lorenza

    https://wordpress.org/plugins/wp-simpleviewer/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Steven

    (@steven-speirs)

    There are no known incompatibilities between WP-SimpleViewer and NextGEN Gallery. Just to double-check, I have installed and activated both WP-SimpleViewer v2.3.2.4 and NextGEN Gallery v2.0.74 (the latest versions of both plugins) and have been able to successfully create and view a couple of SimpleViewer galleries (sourced by the WordPress Media Library and a NextGEN Gallery).

    I have also found pages with SimpleViewer galleries on your web site (such as in your ‘micam-2’ directory) and they seem to display and function fine so it looks like you might have already solved your problem. If not, then try clearing your browser’s cache before reloading your web site to see if this makes a difference.

    Try temporarily reverting to a default WordPress theme (such as TwentyFourteen) to see if this helps.
    Also, to check if there is a conflict with another one of your plugins, try deactivating all your plugins (other that WP-SimpleViewer) and reactivate them one-by-one (checking the WP-SimpleViewer functionality each time) until you find the source of the conflict.

    I hope this helps.

    Thread Starter LoreGI13

    (@loregi13)

    Hi Steven thank-you for your check: it is a problem that appears with the theme I was using:
    I tried with my child theme and then with the official Responsive ChyberChimps Theme and with all the plug-in deactivated, except from Nextgen and SimpleViewer: there is the problem the galleries disappeared.
    Using the theme Twenty Fourteen there is no problem.
    I will try to solve.
    Thank-you
    Lorenza

    Thread Starter LoreGI13

    (@loregi13)

    I mark as solved and will ask in Cyber Chimps forum

    Steven

    (@steven-speirs)

    Thank you for the additional information.

    I have downloaded the free CyberChimps free Responsive v1.9.7.6 theme and notice that it includes the jQuery FitVids JavaScript functionality (within the theme’s ‘responsive/core/js/responsive-scripts.min.js’ file).

    This JavaScript functionality is designed to resize videos. However, it looks like FitVids sees the ‘simpleviewer.swf’ file (embedded internally using an <object> tag) as a video, fails to determine the correct aspect ratio and wraps the <object> tag in a parent container with a large CSS padding-top value pushing the gallery images down the container and out of view.

    If you do not have any videos in your WordPress site, then you could prevent the loading of FitVids by editing your theme’s ‘responsive/core/js/responsive-scripts.min.js’ file in a plain text editor and removing the FitVids section (search for ‘FitVids’ and you should find the relevant section).

    It looks like the order in which the ‘responsive-scripts.min.js’ and ‘simpleviewer.js’ files are loaded into the web page may also make a difference.
    In WP-SimpleViewer v2.4.2.4, try opening the ‘wp-simpleviewer/wp-simpleviewer.php’ file in a plain text editor and replace the shortcode_check function (lines 153 to 169 inclusive) with the following:

    /**
     * Shortcode check
     *
     * @param array posts
     * @return array posts
     */
    function shortcode_check($posts) {
        if (!empty($posts) && !is_search() && !$this->required_core) {
            foreach ($posts as $post) {
                if (preg_match('/\[simpleviewer.*?gallery_id="[1-9][0-9]*".*?\]/i', $post->post_content)) {
                    $this->required_core = true;
                    add_action('wp_enqueue_scripts', array(&$this, 'add_scripts_wp_core'));
                    break;
                }
            }
        }
        return $posts;
    }

    I do not know if SimpleViewer can be made to prevent this from happening but I have notified the developers of this problem.

    I hope this helps.

    Thread Starter LoreGI13

    (@loregi13)

    Thank-you, I think it will be useful, and I’ve open a thread describing the issue.
    Lorenza

    Thread Starter LoreGI13

    (@loregi13)

    I tried to put the code you suggested to me
    /**
    * Shortcode check
    *
    * @param array posts
    * @return array posts
    */
    but something broke the whole theme : I hade to face a white page on admin wordpress panel and on the whole website…
    now I’ve restored the website from a backup and I wrote again to cyber chimps assistance giving them those further infos you shared with me.
    Thank-you
    Lorenza

    Steven

    (@steven-speirs)

    I have just double-checked my suggestion above (of replacing the shortcode_check function) and it works fine for me. (I copied and pasted the code from my post above to ensure that there are no errors in it).

    The SimpleViewer galleries within my test site (using the CyberChimps free Responsive v1.9.7.6 theme) now display fine.

    It should not break your site but even if it did, all you would need to do to restore it would be to re-upload a fresh (unmodified) copy of the ‘wp-simpleviewer.php’ file (the file you modified) from the ‘wp-simpleviewer.zip’ file.

    Please check that you are using the latest version of WP-SimpleViewer (v2.3.2.4) and that you are copying the code to the correct location in the ‘wp-simpleviewer.php’ file (replacing the existing version of the shortcode_check function).

    It should hopefully work OK for you as it did for me.

    Thread Starter LoreGI13

    (@loregi13)

    Hi Steven,
    you are right, I ‘m sorry: I made some mistake pasting the code: I ‘ve done it again now and it solve the conflict!

    From CyberChimps assistance they’ve suggested to put a css:
    <div style=”max-width:500px !important”></div>

    But now, I think, if this replacement you’ve suggested is working, that’s ok: I will put it in future updatings of Simpleviewer Plug-in.
    Thank-you for your accurate assistance.
    Kind Regards
    Lorenza

    Steven

    (@steven-speirs)

    I’ve tried wrapping the ‘sv-container’ div in the code you posted above but it does not work (and limits the width of the gallery to 500px).

    However, I’m glad my own solution works.
    Thank you for posting back to let me know.

    I’ll be sure to incorporate this into the next version of WP-SimpleViewer (there are no drawbacks to using the code I posted) so you should not have to make any modifications to any future versions.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Has simpleviewer any conflict with nexgen gallery?’ is closed to new replies.