Check out our latest templates:
  • Inspiredblog theme Inspiredblog theme
  • A Classy Theme A Classy Theme
  • Fancy Theme Fancy Theme
  • Book Template Book Template
  • TealGray Retro theme TealGray Retro theme
  • MinimaxWhite MinimaxWhite
  • Business in Color II Business in Color II
  • Business in Color I Business in Color I

Inspiredblog: How to implement filmstrip navigation from FancyThemeWed, Oct 28, 2009 in Freebies, Tutorials, WP templates

Inspiredblog: How to implement filmstrip navigation from FancyTheme

“I would really appreciate your suggestion of a tutorial, how to include the gallery of your Fancy Theme’s starting page to the starting page of Inspired Blog. I guess, this would be interesting to others, too.. said Colorit.

Well, it took me a little while, but here is a tutorial how to do it.

1. Add new options to administration

Open “admin-options.php” file located in “functions” folder and insert (paste) the following code at line 46:


array(	"name" => "Filmstrip navigation",
											"type" => "heading",
											"desc" => "Settings for home post animation"),

		array(	"name" => "Post/page Highlight IDs",
											"desc" => "Please enter ID of post(s) you want to display on homepage and separate them by commas",
											"id" => $shortname."_hl_ID",
											"std" => "",
											"type" => "text"),

		array(	"name" => "Highlight overlay color",
											"desc" => "Please enter color of overlay panel",
											"id" => $shortname."_hl_overlay",
											"std" => "",
											"type" => "text"),

		array(	"name" => "Highlight opacity",
											"desc" => "Please enter opacity overlay panel (Example: 0.6, 0.3 ...)",
											"id" => $shortname."_hl_opacity",
											"std" => "",
											"type" => "text"),							

		array(	"name" => "Filmstrip Thumbnail width",
											"desc" => "Please enter desired thumbnail width",
											"id" => $shortname."_h1_thumb_width",
											"std" => "",
											"type" => "text"),					 							    

		array(	"name" => "Filmstrip Thumbnail height",
											"desc" => "Please enter desired thumbnail height",
											"id" => $shortname."_h1_thumb_height",
											"std" => "",
											"type" => "text"),

2. Copy all javascript files

Just download this zip file and extract it to themes “js” folder.

3. Include javascript files

Open “header.php” file and replace old jQuery easing plugin at line 43:


<script src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.min.js" type="text/javascript"></script>

with the following code:


<script src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.1.3.js" type="text/javascript"></script>

and add this two lines as last called javascript functions:


<script src="<?php bloginfo('template_directory'); ?>/js/jquery.galleryview-1.1.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.timers-1.1.2.js" type="text/javascript"></script>

4. Set new easing effect for LavaLamp menu

New easing plugin has changed animation names so we need to change line 56:


jQuery("#nav").lavaLamp({ fx: "backout", speed: 700 });	

to:


jQuery("#nav").lavaLamp({ fx: "easeOutBack", speed: 700 });	

5. Create filmstrip navigation file

Create new blank file “filmstrip_navigation.php” in themes root directory and paste the following code:


<script type="text/javascript">
	jQuery(document).ready(function($){
		$('#photos').galleryView({
			panel_width: 930,
			panel_height: 275,
			overlay_width: 285,
			overlay_opacity: <?php echo get_option('miptheme_hl_opacity');?>,
			overlay_position: 'top',
			overlay_color: '<?php echo get_option('miptheme_hl_overlay');?>',
			overlay_text_color: '#fff',
			caption_text_color: '#dedfdf',
			background_color: '#444444',
			border: 'none',
			nav_theme: 'light',
			frame_width: <?php echo get_option('miptheme_h1_thumb_width');?>,
    		frame_height: <?php echo get_option('miptheme_h1_thumb_height');?>,
			easing: 'easeInOutQuad',
			pause_on_hover: true
		});
	});
</script>

<div id="head-highlight" class="box">
	<div class="head-highlight-inner clearfix">

		<div id="photos" class="galleryview">

			<?php
				global $post;
				$nav = '';
				$my_query = get_posts('include='.get_option('miptheme_hl_ID').'');
				foreach($my_query as $post) :
			?>
				<div class="panel">
					<?php
						if ( get_post_meta($post->ID,'thumb', true) ) {
					?>
				    <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&amp;amp;amp;amp;h=275&amp;amp;amp;amp;w=928&amp;amp;amp;amp;zc=1&amp;amp;amp;amp;q=80" alt="<?php the_title(); ?>" />
					<?php
						}
					?>
			    <div class="panel-overlay">
			      <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
			      <p><?php echo ShortenText( $post->post_content, 250 ); ?></p>
				  <a title="Permanent Link to <?php the_title(); ?>" class="detail" href="<?php the_permalink(); ?>">more detail</a>
			    </div>
				</div>
			<?php
					$nav .= '<li><img src="'. get_bloginfo('template_url') .'/thumb.php?src='. get_post_meta($post->ID, "thumb", $single = true) .'&amp;amp;amp;amp;h='. get_option('miptheme_h1_thumb_height') .'&amp;amp;amp;amp;w='. get_option('miptheme_h1_thumb_width') .'&amp;amp;amp;amp;zc=1&amp;amp;amp;amp;q=80" alt="'. $post->post_title .'" /></li>';
				endforeach;
			?>
			<ul class="filmstrip">
				<?php echo $nav; ?>
			</ul>
		</div>

	</div><!-- end head-highlight-inner -->
</div><!-- end head-highlight -->

6. Include filmstrip navigation on homepage

Open “index.php” file and insert this code at line 12:


<?php include ('filmstrip_navigation.php'); ?>

7. Let’s style the navigation

Open “style.css” file and just insert the following code:


/* Highlight - Main
------------------------------------------------------*/
#head-highlight
{
	padding: 15px 15px 2px 15px;
	margin-bottom: 15px;
	font-size: 1.1em;
	color: #dedfdf;
	background-color: #444;
}

#head-highlight .panel img { border: 1px solid #999; }

#head-highlight h2
{
	font: normal 1.8em/120% Georgia, Times, serif;
	color: #fff;
	margin-bottom: 10px;
}

#head-highlight h2 a
{
	color: #fff;
}

#head-highlight p
{
	color: #dedfdf;
}

#head-highlight a.detail
{
	display: block;
	font: bold 1.0em/140% Arial, Tahoma, sans-serif;
	color: #fff;
	margin-bottom: 5px;
	background: url("images/bullet_1.png") no-repeat 0% 80%;
	padding-left: 18px;
}

8. Set up your navigation

Go to wordpress administration and under Appearance select “Theme Options”. You will se new section here called “Filmstrip navigation”. You have to populate all the fields and click “Update” at the end of page. Here is the example how to insert proper values:

Preview

You can preview live demo here.


Related posts:

Categorized as Freebies, Tutorials, WP templates

About the Author

Danny is a freelance web designer and developer based in Zagreb, Croatia. He is also the founder and owner of Mip Design Studio. In his free time, he creates mostly wordpress themes sold on Themeforest, and on this blog gives support, advices and help. Contact the author | Visit authors website

Comments

6 Responses to “Inspiredblog: How to implement filmstrip navigation from FancyTheme”

  • Chris [colorit] November 4th, 2009 at 4:45 pm

    Wow! You are really the best! Thank you so much for your time and effort, for making this great tutorial. Tonight, it’s late … but these days I will try it for my own to insert all this to my InspiredBlog! Thanks for all your great work, themes and support! It won’t be the last theme, I purchased from you :-)

    So long … Chris

  • Chris [colorit] November 10th, 2009 at 11:11 am

    Hi Mip,

    with this new code for the filmstrip the lavalamp (?) top navigation has been lost (the blue rectangle, when hovering over the top navigation items).

    Any idea how to get it back?
    Thank you very much.

  • Mip November 16th, 2009 at 6:05 am

    Hi Chris,

    Sorry for late response but here is the solution. Look now at section 4 in my tutorial.

    The problem was in easing effect for LavaLamp menu. Instead using “backout” effect we need to use “easeOutBack” effect due to name changing in latest version of easing plugin.

  • Chris [colorit] November 18th, 2009 at 10:03 am

    I see … thank you very much. But you haven’t changed that at your demoblog in this way, because it does not show the right way with lavalamp – or does it still not work?

    http://wptheme5.mipdesign.com/?page_id=240

  • Mip November 18th, 2009 at 1:34 pm

    Sorry Chris,

    I simply forgot. I changed it now, thank you for reminding me.

  • Chris [colorit] November 24th, 2009 at 4:53 am

    Hi Mip,

    I have changed my InspiredBlog-theme exactly how you have described it above, but it looks horrible, if I insert all this to my site.

    The reason:

    1. only 3 images are shown in the slider, more don’t appear
    2. inside the slider all images are 100×100 px and don’t fill out the slider
    3. the thumbnails, no matter what size I use in the theme settings, are everytime about 6 px more height than your white slider thumbnail boxes and
    4. the proportions of the thumbnail images (inside the small white box) don’t fit in it

    Here’s a screenshot:

    http://i49.tinypic.com/t0lvfm.jpg

    I guess, there’s something that don’t fit within the InspiredBlog theme, because I’ve also purchased your FancyTheme (with this filmstrip), and there I have no single problem with this filmstrip and it works perfect.

    Any idea?

Leave a Reply