Forums

[resolved] [Plugin: NextGEN Gallery] Slideshow doesn't load images - found the bug (3 posts)

  1. jamesbisset
    Member
    Posted 3 years ago #

    When the slideshow is requested, XML data is generated to give imagerotator.swf a list of images in XML format. The file which does this is nggextractXML.php and the first thing it does is go and look for wp-load.php or wp-config.php at this location.

    $root = dirname(dirname(dirname(dirname(__FILE__))));
    require_once($root.'/wp-load.php');

    if your file path is like this:
    /wordpress/wp-content/plugins/nggallery/nggextractXML.php
    then everything will work perfectly, but if you choose to have your wp-config.php and/or your wp-content folder OUTSIDE the WordPress directory then the slideshow gets stuck.

    I've fixed it temporarily by just setting the absolute path to wp-load.php, but I'm sure WordPress must have a more elegant solution for developers?

  2. Alex Rabe
    Member
    Posted 3 years ago #

    I have changed this for v1.00, so you can use different folder structures, see also
    http://alexrabe.boelinger.com/2008/08/06/the-hassle-with-wp_content_url-and-wp_plugin_dir/

  3. jamesbisset
    Member
    Posted 3 years ago #

    Thanks for the information and the links.

    It seems a good idea in principle to separate the wordpress engine from the customised wp-content and wp-config.php. Makes upgrading on shared servers without SSH much more straightforward, and the site (possibly) a little more secure.

    But it does seem that it's not just a straight-forward code tweak for developers.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags