allow embedded use (fixes #56)
This commit is contained in:
parent
68ca59cac4
commit
050caa5830
4 changed files with 11 additions and 9 deletions
|
@ -32,7 +32,7 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$basedir = dirname(__file__);
|
||||
$basedir = realpath(dirname(__file__));
|
||||
|
||||
/**
|
||||
* Inkludiert die Funktionsbibliothek.
|
||||
|
@ -59,16 +59,17 @@ $template = $theme->getTemplate();
|
|||
|
||||
if ($theme->themetype == 'horizontal') {
|
||||
$inlinestyles = sprintf("#scrollable { width:%dpx; }\n", $thumbinfo[0]);
|
||||
$inlinescript = "var themetype='horizontal';";
|
||||
$inlinescript = array("var themetype='horizontal';");
|
||||
} else {
|
||||
$inlinestyles = sprintf("#scrollable { height:%dpx; }\n", $thumbinfo[0]);
|
||||
$inlinescript = "var themetype='vertical';";
|
||||
$inlinescript = array("var themetype='vertical';");
|
||||
}
|
||||
$inlinescript[] = "var basepath='" . $configuration['basepath'] . "';";
|
||||
|
||||
$template->assign('scripts', $scripts);
|
||||
$template->assign('styles', $styles);
|
||||
$template->assign('inlinestyle', $inlinestyles);
|
||||
$template->assign('inlinescript', $inlinescript);
|
||||
$template->assign('inlinescript', implode("\n", $inlinescript));
|
||||
$template->assign('title', getGalleryTitle($thumbinfo));
|
||||
$template->assign('gallerylinks', getGalleryLinks());
|
||||
$template->assign('thumbnails', getAllThumbnails($thumbinfo));
|
||||
|
|
Reference in a new issue