samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

feature request: choose gallery template in album shortcode #421

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have made a modification in some files in order to choose the gallery 
template with the album shortcode:

[album id=3 template=extend gallery_template =lorem]

I have done these modifications:

******* lib/shortcodes.php *******

line 183 -> function(show_album)
- added new atts and passed new var to nggShowAlbum function

    function show_album( $atts ) {

        extract(shortcode_atts(array(
            'id'        => 0,
            'template'  => 'extend' 
            'gtemplate'  => '' 
        ), $atts ));

        $out = nggShowAlbum($id, $template, $gtemplate);

        return $out;
    }

******* lib/nggfunctions.php *******

line 417 -> function(nggShowAlbum)
- added new arg to the function;

     function nggShowAlbum($albumID, $template = 'extend', $gtemplate = '') {

line 435 -> inside function(nggShowAlbum)
- passed template arg to nggShowGallery call
      $out = nggShowGallery( $gallery, $gtemplate );

It should be good to add it in a new version, isn't it?

With this modification, il will be easy to use different templates for 
different album sets.

Original issue reported on code.google.com by roberto....@gmail.com on 16 Sep 2011 at 10:23

GoogleCodeExporter commented 8 years ago
This is a good point, just take a slightly differt parameter now : 

[album id=xxx template="extend" gallery="gallery_template"]

Not sure about the naming, but ok let's see

fixed in r999

Original comment by alex.cologne on 18 Sep 2011 at 12:43