Hi
I work in a visualisation office. We have quite a big library of 3d Models, which we keep on a internal server. To be able to choose the models we maintain a intranet page, where we have the pictures of the 3d Models, sorted into categories. If you click onto a picture it links to the folder of the model and opens it in finder. It is a quite good system, but has one big flaw: we can not search on the page. It would be really nice, if we could add keywords to the pictures and be able to search for them.
I looked at zenphoto and so far I liked it a lot. I tried to let it run on our internal server and it works great. My questions is now the folowing:
Is it some how possible, to add the link to a file to the pictures. I would like to klick on a picture and then instead of getting the fullsize image of the picture, I would like to activate a link to an 3d File. On the HTML page we maintain so far, this works with the following Code:
`
`
Is there any possibility to get something similar in Zenphoto?
Thanks a lot for any help on the topic.
Comments
Since .c4d files are no web format that Zenphoto respectively any server can displays you need to tell Zenphoto to at least "list" it. You can do that by using the anyFile plugin and adding the suffix to the supported file types.
To get Zenphoto to show at least a thumb in the album view you would have to follow the "video thumb" instructions here:
http://www.zenphoto.org/news/problems-with-albums-and-images#thumbnails-for-videos-or-other-non-standard-image-
Thanks a lot for your help. The hint with the anyFile plug-in works perfect. It loads the .c4d automatic in to the gallery and uses the .jpg as the thumbnail.
I also managed to download the Object, when I click on the thumbnail. I changes the following line in the image.php
`
<?php
if (isImagePhoto()) {
$fullimage = getFullImageURL();
} else {
$fullimage = getFullImageURL(); //It was NULL
}
`
But now I would like to not download the c4d file, instead I would like to open it in the finder. This works best in Safari. Safari opens the finder, if you request a file with: `file:///server/folder/subfolder/3dFile.c4d`
Since the gallery will never be accessed from outside of the LAN, this code would not be a problem.
Unfortunately my PHP knowleg is very basic. My guess would be, to add a function for c4d-files in the full-image.php. Would this be the right place to start?
Thanks a lot for any further help!
That problem is that Zenphoto is used with a web server even if in LAN or locally. That means it is not OS X directly. So if you click on a web link the browser decides what to do with the file. If it can display it it will do so and if not it will download it.
This would give you basically a link to the OS X filesystem path.
`<?php echo '<a href="file://'.pathurlencode($_zp_current_image->getFullImage(SERVERPATH)).'">Link'; ?>`
But since that is outside the web server it is not working as a link because browser have disabled that for security reasons. It only works if entered in the address bar manually.
I think there is a plugin for Firefox. Best you take a look.
An alternative would be to tell the browser which program to use for that file type afterwards. Safari does not have any setting for that but e.g. Firefox does.