Benjamin
Forum Replies Created
-
Hi Beak,
Could you try adding
define('NGG_DISABLE_RESOURCE_MANAGER', TRUE);to your wp-config.php? If that works and you’d like to keep the behavior on non-MailPoet pages you can use the ‘run_ngg_resource_manager’ filter to disable it on just those URL you want.I’ve added a filter (‘ngg_get_image_size_params’, $params, $size, $image) that will let you do this in the future without modifying our code, until then you can edit nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php’s get_image_size_params() method by adding to the top of the method:
$params['crop'] = TRUE; $params['crop_frame'] = array();Unfortunately we don’t have a way to totally deactivate our transients. They were necessary for flash slideshows, MediaRSS, and some other things but he have since removed everything that depends on them but MediaRSS. It probably won’t be in the very next release but the one after that where we will stop using transients unless MediaRSS is active.
I understand transient storage can be a problem, for which I recommend storing them in memcache, or using a plugin like W3TC to store them on disk or in a PHP opcode cache.
Sorry I can’t help more.
In testing the problem I don’t think that’s the case: if I ensure that method comes back with only “/albums” the redirect is still taking place.
We have made a change so that only “/albums” will be returned which will be a part of the next release.
Hi bigdealben,
NextGen should only change your URL to protocol relative; that is it should only change http://example.com/wp-content/.. to //example.com/wp-content/.. so that your CSS/JS work with both HTTP/HTTPS depending on which protocol the site was requested with.
The “code” line is injected into the images anchor element; you could use it to add a class, data- attributes, rel, or anything else you may like. We also provide a filter (‘ngg_effect_code’ with params $effect_code and $displayed_gallery) you can use if you’d like finer control.
The following should work:
$gallery_id = 3; // for example $gallery_mapper = C_Gallery_Mapper::get_instance(); $image_mapper = C_Image_Mapper::get_instance(); $storage = C_Gallery_Storage::get_instance(); $gallery = $gallery_mapper->find($gallery_id); $image = $image_mapper->find($gallery->previewpic); var_dump($image); var_dump($storage->get_image_url($image, 'thumb')); var_dump($storage->get_image_url($image, 'full'));I hope it helps!
We’re doing what we are intentionally, though the appearance of the double slashes isn’t intentional. Forcing the result to not include a pair of slashes doesn’t seem to have any result, but my original suggestions still apply (inspecting ORIG_REQUEST_URI or using the wp action instead of template_redirect).
NextGen has its own small framework (POPE) that we use to emulate mixins & provide a kind of dependency injection; we temporarily had a filesystem cache of our object dependency tree but the most recent releases haven’t used it.
Feel free to delete the directory; if you’re using an older NextGen it may be recreated but it won’t cause any problems other than making the next couple of page loads slightly slower.
It’s possible, but I wasn’t responsible for that particular bit of code and don’t know why we chose that particular path. I’ll give it a try though.
I hadn’t considered Nextcellent; it appears they don’t define NGG_PLUGIN. They do define NGGFOLDER and NGG_DBVERSION like we do, so you could use those with NGG_PLUGIN to detect NextGen or Nextcellent.
Hi Chouby,
We copy the REQUEST_URI into ORIG_REQUEST_URI to prevent WordPress from treating our “/nggallery/page/2” (for example) as a 404 and redirecting them but it is restored on template_redirect:1
I’ve reproduced the problem on my machine and you could fix this by checking ORIG_REQUEST_URI in addition to REQUEST_URI, or change the check_canonical_url() action from wp to template_redirect.
If you’d like to detect for NextGen’s presence you can check if ‘NGG_PLUGIN’ has been defined.
I hope that helps!
We omit the tests directory from public releases to conserve bandwidth and disk space but you can find it’s Mercurial repository on bitbucket.org.
Unfortunately POPE’s unit tests are a little neglected (just ignore anything with hooks) and requires a Simpletest-Wordpress plugin that I can’t seem to find, making running them difficult anyway.
On the upside POPE is just our framework, and NextGen can be customized in many ways. What is it you are trying to customize? I can guide you towards what you need to do.
I may be missing some context but the code you provide looks like it only applies to the WordPress media gallery, not to NextGen. Is there more you could give us?
It’s been a while since we’ve worked on the ngg_tag archive page and you’re totally right; I’ll attempt to have these fixed in our next release (but I don’t know when that will be).
Thanks tizz!
Thank Sergei! I’ve checked in a similar update:
$template = !empty($instance['template']) ? $instance['template'] : $view->get_template_abspath('photocrati-widget#display_gallery');so that any gallery templates can be pulled from the theme override dir.Unfortunately we currently only handle unicode filenames; I intend to get UTF8 gallery-names available in our next major release. Sorry mp9_sit!