Webmaster BG3
Forum Replies Created
-
Nextgen version 1.9.x
All files in wp-content/plugins/nextgen-gallery/adminbatch-import.php (user interface)
http://pastebin.com/AsqVTbHrprocessor.php (do all the job)
http://pastebin.com/gUZDZS4Lcsv.php (not a real csv class but only a line by line reader)
http://pastebin.com/HjdhAzARcsv format is
PATH;TITLE;ALBUMi.e.
/testme;A test gallery;3import the folder /testme (processor.php contain basepath) in a new gallery, assign the title “A test gallery” and add the gallery to albumID #3
of course you have to prepare a CSV, and a directory tree with your gallery and picture file (name must be sanitized, no space, no strange character)
hope to be helpful
my nextgen: 33 album, 513 gallery, 47786 images… growing everyday!
same for me +1
Forum: Plugins
In reply to: [Firelight Lightbox] got fancybox working with ajax pagination in nextgenUpdated today. Everything sounds good with 1.5 release.
Forum: Plugins
In reply to: [Firelight Lightbox] got fancybox working with ajax pagination in nextgenI have found the solution by myself, so I like to post the answer for anyone who has the same problem.
N.B. this work only on development version of Easy Fancybox. Get the plugin link at the end of the post
1) Configure Nextgen effect for fancybox:
Go to http://yoursite.com/wp-admin/admin.php?page=nggallery-options at tab “Effects”, select “Custom” as JavaScript Thumbnail effect and put this line of code in Link Code lineclass="fancybox" rel="%GALLERY_NAME%"2) Modify plugin code to get ajax pagination for custom effect:
Open the file wp-content/plugins/nextgen-gallery/nggallery.php and locate this block of code:// Load AJAX navigation script, works only with shutter script as we need to add the listener if ( $this->options['galAjaxNav'] ) { if ( ($this->options['thumbEffect'] == "shutter") || function_exists('srel_makeshutter') ) { wp_enqueue_script ( 'ngg_script', NGGALLERY_URLPATH . 'js/ngg.js', array('jquery'), '2.1'); wp_localize_script( 'ngg_script', 'ngg_ajax', array('path' => NGGALLERY_URLPATH, 'callback' => trailingslashit( home_url() ) . 'index.php?callback=ngg-ajax', 'loading' => __('loading', 'nggallery'), ) ); } }Modify the code to be like this:
// Load AJAX navigation script, works only with shutter script as we need to add the listener if ( $this->options['galAjaxNav'] ) { if ( ($this->options['thumbEffect'] == "shutter") || function_exists('srel_makeshutter') ) { wp_enqueue_script ( 'ngg_script', NGGALLERY_URLPATH . 'js/ngg.js', array('jquery'), '2.1'); wp_localize_script( 'ngg_script', 'ngg_ajax', array('path' => NGGALLERY_URLPATH, 'callback' => trailingslashit( home_url() ) . 'index.php?callback=ngg-ajax', 'loading' => __('loading', 'nggallery'), ) ); } else if ( ($this->options['thumbEffect'] == "custom") || function_exists('srel_makeshutter') ) { wp_enqueue_script ( 'ngg_script', NGGALLERY_URLPATH . 'js/ngg.js', array('jquery'), '2.1'); wp_localize_script( 'ngg_script', 'ngg_ajax', array('path' => NGGALLERY_URLPATH, 'callback' => trailingslashit( home_url() ) . 'index.php?callback=ngg-ajax', 'loading' => __('loading', 'nggallery'), ) ); } }Now open the file wp-content/plugins/nextgen-gallery/js/ngg.js and locate the line:
shutterReloaded.init('sh');You must found two occurrence in Nextgen Gallery 1.9.12. Change the code like this for both occurrence:
//shutterReloaded.init('sh'); easy_fancybox_handler();That’s all! Now you have Ajax pagination and Easy Fancybox working together.
Warning: the modification i suggest will broke the default shutter effect, because I commented out it’s call. Another problem is that you could have some error if you uninstall or disable Easy Fancybox. So it need to be hardened if you want a safe code
My setup:
– WordPress 3.5.1
– Easy Fancybox 1.5.0dev11 from http://downloads.wp.xz.cn/plugin/easy-fancybox.zip
– Nextgen Gallery 1.9.12Hope to be helpful
solved by myself