bill61: You can assign different themes to each top level album, so you could just double the theme you are using and rename it, then change it's album.php to show "videos" instead of "photos".
But Mammlouks recent suggestions are probably the most convenient ones.
hi Mammlouk
ok, so in this case lets say the sub-album name is : "Amazing Things" so it should be : Amazing Things_vid and the same for audio correct??
and this will be apply for all sub and sub-sub albums in the main album in this case " Videos" and so on correct??
if yes i thing the re-code should in the album.php only or in both album.php and image.php??
regards
bill61:
If I understand you correctly, you have it right. Basically any album that contains actual videos (or audio tracks) will need to have the appropriate naming convention applied.
You should only have to modify album.php
This will take care of handling the checking of albums:
$number = getNumImages();
if ($number > 0) {
if(stristr(getAlbumTitle(), "_vid")){
$multtext = " videos";
$singtext = " video";
}else if(stristr(getAlbumTitle(), "_aud")){
$multtext = " tracks";
$singtext = " track";
}else{
$multtext = " photos";
$singtext = " photo";
}
if (!empty($counters)) { $counters .= ", "; }
if ($number != 1) $number .= gettext($multtext); else $number .= gettext($singtext);
$counters .= $number;
}
If you want to make it so your albums aren't listed with the "_vid" or "aud" being visible then go to all of the places where getAlbumitle() is being printed (NOT WHERE IT IS USED FOR OTHER FUNCTIONS) and replace it with:
str_ireplace("_vid", "", str_ireplace("_aud", "", getAlbumTitle()))
I think that should take car of your problem for now. It's not very elegant, but it gets you by. I was just thinking another option that would avoid the str_ireplace fix for titles would be to put your ivde and audio tags in the album description instead and then change the stristr loop to check in getAlbumDesc() instead of getAlbumTitle().
-Jeremy
hi Mammlouk
i am doing test now but i thing i did not have the code above in the right place
bellow is the full "album.php" file code could u pls re-write it for me according to your code above?
you may find lines like:
i made this lines so i can work out the original from the modifications each time i upgrade.
here is the code:
|
O.k. here is the change to recognize the directories have video/audio/photo based on the name. All of the changes are included within the third "modified" block. I am only posting that portion because the rest of the file you posted has errors due to the forum parsing your a refs. To avoid that in the future surround the code in back tick marks. If you would like me to add the code to strip the vid and aud from being show I will need you to repost the code within bacticks so I can accurately find all applicable portions.
`
`
hi Mammlouk
thanks for the help for the last days
it works perfectly well now.
something else related to this i am not realy sure if it can be done.
i the home page : http://mediabox.alankabout.com/
u will find:
Gallery data
Albums: ## · SubAlbums: ## · Images: ## · Comments: ##
now, how can i get the numbers for : Videos and Audio Tracks ??
in index.php the code is:
Gallery data
Albums: ·
SubAlbums: ·
Images:
·
Comments:
regards