Using Galeriffic in NextGen Gallery template

Let’s check out the possibilities of NextGen gallerys templating system and create a template to use with nice Galleriffic jQuery plugin.

1. Install Galleriffic. Download the install package from http://www.twospy.com/galleriffic/. Create a galleriffic directory in your theme directory and extract the package contents there. The files could be put to another locations, but I’ll use the one for simplicity.

2. Install NextGen gallery to WordPress and enable it, if not already done.

3. Include galleriffic javascript and stylesheets in your theme file, before calling get_header();

wp_register_script('galleriffic',get_bloginfo('template_url') . '/galleriffic/js/jquery.galleriffic.js',false, '2.0.0');
wp_register_script('jquery.opacityrollover',get_bloginfo('template_url') . '/galleriffic/js/jquery.opacityrollover.js',false, '2.0.0');
wp_enqueue_script('galleriffic');
wp_enqueue_script('jquery.opacityrollover');

wp_enqueue_style('galleriffic-style', get_bloginfo('template_url') . '/galleriffic/css/basic.css',false,'2.0','all');wp_enqueue_style('galleriffic-style-2', get_bloginfo('template_url') . '/galleriffic/css/galleriffic-2.css',false,'2.0','all');

4. Create a nextgen template in directory: wp-content/plugins/nextgen-gallery/view/gallery-galleriffic.php. The contents is as follows for current example:

< ?php
/**

@description Galleriffic (http://www.twospy.com/galleriffic/) template for Nextgen Gallery WordPress plugin
@author Kaarel Sikk

Template Page for the gallery overview

Follow variables are useable :

	$gallery     : Contain all about the gallery
	$images      : Contain all images, path, title
	$pagination  : Contain the pagination content

 You can check the content when you insert the tag 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 echo $pagination ?>

< ?php endif; ?>

 

5. Add Nextgen Gallery to your pages/posts with following key:

[nggallery id=XXX template=galleriffic]

This work in my case well with default twentyten theme setup.

You can download the template file from here:
gallery-galleriffic.php

This entry was posted in Arvuti, to-move. Bookmark the permalink.

2 Responses to Using Galeriffic in NextGen Gallery template

  1. mark shirley says:

    galleriffic-style-2

    code seems to be repeated

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.