G2 Album Navigation block

archshrk
archshrk's picture

Joined: 2005-04-29
Posts: 45
Posted: Thu, 2007-10-11 19:04

Are there any plans to update the G2 Album Navigation block?
When upgrading from wpg2-2.13 to wpg2-3.0.1 I had to change the code to read
php @readfile('http://<url to your Wordpress site>/wpg2?g2_view=albumselect.Navigation');
and everything worked (except the font is smaller)

-
www.archshrk.com
www.photojulia.com

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Thu, 2007-10-11 19:33

WPG2 3.0 has a new WPG2 Album Tree Widget. Small example at wpg2next.com.

To use it, you first have to "widgetize" your theme. Matt put up some instructions here.

Then you go to WP Admin -> Presentation -> Widgets and drag the WPG2 Album Tree to the part of the sidebar you want it in.

The alternative way of implementing it is the old style of including the PHP in your sidebar code, like this:

<?php
if (function_exists('wpg2_make_html_album_tree')){
?>
			<h2><?php _e('Photo Gallery'); ?></h2>
			<ul><?php print wpg2_make_html_album_tree(); ?></ul>

<?php
}
?>

or even simpler (if you don't want the title above the album tree)

<?php
if (function_exists('wpg2_make_html_album_tree')){
	print wpg2_make_html_album_tree();
}
?>

EDIT: Also, if you're using wpg2header.php, you need to get the dtree javascript and CSS into your header by adding the following to your theme's header file:

<link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('wpurl'); ?>/wp-content/plugins/wpg2/css/dtree.css"/>
<script language="javascript" type="text/javascript" src="<?php bloginfo('wpurl'); ?>/wp-content/plugins/wpg2/js/dtree.js"></script>

I haven't ever installed Aylwin's album tree, so I'm not sure if we're missing any functionality. But, if we are, we can add it in for WPG2 3.1.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
archshrk
archshrk's picture

Joined: 2005-04-29
Posts: 45
Posted: Thu, 2007-10-11 20:14

I tried the first of the alternative ways and there seems to be a glitch.
The expand/collapse all part is there but no actual nav tree (see bottom of right column.
-
www.archshrk.com
www.photojulia.com

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Thu, 2007-10-11 21:16

EDIT: See my edited entry above. I forgot that you need to add the dtree javascript and CSS into your header, if you're using wpg2header.php.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
archshrk
archshrk's picture

Joined: 2005-04-29
Posts: 45
Posted: Thu, 2007-10-11 22:01
 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Thu, 2007-10-11 22:44

All the code is there in the HTML and the javascript and CSS are loading. But using Firebug, it's showing 9 javascript/xml errors. I'm wondering if one of those errors is keeping the dtree javascript from functioning?

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website