hi
In my new theme, I want to allow a specific album as a slider on the home page.
In my themeoptions.php, I want to manage if this album name exists or not.
I am probably tired, but my code doesn't work as usual, and I don't know why: I have an error when I test if the album is an object (line 6 of the following code).
can you help me to solve my issue?
I would really appreciate.
`
function getOptionsSupported() {
$msg = '';
$zpB_homepage_album_filename = getOption('zpB_homepage_album_filename');
if (!empty($zpB_homepage_album_filename)) {
$album = newAlbum($zpB_homepage_album_filename);
if (!is_object($album) || !$album->exists) {
$msg = '<p class="errorbox">' . gettext('You need to provide a valid Album filename.') . '
';
}
}
return array(
gettext('Homepage') => array('order' => 0, 'key' => 'zpB_homepage', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext_th("Display a home page, with a slider of 5 random picts, the gallery description and the latest news.", 'zpBootstrap')),
gettext('Use this album for homepage slider') => array(
'order' => 2,
'key' => 'zpB_homepage_album_filename',
'type' => OPTION_TYPE_TEXTBOX,
'multilingual' => 0,
'desc' => gettext_th('Album file name for the homepage slider: enter the full filename of the Album to use for the homepage slider. If empty, the whole gallery will be used for the slider.', 'zpBootstrap') . $msg),
gettext('Random pictures for homepage slider') => array('order' => 4, 'key' => 'zpB_homepage_random_pictures', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => 0, 'desc' => gettext_th('Number of random pictures to use for the homepage slider.', 'zpBootstrap')),
gettext('Archive View') => array('order' => 12, 'key' => 'zpB_show_archive', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext_th("Display a link to the Archive list.", 'zpBootstrap')),
gettext('Tags') => array('order' => 14, 'key' => 'zpB_show_tags', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext_th("Check to show a tag cloud in Archive list, with all the tags of the gallery.", 'zpBootstrap')),
gettext('Exif') => array('order' => 16, 'key' => 'zpB_show_exif', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext_th("Show the EXIF Data on Image page. Remember you have to check EXIFs data you want to show on options>image>information EXIF.", 'zpBootstrap'))
);
}
`