• Resolved iliaovechkin

    (@iliaovechkin)


    Hi, I’m using the latest nextgen and wordpress. I have an issue with my current set up in the imagebrowser script. Instead of allowing the user to click on an image and see it ‘maximized’ i wanted to use that link as a way to go to the next image. Well I got that working just fine, but the problem is this… I have AJAX
    enabled and it works fine when you use the arrow navigation but the image link acts as if AJAX is turned off and reloads the page.

    Here’s the link to the page: https://iliaovechkin.com/abouelala/?page_id=42

    and here is the code i have in imagebrowser.php:

    <div class="ngg-imagebrowser" id="<?php echo $image->anchor ?>">
    
    	<div class="pic"><a id="ngg-next-<?php echo $image->next_pid ?>" href="<?php echo
    $image->next_image_link ?>"><img alt="<?php echo $image->alttext ?>" src="<?php echo
    $image->imageURL ?>"/></a></div>
    	<div class="ngg-imagebrowser-nav">
    		<div class="back">
    			<a class="ngg-browser-prev" id="ngg-prev-<?php echo $image->previous_pid ?
    >" href="<?php echo $image->previous_image_link ?>"><<?php _e('', 'nggallery') ?></a>
    		</div>
    		<div class="next">
    			<a class="ngg-browser-next" id="ngg-next-<?php echo $image->next_pid ?>"
    href="<?php echo $image->next_image_link ?>"><?php _e('', 'nggallery') ?>></a>
    		</div>
    		<div class="counter"><?php echo $image->alttext ?></div>
    		<div class="ngg-imagebrowser-desc"><p><?php echo $image->description ?
    ></p></div>
    	</div>	
    
    </div>

    Thank you for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Alex Rabe

    (@alexrabe)

    You need to add class="ngg-browser-prev" or class="ngg-browser-next" to the a href

    Thread Starter iliaovechkin

    (@iliaovechkin)

    Worked! Thank you.

    fareldal

    (@fareldal)

    “I have an issue with my current set up in the imagebrowser script. Instead of allowing the user to click on an image and see it ‘maximized’ i wanted to use that link as a way to go to the next image. Well I got that working just fine…”

    please excuse my ignorance. i am new to wordpress.
    would you please tell me how you did that? i am using nextgen as well and have been pulling my hair out over this.
    here is the page
    https://fareldalrymple.com/?page_id=102
    i would like to be able to click on the image and go to the next one instead of what it is doing now, which is just reloading the image.

    could i just copy the above and replace the revised imagebrowser.php file?
    and if so where do i add the class=”ngg-browser-next” ?

    please help.

    Michael D

    (@michael-divine)

    Fareldal:
    in the imagebrowser.php file change this:

    <div class="pic"><?php echo $image->href_link ?></div>

    to this:

    <div class=”pic”>
    next_image_link ?>”><img src=”<?php echo $image->imageURL ?>” alt=”<?php echo $image->alttext ?>” /></div>

    This will wrap the image as a link. You may need to update something in the css file. I did a bunch of work on my own version of nggallery and don’t remember if i made changes to the CSS.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] AJAX issue in a custom template for ImageBrowser’ is closed to new replies.