WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
FIlters suggestion (1 post)

  1. roberto.c
    Member
    Posted 1 year ago #

    Hi! I have added some filter in NGG core that i find userful.
    Maybe you can add them to your next update if you think that is useful too.

    ******************************

    in /album/album.php -> function controller:

    after $this->albums = $nggdb->find_all_album();
    added $this->albums = apply_filters('ngg_albums', $this->albums);

    after $this->galleries = $nggdb->find_all_galleries();
    added $this->galleries = apply_filters('ngg_galleries', $this->galleries);

    Why? I used this to order the gallery list in the "manage album" page:

    function rcwd_ngg_galleries($galleries){
    arsort($galleries);
    return $galleries;
    }
    add_filter( 'ngg_galleries', 'rcwd_ngg_galleries' );

    *****************************

    in /nggfunctions.php -> function nggShowGallery:

    after $picturelist = nggdb::get_gallery($galleryID, $ngg_options['galSort'], $ngg_options['galSortDir']);

    added $picturelist = apply_filters('ngg_gallery_picturelist', $picturelist, $galleryID);

    Why? I have created a select field in the manage gallery where the admin can choose to connect a flikr gallery to the ngg gallery instead to load the pictures.

    Also, used that filter to load videos in the gallery pics flow.

    ******************************************************

    Have a good day

    http://wordpress.org/extend/plugins/nextgen-gallery/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic