To trisweb. sub-cat is done

source //my code is poorly commented
live demo
I modified zp 1.0 to support sub-catigories.
if you have any question contact me by email or leave a message on my website
I also add a slideshow function, see demo
ajax.js was modified for better view.


  • wow, seriously great work.

    trisweb, whilst your here: for ZenPhoto help/install/tutorials, why dont you set up a wiki?

  • Sub-categories is good think :)
  • The slideshow looks great!
  • @WeiChen: Welcome to the Zenphoto + Wordpress community! Truly great feaures you've implemented to zenphoto, especially the slideshow and pop-out comment. Looks smooth, both in FF 1.5 and IE 6.0.

    A quick suggestion: Lower the comment pop-out such that it won't block the photo.

    I'll be following your contributions, God bless!
  • I don't think I like the slideshow plugin and the popup commenting did not work for me. I think ZenPhoto should focus on being small, lightweight and flexible, I see it beeing good as a theme but not as something that is integrated into ZP.
  • wow! hopefully the sub cats get implemented soon but the other two new features, i agree with fungifred should be left to the plugin api, whenever its done
  • fungifred: I agree with you that the gallery should be small and flexible. That's why I like zenphoto. However, when I realize it does not support sub-catigories, and waited several days for the new release, finally, I decided to write my own gallery. What you see at is actually written all by myself. But about 10% of the code and the default theme are from ZP. It seems the zp developers are not interested in implementing sub-cats, while many users are expecting this feature, so I spent several hours yesterday to implement this feature to zp. But still there's a lot to do to optimize the code and structure of zp.

    I like the popup commenting, because most people do not comment, and it is a waste of space to show the comment form for each photo. and It is ajaxy. I don't know why it did not work for you. As for the slide show, some of my friends are crazy about it, and it is just my theme, and do not need any support in zp's kernel.
  • I dont think there is much need for you being so negative towards the developers, they have said they are working on it. They have families and lives, so needless to say, they cant work on Zenphoto all the time.

    Your contribution is appreciated but your attitude is not.
  • aitf311: I did mean that. I don't know which sentence makes you think I am "so negative towords the developers".
    sorry for the confusing.
  • Is this possible to include your slideshow system into ZenPhoto without using your theme ? I mean, I made my own theme and I would like to have only the slideshow feature on top of it. Is it possible to do this in any way ?
  • Yes, it is possible.
    download the slideshow code here,
    extract it to your theme folder and add
    include ("slideshow.php");
    in the beginning of your album.php
    then the link to your slidesshow is
    that is the link of your album plus "&slideshow"
  • Hello WeiChen

    Is it possible to only use sub-catigories, and not slide show?
  • I can't see image... :

    Fatal error: Call to a member function on a non-object in ....classes.php on line 761

    any suggestion?
  • I would very much like to use sub-categories alone also. Thanks very much for doing this. If we could get the code for just the sub-cat implementation that would be awesome!
  • Solution of Wei Chen :

    just change this line in index.php

  • Any word on how to add sub-cats? Thanks :)
  • picus:A hacked version of zp add the sub-cats can be find here:
    It works, but still a lot work to do. you can try out.
  • Thanks! I'm going to give it a shot now. I'll let you guys know how it goes. :)
  • It works wonderfully:

    Here are a couple suggestions for future versions/releases. I am working on these now but I'm an admitted php newb.

    1) Add functionality to the admin page so it understands sub folders. As it stands you can not select the sub folders unless you manually edit the url when you're editting an album.

    2) Descriptions do not seem to work in sub-categories. It would be great to have that abilty.

    Otherwise it looks awesome. Thanks so much!
  • Work for me
  • trisweb Administrator
    Wei Chen -- if your gallery really is "about 10%" zenphoto, then I'd prefer if you didn't advertize it on these forums.

    I want to promote compatiblity, not two different forked versions. If you actually rewrote all the code yourself, then promote it on your own site, and please refrain from doing so here.

    I haven't looked at how you've done subcats and other features, but since you say you've made everything from scratch, how can it be much use to us? If you want to help, please work off our own codebase and with the original code, otherwise, take it elsewhere.

    The rest of you are welcome to use whatever you want (especially if you need subcats, or whatever else), but for now, this is NOT zenphoto, and please don't call it that if you use it. Thank you.
This discussion has been closed.