8

Put this into your page template: <?php global $nggdb; $galleries = array(); $album = $nggdb->find_album(1); foreach( $album->gallery_ids as $galleryid ){ $gallery = $nggdb->find_gallery($galleryid); $galleries[$galleryid]['title'] = $gallery->title; $galleries[$galleryid]['url'] = get_bloginfo('url') ...


6

NextGEN Gallery 2.0 caches galleries and albums in transients (plus their own custom transient expiration time record). You can clear the cache by deleting all transients. Easiest way is to install a plugin like Delete Expired Transients and delete all transients from the Tools menu -- that plugin has an option for deleting either expired transients or all ...


4

After analyzing nextgen core files I have found solution to my problem. I hope it will be useful for somebody. global $nggdb; $get_gall_id = get_post_meta($post_id, 'galerijos_id', true); $gall_ids = $nggdb->get_ids_from_gallery($get_gall_id); $images = $nggdb->get_gallery($get_gall_id); foreach ( $gall_ids as $gall_id ) { echo $images[$gall_id]->...


4

I have not a ready solution, but small hints. You get all albums from nggallery with a small sql select. This get a array with all data to the album. If you have the right fields, change the * and use only the fields, there store your data. global $wpdb; $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id"); After ...


4

I know this is a bit late, but I just overcame this issue myself. If you go to 'Gallery > Other Options > Miscellaneous' you will see a "Clear image cache" button. That should solve the problem. I haven't found a way to permanently adjust caching, but this works. Hope this helps someone.


4

You don't have to insert image into post after attaching it to this post. When you edit post, click on 'Add Media' button. Upload your image and when it's uploaded just close the 'Insert Media' dialog (use 'x' button in top right corner and not 'Insert into post' button). You can then get (and show) them with this code: <?php $images = new WP_Query(...


3

Use a rewrite rule in your .htaccess: RewriteRule ^path-to-images/ajax-loader\.gif /path-to-replacement.gif [L] Make sure to set this above the WordPress rules.


3

Your solution has helped me find an answer to my own problem of getting the attribute of a certain shortcode, but I fear there may be an issue with your approach. You're using preg_match to check the post_content, which will only return 1 match. If you have a post that has multiple shortcodes in it, it will only return the first one, which may not be the ...


2

Ok, this has worked for me. <?php // get the track list global $nggdb; $gallery = $nggdb->get_gallery ($galleryID, 'sortorder', 'ASC', true, 0, 0); ?> <div id="tracklist"> <?php foreach($gallery as $image) { ?> <div class="single_image" id="image-<?php echo $image->pid; ?>"> <a href="<?php the_permalink() ?...


2

Konstantin Kovshenin from Automattic built a small WP plugin hosted here at GitHUB, which does pretty much exactly what you are asking for. It does not seem to solve the whole migration as it works only for [nggallery] shortcodes, but anyone can fork it and add some more lines to solve the rest, right?


2

You're in the right file, shutter-reloaded is where you'll want to make the change. It looks like the gallery plugin is parsing the entire document for its links to start. That function is called init on line 34. Inside that function, the plugin is going to loop through all the links on the page and determine if it's a valid gallery thumbnail. The line ...


2

Assuming you actually have something in the $gallery object (hint: confirm that by print_r($gallery) in your template), then your code should work. Perhaps step back and leave the database stuff to NextGEN, just count the image IDs: global $nggdb; $poze = get_field('poze'); if ($poze && count($poze)) { $galleryID = $poze[0]['ngg_id']; $...


2

A .mo file is the machine readable Version of a .po file, which in turn holds the translation of a .pot file. Hence, the latter is what you want to have in the first place. And if it is your theme you want to localize, you certainly do not need a random plugin's simplified Chinese .mo file... Using either, poedit, any other gettext application or the ...


2

I figured it out!! My final code looks like: <?php $images = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures")); $ngg_options = nggGallery::get_option("ngg_options"); $maxElement = $ngg_options["galImages"]; if ($images > $maxElement) { echo "duck"; } ?> Basically the code checks see if the number ...


2

As of 2015 and NextGen 2.0. Don't hack this, use shortcodes to display a single image and then lead to the lightbox: [ngg_images gallery_ids=7 display_type=photocrati-nextgen_basic_thumbnails disable_pagination=1 images_per_page=1 show_all_in_lightbox=1 show_slideshow_link=0] Further documentation and useful examples.


1

Work with the options found under Gallery > Other Options > Lightbox Effects ... "What must the lightbox be applied to?" These will allow other images not in the NextGEN Galleries to be opened into the Lightbox Effect you have chosen.


1

Yes, NGG can be used exactly like you described it. under Other Settings you find the Lightbox Effects where you can select Fancybox, and click Show Advanced Options. That's where you can find/set class="fancybox" rel="gallery" and you're good to go. To show single images you can use the shortcode [singlepic id=47 ...], for instance.


1

This is what you need to do: 1. In the Dashboard, go to Gallery > Other options 2. Click on "Lightbox effects" tab 3. Click "Show advanced settings" 4. In the text boxes, changes the stylesheet and javascript urls. Change from 'localhost' to your new path. 5. Click save 6. Done! It will now work properly.


1

EDIT: function and plugin below work, but are not necessary Last version of Nexgen galley as a function to set featured images: EDIT 2: My plugin Just for the exercise, I used the function originally published to create a plugin with the functionality required by OP. The code is in a Gist. First of all, in all the posts you want show the preview image, ...


1

NextGen uploads your images basically as Attachment Post types. This means that the tags themselves are stored in the wp_terms table


1

Jared Cobb's solution relies on jquery. You can do without by instead using var linkAlt = L.getElementsByTagName("img")[0]['alt'] T = ( linkAlt && linkAlt != shfile ) ? linkAlt : '';


1

There are several things you could do to achieve what you want. You could: create a new gallery with just the landscape images and include this new gallery into the sidebar; try different thumbnail settings in the NGG options (ignore aspect ratio or not, set height and width to the same value and thus show quadratic images); edit the file widgets.php (...


1

The easiest way is to create your own gallery template that has a form for each image (or perhaps a checkbox for each image, inside a form) and some handler code that takes the form submission and sends the emails. I'd do that as a plugin that hooks into the 'ngg_render_template' filter to load its own template. You could start with NextGEN Download Gallery ...


1

Another buyer has created this snippet https://gist.github.com/Davidlab/5134645 The proper way is to define('NGG_SKIP_LOAD_SCRIPTS', true); Note that this'll be included in the next version of my plugin.


1

This takes care of NextGEN's slideshow and CSS, as well as the Shutter script and CSS that it also enqueues by default. add_action('wp_print_scripts', 'wpse_82982_removeScripts'); add_action('wp_print_styles', 'wpse_82982_removeStyles'); function wpse_82982_removeScripts() { wp_dequeue_script('ngg-slideshow'); wp_dequeue_script('shutter'); } ...


1

You can use the include attribute of the [gallery] shortcode to include the images in your galleries. For example, if you have an image with ID of 6 and you want to include it in two different galleries and in different posts, in the first post you can put: [gallery include="1,2,31,6"] This include images with IDs: 1, 2 31, and 6. And on the second post: [...


1

This is not possible in NextGen gallery. You have to upload the image into each folder, as NextGen gallery works with file structures, not with database entries for retrieving the images.


1

You must to do: Set option "Override thumbnail settings" to "Yes" https://yourdomain.com/wp-admin/admin.php?page=ngg_display_settings 1.1. in BASIC BASIC THUMBNAILS 1.2. in BASIC EXTENDED ALBUM In template write thumbnail_width and thumbnail_height echo do_shortcode( '[nggallery id=1 template="your_template" thumbnail_width="229" thumbnail_height="331"]...


1

You may use a function similar to below one to retrieve a list of image properties in a Next-Gen image gallery. function wp75475_imagelist(){ //http://codex.wordpress.org/Function_Reference/is_plugin_active include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if(!is_plugin_active('nextgen-gallery/nggallery.php')){ return 'NextGen Gallery Plugin ...


1

If you look at the nextgen gallery slideshow widget you will find the option "select gallery" => "all images".


Only top voted, non community-wiki answers of a minimum length are eligible