Help! - Displaying Album Titles in a Wordpress sidebar

Hi, I'm just a newbie in the process of getting Zenphoto to work how I want it to in Wordpress and have come up against a wall which I can't clamber over...

What I'm trying to do is to pull the 'Album Titles' as a link which I want to display in my Wordpress themes 'sidebar.php' as a listed menu. So that I can have access to the Albums from any page on the site..

I've found a way of intergrating Zenphoto into Wordpress from tech.einaregilsson.com which worked and which I am happy with so am just trying to get this sidebar thing working.

Has anyone has used this method and knows how I might go about doing this!

The current install is at wiredkiwis.com/photos
I'm using one database for both WP & ZP.

PS:
Dont take any notice of the current sidebar menu to my photos as this is another attempt which will be changed :)

Any help for this newbie is appericated

Comments

  • Hi I did this on my site like this

    I have zenphoto integerated into wordpress according to ruzee's method.

    create an file called albumlist.php in your themefolder

    in this file I only did put this

    `
  • ps in the while next loop the link to the albums dropped out of the paste.. i mean i can't seem to paste link code in a reply..the printAlbumTitle should link to your albums as it does on my site
  • or if you want to have also the subalbums generated, copy the code in zenphoto/zp-core/plugins/print_album_menu.php to the albumlist.php file you made before and in this file only place a:

    '<?php printAlbumMenu("list",""); ?>'
  • Hey thanks Bert, I'm sure you've sent me in the right direction :)

    I got it sort of working for a sec.... but not quite...

    Because of the way I've got it set up I tried the printAlbumMenu("list","","","","",""); in the sidebar.php of wordpress and put require_once("print_album_menu.php"); in the wordpress header....
    this worked fine in the wiredkiwis.com/photos/ address for Zenphoto but it didnt like it anywhere else...

    is this to do with the require_once ? should I be use something else?

    I really don't know php i just guess a bit and copypaste the rest

    anyone got any ideas?
  • acrylian Administrator, Developer
    Blair, the function like every zenphoto function does not work outsite zenphoto, because it uses zenphoto stuff that is not avaiable in wordpress of course. Here is the full tutorial:

    Make a new php file for example called printalbummenu.php, put this into your zenphoto theme's folder and then simply insert the function into the file.
    `

    <?php printAlbumMenu(); ?>` // with your desired options of course

    Then call this file as a custom page in the wordpress sidebar with
    `require_once or include ("http://www..de/zenphoto/page/printalbummenu");`
    if you don't have mod_rewrite use this link:
    `http://www..de/zenphoto/index.php?p=printalbummenu`

    By the way, you can do it that way with other functions like latestimages or randomimages too.
  • Hi acrylian, I've tried your instructions but no luck... maybe it the way I've got evrything set up?

    this is how I got to this point....from tech.einaregilsson.com

    Copy the wordpress-integration-zp-theme folder into your zenphoto/themes folder.

    Go to your ZenPhoto admin web, choose Options and activate the theme called ‘Wordpress Integration Theme’.

    Copy the files (zp-index.php, zp-image.php, zp-album.php, zp-style.css) from the wordpress-theme-files folder into your current Wordpress theme folder, /wp-content/themes/yourthemename.

    Copy the zen-integration.php file into your Wordpress plugin folder, /wp-content/plugins .

    Goto your Wordpress admin interface, choose Plugins, and activate the ‘Zen Integration’ plugin.

    Note that the plugin assumes that your zenphoto folder is directly below your Wordpress folder and is called ‘zenphoto’, ‘photos’ or ‘gallery’.

    So I did as instructed above and its all working great, just what I was looking for.

    To get the wordpress sidebar to show up I just used:
    `<?php include (TEMPLATEPATH . '/leftsidebar.php'); ?>`
    in the zp-index, zp-album, zp-image files which are in my wordpress theme.

    Could I maybe use something like this to display the printalbummenu.php file?

    Anyway, I'll give it a go when I get home.....

    Cheerrs
    ----------
    ps: would using a shared database with a suffix eg: zpalbum, zpimage etc cause problems?
  • acrylian Administrator, Developer
    You are right, that doesn't work. There was a mistake in my tutorial too. Of course a file with only printAlbumMenu can't work because the function is not defined anywhere that way. The function will need to be included of course.

    But even that seems not to work. I had not really tested it before posting, but I did the same thing with latest images within Website Baker CMS (with zp 1.0.8.2) twice.... I am really sorry.

    I am not familar with the wordpress intregration you mentioned. Please share if you figure that out!

    A shared database should not cause problems, but set prefixes within the zenphoto option.
  • Thats cool :) thanks for trying anyway...

    ...errrr so is there a way for wordpress to 'see' zenphoto functions?

    maybe someone could come up with a plugin for the above mentioned menu method?

    I'm sure it would be very popular and a great way to get zenphoto intergrated into wordpress!
    [hint]

    ok thats me for now... I'll stop nagging..

    Cya
  • ok.... I've tried all sorts but no luck as yet....

    got a question tho...

    Q: Is it possible to use an RSS feed from the Gallery to generate the Ablum Title links which could in turn be displayed in the wordpress sidebar?

    hmmmm just wondering..
  • acrylian Administrator, Developer
    That's an idea. You could try this RSS to html parser: http://www.feedforall.com/free-php-script.htm
  • Follow this guide and you should be good to go:
    http://www.zenphoto.org/support/topic.php?id=1998&replies=1
Sign In or Register to comment.