Hi there,
I'm doing a custom theme and after looking through the zenphoto cms and the forums for more info I can't seem to find how to change the thumbnail size for albums on the index page. I would have though it would be in options but it looks like I need to change a bit of the code.
I've changed the print thumb image code to: printCustomAlbumThumbImage
Which throws back up the full size image as a thumb currently. I'm not much of a developer, but I'm not sure where I put in the image dimensions in the arguement.
It now reads:
<?php printCustomAlbumThumbImage(getAnnotatedAlbumTitle()); ?>
Which I know is wrong. I want the images width to be 190. It'd be perfect if it actually ran off the same bit of script used to gallery thumbs in the album page, that's generated from the options menu, but I think that's quite a bit more complex! lol.
Any help or ideas would be really appreciated.
Comments
<?php string printCustomAlbumThumbImage( string $alt, int $size, [int $width = 190], [int $height = 100], [int $cropw = NULL], [int $croph = NULL], [int $cropx = NULL], [int $cropy = null], [string $class = NULL], [string $id = NULL] );?>
If I take out bit's im not using, what do i need to leave in it's place if anything? I'm getting the error message:
Parse error: syntax error, unexpected T_STRING in /home/matthewbriuk/public_html/megamegamega/mega/themes/default MEGA/index.php on line 26
`<?php printCustomAlbumThumbImage( $alt, $size, $width = 140, $height = 78 ); ?>`
instead of
`<?php printCustomAlbumThumbImage( $alt, $size, $width = 140, $height = 78, $cropw = NULL, $croph = NULL, $cropx = NULL, $cropy = null, $class = NULL, $id = NULL ); ?>`
?
I tried it and it seems to work but I just want to be sure cutting the extra stuff out doesn't cause any potential conflicts anywhere else..
You need to write `<?php printCustomAlbumThumbImage(NULL, NULL, 140, 78 ); ?>` (instead of NULL "" will work, too) if you don't set parameters before the ones you use. You can skip the ones after if there is none used since they always have default values (indicated by `$class=NULL`). If you want to set `$id` for example, you need to set the ones before to NULL/"", too.
Also a look at the theme files itself and the theming tutorial should give a little insight in how php functions are used.
If that article is somehow not clear enough please let us know. Feedback is always appreciated.
as you can see, I'm not any good at php. But I need to fix the size of the albumthumbs
I read all these posts, I read the "how to read" file. I read the function file. I think I somehow understood how it is supposed to work principally, but whatever I type in there my images will not change their size. When I copy the code that acrylian suggested it will also not affect the image size.
It seems I just don't get it.
I know I can't expect it, but I would be very thankful if one of the pros could walk me through this. For you it's few minutes, for me an infinite loop.
Thank you for your time
Best
Sebastian
You also should also clear your image cache.
That's what I thought too. I can't explain it myself, but changes only apply once I alter the code in gallery.php, where I found the same code. To be exact: As far as I can see, zenphoto runs nice an smoothly even if I delete album.php.
In general, there is something strange happening. E.g. editing themeoption.php will not do anything, also deleting the file seems to have no effect. But changing values on the theme option panel will do something.
I must have made a mistake somewhere along the line duplicating your zenpage theme, which I did to customize it.
E.g. if I want to add a menu with menu_manager zenphoto will offer "effervescene", "zenpage" and "mytheme" as possible locations for the navigation. But only placing menus under "zenpage" will create output on my theme, even though I deleted the complete "zenpage"-theme folder.
E.g. once I hit the "edit" button under the duplicated theme I can't edit the files. zenpage throws out a warning:
Fatal error: Die Datei kann nicht bearbeitet werden! in /homepages/2/d94567386/htdocs/alexberg/zp-core/functions-common.php on line 284
seems like the path to my theme is messed up.
I can edit the css file though....
any idea?
Thank you
Sebastian
themeoptions.php creates the theme options on the backend. The top of that tab is theme independent, those below are theme specific and should disappear actually.
However if you copy a theme it shares the same options with the original unless you rename the options (specific ones have a prefix "zenpage_"). Others are general options that are automatically prefixed theme dependent like search enabled.
The menu_manager uses sets which have nothing to do with the theme. In this case the theme can setup a set that is named "zenpage". You can have several sets and call them in various places. The Zenpage themes only calls the set "zenpage".
thank you again for your time.
I did read the theming tutorial. But I will get back to it. I don't want to ask stuff that's already answered.
I changed al the prefixes to "my_theme". I'm totally new to the structure of zenphoto. Using it will clear the the clouds I guess.
I found the menu_manager problem. I forgot to enable it on theme option panel. sorry for that, a lot check boxes...
I still wanted to say that I like zenphoto and zenpage a lot.
I very glad I found it.
I still have some other issues but they belong in other topics.
Thank you
Sebastian
Yes, the best is to use separate topics for each issue.