Integrating ZenPhoto in Wordpress

2»

Comments

  • Anya Member
    Thanks very much, Acrylian. And I just did upgrade ZP! :) It was definitely time. I'm still getting the same error though, so I'll check out the link you provided and let you know how things go.
  • I think Kieran did a very nice job of integrating his ZenPhoto galleries into his Wordpress blog. Check it out at http://www.kieranoshea.com/gallery/ . Looks like he used gallery templates from http://stopdesign.com/templates/photos/ . Wish he'd post in his blog how he did it.
  • acrylian Administrator, Developer
  • I had difficulty editing the Zenphoto theme, it kept throwing error messages to me.

    What I did instead was change the page title field of my Wordpress gallery page to include an "a" tag to turn the title into a link. So, when someone comes to my website and clicks 'Gallery' they will be taken through to my zenphoto albums. I just gave the zenphoto page a similar look and feel to my main website. Nice easy alternative for those which are having problems with integrating zenphoto and wordpress :)

    Check out what I did at www.ginajphotography.com
  • lucky Member
    Hello
    Is there some way I can include Zen in my wordpress site,so that my menu on wordpress shows? No, I have setup a redirect, but I want to integrate zen in wp.The problem is also that I am not good with coding and php:(
  • lucky Member
    Hello
    Gina, can you tell me step by step how you did that? Please:)
  • lucky Member
    Hello again:)
    I`m not that good in coding,so I would,like to do it like Gina did it.
    But I dont know how:( Can someone please tell me? Like this: "change the page title field of my Wordpress gallery page to include an "a" tag to turn the title into a link. So, when someone comes to my website and clicks 'Gallery' they will be taken through to my zenphoto albums."
  • Jonas Member
    I used the third option in acrylians link (ruzee.com), and it worked great with latest builds of wp and zp. The benefit of following this method is that you don't have to re-style your ZP-theme that much to make it look like your WP-theme. The process of implementation is really simple, you just have to change your ZP theme.

    My result is at http://jonasgran.com/bilder/asia/boracay/DSC_0049.jpg/vis which is still a work in progress (direct link to photo because you probably don't know norwegian)..

    I tweaked it a tiny bit, so that the title from my ZP would work aswell. So I'll just leave the code I used below if anyone want it.

    You basically just replace the header and footer in your ZP-theme index.php, album.php etc with the code below, then adjust your css if anything looks weird - check the ruzee.com tutorial. The second line needs to be changed to YOUR wordpress folder, my installation is in /wordpress/.

    CODE:
    `
    <?php if (!defined('WEBPATH')) die(); ?>
    <?php require($_SERVER['DOCUMENT_ROOT'].'/wordpress/wp-blog-header.php'); ?>

    <?php
    // add the zen css to the wordpress header
    function addcss() {
    global $_zp_themeroot;
    echo '<link rel="stylesheet" href="'.$_zp_themeroot.'/zen.css" type="text/css" />';
    }
    add_action('wp_head', 'addcss');
    function addtitle() {
    echo getBareAlbumTitle().' «';
    }
    add_action('wp_title', 'addtitle');
    ?>

    <?php get_header(); ?>
    <?php db_connect(); // reconnect to zenphoto db ?>
    `
    HERE YOU PUT ALL YOUR ZP THEME CONTENT, TYPICALLY STARTING FROM <div id=content>

    AND THEN AT THE BOTTOM, JUST ADD THIS:

    `
    <?php $wpdb->select(DB_NAME); // reconnect wordpress db ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    `
  • lucky Member
    Hello
    Thanks a lot:)
    I shall try it.
  • lucky Member
    Hello
    Where should I put this?AND THEN AT THE BOTTOM, JUST ADD THIS:

    <?php $wpdb->select(DB_NAME); // reconnect wordpress db ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  • Jonas Member
    @lucky

    just put it at the very end of your ZP theme files (index.php, album.php and image.php at least). it will insert the wordpress footer if there are any.
  • lucky Member
    Thanks:)
Sign In or Register to comment.