Archived
1
0
Fork 0

move more theme related functionality into the theme class (addresses #46)

This commit is contained in:
Jan Dittberner 2009-07-11 15:13:40 +00:00
parent fcea03a800
commit ded7232146
3 changed files with 43 additions and 24 deletions

View file

@ -47,35 +47,19 @@ $gallery = getCurrentGallery();
*/
$thumbinfo = getThumbNailInfo($gallery);
require('includes/template.class.php');
$template = new Template();
$scripts = array('js/jquery.js',
'js/jquery.colorBlend.js',
'js/jquery.lightbox.js',
'scripts/ourhandlers.js');
$styles = array('css/jquery.lightbox.css');
$inlinestyles = sprintf("\n#scrollable { width:%dpx; }\n", $thumbinfo[0]);
$template = $theme->getTemplate();
$inlinestyles .= <<<EOD
a {
font-size: 9px;
if ($theme->themetype == 'horizontal') {
$inlinestyles = sprintf("\n#scrollable { width:%dpx; }\n", $thumbinfo[0]);
} else {
$inlinestyles = sprintf("\n#scrollable { height:%dpx; }\n", $thumbinfo[0]);
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
EOD;
$template->assign('scripts', $scripts);
$template->assign('styles', $styles);
@ -86,9 +70,8 @@ $template->assign('thumbnails', getAllThumbnails($thumbinfo));
$template->assign('firstpreview', getFirstPreview($thumbinfo));
$template->assign('firstdescription', getFirstDescription($thumbinfo));
$template->assign('lang', 'de');
$template->assign('themepath', 'themes/default_horizontal');
$template->assign('gallery', $gallery);
$template->display('themes/default_horizontal/theme.php');
$theme->display();
?>