Forums

[Plugin: NextGEN Gallery] Prev and Next image links under big image on Carusel template (8 posts)

  1. nicolass2002
    Member
    Posted 2 years ago #

    Hi,
    Can I somehow include “Prev” and “Next” image links under big image on Carusel template? (same “prev” "next” like on Imagebrowser”)

    Plz, suggest me how? I think I need to include somehow variable $image on carusel template but how :)

  2. Alex Rabe
    Member
    Posted 2 years ago #

    You can change the text in the template file view/gallery-carousel.php

  3. nicolass2002
    Member
    Posted 2 years ago #

    To change text? I need two navigation links for previous and next image in Carousel template same like on ImageBrowser template.

    If I use code from ImageBrowser template that not work, coz I think in Carousel template I dont have same Variable like on ImageBrowser template, exactley $image variable I think.

    So, what you mean "change text" ?

  4. nicolass2002
    Member
    Posted 2 years ago #

    To be clear navigation under "big" image on caruosel template. Same like on ImageBrowser template. When you click on "Next" you will go on next image same like on ImageBrowser.

    I know that there is "prev" and "next" for thumbs on Carusel template.

    But is it somehow possible to get also navigation under big image on carousel like on ImageBrowser.

    I think I need to get in Carousel variable $image same like on ImageBrowser, but how to get that :(

  5. Alex Rabe
    Member
    Posted 2 years ago #

    Sorry didn' t read your post enough... Don't think it's possible by default, you need to modify the imagebrowser template and fetch the prev/next image information from the database

  6. mfal55
    Member
    Posted 2 years ago #

    Hi there,
    I am curious to know if anyone has figured out how to add the next/prev links to the carousel images as mentioned above? If so, I'm hoping that someone might share this with the forum?

    Thanks!!

  7. tschramm
    Member
    Posted 1 year ago #

    hi all ...

    quick and dirty hack

    <?php
    /**
    Template Page for the gallery carousel
    
    Follow variables are useable :
    
    	$gallery     : Contain all about the gallery
    	$images      : Contain all images, path, title
    	$pagination  : Contain the pagination content
    	$current     : Contain the selected image
    	$prev/$next  : Contain link to the next/previous gallery page
    
     You can check the content when you insert the tag <?php var_dump($variable) ?>
     If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
    **/
    ?>
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
    <?php $subnavi = array() ?>
    <div class="ngg-galleryoverview">
    
    	<ul class="ngg-gallery-list">
    
    		<!-- Thumbnail list -->
    		<?php foreach ( $images as $image ) : ?>
    		<?php if ( $image->hidden ) continue; ?>
    		<?php $subnavi[] = $image->pidlink ;?>
    		<li id="ngg-image-<?php echo $image->pid ?>" class="ngg-thumbnail-list <?php if ($image->pid == $current->pid) echo 'selected' ?>" >
    			<a href="<?php echo $image->pidlink ?>">
    				<img src="<?php echo $image->thumbnailURL ?>" alt="<?php echo $image->alttext ?>"   />
    			</a>
    		</li>
    
    	 	<?php endforeach; ?>
    
    	</ul>
    	<div class = "clear"></div>
    </div>
    <div id = "pic_top_line"></div>
    <div class="ngg-galleryoverview">
    
    	<div class="pic"><img src="<?php echo $current->url; ?>" alt="<?php echo $image->alttext ?>" id="photofader"/></div>
    <div id = "pic_bottom_line"></div>
    	<div class = "clear"></div>
    <div class = "center">
    	<div class = "bildunterschrift"><span class = "left"><?php echo $current->alttext ?></span><?php echo $current->description ?></div>
    
    <?php
    $anzahl = count($subnavi);
    $link = $current->pidlink;
    $key = array_search($link, $subnavi);
    $next=$key+1;
    $back=$key-1;
    ?>
    
    <div id = "subnavi">
    <?php if ($back == -1) : ?>
    <span class = "inaktive" >prev</span>
    <?php else : ?>
    <a href="<?php echo $subnavi[$back] ?>">prev</a>
    <?php endif; ?>
    <?php if ($next == $anzahl) : ?>
    <span class = "inaktive" > next</span>
    <?php else : ?>
    <a href="<?php echo $subnavi[$next] ?>"> next</a>
    <?php endif; ?>
    </div>
    </div>
    <?php endif; ?>

    so long

    tschramm

  8. rafaelrubirajr
    Member
    Posted 1 year ago #

    Thanks tschramm! I used your code to also implement a next and previous thumbnail with next/prev links ;)

Topic Closed

This topic has been closed to new replies.

About this Topic