diff options
-rw-r--r-- | modules/gallery/helpers/gallery_theme.php | 10 | ||||
-rw-r--r-- | themes/default/js/fullsize.js (renamed from modules/gallery/js/fullsize.js) | 0 | ||||
-rw-r--r-- | themes/default/views/photo.html.php | 13 |
3 files changed, 13 insertions, 10 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index c28c9040..44c1d3f1 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -31,16 +31,6 @@ class gallery_theme_Core { url::file("modules/gallery/css/quick.css") . "\" />"; $buf .= html::script("modules/gallery/js/quick.js"); } - if ($theme->page_type == "photo" && access::can("view_full", $theme->item())) { - $buf .= "<script type=\"text/javascript\" >" . - " var fullsize_detail = { " . - " close: \"" . url::file("modules/gallery/images/ico-close.png") . "\", " . - " url: \"" . $theme->item()->file_url() . "\", " . - " width: " . $theme->item()->width . ", " . - " height: " . $theme->item()->height . "};" . - "</script>"; - $buf .= html::script("modules/gallery/js/fullsize.js"); - } if (module::is_active("rss")) { if ($item = $theme->item()) { diff --git a/modules/gallery/js/fullsize.js b/themes/default/js/fullsize.js index f95dc428..f95dc428 100644 --- a/modules/gallery/js/fullsize.js +++ b/themes/default/js/fullsize.js diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index cc4cc750..0fbaa3e0 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -1,4 +1,17 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> + +<? if (access::can("view_full", $theme->item())): ?> +<script type="text/javascript"> + var fullsize_detail = { + close: "<?= url::file("modules/gallery/images/ico-close.png") ?>", + url: "<?= $theme->item()->file_url() ?>", + width: "<?= $theme->item()->width ?>", + height: "<?= $theme->item()->height ?>" + }; +</script> +<script src="<?= url::file("themes/default/js/fullsize.js") ?>" type="text/javascript"></script> +<? endif ?> + <div id="gItem"> <?= $theme->photo_top() ?> |