hi developers
is there any plan to get things like the bellow to be fixed in the current " nightly build "?
1- in this example page : http://mediabox.alankabout.com/Videos/Amazing%20Things/
u will find (2 photos) or (1 photo) instead of " videos " . it is a video category and still getting number of
"photos"
the same thing apply om mp3 files as well.
2- also is it possible to get the flv thumbnail in the next edition as well ?
thanks
1 - You can (and have to) do that easily yourself in your theme:
`if(getAlbumTitle() === "insert-the-video-album-name") { echo "videos" } else { echo "photos" }
Same for mp3 albums of course. Since you can have mixed albums with all types, Zenphoto does not make any difference on the item type.
2 - What flv thumbnail do you refer to? If you mean the preview thumbnail, that is already in the nightly.
hi
in my album.php i have this:
" title=" ">
" title=" ">
so the changes should be in this code?
if yes how?
in regards to #2
example video page: http://demo.xpoze.org/video.html
my video page: http://mediabox.alankabout.com/Videos/Amazing%20Things/The%20most%20serious%20incidents%20filmed%20globally/
thanks
thanks
The code should go in that part (important is within the next_album() loop). In your current theme page must be a part where currently the "x photos" is shown. There must be a getNumImages(), too. You need "x photo" code within the if clause I posted above. Of course you need to change it to your album name.
Zenphoto is not able to generate thumbs from movies. To get an specific image to be shown as a thumb you need to put image with the same name as the movie to the album folder.
Finally had a minute to look at this. I would put all of your video album names into an array and then check for the current album title with in_array as follows
$number = getNumImages();
if ($number > 0) {
$videoarr = array("Videos1", "Videos2", "Videos3");
if(in_array(getAlbumTitle(), $videoarr)){
$multtext = " videos";
$singtext = " video";
}else{
$multtext = " photos";
$singtext = " photo";
}
if (!empty($counters)) { $counters .= ", "; }
if ($number != 1) $number .= gettext($multtext); else $number .= gettext($singtext);
$counters .= $number;
}
in_array is case sensitive so make sure you enter the names of your video albums appropriately.
It's my fault, I accidentally left an endig brace off. Just add another closing brace after the if/else statement like this:
$number = getNumImages();
if ($number > 0) {
$videoarr = array("Videos1", "Videos2", "Videos3");
if(in_array(getAlbumTitle(), $videoarr)){
$multtext = " videos";
$singtext = " video";
}else{
$multtext = " photos";
$singtext = " photo";
}
}
That should fix you up. Let you know if you have any more problems.
hi Mammlouk
thanks for the reply
may be what i am looking for is slightly diff from what u post.
what i like to have is this:
where is the album contains flv files than it should show instead of : "(# photos)" it should show "(# videos or videos)"
also if the album contains "mp3 or mp4 " than it should show instead of : "(# photos)" it should show "(# audio or audios)"
i am not sure if this can be done because i have no exp with php at all.
the question is : how or is it possible zenphoto can recognize diff files?
logicly speaking it should but logic and programming are two diff things.
hope i am clear
regards
hi bill61,
I completely understand what you are trying to do, although I didn't realize you wanted it for audio also. If you want it to be completely automated then you are out of luck for a reasonably quick solution. Using the method I provided is relatively easy, the only work you have to do is fill the array of video directory names and one for audio directory names similarly. Where it says:
$videoarr = array("Videos1", "Videos2", "Videos3");
The values there get replaced by whatever your Video Album Names are. I know this is not quite as automated as you like, but for now it is the simplest solution. If I have enough time next week after some changes I thought of for the Google Checkout/Cart I might get to looking at it more, but I cannotmake any promises so please do not count on it.
-Jeremy
hi Mammlouk
thanks again
ok, now this is the piece of code i have in album.php already:
.................................
p>
...............................
so it should be like this ???????:
.................................
also, lets assume the actual "flv" name is :
The_most_serious_incidents_filmed_globally_1.flv
so for example :
$videoarr = array("Videos1", "Videos2", "Videos3");
will be:
$videoarr = array("The_most_serious_incidents_filmed_globally_1", "Videos2", "Videos3");
?????
regards
I don't see any reason for that. Why should Zenphoto treat albums differently just because there are videos or audio files? Also you can have albums with all types of supported files. I gave you two not to hard suggestions, here is a third easy one: Use the album theme feature to achive a difference like "videos" instead of "photos" for specific albums.
bill61,
You have it very close. The only thing is that the things you put in the array are going to be the appropriate album names, not the actual filenames.
Another way to tag your folders without having to go bakc an edit the php to add every new one would be to name them with "_vid" and :"_aud" at the end of the album titles. Thne you have something we can check for in the album title. If that is something you are interested in instead I can throw together an example for it.