Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi everyone,

    I changed it so I could use fancybox instead of shutter. The things I changed are:

    In js/ngg.js:

    // add shutter-listeners again
    //shutterReloaded.init('sh');
    FancyBoxReload();  // So that it will load fancybox after updating

    I also included fancyboxconf.js so that fancybox loads after start-up.

    In nggalery.php – line 341 I added:

    // activate Fancybox
                if ( ($this->options['thumbEffect'] == "custom") ) {
                    wp_register_script('fancybox', NGGALLERY_URLPATH .'fancybox/jquery.fancybox-1.3.1.pack.js', false);
                    wp_enqueue_script( 'fancybox' );
                    wp_register_script('fancyboxConf', NGGALLERY_URLPATH .'fancybox/fancyboxConf.js', false);
                    wp_enqueue_script( 'fancyboxConf' );
                }

    You also have to change the if-test to add the ajax-script. You do this also in ngggalery.php a bit after the above snippet. There will allready be a script to load the ajax-navigation, you just have to alter the if-test so that it will call the ajax-js-file if you use the custom thumbEffect.

    // Load AJAX navigation script, works only with shutter script as we need to add the listener
                if ( $this->options['galAjaxNav'] ) {
                    if ( ($this->options['thumbEffect'] == "custom") ) {
                        wp_enqueue_script ( 'ngg_script', NGGALLERY_URLPATH . 'js/ngg.js', array('jquery'), '2.0');
                        wp_localize_script( 'ngg_script', 'ngg_ajax', array('path'		=> NGGALLERY_URLPATH,
                                'callback'  => get_option ('siteurl') . '/' . 'index.php?callback=ngg-ajax',
                                'loading'	=> __('loading', 'nggallery'),
                                ) );
                    }
                }

    In fancyboxConf.js is FancyBoxReload() declared.
    fancyboxConf.js:

    function FancyBoxReload() {
        /* This is basic - uses default settings */
    
    	jQuery("a.fancybox").fancybox({
    		'titlePosition'	: 'over',
    		'cyclic'		: true,
    		'onComplete'	:	function() {
    			if(jQuery("span#fancybox-title-over").text() == " "){
    				jQuery("span#fancybox-title-over").parent().hide();
    			}
    		}
    	});
    }
    
    jQuery(document).ready(function() {
    	FancyBoxReload();
    });

    This way it will load fancybox on page-load and after receiving ajax-response.

    I hope it can be of any help to you.

    Someone made an update for this plugin which you can find here: http://webdesign.anmari.com/rental-property-availability/

    I’ve tried this one and it worked.

    Thread Starter zombaya

    (@zombaya)

    Ok, I found out why it didn’t work.

    If you disable “enable reCAPTCHA for comments”, it doesn’t work, which is not what I want.

    I want to be able to disable reCAPTCHA for comments and enable MailHide, which shouldn’t be too much of a trouble.

    And now I am able! If you go to line 301 of wp-recaptcha.php and make this:

    if (($needed_capability && current_user_can($needed_capability))|| !$recaptcha_opt['re_comments']) {
    Into this:
    if (($needed_capability && current_user_can($needed_capability))) {

    Then you’re ready to go.

    me 6!

Viewing 4 replies - 1 through 4 (of 4 total)