Pages (2): 1 2   
Member
Member
bill61   06-06-2008, 12:22
#1

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

Administrator
Administrator
acrylian   06-06-2008, 12:59
#2

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.

Member
Member
bill61   06-06-2008, 14:07
#3

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

Administrator
Administrator
acrylian   06-06-2008, 15:11
#4
  1. 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.

  2. 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.

Member
Member
bill61   06-06-2008, 15:36
#5

hi acrylian

so u are talking about this part in the "album.php file" where getNumImages() correct?

Member
Member
Mammlouk   07-06-2008, 15:11
#6

bill61,

I'm quite busy this morning and don't have time to look at this right now, but if no one else takes care of it by tonight I will look at it and post some code for you.

-Jeremy

Member
Member
bill61   07-06-2008, 15:27
#7

hi Mammlouk

thanks a lot.

regards

Member
Member
Mammlouk   09-06-2008, 04:36
#8

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.

Member
Member
bill61   09-06-2008, 13:04
#9

hi Mammlouk

thanks for that

i could not do it for some reason.

i tried few tests but it did not work

regards

Member
Member
Mammlouk   09-06-2008, 13:20
#10

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.

Member
Member
bill61   10-06-2008, 01:24
#11

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

Member
Member
Mammlouk   10-06-2008, 02:21
#12

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

Member
Member
bill61   10-06-2008, 06:22
#13

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

Administrator
Administrator
acrylian   10-06-2008, 10:22
#14

The easiest would be to "mark" the video or mp3 albums using the custom data field that each album has. Fill in for example "mp3" or "video" and then check that with a if/else construct.

Member
Member
bill61   10-06-2008, 10:53
#15

hi acrylian

the thing is i am using " custom data field " for "General Views" and "Adult Viewers Only"

hope developers can come with something more appropriate in regards to this issue

Administrator
Administrator
acrylian   10-06-2008, 10:57
#16

It's not really an issue. Then I would suggest you use another field you maybe don't use currently or simple check using getAlbumTitle().

Member
Member
bill61   10-06-2008, 12:26
#17

hi acrylian

the zenphoto have "album.php" "image.php" but why not : "video,php" and "audio.php" ???

may be it will be the appropriate thing i guess

Administrator
Administrator
acrylian   10-06-2008, 12:41
#18

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.

Member
Member
bill61   10-06-2008, 12:59
#19

hi acrylian

do u mean create another 2 php files in the theme "in this case default" and rename them to : "video,php" and "audio.php"

than inside the file code change to "videos" instead of "photos" and so on ??

Member
Member
Mammlouk   10-06-2008, 13:03
#20

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.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.