dalexisv83
Forum Replies Created
-
Same here. Though, it is working with the same theme on a MAMP development copy, so I know it isn’t the theme. I’ve tried disabling plugins that I think would conflict.
This was working with the legacy version of NextGen.
I’m on an NGINX with apache proxy setup with APC on centos. Not sure where to look for errors. What is nngallery using to extract zip files? Could it be the actual extraction isnt working?
I’ve checked permissions/ownership on gallery and subfolders (777/apache), I’ve cleared my cookies/browser cache, I refreshed permalink settings.
Not sure where to go from here. Any ideas other than plugin conflict?
I wrote a quick workaround using the old plugin code.
On line 152 of module.nextgen_basic_gallery.php there is a function called render that takes the data from the shortcode. This function doesn’t check against the DB if the ID is not numeric since that practice was deprecated even in the old plugin.
I changed lines 152-154 from:
function render($params, $inner_content=NULL) { $params['gallery_ids'] = $this->_get_param('id', NULL, $params);
To:
function render($params, $inner_content=NULL) { global $wpdb; $id = $this->_get_param('id', NULL, $params); if( !is_numeric($id) ) { $id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' ", $id) ); } $params['gallery_ids'] = $id;
Couple things!! This will get removed if you update the plugin. Also, this doesn’t support multiple gallery ID’s in one shortcode (which might be why it was deprecated, I dunno).
The render function only works for galleries not slideshows. You’d have to do a similar code swap for the function called render_slideshow on line 229 probably.
Any chance of getting this in the next update Photocrati? Would be much appreciated.
I just realized the legacy shortcodes don’t support id=album-name anymore. Any plans to reinstate? I have hundreds of galleries on my site, I would not be able to convert each gallery name to its corresponding id/number. Tested on a local development duplicate.
[nggallery id=my-album]
<= broken[nggallery id=345]
<= works