Hey everyone, after seeing how PicasaWeb does their image navigation, I decided to give it a shot in a theme and this is what I came up with:
http://www.trisweb.com/tests/zenphoto-svn/Random/Desktops/ActionCat-1051338286.jpg.html
Have fun browsing the dynamically loaded images :-) If anyone wants this code, it's freely available in the /themes/testing-js folder from SVN, and it's rather good if I do say so myself.
Okay, back to spending my time on more important things ;-)
Wow. That's nice and quick. I'll be taking a peek at the code if you don't mind...
Let's name it the Tricasa theme! Actually I think the implementation is better than Picasa's...as expected. Anyone can verify this by very rapidly and repeatedly clicking the NEXT button. In Picasa there is an intermediate "de-interlaced" image as @monster called it. This happens even on my fast internet connection (33,623 kbps down according to speakeasy.net). So I think the unsightly intermediate image has nothing to do with network speed.
yes.. it is very very very smooth.. I couldnt click on the next button fast enough to get it to pull a "waiting for the page to load" or a slow down at all. I will be taking a look at the code also..
I like Tricasa... :-)
Thanks for the compliments everyone. It's got a long way to go... there needs to be AJAX for getting and submitting comments, as plain JS possibly adds too much to the initial page load... and it needs to be able to load individual images, and work with back/forward in the browser.
The code is fairly simple... it should speak for itself, but if anyone wants explanation I'd be happy to give it. It took a couple late nights, followed each by a morning where everything made much more sense. ;-)
I'm currently integrating some effects, and converting a lot of the grunt work to jQuery. I believe jQuery will replace scriptaculous as Zenphoto's javascript library of choice for many reasons. It'll do sortable images too, and should make some of the things I'm doing in the new admin much easier. :-)
Very slick.
@monster -- the preload metrics can be configured, for all levels of images (right now it's set to preload 10 hi-res and 25 lo-res images in advance, but obviously that could be wasting a lot of bandwidth).
The testing-js theme relies on SVN code as of rev. [416], but that should be very stable if you want to use it.
can this be integrated in a post(for example in Wordpress)?
hehe, monster already started calling it tricasa
I like the name!
one more thing, rename this thread so more people check it!
like "Tricasa: cool new navigation"
or "mr. trisweb rules"
Haha, thanks Edna. Good idea on the post rename.
It could theoretically be integrated into Wordpress as long as the client supported javascript. It would be a snippet of included code to place the image and navigation buttons, and since that would be standard zenphoto theme template stuff, it would work with any theme.
That's a great idea, perhaps something we can integrate with Zenpress (I'm planning a lot of things for zenpress once we've got it into the main project :-)
Found a "bug"
When pressing an image from the overview, it will be loaded, but pressing nex will not show the next image inline, but the sec one from the overview (and then the next one etc).
Hope you understand what I mean
ps. use this theme in the next ZP as default
I can't hardly wait!
this plugin is excellent! excellent!
Mucho cool. Can't wait to test drive.
Hi again. I've properly adopted the Tricasa theme on my site now: http://www.strangerpixel.com/albums. The navigation is still problematic, as per the bug reported above. Please excuse my amateurish hacks, but I have also changed templatefunctions.php as follows:
`function printImageTitle($editable=false) {
global $_zp_current_image;
if ($editable && zp_loggedin()) {
echo "" . htmlspecialchars(getImageTitle()) . "n";
echo "initEditableTitle('imageTitleEditable');";
} else {
echo "" . htmlspecialchars(getImageTitle()) . "n";
}
}`
This ensures that the getImageTitle() function works if you're logged in or not (which was the error I ran into above). One problem I still have is that when you first load an image, there's no description.