• 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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘fix to support external wp-content location’ is closed to new replies.