I am trying to design a few themes with different thumb sizes but the admin theme standard options indicates that "image and album presentation options are standard to all themes".
Is there a way to have two or more themes, each with its own thumb size?
I am looking for a solution, other than having two or more installations, so that each can have it's own thumb size, e.g. one theme with thumbs sized to 60px, another with thumbs 80px, a third with 60-100px, etc.
Also, if possible, I do not want to have to reset the theme options each time I switch from one theme to another.
Would it not make more sense to have the album presentation options apply specifically to each theme, rather than to all themes? I think it makes more sense to have the freedom to use different thumb sizes rather than the same size for all themes.
Comments
Just make 2 themes and pick the themes you want for each folder you want different.
Then use something like.
<?php echo getBareAlbumTitle();?>"><?php printCustomAlbumThumbMaxSpace(getAlbumTitle(),X,Y); ?>
Just put the sizes you want in the X and Y. so different number for each theme.
Of course you it is also possible to do it with some if/else stuff all on one theme page, too. But album themes might be more convenient if don't want to code. You also don't really have to change the theme to use the `maxspace` function as in olihar's example unless you want to use uncropped thumbs.
But pf you intend to use the maxspace ones I would recommend to use the nightly/svn version because of some bugs in those functions in 1.2.2.
Just a quick one related to that. I am running zenphoto version 1.2.2 [3055] at the moment, and there is still problems related to video and it does not display thumbs right, as it just places a single video and links instead of the thumbs, as in the same problem way back when I did some code related to the random sized thumbs problem.
Are there any changes related to that so far or is that still on hold?
I am using
`
" title="<?php echo gettext('View album:'); ?> <?php echo getBareAlbumTitle();?>"><?php printCustomAlbumThumbMaxSpace(getAlbumTitle(),200,200); ?>
`
Btw, also the printRandomImages function as all of the image_album_statistics have now parameters for custom sizes.
The two themes would apply to all albums in the gallery (not only some albums), and each theme has its own thumb size, one is 60x60px, the other 80x80px. I know the two sets of different sized thumbs are generated and cached once, when I change and save the theme options in the admin panel. So far ok.
Now what I want is just go in the panel and select one theme or other and do not have to also modify the theme options in the admin panel. Ideally I should be able to select the theme from the front end but that is another problem to solve next. Questions:
Does the printCustomAlbumThumbMaxSpace(getAlbumTitle(),X,Y) generate the custom thumb sizes once, or each time I view the gallery or album page?
The documentation on the above function does not specify if it grabs a pre-generated thumb or if it generates it each time I view the page. Obviously the second method would be slow and resource intensive and thus be less desirable than just switching the themes and have them pick the right sized thumbs which anyway would already be there in the cache.