Merge commit '25ae7f02cd893127901bd26fc1297d109b781746'
This commit is contained in:
commit
b297aba1e3
@ -84,7 +84,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
->value(module::get_var("gallery", "appletouchicon_url"));
|
->value(module::get_var("gallery", "appletouchicon_url"));
|
||||||
$group->input("logo_path")
|
$group->input("logo_path")
|
||||||
->label(t("URL (relative path) to custom logo"))
|
->label(t("URL (relative path) to custom logo"))
|
||||||
->value(module::get_var("gallery", "logo_path"));
|
->value(module::get_var("th_pear4gallery3", "logo_path"));
|
||||||
$group->input("slideshow_time")
|
$group->input("slideshow_time")
|
||||||
->label(t("Slideshow timeout (in ms)"))
|
->label(t("Slideshow timeout (in ms)"))
|
||||||
->value(module::get_var("th_pear4gallery3", "slideshow_time", "5000"));
|
->value(module::get_var("th_pear4gallery3", "slideshow_time", "5000"));
|
||||||
@ -140,6 +140,13 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
"scale" => t("Shrink and grow an element"),
|
"scale" => t("Shrink and grow an element"),
|
||||||
"none" => t("Disable effects (faster switching)")))
|
"none" => t("Disable effects (faster switching)")))
|
||||||
->selected(module::get_var("th_pear4gallery3", "mosaic_effect", "blind"));
|
->selected(module::get_var("th_pear4gallery3", "mosaic_effect", "blind"));
|
||||||
|
|
||||||
|
/* Advanced Options - Photo settings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||||
|
|
||||||
|
$group = $form->group("edit_theme_adv_photo")->label(t("Advanced Options - Photo settings"));
|
||||||
|
$group->input("resize_size")
|
||||||
|
->label(t("Photo resize size (800 is default)"))
|
||||||
|
->value(module::get_var("gallery", "resize_size", "800"));
|
||||||
/*
|
/*
|
||||||
$group->dropdown("photo_descmode")
|
$group->dropdown("photo_descmode")
|
||||||
->label(t("Description Display Mode"))
|
->label(t("Description Display Mode"))
|
||||||
@ -258,8 +265,10 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
message::success(t("Theme details are reset"));
|
message::success(t("Theme details are reset"));
|
||||||
else:
|
else:
|
||||||
// * General Settings ****************************************************
|
// * General Settings ****************************************************
|
||||||
|
$old_resize_size = module::get_var("gallery", "resize_size", 800);
|
||||||
|
module::set_var("gallery", "resize_size", filter_var($form->edit_theme_adv_photo->resize_size->value, FILTER_VALIDATE_INT, array('options' => array('default' => 800, 'min_range' => 640))));
|
||||||
|
|
||||||
$resize_size = 800;
|
$resize_size = module::get_var("gallery", "resize_size", 800);
|
||||||
|
|
||||||
$build_resize = $form->maintenance->build_resize->value;
|
$build_resize = $form->maintenance->build_resize->value;
|
||||||
$build_thumbs = $form->maintenance->build_thumbs->value;
|
$build_thumbs = $form->maintenance->build_thumbs->value;
|
||||||
@ -271,7 +280,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
endif;
|
endif;
|
||||||
$purge_cache = $form->maintenance->purge_cache->value;
|
$purge_cache = $form->maintenance->purge_cache->value;
|
||||||
|
|
||||||
if ($build_resize):
|
if ($build_resize || $old_resize_size != $resize_size):
|
||||||
graphics::remove_rule("gallery", "resize", "gallery_graphics::resize");
|
graphics::remove_rule("gallery", "resize", "gallery_graphics::resize");
|
||||||
graphics::add_rule("gallery", "resize", "gallery_graphics::resize",
|
graphics::add_rule("gallery", "resize", "gallery_graphics::resize",
|
||||||
array("width" => $resize_size, "height" => $resize_size, "master" => Image::AUTO), 100);
|
array("width" => $resize_size, "height" => $resize_size, "master" => Image::AUTO), 100);
|
||||||
@ -297,7 +306,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
module::set_var("gallery", "page_size", 50);
|
module::set_var("gallery", "page_size", 50);
|
||||||
module::set_var("gallery", "favicon_url", $form->edit_theme->favicon->value);
|
module::set_var("gallery", "favicon_url", $form->edit_theme->favicon->value);
|
||||||
module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value);
|
module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value);
|
||||||
module::set_var("gallery", "logo_path", $form->edit_theme->logo_path->value);
|
$this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value);
|
||||||
|
|
||||||
$this->save_item_state("slideshow_time", $form->edit_theme->slideshow_time->value != 5000, filter_var($form->edit_theme->slideshow_time->value, FILTER_VALIDATE_INT, array('options' => array('default' => 5000, 'min_range' => 1000))));
|
$this->save_item_state("slideshow_time", $form->edit_theme->slideshow_time->value != 5000, filter_var($form->edit_theme->slideshow_time->value, FILTER_VALIDATE_INT, array('options' => array('default' => 5000, 'min_range' => 1000))));
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ class Pear_Controller extends Controller {
|
|||||||
|
|
||||||
if(module::is_active("facebook_comment")) {
|
if(module::is_active("facebook_comment")) {
|
||||||
$v = new Theme_View("facebook_comment.html", "other", "comment-fragment");
|
$v = new Theme_View("facebook_comment.html", "other", "comment-fragment");
|
||||||
$v->url = $item->url();
|
$v->url = $item->abs_url();
|
||||||
|
$v->title = $item->title;
|
||||||
print $v;
|
print $v;
|
||||||
} else {
|
} else {
|
||||||
$comments = ORM::factory("comment")
|
$comments = ORM::factory("comment")
|
||||||
@ -42,7 +43,7 @@ class Pear_Controller extends Controller {
|
|||||||
public function about($id){
|
public function about($id){
|
||||||
$item = ORM::factory("item", $id);
|
$item = ORM::factory("item", $id);
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
$v = new Theme_View("about.html");
|
$v = new Theme_View("about.html","","");
|
||||||
$v->item = $item;
|
$v->item = $item;
|
||||||
$details = array(array("caption" => "Title", "value" => $item->title));
|
$details = array(array("caption" => "Title", "value" => $item->title));
|
||||||
if ( $item->description != $item->title) {
|
if ( $item->description != $item->title) {
|
||||||
|
@ -204,6 +204,7 @@ outline: medium none;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#sidebarContainer {
|
#sidebarContainer {
|
||||||
|
width: 221px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
overflow: none;
|
overflow: none;
|
||||||
@ -313,7 +314,7 @@ bottom: 0;
|
|||||||
#logoButton {
|
#logoButton {
|
||||||
display: block;
|
display: block;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
background: transparent url('../icons/pear_logo_sml.png') no-repeat center center;
|
background: transparent no-repeat center center;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -9,6 +9,7 @@ var pear = {defaultView: "grid",
|
|||||||
slideshowTimeout: 5000,
|
slideshowTimeout: 5000,
|
||||||
currentImg: 0,
|
currentImg: 0,
|
||||||
hovering: false,
|
hovering: false,
|
||||||
|
redirected: false,
|
||||||
mosaicEffect: "" };
|
mosaicEffect: "" };
|
||||||
|
|
||||||
function thumbPadding() {
|
function thumbPadding() {
|
||||||
@ -49,6 +50,9 @@ function scaleIt(v, sliding) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function thumbLoad(index) {
|
function thumbLoad(index) {
|
||||||
|
//Reindex the slideshowImages array.
|
||||||
|
slideshowImages = slideshowImages.filter(function (i) { return i != undefined});
|
||||||
|
|
||||||
//Load non skimming thumbs
|
//Load non skimming thumbs
|
||||||
$('.g-thumbnail').each( function() { $(this).attr('src', thumbImages[$(this).attr('id')]); });
|
$('.g-thumbnail').each( function() { $(this).attr('src', thumbImages[$(this).attr('id')]); });
|
||||||
//Load skimming thumbs
|
//Load skimming thumbs
|
||||||
@ -57,7 +61,12 @@ function thumbLoad(index) {
|
|||||||
//Re-initiate all fancyness.
|
//Re-initiate all fancyness.
|
||||||
if (pear.currentView === 'mosaic') { $('p.giTitle,div.giInfo').hide(); } else { $('p.giTitle,div.giInfo').show(); }
|
if (pear.currentView === 'mosaic') { $('p.giTitle,div.giInfo').hide(); } else { $('p.giTitle,div.giInfo').show(); }
|
||||||
scaleIt($('#imgSlider').slider('value'));
|
scaleIt($('#imgSlider').slider('value'));
|
||||||
$('.g-item:not(.g-hover-item)').each(function (index) { $(this).unbind('click'); if ($(this).is('.g-photo')) { $(this).click(function () { if (pear.currentView === 'mosaic') { swatchImg(index); } else { focusImage(index); } }); }});
|
$('.g-photo:not(.g-hover-item)').each(function (index) {
|
||||||
|
$(this).unbind('click');
|
||||||
|
$(this).click(function () {
|
||||||
|
if (pear.currentView === 'mosaic') { swatchImg(index); }
|
||||||
|
else { focusImage(index); } });
|
||||||
|
});
|
||||||
// Apply jQuery UI icon and hover styles to context menus
|
// Apply jQuery UI icon and hover styles to context menus
|
||||||
if ($(".g-context-menu").length) {
|
if ($(".g-context-menu").length) {
|
||||||
$(".g-context-menu li").addClass("ui-state-default");
|
$(".g-context-menu li").addClass("ui-state-default");
|
||||||
@ -308,6 +317,8 @@ function swatchImg(imageId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pear.currentImg = imageId;
|
pear.currentImg = imageId;
|
||||||
|
//Image count.
|
||||||
|
if (!pear.redirected) { $.get(slideshowImages[pear.currentImg][6]); pear.redirected = false;}
|
||||||
|
|
||||||
if (pear.currentView === 'mosaic') {
|
if (pear.currentView === 'mosaic') {
|
||||||
$('#imageTitle').each(function (i) {$(this).html("<h2></h2>"); $(this).attr("savedH", $(this).height()); });
|
$('#imageTitle').each(function (i) {$(this).html("<h2></h2>"); $(this).attr("savedH", $(this).height()); });
|
||||||
@ -362,7 +373,7 @@ function showHoverView() {
|
|||||||
pear.hideHoverViewHandler = setTimeout(hideHoverView, 3000);
|
pear.hideHoverViewHandler = setTimeout(hideHoverView, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function focusImage(id, redirected) {
|
function focusImage(id) {
|
||||||
if (id < 0 || id >= slideshowImages.length) {
|
if (id < 0 || id >= slideshowImages.length) {
|
||||||
if ( navigation.next !== '') {
|
if ( navigation.next !== '') {
|
||||||
$.get(navigation.next,{ ajax: '1'},function (data) {
|
$.get(navigation.next,{ ajax: '1'},function (data) {
|
||||||
@ -377,10 +388,9 @@ function focusImage(id, redirected) {
|
|||||||
pear.detailView = true;
|
pear.detailView = true;
|
||||||
swatchImg(id);
|
swatchImg(id);
|
||||||
$('#play_detail,#pause_detail').addClass('hidden');
|
$('#play_detail,#pause_detail').addClass('hidden');
|
||||||
|
$('.g-block-content').hide();
|
||||||
$('#detailView').fadeIn('slow');
|
$('#detailView').fadeIn('slow');
|
||||||
showHoverView();
|
showHoverView();
|
||||||
//Image count.
|
|
||||||
//if (!redirected) { $.get(slideshowImages[pear.currentImg][6]); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkCookie() {
|
function checkCookie() {
|
||||||
@ -440,6 +450,7 @@ function startSlideshow() {
|
|||||||
slideShowMode = true;
|
slideShowMode = true;
|
||||||
$('#play_detail').addClass('hidden');
|
$('#play_detail').addClass('hidden');
|
||||||
$('#pause_detail').removeClass('hidden');
|
$('#pause_detail').removeClass('hidden');
|
||||||
|
$('.g-block-content').hide();
|
||||||
$('#detailView').fadeIn('slow');
|
$('#detailView').fadeIn('slow');
|
||||||
showHoverView();
|
showHoverView();
|
||||||
pear.slideShowId = pear.currentImg;
|
pear.slideShowId = pear.currentImg;
|
||||||
@ -510,6 +521,7 @@ function startImageFlow() {
|
|||||||
|
|
||||||
function hideDetailView() {
|
function hideDetailView() {
|
||||||
$('#detailView').hide();
|
$('#detailView').hide();
|
||||||
|
$('.g-block-content').show();
|
||||||
pear.slideShowMode = pear.detailView = false;
|
pear.slideShowMode = pear.detailView = false;
|
||||||
if (pear.slideShowHandler !== null) { clearTimeout(pear.slideShowHandler); }
|
if (pear.slideShowHandler !== null) { clearTimeout(pear.slideShowHandler); }
|
||||||
pear.slideShowHandler = null;
|
pear.slideShowHandler = null;
|
||||||
@ -563,10 +575,11 @@ function pearInit(options) {
|
|||||||
if (h.bgcolor !== undefined) {
|
if (h.bgcolor !== undefined) {
|
||||||
pear.currentBg = h.bgcolor;
|
pear.currentBg = h.bgcolor;
|
||||||
}
|
}
|
||||||
|
pear.redirected = (h.redirected === 'true');
|
||||||
if (h.viewMode !== undefined) {
|
if (h.viewMode !== undefined) {
|
||||||
if (h.viewMode === 'detail') {
|
if (h.viewMode === 'detail') {
|
||||||
pear.currentView = pear.defaultView;
|
pear.currentView = pear.defaultView;
|
||||||
focusImage(pear.currentImg, h.redirected);
|
focusImage(pear.currentImg);
|
||||||
}
|
}
|
||||||
pear.currentView = h.viewMode;
|
pear.currentView = h.viewMode;
|
||||||
}
|
}
|
||||||
@ -594,7 +607,7 @@ function pearInit(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setKeys();
|
setKeys();
|
||||||
thumbLoad();
|
setTimeout(thumbLoad, 1);
|
||||||
$('#gridContainer').endlessScroll({ fireOnce: true, bottomPixels: 200, callback: function(p) { loadMore(); } });
|
$('#gridContainer').endlessScroll({ fireOnce: true, bottomPixels: 200, callback: function(p) { loadMore(); } });
|
||||||
$('#gridContainer').trigger('scroll');
|
$('#gridContainer').trigger('scroll');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name = ".Pear Theme"
|
name = ".Pear Theme"
|
||||||
description = "A theme with the intention to mimic Apples mobile me gallery."
|
description = "A theme with the intention to mimic Apples mobile me gallery."
|
||||||
version = 3.4.1
|
version = 3.5.2
|
||||||
author = "Fredrik Erlandsson <fredrik.e@gmail.com>"
|
author = "Fredrik Erlandsson <fredrik.e@gmail.com>"
|
||||||
site = 1
|
site = 1
|
||||||
admin = 0
|
admin = 0
|
||||||
|
@ -56,5 +56,7 @@ $(window).load(function () {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
<? if(($theme->item())): ?>
|
||||||
<?= $theme->album_bottom() ?>
|
<?= $theme->album_bottom() ?>
|
||||||
|
<? endif ?>
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
<div class="g-facebook-comment-block">
|
<div class="g-facebook-comment-block">
|
||||||
|
<h1>Facebook comments for <?= $title?></h1>
|
||||||
<div id="fb-root"></div>
|
<div id="fb-root"></div>
|
||||||
<script>
|
<script>
|
||||||
(function(d, s, id) {
|
(function(d, s, id) {
|
||||||
@ -10,7 +11,15 @@
|
|||||||
fjs.parentNode.insertBefore(js, fjs);
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
}(document, 'script', 'facebook-jssdk'));
|
}(document, 'script', 'facebook-jssdk'));
|
||||||
</script>
|
</script>
|
||||||
<fb:comments href="<?=$url?>" num_posts="5" width="478" colorscheme="dark"> </fb:comments>
|
<fb:comments href="<?if(isset($url)) { print $url; } else { print url::abs_current(); }?>"
|
||||||
|
num_posts="5" width="478" colorscheme="dark"> </fb:comments>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>FB.XFBML.parse(document.getElementById('g-dialog'));</script>
|
<script>
|
||||||
|
if (typeof(FB) != 'undefined') {
|
||||||
|
FB.XFBML.parse(document.getElementById('g-dialog'));
|
||||||
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
$("#g-dialog").removeClass("g-loading-small");
|
||||||
|
}, 10);
|
||||||
|
</script>
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
<?
|
<?
|
||||||
if (isset($_GET['ajax'])) {
|
if (isset($_GET['ajax'])) {
|
||||||
|
if ($theme->page_subtype == "search") {
|
||||||
|
$v = new View("thumbs.html");
|
||||||
|
$v->children = $content->items;
|
||||||
|
print $v;
|
||||||
|
die(0);
|
||||||
|
}
|
||||||
echo new View("thumbs.html");
|
echo new View("thumbs.html");
|
||||||
die(0);
|
die(0);
|
||||||
}
|
}
|
||||||
@ -9,8 +15,19 @@ if (isset($_GET['ajax'])) {
|
|||||||
foreach (end($parents)->viewable()->children() as $i => $child)
|
foreach (end($parents)->viewable()->children() as $i => $child)
|
||||||
if(!($child->is_album() || $child->is_movie()))
|
if(!($child->is_album() || $child->is_movie()))
|
||||||
if($child->url() == $_SERVER['REQUEST_URI']) {
|
if($child->url() == $_SERVER['REQUEST_URI']) {
|
||||||
header("HTTP/1.1 302 Found");
|
?>
|
||||||
header("Location: ".end($parents)->url()."#img=$i&viewMode=detail&redirected=true");
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" <?= $theme->html_attributes() ?> xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Photo page</title>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
|
<meta http-equiv="refresh" content="1;url=<?=end($parents)->url()?>#img=<?=$i?>&viewMode=detail&redirected=true" />
|
||||||
|
<?= $theme->head() ?>
|
||||||
|
</head>
|
||||||
|
<body>Page moved <a href="<?=end($parents)->url()?>#img=<?=$i?>&viewMode=detail&redirected=true">here</a>.</body>
|
||||||
|
</html>
|
||||||
|
<?
|
||||||
die(0);
|
die(0);
|
||||||
}?>
|
}?>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
@ -131,7 +148,7 @@ if (isset($_GET['ajax'])) {
|
|||||||
<? if (!module::get_var("th_pear4gallery3", "show_breadcrumbs")) break; ?>
|
<? if (!module::get_var("th_pear4gallery3", "show_breadcrumbs")) break; ?>
|
||||||
<? endforeach ?>
|
<? endforeach ?>
|
||||||
<? elseif (!($theme->item() && $theme->item()->id == item::root()->id)): ?>
|
<? elseif (!($theme->item() && $theme->item()->id == item::root()->id)): ?>
|
||||||
<button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all" onclick="window.location='<?= item::root()->url() ?>' + getAlbumHash(0);"> <span class="ui-button-text"><?= html::purify(text::limit_chars($parent->title, module::get_var("gallery", "visible_title_length"))) ?></span> </button>
|
<button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all" onclick="window.location='<?= item::root()->url() ?>' + getAlbumHash(0);"> <span class="ui-button-text"><?= html::purify(text::limit_chars(item::root()->title, module::get_var("gallery", "visible_title_length"))) ?></span> </button>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
</div>
|
</div>
|
||||||
<? if ($theme->item()): ?>
|
<? if ($theme->item()): ?>
|
||||||
@ -208,10 +225,14 @@ if (isset($_GET['ajax'])) {
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
</div>
|
</div>
|
||||||
<? if (module::get_var("gallery", "logo_path")): ?>
|
<? if (!module::get_var("th_pear4gallery3", "hide_logo")): ?>
|
||||||
<style type="text/css">#logoButton { background-image: url("<?= module::get_var("gallery", "logo_path") ?>"); }</style>
|
<? if (module::get_var("gallery", "logo_path")) {
|
||||||
|
$logo_url = url::file(module::get_var("th_pear4gallery3", "logo_path"));
|
||||||
|
} else {
|
||||||
|
$logo_url = $theme->url("icons/pear_logo_sml.png");
|
||||||
|
} ?>
|
||||||
|
<button id="logoButton" style="background-image: url('<?= $logo_url ?>') !important"></button>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!module::get_var("th_pear4gallery3", "hide_logo")): ?><button id="logoButton"></button><? endif ?>
|
|
||||||
</div>
|
</div>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,48 +1,18 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
<? // @todo Set hover on AlbumGrid list items ?>
|
<script>
|
||||||
<form action="<?= url::site("/search") ?>" id="g-search-form" class="g-short-form">
|
$(function() {
|
||||||
<fieldset>
|
$('#g-search').attr('value', '<?=$q?>');
|
||||||
<legend>
|
$('.pearTitle').html("Search results for \"<?=$q?>\"");
|
||||||
<?= t("Search") ?>
|
});
|
||||||
</legend>
|
</script>
|
||||||
<ul>
|
<? if (count($items)): ?>
|
||||||
<li>
|
<?/* Treat dynamic pages just lite album pages. */ ?>
|
||||||
<label for="q"><?= t("Search the gallery") ?></label>
|
<? $children = $items ?>
|
||||||
<input name="q" id="q" type="text" value="<?= html::clean_attribute($q) ?>" class="text" />
|
<? $v = new View("album.html");
|
||||||
</li>
|
$v->set_global("children", $items);// = $items;
|
||||||
<li>
|
print $v;?>
|
||||||
<input type="submit" value="<?= t("Search")->for_html_attr() ?>" class="submit" />
|
<? else: ?>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="g-search-results">
|
|
||||||
<h1><?= t("Search results") ?></h1>
|
|
||||||
|
|
||||||
<? if (count($items)): ?>
|
|
||||||
<ul id="g-album-grid" class="ui-helper-clearfix">
|
|
||||||
<? foreach ($items as $item): ?>
|
|
||||||
<? $item_class = $item->is_album() ? "g-album" : "g-photo" ?>
|
|
||||||
<li class="g-item <?= $item_class ?>">
|
|
||||||
<a href="<?= $item->url() ?>">
|
|
||||||
<?= $item->thumb_img() ?>
|
|
||||||
<p>
|
|
||||||
<?= html::purify(text::limit_chars($item->title, 32, "…")) ?>
|
|
||||||
</p>
|
|
||||||
<div>
|
|
||||||
<?= nl2br(html::purify(text::limit_chars($item->description, 64, "…"))) ?>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<?= $theme->paginator() ?>
|
|
||||||
|
|
||||||
<? else: ?>
|
|
||||||
<p>
|
<p>
|
||||||
<?= t("No results found for <b>%term</b>", array("term" => $q)) ?>
|
<?= t("No results found for <b>%term</b>", array("term" => $q)) ?>
|
||||||
</p>
|
</p>
|
||||||
|
<? endif; ?>
|
||||||
<? endif; ?>
|
|
||||||
</div>
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<? if ($i > 50) break; ?>
|
<? if ($i > 50) break; ?>
|
||||||
<? $item_class = "g-photo"; ?>
|
<? $item_class = "g-photo"; ?>
|
||||||
<? if ($child->is_album()): ?>
|
<? if ($child->is_album()): ?>
|
||||||
<? $item_class = "g-album\" onclick=\"window.location='".$child->url()."/'+getAlbumHash(skimimg);"; ?>
|
<? $item_class = "g-album\" onclick=\"window.location='".$child->url()."/'+getAlbumHash((typeof skimimg === 'undefined') ? 0 : skimimg);"; ?>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? $img_class = "g-thumbnail"; ?>
|
<? $img_class = "g-thumbnail"; ?>
|
||||||
<? if ($child->is_photo()): ?>
|
<? if ($child->is_photo()): ?>
|
||||||
@ -55,9 +55,7 @@ endif;
|
|||||||
<? $item_no = ($page*$page_size)-$page_size; ?>
|
<? $item_no = ($page*$page_size)-$page_size; ?>
|
||||||
<? foreach ($children as $i => $child): ?>
|
<? foreach ($children as $i => $child): ?>
|
||||||
<? if(!($child->is_album() || $child->is_movie())): ?>
|
<? if(!($child->is_album() || $child->is_movie())): ?>
|
||||||
slideshowImages[<?= $item_no++ ?>] = (['<?= $child->resize_url() ?>', '<?= $child->id ?>', '<?= $child->width ?>','<?= $child->height ?>', '<?= htmlentities($child->title, ENT_QUOTES) ?>', '<? if (access::can("view_full", $child)) print "true" ?>', '<?= $child->url() ?>']);
|
slideshowImages[<?= $item_no++ ?>] = (['<?= $child->resize_url() ?>', '<?= $child->id ?>', '<?= $child->resize_width ?>','<?= $child->resize_height ?>', '<?= htmlentities($child->title, ENT_QUOTES) ?>', '<? if (access::can("view_full", $child)) print "true" ?>', '<?= $child->url() ?>']);
|
||||||
<? else: ?>
|
|
||||||
<? $item_no++ ?>
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? endforeach ?>
|
<? endforeach ?>
|
||||||
<?= $javaScript ?>
|
<?= $javaScript ?>
|
||||||
|
Reference in New Issue
Block a user