WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
fix to support external wp-content location (2 posts)

  1. jimhu
    Member
    Posted 1 year ago #

    I patched my copy of nextGen gallery to allow it to use a wp-content folder on a different virtual host than the WordPress using it.

    First, in wp-config set

    define(WP_CONTENT_DIR,'/var/www/wp-conf-dirs/sitename/wp-content');
    define ('WP_CONTENT_URL','http://example.com/wp-conf-dirs/sitename/wp-content');
    define ('WP_PLUGIN_DIR',WP_CONTENT_DIR.'/plugins');
    define ('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');

    Modify lib/image.php on lines 67-68 replace site_url() with WP_CONTENT_URL

    // set urls and paths
                    $this->imageURL         = WP_CONTENT_URL . '/' . $this->path . '/' . $this->filename;
                    $this->thumbURL         = WP_CONTENT_URL . '/' . $this->path . '/thumbs/thumbs_' . $this->filename;

    I also modified nggallery.php to change line 288 to

    define('WINABSPATH', str_replace("\\", "/", WP_CONTENT_DIR) );

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

  2. jimhu
    Member
    Posted 1 year ago #

    Also had to edit some other places where site_url was used...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic