Hello -
I'm playing around with creating a theme and don't quite know where to find documentation on theme options.
Here are things that I understand...
1) Some theme options are set in a theme's themeoptions.php file.
2) The function is called ThemeOptions()
3) To set options in the themeoptions.php you use setOptionDefault(___, ___)
What I don't understand is...
1) Where is this function (class?) ThemeOptions() located?
2) How do I know what options I can set?
3) What is the difference between setOptionDefault() and setOption()?
I have been looking at the Stopdesign files because they are pretty organized.
So in the Stopdesign themeoptions.php file there is this code...
`class ThemeOptions {
function ThemeOptions() {
/* put any setup code needed here */
setOptionDefault('Allow_comments', true);
setOptionDefault('Allow_search', true);
setOptionDefault('Gallery_description', 'You can insert your Gallery description using on the Admin Options tab.');
setOptionDefault('Mini_slide_selector', 'Recent images');
}`
But when I got to my admin page I see that my Mini slide selector has been set to Random images (which is what I changed it to). Why doesn't is go back to default if I move away from the theme. Not that I'm complaining, I just don't understand why. And also there are only four setOptionDefault values here but on the theme options tab there are 12 options. The discrepancy leads me to thing that there are other things going on that I'm not aware of.
And then I look at the index.php for the Stopdesign theme and see these thumb_crop_height/width in the <head>...
`<head>
<title><?php printGalleryTitle(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="<?php echo $_zp_themeroot ?>/css/master.css" />
<?php
printRSSHeaderLink('Gallery','Gallery RSS');
zenJavascript();
setOption('thumb_crop_width', 85, false);
setOption('thumb_crop_height', 85, false);
?>
</head>`
So these setOption items *seem* to correspond to the theme options in the options tab BUT they don't update either as when I use this theme AND there are three variables for setOption not two like setOptionDefault.
Where do I find information on these things? I've scoured the online documentation and searched through my actual files for these strings and I'm confused.
Would it be helpful to start asking this stuff on the IRC?
Thanks.
Nif
http://www.crankybunny.com