Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • My favorite posts this may help you.

    Go to – NextGen Gallery >> Option >> Effects and set custom effect. and clear the js function call and css class name.
    Hope this will resolve your problem.

    Thread Starter Arafat

    (@arafat)

    You are most welcome geraldmorales.

    You may create another JS array like the array for the image, and put the string bellow the big image.

    Thanks

    Thread Starter Arafat

    (@arafat)

    I made a solution for this. Let me share the solution here. Please take a look into this page –
    https://theserendipitymagazine.com/?page_id=97

    Step One:
    I made wordpress template in my current theme, in that template I put a HTML div like bellow.
    <div id="big_image_container"></div>

    Step Two:
    Make a javascript function and load the function into the header.php function loads the image into the div.

    /*
    * Author Arafat Rahman (https://arafatbd.net)
    */
    function custom_effect(img, div, attr) {
    	if(img != 'undefined' && div != 'undefined' && div != '') {
    		var d = document.getElementById(div);
    		var html = '<img src="' + img + '"';
    		if(attr != 'undefined' && attr != '') {
    			html += ' ' + attr;
    		}
    		html += ' />';
    		d.innerHTML = html;
    	}
    	return false;
    }

    Step Three:
    Call the JS function in NextGen Gallery configuration. NextGen Gallery >> Option >> Effects
    JavaScript Thumbnail effect: custom
    Link Code line :
    class="highslide" onclick="return custom_effect(this, 'big_image_container', '')"

    Step Four:
    Load the first image in the blank DIV, I need to edit the gallery.php located into the NextGen Gallery plugin directory/view/

    <!-- Thumbnails -->
    <script language="javascript">
    	var default_img = new Array();
    </script>
    <?php $i = 0;?>
    ......
    loop for thumbnais
    <script language="javascript">
    	default_img[<?=$i?>] = '<?php echo $image->imageURL ?>';
    </script>
    <?php $i++; ?>
    .... loop ends here

    Step Five:
    Call the function for first time
    where body content ends

    <script language="javascript">
    	custom_effect(default_img[0], "big_image_container", ""); // show default image
    </script>

    That’s all

    I needed the solution urgent that’s why I made in simple way, did not care to wordpress structure LOL

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