Benjamin
Forum Replies Created
-
You can prevent NextGen from attaching any lightbox effects to images with your template by removing
<?php echo $image->thumbcode ?>which should solve that problem. All it does is inject a CSS class to mark the image as being loadable with that lightbox, and sometimes some additional code (like data- attributes or rel=..) to group images from the same gallery together.The purpose of our resource manager is mostly for compatibility with themes that don’t call wp_footer() or wp_print_footer_scripts(), and we do ourselves turn it off for a few occasions (like if ‘Genesis Tabs’ or ‘Adminer’ is active). The main consequence of turning it off should only cause problems with incorrectly written themes.
If you don’t want to disable it you could add an action to ‘shutdown’ with priority 9 that starts a new buffer, and another on shutdown/11 that looks for CSS/JS to grab for aggregation.
We’ve released 2.0.77 which includes a fix for custom templates not working correctly with lightboxes & the imagebrowser effect; it should finally fix this last issue.
So sorry for the number of problems, this is hopefully the last we’ll need to touch either of these parts of the plugin for a while 🙂
Unfortunately by the time NextGen shortcodes or ATP created galleries are rendered WordPress has already started to reply to the browser with the site headers & top content.
You can however use output buffering to begin capturing output early (so no http headers are sent to the browser) and then do an inspection on the resulting imagebrowser gallery and inject whatever data you need into the <head></head> portion.
<?php function addog($buffer) { return (str_replace("</head>", "<og:img src='...'></head>", $buffer)); } function addog_start() { ob_start('addog'); } function addog_end() { ob_end_flush(); } add_action('wp_head', 'addog_start'); add_action('wp_footer', 'addog_end');You’ll just need to fill in the opengraph tags by reading $buffer to determine the image src, alt, title, etc.
That should get you started, I hope it helps!
Sorry bmherold, this was my mistake. Unfortunately I’ve checked in a fix for this right after we’ve released 2.0.77 so this may not appear officially for a short while.
If you download and this class.image_wrapper.php over your nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/class.image_wrapper.php it should fix your problem.
Thanks for your report, I hope that helps.
I have to confess I’m confused. It’s possible that setting
define('NGG_DISABLE_FILTER_THE_CONTENT', TRUE);in your wp-config.php may fix the problem, but it’s only a chance.If you are willing to share access to your site I’d be glad to some debugging, you can fill out a bug report on the nextgen-gallery.com site and I can see why albums in particular aren’t displaying.
Sorry I couldn’t help more.
You could either disable that setting in the “Gallery Settings” page to disable that effect sitewide, or if you want to preserve it everywhere but certain galleries you can add
use_imagebrowser_effect='0'to their shortcode.Trying to find a workaround to print album info on gallery page.
Are you attempting to do this on an admin page (would is_admin() be true)? If so that may be the issue; for 2.0.68+ we’ve made some performance adjustments that limit gallery rendering to the frontend, but that may be a decision to reconsider.
NextGen requires GD even when ImageMagick is installed because they are different libraries.
At one time 1.9 partially supported ImageMagick but it wasn’t complete so we’ve so far dedicated ourselves to making the GD implementation work as best as we can. We have/are considering rebuilding ImageMagick support, but it hasn’t been a high priority yet.
We are always taking submissions and votes on new features on nextgen-gallery.com, but for the time we are still dependent on GD.
I’ve been trying to find a way this could be done, but unfortunately we also don’t initialize the display type controllers when is_admin() is true.
All I can think of is to recommend using ajax that isn’t in the admin, but check to ensure there is an authenticated admin user. I’m sorry I can’t help more.
I believe we fixed a bug related to the imagebrowser effect not being applied correctly to custom templates, it may be that you were unintentionally benefiting from our earlier mistake.
Can you tell me what that error is?
If you visit Gallery Settings do the album accordions appear, and do they have settings? Alternately do the albums appear in our “Insert Gallery Window” (green icon above the page/post editor) list?
I don’t think I can make Alex Rabe’s plugin work again too easily, but the following code should work. It’s a little hackish and will require some customization, but this works for me:
global $nggdb; $images = $nggdb->search_for_images('Boeing'); $image_ids = array(); foreach($images as $image) { $image_ids[] = $image->{$image->id_field}; } $image_ids = implode(',', $image_ids); $renderer = C_Displayed_Gallery_Renderer::get_instance(); $output = $renderer->display_images(array( 'source' => 'images', 'image_ids' => $image_ids, 'display_type' => 'photocrati-nextgen_basic_thumbnails' )); echo $output;Could you check the ‘Gallery Settings’ page and look for the “Use imagebrowser effect” setting in the “NextGEN Basic Thumbnails” accordion? It sounds like that option is on.
If you would like to leave it on except for this gallery you could add use_imagebrowser_effect=’0′ to your shortcode.