Pages (2):    1 2
Administrator
Administrator
acrylian   2008-06-10, 13:08
#21

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.

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

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

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

hi acrylian

i thing so

lets work on Mammlouk suggestion hope i get it right this time

Member
Member
Mammlouk   2008-06-10, 14:55
#24

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

Member
Member
bill61   2008-06-11, 00:27
#25

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:

 | 
Member
Member
Mammlouk   2008-06-11, 01:43
#26

Yeah, I will post it later tonight.

Member
Member
Mammlouk   2008-06-11, 14:49
#27

Sorry, didn't have time last night, I will try to get it up today.

Member
Member
bill61   2008-06-11, 22:14
#28

hi Mammlouk

it is ok

Member
Member
Mammlouk   2008-06-12, 16:12
#29

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.

`

`

Member
Member
bill61   2008-06-13, 09:56
#30

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

Member
Member
Mammlouk   2008-06-13, 13:20
#31

I had a feeling that would be the next question. I'll respond later today.

Member
Member
Mammlouk   2008-06-15, 05:44
#32

I'm really not seeing an easy way of doing this since it's not specified video/image in the database. Let me think about it for a few days. Also, maybe someone who know the internals better can suggest a method.

Administrator
Administrator
acrylian   2008-06-15, 10:03
#33

I still think the easiest would be to use albums specificiall for videos and use an album theme for that or a check by name.

Member
Member
bill61   2008-06-15, 12:46
#34

hi Mammlouk

it is ok thanks

Member
Member
bill61   2008-06-15, 12:49
#35

hi acrylian

i did already changed the names of folders in the directory who contains "videos" to "-vid" in the end of the folder name.

did u mean that i should create a "video.php" in the themes as well ??

Administrator
Administrator
acrylian   2008-06-15, 13:03
#36

I actually meant the renaming of folders (sorry, I don't have the whole thread in mind when I replied. so that might be a nonsens reply at all..:-))

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