Confused - Zen Page themeoptions.php?

Hello,
first of all: I love ZenPhoto, its object model framework and deeply appreciate all the work that has been done! Thank you so much.!

Now my question probably seems simple - but I searched the forum and User Guide and I'm a still confused and m tired of regenerating the whole cache to figure it out :)

My Questions: If I duplicate the zenpage theme to make a custom one - do I have to rename 'zenpage' for (some) themeoptions (as found in some forum entries) or not (as stated here: http://www.zenphoto.org/news/theming-tutorial#part-4-theming-zenpage -> 4.Open the theme's themeoptions.php file and change option definitions ...Only change those with the theme name in it (For the Zenpage theme don't change any as they are connected with the Zenpage plugin and not the theme!))

What I did and what happens:
(After every step I deleted and regenerated the HTML and Image Cache)

1) I duplicate the theme and did not rename anything -> In Admin Setting image/thumb setting are not greyed out but ignored (seems to be clear)

2) I changed some option values like `setThemeOption('image_size', 780, NULL, 'zenpage');`
-> nothing happens (?)

3) I renamed some options and changed the value like `setThemeOption('image_size', 780, NULL, 'zenpage_custom'); ->` nothing happens (?)

etc... at some point the image and thumb size changed - but I'm not sure what did trigger it - so I would really appreciate a clarification if:

a) on duplicating the zenpage theme all admin options that are not greyed out anymore are still ignored (?)

b) Does themeoptions.php has to be modified? If yes - where exactly?

`
setThemeOption('image_size', 580, NULL, 'zenpage');
setThemeOption('image_use_side', 'longest', NULL, 'zenpage');
setThemeOption('thumb_size', 95, NULL, 'zenpage');
...
if (extensionEnabled('zenpage')) {
setThemeOption('custom_index_page', 'gallery', NULL, 'zenpage', false);
} else {
setThemeOption('custom_index_page', '', NULL, 'zenpage', false);
}
...
createMenuIfNotExists($menuitems, 'zenpage');
`
Thank you very much!

Comments

  • acrylian Administrator, Developer
    Options like `image_size`, `thumb_crop_width` etc. are general theme options (some are disabled on the original Zenpage theme for layout reasons). `image_size` for example, see `getOptionsDisabled()` in the file.

    What you renamed is actually correct. You should also rename those prefixed with `zenpage_`. But not only the `setThemeOption` calls but also the form ones within `getOptionsSupported()` below.

    If unsure look at the differences between the theme options of the Zenpage and Garland theme. Those are quite the same otherwise.

    I will review the tutorial, probably could use some improvements.
  • Thank you very much for your quick response acrylian!
    Actually the tutorial did confuse me, especially the line:
    Only change those with the theme name in it (For the Zenpage theme don't change any as they are connected with the Zenpage plugin and not the theme!)

    But I found a forum thread where you stated that some options should be renamed.

    Taking a look a Garland theme helped a lot and now everything works fine! I renamed everything containing "zenpage" except for the one occurrence in the `if(...)` statement referring to the extension:

    `
    if (extensionEnabled('zenpage')) {
    setThemeOption('...,'zenpage_custom',..);
    } else {...
    `
    Seems to work fine now :)

    *edit*
    Removing the options from `getOptionsDisabled()` allows me to set settings in the admin backend - but still the value of themeoptions.php is used.

    Thank you very much!
  • acrylian Administrator, Developer
    Might be that the tutorial is outdated in some parts and we missed that. We will put that on the list.

    Some options are disabled because the Zenpage theme uses hardcoded values for the image/thumb sizes for layout reasons. If you enable you can set them but they are not used. Unless you further modify the theme naturally.
Sign In or Register to comment.