Hey
I spent a lot of time reading the docs and working on a custom ZenPhoto theme, and now I have everything working except the last part - HTML5 panoramas. I found shreds of advice that using textObject is the way to go, but I haven't found any more concrete advice or examples. Furthermore, the documentation is poor. For example this page
http://www.zenphoto.org/documentation/plugins/TextObject.html is a badly formatted copy of this page
http://www.zenphoto.org/documentation/plugins/media/_zp-extensions---class-textobject.php.html and both pages reference code that is not there: "the first three lines of code below". I learn best by example, and I have no examples to go by.
I understand that using textObject I should be able to upload foo.html which contains the actual panorama code (Pano2VR-generated for instance) and foo.jpg should be picked up by ZenPhoto and used as the thumbnail.
Please advise on the most simple way to have the above behaviour using textObject. Ideally if you could point to a theme that uses that without any exotic additions to serve as an example, that would be ideal.
Comments
The two pages are not the same, one is for the class and the other for the actual file itself. That they are similar is because the file is the class :-)
It is really simple. You use put your code into a .txt file and upload it like an image to an album. Then the content is displayed within an iFrame. Live example with Youtube and other services' videos (using the embed code provided in this case):
http://www.zenphoto.org/screenshots/screencasts/installazione-zenphoto-by-pJ-hooker.txt.html
If you need a thumb for the gallery follow the video thumb way.
What code do I put in a text file? Show an example please. Document this somewhere. Maybe it is simple, once you know the way.
It is not the usage documentation anyway
As I said about already, create a .txt file, put the html code you want to use within it and upload it like an image, video, audio file to an album. That's it.
There is also a short doc for youtube videos here:
http://www.zenphoto.org/news/using-external-sources#using-videos-from-youtube-or-other-portals
It's the same for all kinds of usages anyway.
That is the first part of the pages above basically:
Yes, looking at the files directly is the other way. We cannot much change what the tool that generates the doc from the PHP file comments generates how. The only wrong above I see is the somehow misaligned sidebar on the right and I notice it for the first time actually. So thanks for pointing that out as we cannot test all pages generated.
Since that is the 1.4.5.x doc we will create a 1.4.6 one some time soon and try to change things there.
As for the docs, there are numerous issues, for example:
* zp-core/zp-extensions/class-textobject/class-textobject_core.php Line 21 ends up not being part of point 2 of the list in the docs though it should be. Maybe if you add another space before "as it is the indicator" in the php file then your doc generation program will treat it like its part of the second point (that's what MediaWiki would do anyway, maybe your soft follows the same way).
* /var/www/localhost/htdocs/zp/zp-core/zp-extensions/class-textobject.php Here lists are explicitly created using HTML so no issues with that, but there are visible closing tags </var> because two of the <var> tags were closed twice each in the php file. "addPlginType" typo, "dumpped" typo. etc
http://www.zenphoto.org/albums/screenshots/screencasts/installazione-zenphoto-by-pJ-hooker.txt
As you see you just put text or in this case embed html code you get from youtube in it. The plugin hooks into the normal image functions for the sized uncropped that is generally used on image.php. It cannot scale like an image since it is no so the size is the iFrame size basically.
I updated zenphoto to 1.4.6 today.
I have this (sub)album layout: zp/albums/Panoramas/House of Karin/
Into that I would put panoramas of every room, and each panorama resides in a folder. I don't want to create further subalbums, just to have a text file for each room treated as an image, so image-pano.php gets called and handles it. Now if I put a text file into zp/albums/Panoramas/House of Karin/ then I see it show up, however if I create folders (which I have to, because each pano stores hundreds of small images in subfolders) then zenphoto completely ignores the <?php while (next_image()): ?> part of album-pano.php!
I thought maybe I did something wrong, so I copied the exact code from themes/basic/album.php but it behaves the same way!
How do I get ZP to ignore folders in "zp/albums/Panoramas/House of Karin/" and to show the text files? Is this a 1.4.6 bug?
class-textobject and class-AnyFile are enabled.
album-pano.php:
`
<?php while (next_album()): ?>
" title="<?php echo gettext('View album:'); printAnnotatedAlbumTitle(); ?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>
" title="<?php echo gettext('View album:'); printAnnotatedAlbumTitle(); ?>">
<?php endwhile; ?>
<?php while (next_image()): ?>
" title="<?php printBareImageTitle(); ?>"><?php printImageThumb(getAnnotatedImageTitle()); ?>
<?php printImageTitle(); ?>
<?php printImageDate(""); ?>
<?php printImageDesc(); ?>
<?php endwhile; ?>
`
Maybe related: I can see all folders in that path even though they are not published! I am logged in as the ZP admin but that shouldn't matter should it? I should see them in the ZP admin interface, but not when viewing the gallery.
In Konqueror where I am not logged in, I see only that text.txt file with the text.jpg thumbnail. http://i.imgur.com/FPAVcQZ.png
Is this a bug?
To your problem. Zenphoto has two basic setting for combined album and image pages. Generally the albums (next_album loop) comes first, the images (next_image loop) second. Order can be changed but is against internals because there is a setting to have the first page combined with albums and images or albums first page and images on the others.
Since loggedin you see the unpublished albums as well, you don't see the images. If you don't have any pagination on your theme page you of course cannot get to page 2 with the images.
Is there any way to have me logged in as master not see unpublished albums when viewing my gallery 'the usual way'? Of course I'd expect to see them in the admin interface (zp-core/admin), but not when just normally viewing.