Benjamin
Forum Replies Created
-
This does look like a regression, sorry borissamardzija! I’ve committed an update for the next release; you can fix this yourself for now with the following filter:
add_filter('ngg_non_minified_files', 'fix_ngg_plupload_i18n'), 10, 2); function fix_ngg_plupload_i18n($path, $module) { $retval = FALSE; if ($module == 'photocrati-nextgen_addgallery_page' && strpos($path, '/i18n/') !== FALSE) $retval = TRUE; return $retval; }I can’t say with certainty why a hash was chosen over JSON though I will note that NextGen 1.9x didn’t really use JSON at all either.
Scripters aren’t stopped from updating ATP galleries; it just requires a certain process. One could query wp_posts for post_type = displayed_gallery and then unserialize() its post-content, alter the display gallery object’s ‘template’ path, and then restore.
You could also add a filter to ‘ngg_gallery_object’ to alter the template attribute at runtime.
To use the NextGen 2 API you could also do this once:
$mapper = C_Displayed_Gallery_Mapper::get_instance(); foreach($mapper->find_all() as $gallery) { $gallery->display_settings['template'] = alter_as_needed(); $mapper->save($gallery); }Forum: Plugins
In reply to: [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery] Ajax BUGI’m working on putting together some more comprehensive documentation on the NGG internals, but this covers how to find NGG css/js url. I’m always open to questions or criticism if you have any.
NextGen lightboxes will rebind their targets on the window ‘refreshed’ event.
Why would you hash anything for your plugin? Especially setting information that contains information that is environment specific and potentially needs to be systematically updated?
Galleries created by our “Attach to Post” window are stored as a hash in a custom post type to avoid creating another mysql table.
Is there a way to update all of the display_settings systematically when I go from local -> staging -> production?
Not “Attach to Post” galleries; their settings are persistent (note that changing global settings in Gallery Settings does not change the settings of an ATP gallery). Shortcodes are easier to manage in that respect.
Making that dialog generate shortcodes with a visual placeholder is a common feature request we intend to implement soon (ish).
Sorry Marco, our “Attach To Post” interface just isn’t built to run anywhere but post/post-new.php
Thanks for the report MrWp007! I’ve committed a change to our Bitbucket that moves our Select2 to its own hook which should prevent our CSS being enqueued when its not wanted.
Hi Hoosierboy; the two parameters given to the filter are the $table_prefix global and the name of the table being retrieved (like wp_ngg_8_pictures or bh_ngg_albums). This can be used in a multisite network to make each site have the same galleries available for display by directing all of NGG’s database lookups to the same table.
You likely want to define the following constants:
define('NGG_DISABLE_RESOURCE_MANAGER', TRUE); define('NGG_DISABLE_FILTER_THE_CONTENT', TRUE);For compatibility with certain (a lot of badly written..) themes & plugins NextGen does a little output buffering to ensure stylesheets and scripts are always enqueued correctly.
It appears that BackWPup does not use the system tar and has its own method for creating archive files.
I would recommend either requesting that the BackWPup authors support longer filenames (the POSIX standard says 100 but modern BSD/GNU tar doesn’t enforce any limits) or making BackWPup ignore your ‘dynamic’ directories as they aren’t archivable by BackWPup.
The extra characters identify in what ways the image has been generated from the original; for example whether it has a watermark applied (or not), whether it’s been rotated, given a shadow effect, resized, etc. There isn’t currently an alternate method of naming.
What are you using for your backup generation? GNU and BSD tar should not have any limit on its lengths; it looks like micro-libc (which BusyBox uses) appears to use the old POSIX standard of 100 characters, but I wouldn’t expect many web servers to use that.
The easiest way is to copy that file (upload_images.php) to your WP_CONTENT/ngg/modules/photocrati-nextgen_addgallery_page/templates/ and edit it as necessary. A var_dump() / print_r() of the $galleries array will tell you what attributes you can filter.
You’ll want to keep an eye on our changelog when updating in case that file is altered but it won’t happen often.
Thanks for telling us VictorMarieLeoIsaakNicoUtrecht! I’ve checked in an update fixing this bug that will be part of our next release.
Sorry MyMediaMagnet, we’ve been focusing on some other priorities. One thing that comes to mind though is that you could define NGG_GALLERY_ROOT_TYPE to ‘content’ to cause NextGen to place its galleries under WP_CONTENT instead of assuming they’re in the WordPress root.
So changing your default gallery path from ‘/wp-content/gallery’ to ‘ngg_store’ and setting that constant will cause your galleries to be placed in WP_CONTENT/ngg_store/.
Galleries created through the green button are stored as custom posts in wp_posts. You can use the NextGen API to retrieve these like so:
$mapper = C_Displayed_Gallery_Mapper::get_instance()->find($id);These posts are just the equivalent of serialized shortcodes.I’m working on some documentation on the NextGen internals & API that may help; though it’s not done yet I welcome any questions or criticism.
Sorry, I was copy/pasting my example code from my local test site where I was using an object instead of just dumping everything into the global context. Please ignore the extraneous end brace.