• Hi there again,
    two more questions:

    1. How can i make permalinks work with the image browser?
    To avoid this in the URL: /nggallery/page-162/page/315
    Until I enter the image browser permalinks work fine.

    2. How can i make NGGallery return the image description/alt/title
    in the page title rather than the image ID Number?

    Thanks a lot
    sascha

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sascha-rossaint

    (@sascha-rossaint)

    I found the part in rewrite.php that is responsible for question 2 but
    i dont know how to parse the image alttext or description.
    I figured that the line where the variable pid is triggered is the responsible line.
    just need the code for how to parse image description
    any help would be great.

    thanks
    sascha

    below the part of the php file

    function rewrite_title($title) {
    
    		$new_title = '';
    		// the separataor
    		$sep = ' | ';
    
    		// $_GET from wp_query
    		$pid     = get_query_var('pid');
    		$pageid  = get_query_var('pageid');
    		$nggpage = get_query_var('nggpage');
    		$gallery = get_query_var('gallery');
    		$album   = get_query_var('album');
    		$tag  	 = get_query_var('gallerytag');
    		$show    = get_query_var('show');
    
    		//TODO:: I could parse for the Picture name , gallery etc, but this increase the queries
    		//TODO:: Class nggdb need to cache the query for the nggfunctions.php
    
    		if ( $show == 'slide' )
    			$new_title .= __('Slideshow', 'nggallery') . $sep ;
    		elseif ( $show == 'show' )
    			$new_title .= __('Gallery', 'nggallery') . $sep ;	
    
    		if ( !empty($pid) )
    			$new_title .= __('Picture', 'nggallery') . ' ' . $pid . $sep ;
    
    		if ( !empty($album) )
    			$new_title .= __('Album', 'nggallery') . ' ' . $album . $sep ;
    
    		if ( !empty($gallery) )
    			$new_title .= __('Gallery', 'nggallery') . ' ' . $gallery . $sep ;
    
    		if ( !empty($nggpage) )
    			$new_title .= __('Page', 'nggallery') . ' ' . $nggpage . $sep ;
    
    		if ( !empty($tag) )
    			$new_title .= $tag . $sep;
    
    		//prepend the data
    		$title = $new_title . $title;
    
    		return $title;
    	}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: NextGEN Gallery] permalinks and title in image-browser’ is closed to new replies.