kylethebaker
Forum Replies Created
-
It looks like gallerypath is intended to be used as a path that is relative to the wordpress root. So instead of being
/var/www/public/wp-content/gallery
is it justwp-content/gallery
. Then it’s being resolved into an absolute path in each place that it’s used instead of just the once in the gallery settings. It is expected to be relative to the wordpress core root, which means decoupling content from the core files currently isn’t possible without going through and changing each place that uses gallerypath to expect a full path.With that being said, I’ve found something that seems to work…
When the gallery path is being converted into an absolute path it is using
C_Fs::get_document_root($type)
to determine the absolute path prefix. When the$type
is'galleries'
it will check to see if the constantNGG_GALLERY_ROOT_TYPE
is set to “content”, and if so it will returnWP_CONTENT_DIR
for the document root. After setting this constant and adjusting ngg_options in the wp_options table to point somewhere relative toWP_CONTENT_DIR
is seems to work…I’m not really comfortable with this solution at the moment even though it appears to be working. I will need to do some testing. I’m wondering if this is an actual solution to my problem or just something that happens to work. Does the constant NGG_GALLERY_ROOT_TYPE exist for this exact scenario?
- This reply was modified 7 years, 7 months ago by kylethebaker.
@imagely – Thanks, I’ve submitted a pull request