summaryrefslogtreecommitdiff
path: root/themes/greydragon_old/views
diff options
context:
space:
mode:
Diffstat (limited to 'themes/greydragon_old/views')
-rw-r--r--themes/greydragon_old/views/album.html.php68
-rw-r--r--themes/greydragon_old/views/block.html.php29
-rw-r--r--themes/greydragon_old/views/calpage.html.php257
-rw-r--r--themes/greydragon_old/views/dynamic.html.php38
-rw-r--r--themes/greydragon_old/views/exif_sidebar.html.php18
-rw-r--r--themes/greydragon_old/views/gd_admin_include.html.php180
-rw-r--r--themes/greydragon_old/views/info_block.html.php29
-rw-r--r--themes/greydragon_old/views/movie.html.php38
-rw-r--r--themes/greydragon_old/views/no_sidebar.html.php19
-rw-r--r--themes/greydragon_old/views/page.html.php259
-rw-r--r--themes/greydragon_old/views/paginator.html.php194
-rw-r--r--themes/greydragon_old/views/photo.html.php124
-rw-r--r--themes/greydragon_old/views/rootpage.html.php59
-rw-r--r--themes/greydragon_old/views/rootpage.html.php_fix46
-rw-r--r--themes/greydragon_old/views/rss_block.html.php30
-rw-r--r--themes/greydragon_old/views/search.html.php35
-rw-r--r--themes/greydragon_old/views/sidebar.html.php27
-rw-r--r--themes/greydragon_old/views/user_profile.html.php44
18 files changed, 1494 insertions, 0 deletions
diff --git a/themes/greydragon_old/views/album.html.php b/themes/greydragon_old/views/album.html.php
new file mode 100644
index 0000000..d371cae
--- /dev/null
+++ b/themes/greydragon_old/views/album.html.php
@@ -0,0 +1,68 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<div id="g-album-header">
+ <?= $theme->album_top() ?>
+ <h1><?= $theme->get_item_title($item, TRUE) ?> <?= ($theme->item()->id != item::root()->id && 0 < count($item->children())) ? t("(%count Bilder)", array("count"=>count($item->children()))) : ""?></h1>
+</div>
+
+<?= $theme->add_paginator("top"); ?>
+
+<? if (($theme->album_descmode == "top") and ($item->description)): ?>
+ <div id="g-info"><div class="g-description"><?= $theme->bb2html(html::purify($item->description), 1); ?></div></div>
+<? endif; ?>
+
+<div class="g-album-grid-container">
+<ul id="g-album-grid">
+<?
+ if (count($children)):
+ $siblings = $item->children();
+ if (($theme->disablephotopage) && (count($siblings) > count($children))):
+ $j = 0;
+ foreach ($siblings as $i => $sibling):
+ if ($sibling->rand_key == $children[$j]->rand_key):
+ echo $theme->get_thumb_element($sibling, !$theme->hidecontextmenu);
+ if ($j + 1 < count($children)):
+ $j++;
+ endif;
+ else:
+ echo $theme->get_thumb_link($sibling);
+ endif;
+ endforeach;
+ else:
+ foreach ($children as $i => $child):
+ echo $theme->get_thumb_element($child, !$theme->hidecontextmenu);
+ endforeach;
+ endif;
+ else:
+ if ($user->admin || access::can("add", $item)):
+ $addurl = url::site("uploader/index/$item->id"); ?>
+ <li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.", array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
+ <? else: ?>
+ <li><?= t("There aren't any photos here yet!") ?></li>
+ <? endif; ?>
+<? endif; ?>
+</ul>
+</div>
+
+<? if (($theme->album_descmode == "bottom") and ($item->description)): ?>
+ <div id="g-info"><div class="g-description"><?= $theme->bb2html(html::purify($item->description), 1) ?></div></div>
+<? endif; ?>
+<?= $theme->album_bottom() ?>
+
+<?= $theme->add_paginator("bottom"); ?>
diff --git a/themes/greydragon_old/views/block.html.php b/themes/greydragon_old/views/block.html.php
new file mode 100644
index 0000000..e9d1a85
--- /dev/null
+++ b/themes/greydragon_old/views/block.html.php
@@ -0,0 +1,29 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<? if ($anchor): ?>
+<a name="<?= $anchor ?>"></a>
+<? endif ?>
+<div id="<?= $css_id ?>" class="g-block">
+ <? if (isset($theme) and ($theme->is_blockheader_visible)): ?>
+ <h2><?= $title ?></h2>
+ <? endif ?>
+ <div class="g-block-content">
+ <?= $content ?>
+ </div>
+</div>
diff --git a/themes/greydragon_old/views/calpage.html.php b/themes/greydragon_old/views/calpage.html.php
new file mode 100644
index 0000000..c87d2c9
--- /dev/null
+++ b/themes/greydragon_old/views/calpage.html.php
@@ -0,0 +1,257 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<!DOCTYPE html >
+<? $theme->load_sessioninfo(); ?>
+<html <?= $theme->html_attributes() ?> xml:lang="en" lang="en" <?= ($theme->is_rtl)? "dir=rtl" : null; ?> >
+<?
+ $item = $theme->item();
+ if (($theme->enable_pagecache) and (isset($item))):
+ // Page will expire in 60 seconds
+ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 60).'GMT');
+ header("Cache-Control: public");
+ header("Cache-Control: post-check=3600, pre-check=43200", false);
+ header("Content-Type: text/html; charset=UTF-8");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ endif;
+?>
+<!-- <?= $theme->themename ?> v.<?= $theme->themeversion ?> (<?= $theme->colorpack ?> : <?= $theme->framepack ?>) - Copyright (c) 2009-2012 Serguei Dosyukov - All Rights Reserved -->
+<head>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<? $theme->start_combining("script,css") ?>
+<? if ($page_title): ?>
+<? $_title = $page_title ?>
+<? else: ?>
+<? if ($theme->item()): ?>
+<? $_title = $theme->get_item_title($theme->item()); ?>
+<? elseif ($theme->tag()): ?>
+<? $_title = t("Photos tagged with %tag_title", array("tag_title" => $theme->bb2html($theme->tag()->name, 2))) ?>
+<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
+<? $_title = $theme->bb2html(item::root()->title, 2); ?>
+<? endif ?>
+<? endif ?>
+<title><?= $_title ?></title>
+<? if ($theme->disable_seosupport): ?>
+<meta name="robots" content="noindex, nofollow, noarchive" />
+<meta name="googlebot" content="noindex, nofollow, noarchive, nosnippet, noodp, noimageindex, notranslate" />
+<meta name="slurp" content="noindex, nofollow, noarchive, nosnippet, noodp, noydir" />
+<meta name="msnbot" content="noindex, nofollow, noarchive, nosnippet, noodp" />
+<meta name="teoma" content="noindex, nofollow, noarchive" />
+<? endif; ?>
+<!-- Internet Explorer 9 Meta tags : Start -->
+<meta name="application-name" content="<?= $_title; ?>" />
+<meta name="msapplication-tooltip" content="<?= t("Start"); ?> <?= $_title; ?>" />
+<meta name="msapplication-starturl" content="<?= item::root()->url() ?>" />
+<? if ($theme->allow_root_page): ?>
+<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Page") ?>; action-uri=<?= item::root()->url(); ?><?= $theme->permalinks["root"]; ?>; icon-uri=favicon.ico" />
+<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Album") ?>; action-uri=<?= item::root()->url(); ?><?= $theme->permalinks["enter"]; ?>; icon-uri=favicon.ico" />
+<? else: ?>
+<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Album") ?>; action-uri=<?= item::root()->url(); ?>; icon-uri=favicon.ico" />
+<? endif; ?>
+<? if (identity::active_user()->admin): ?>
+<meta name="msapplication-task-separator" content="gallery3-greydragon" />
+<meta name="msapplication-task" content="name=<?= t("Admin") ?>: <?= t("Dashboard") ?>; action-uri=<?= url::site("admin"); ?>; icon-uri=favicon.ico" />
+<? endif; ?>
+<!-- Internet Explorer 9 Meta tags : End -->
+
+<link rel="shortcut icon" href="<?= $theme->favicon ?>" type="image/x-icon" />
+<? if ($theme->appletouchicon): ?>
+<link rel="apple-touch-icon" href="<?= $theme->appletouchicon; ?>"/>
+<? endif; ?>
+<?= $theme->script("json2-min.js") ?>
+<?= $theme->script("jquery.js") ?>
+<?= $theme->script("jquery.form.js") ?>
+<?= $theme->script("jquery-ui.js") ?>
+<?= $theme->script("gallery.common.js") ?>
+<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
+<script type="text/javascript">
+ var MSG_CANCEL = <?= t('Cancel')->for_js() ?>;
+</script>
+<?= $theme->script("gallery.ajax.js"); ?>
+<?= $theme->script("gallery.dialog.js"); ?>
+
+<? /* These are page specific but they get combined */ ?>
+<? if ($theme->page_subtype == "photo"): ?>
+<?= $theme->script("jquery.scrollTo.js"); ?>
+<? elseif ($theme->page_subtype == "movie"): ?>
+<?= $theme->script("flowplayer.js") ?>
+<? endif ?>
+
+<?= $theme->head() ?>
+
+<? // Theme specific CSS/JS goes last so that it can override module CSS/JS ?>
+<?= $theme->theme_js_inject(); ?>
+<?= $theme->theme_css_inject(); ?>
+<?= $theme->get_combined("css"); // LOOKING FOR YOUR CSS? It's all been combined into the link ?>
+<?= $theme->custom_css_inject(TRUE); ?>
+<?= $theme->get_combined("script") // LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link ?>
+
+<? if ($theme->thumb_inpage): ?>
+<style type="text/css">
+ #g-column-bottom #g-thumbnav-block, #g-column-top #g-thumbnav-block { display: none; }
+<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?>
+ html { margin-top: 30px !important; }
+<? endif; ?>
+</style>
+<? endif; ?>
+</head>
+<? if ($theme->item()):
+ $item = $theme->item();
+ else:
+ $item = item::root();
+ endif; ?>
+<body <?= $theme->body_attributes() ?><?= ($theme->show_root_page)? ' id="g-rootpage"' : null; ?> <?= $theme->get_bodyclass(); ?>>
+<?= $theme->page_top() ?>
+<?= $theme->site_status() ?>
+<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?>
+ <div id="g-site-menu" class="g-<?= $theme->mainmenu_position; ?>">
+ <?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
+ </div>
+<? endif; ?>
+<div id="g-header">
+ <?= $theme->header_top() ?>
+<? if ($theme->viewmode != "mini"): ?>
+<? if ($header_text = module::get_var("gallery", "header_text")): ?>
+<span id="g-header-text"><?= $theme->bb2html($header_text, 1) ?></span>
+<? else: ?>
+ <a id="g-logo" href="<?= item::root()->url() ?><?= ($theme->allow_root_page)? $theme->permalinks["root"] : null; ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>">
+ <img alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= $theme->logopath ?>" />
+ </a>
+<? endif; ?>
+<? endif; ?>
+<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position != "bar")): ?>
+ <div id="g-site-menu" class="g-<?= $theme->mainmenu_position; ?>">
+ <?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
+ </div>
+<? endif ?>
+
+ <?= $theme->messages() ?>
+<?= $theme->header_bottom() ?>
+
+<? if ($theme->loginmenu_position == "header"): ?>
+ <?= $theme->user_menu() ?>
+<? endif ?>
+<? if (empty($parents)): ?>
+<?= $theme->breadcrumb_menu($theme, null); ?>
+<? else: ?>
+ <?= $theme->breadcrumb_menu($theme, $parents); ?>
+ <? endif; ?>
+<?= $theme->custom_header(); ?>
+</div>
+<? if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "top")): ?>
+<div id="g-column-top">
+ <?= new View("sidebar.html") ?>
+</div>
+<? endif; ?>
+<div id="g-main">
+ <div id="g-main-in">
+ <? if (!$theme->show_root_page): ?>
+ <?= $theme->sidebar_menu($item->url()) ?>
+ <div id="g-view-menu" class="g-buttonset<?= ($theme->sidebarallowed!="any")? " g-buttonset-shift" : null; ?>">
+ <? if ($page_subtype == "album"):?>
+ <?= $theme->album_menu() ?>
+ <? elseif ($page_subtype == "photo") : ?>
+ <?= $theme->photo_menu() ?>
+ <? elseif ($page_subtype == "movie") : ?>
+ <?= $theme->movie_menu() ?>
+ <? elseif ($page_subtype == "tag") : ?>
+ <?= $theme->tag_menu() ?>
+ <? endif ?>
+ </div>
+ <? endif; ?>
+ <? switch ($theme->sidebarvisible):
+ case "left":
+ echo '<div id="g-column-left">';
+ $closediv = TRUE;
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '<div id="g-column-right">';
+ $closediv = TRUE;
+ else:
+ $closediv = FALSE;
+ endif;
+ break;
+ default:
+ echo '<div id="g-column-right">';
+ $closediv = TRUE;
+ break;
+ endswitch; ?>
+<? if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate")): ?>
+<? if (($theme->sidebarvisible == "none") or ($theme->sidebarvisible == "bottom") or ($theme->sidebarvisible == "top")): ?>
+<? if (($theme->thumb_inpage) and ($page_subtype == "photo")): ?>
+<?= '<div class="g-toolbar"><h1>&nbsp;</h1></div>'; ?>
+<?= $theme->get_block_html("thumbnav"); ?>
+<? endif; ?>
+<? else: ?>
+<?= new View("sidebar.html") ?>
+<? endif; ?>
+<? endif ?>
+<?= ($closediv)? "</div>" : null; ?>
+
+<? switch ($theme->sidebarvisible):
+ case "left":
+ echo '<div id="g-column-centerright">';
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '<div id="g-column-centerleft">';
+ else:
+ echo '<div id="g-column-centerfull">';
+ endif;
+ break;
+ default:
+ echo '<div id="g-column-centerleft">';
+ break;
+ endswitch;
+
+ if ($theme->show_root_page):
+ echo new View("rootpage.html");
+ else:
+ echo $content;
+ endif; ?>
+ </div>
+ </div>
+</div>
+<? if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "bottom")): ?>
+<div id="g-column-bottom">
+ <?= new View("sidebar.html") ?>
+</div>
+<? endif; ?>
+<div id="g-footer">
+<? if ($theme->viewmode != "mini"): ?>
+<?= $theme->footer() ?>
+<? if ($footer_text = module::get_var("gallery", "footer_text")): ?>
+<span id="g-footer-text"><?= $theme->bb2html($footer_text, 1) ?></span>
+<? endif ?>
+ <?= $theme->credits() ?>
+ <ul id="g-footer-rightside"><li><?= $theme->copyright ?></li></ul>
+<? if ($theme->loginmenu_position == "default"): ?>
+ <?= $theme->user_menu() ?>
+<? endif; ?>
+<? endif; ?>
+<?= $theme->custom_footer(); ?>
+</div>
+<?= $theme->page_bottom() ?>
+</body>
+</html>
diff --git a/themes/greydragon_old/views/dynamic.html.php b/themes/greydragon_old/views/dynamic.html.php
new file mode 100644
index 0000000..a749d1c
--- /dev/null
+++ b/themes/greydragon_old/views/dynamic.html.php
@@ -0,0 +1,38 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<? if (!isset($title)):
+ $title = "";
+ endif;
+?>
+<div id="g-album-header">
+ <div id="g-album-header-buttons">
+ <?= $theme->dynamic_top() ?>
+ </div>
+ <h1><?= html::clean($title) ?></h1>
+</div>
+<?= $theme->add_paginator("top"); ?>
+<div class="g-album-grid-container">
+<ul id="g-album-grid">
+ <? foreach ($children as $i => $child): ?>
+ <?= $theme->get_thumb_element($child) ?>
+ <? endforeach ?>
+</ul>
+</div>
+<?= $theme->dynamic_bottom() ?>
+<?= $theme->add_paginator("bottom"); ?>
diff --git a/themes/greydragon_old/views/exif_sidebar.html.php b/themes/greydragon_old/views/exif_sidebar.html.php
new file mode 100644
index 0000000..e31adf2
--- /dev/null
+++ b/themes/greydragon_old/views/exif_sidebar.html.php
@@ -0,0 +1,18 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
diff --git a/themes/greydragon_old/views/gd_admin_include.html.php b/themes/greydragon_old/views/gd_admin_include.html.php
new file mode 100644
index 0000000..73962cb
--- /dev/null
+++ b/themes/greydragon_old/views/gd_admin_include.html.php
@@ -0,0 +1,180 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<style>
+ @import "<?= url::file("modules/greydragon/css/gd_common.css"); ?>";
+</style>
+
+<script>
+ $(document).ready( function() {
+ $('form').submit( function() { $('input[type=submit]', this).attr('disabled', 'disabled'); });
+
+ var objAutoUpdate = $('#g-autoupdate-config');
+ var objAutoHidden = $('input[name="g_auto_delay"]');
+ var objAutoEdit = $('#g-auto-delay-edit');
+    function showSidebar(){ objAutoEdit.val(objAutoHidden.val()); objAutoUpdate.slideDown('fast', function() { objAutoUpdate.addClass('visible'); }); };
+    function hideSidebar(){ objAutoHidden.val(objAutoEdit.val()); objAutoUpdate.slideUp('fast', function() { objAutoUpdate.removeClass('visible'); }); };
+
+ objAutoEdit.keyup( function() { objAutoHidden.val($(this).val()); });
+ objAutoEdit.keydown(function(event) {
+ // Allow: backspace, delete, tab and escape
+ if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 ||
+ // Allow: Ctrl+A
+ (event.keyCode == 65 && event.ctrlKey === true) ||
+ // Allow: home, end, left, right
+ (event.keyCode >= 35 && event.keyCode <= 39)) {
+ // let it happen, don't do anything
+ return;
+ } else {
+ // Ensure that it is a number and stop the keypress
+ if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {
+ event.preventDefault();
+ }
+ }
+ });
+    $('.g-link-autoupdate').click(function(e){ e.preventDefault(); if ( objAutoUpdate.hasClass('visible') ){ hideSidebar(); } else { showSidebar(); }});
+ });
+</script>
+
+<?
+
+function isCurlInstalled() {
+ if (in_array('curl', get_loaded_extensions())) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+// -1 - cannot get version info
+// 0 - current
+// + - newer is avaialble, version is returned
+function checkVersionInfo($downloadid, $version) {
+ if (!isset($downloadid)):
+ return -1;
+ endif;
+
+ try {
+ $call = "http://blog.dragonsoft.us/downloadversion/" . $downloadid;
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, $call);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
+ curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
+ $output=curl_exec($ch);
+ $json = json_decode($output);
+
+ if ($json->id == $downloadid):
+ $newversion = $json->version;
+ if ($json->version > $version):
+ return $json->version;
+ else:
+ return 0;
+ endif;
+ else:
+ return -1;
+ endif;
+ } catch (Exception $e) {
+ return -1;
+ }
+}
+
+if ($is_module):
+ $admin_info = new ArrayObject(parse_ini_file(MODPATH . $name . "/module.info"), ArrayObject::ARRAY_AS_PROPS);
+ $version = number_format($admin_info->version / 10, 1, '.', '');
+ $lastupdate = module::get_var($name, "last_update", time());
+ $checkInDays = module::get_var($name, "auto_delay", 30);
+else:
+ $admin_info = new ArrayObject(parse_ini_file(THEMEPATH . $name . "/theme.info"), ArrayObject::ARRAY_AS_PROPS);
+ $version = $admin_info->version;
+ $lastupdate = module::get_var("th_" . $name, "last_update", time());
+ $checkInDays = module::get_var("th_" . $name, "auto_delay", 30);
+endif;
+
+if (isCurlInstalled() && ($checkInDays > 0) && ((time() - $lastupdate) > ($checkInDays * 24 * 60 * 60))): // Check version every N days
+ $admin_info2 = new ArrayObject(parse_ini_file(MODPATH . "greydragon/module.info"), ArrayObject::ARRAY_AS_PROPS);
+ $version2 = number_format($admin_info2->version / 10, 1, '.', '');
+
+ $versionCheck = checkVersionInfo($downloadid, $version);
+ $versionCheck2 = checkVersionInfo(15, $version2);
+
+ if (($versionCheck == 0) && ($versionCheck2 == 0)):
+ if ($is_module):
+ module::set_var($name, "last_update", time());
+ else:
+ module::set_var("th_" . $name, "last_update", time());
+ endif;
+ endif;
+else:
+ $versionCheck = 0;
+ $versionCheck2 = 0;
+endif;
+?>
+
+<div id="gd-admin-header">
+ <div id="gd-admin-title"><?= t($admin_info->name) ?> - <?= $version ?></div>
+ <div id="gd-admin-hlinks">
+ <ul style="float: right;"><li><a href="http://blog.dragonsoft.us/gallery-3/" target="_blank"><?= t("Home") ?></a>&nbsp;|&nbsp;</li>
+ <? if (isset($admin_info->discuss_url)): ?>
+ <li><a href="<?= $admin_info->discuss_url; ?>" target="_blank"><?= t("Support") ?></a>&nbsp;|&nbsp;</li>
+ <? endif; ?>
+ <? if (isset($admin_info->info_url)): ?>
+ <li><a href="<?= $admin_info->info_url; ?>" target="_blank"><?= t("Download") ?></a>&nbsp;|&nbsp;</li>
+ <? endif; ?>
+ <? if (isset($admin_info->vote)): ?>
+ <li><a href="<?= $admin_info->vote; ?>" target="_blank"><?= t("Vote") ?></a>&nbsp;|&nbsp;</li>
+ <? endif; ?>
+ <li><a href="http://twitter.com/greydragon_th" target="_blank" title="<?= t("Follow Us on Twitter") ?>"><?= t("Follow Us") ?></a>&nbsp;|&nbsp;</li>
+ <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9MWBSVJMWMJEU" target="_blank" ><?= t("Coffee Fund") ?></a>&nbsp;|&nbsp;</li>
+ <li><a href="#" class="g-link-autoupdate" <?= (isCurlInstalled())? null : "disabled=\"disabled\""; ?> ><?= t("Auto Update"); ?></a></li>
+ </ul>
+ </div>
+</div>
+<div id="g-autoupdate-config">
+ <ul><li><?= t("Check every"); ?>&nbsp;&nbsp;</li>
+ <li><input id="g-auto-delay-edit" type="text" size="2" value="30"></li>
+ <li><?=t("days (set to 0 to disable)"); ?></li>
+<? if (($versionCheck == 0) && ($versionCheck2 == 0)): ?>
+ <li>&nbsp;&nbsp;|&nbsp;&nbsp;<?= t("Last check:"); ?>&nbsp;<?= date("Y-m-d H:i:s", $lastupdate); ?></li>
+<? endif; ?>
+ </ul>
+</div>
+
+<? if ($versionCheck == -1): ?>
+ <div id="gd-admin-version"><?= t("Version check is incomplete. No version information has been found."); ?> <?= $versionCheck; ?> : <?= $downloadid; ?></div>
+<? elseif ($versionCheck == 0): ?>
+<? else: ?>
+ <div id="gd-admin-version"><?= t("Newer version") ?> <?= $versionCheck; ?> <?= t("is available. Click Download link for more info.") ?></div>
+<? endif; ?>
+<? if (($versionCheck2 == -1) || ($versionCheck2 == 0)): ?>
+<? else: ?>
+ <div id="gd-admin-version-2"><?= t("Newer version") ?> <?= $versionCheck2; ?> <?= t("of GreyDragon Shared Module is available. Click") . ' <a href="http://codex.gallery2.org/Gallery3:Modules:greydragon" target="_blank">' . t("here") . '</a> ' . t("for more info.") ?></div>
+<? endif; ?>
+<div id="g-admin-container">
+<? if (isset($help)): ?>
+ <div class="column1">
+ <?= $form ?>
+ </div>
+ <div class="column2">
+ <?= $help ?>
+ </div>
+<? else: ?>
+ <?= $form ?>
+<? endif; ?>
+</div>
diff --git a/themes/greydragon_old/views/info_block.html.php b/themes/greydragon_old/views/info_block.html.php
new file mode 100644
index 0000000..16c7015
--- /dev/null
+++ b/themes/greydragon_old/views/info_block.html.php
@@ -0,0 +1,29 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<? if (array_key_exists("description", $metadata)): ?>
+<? $metadata["description"]["value"] = $theme->bb2html($metadata["description"]["value"], 1) ?>
+<? endif; ?>
+
+<ul class="g-metadata">
+ <? foreach($metadata as $info): ?>
+ <li>
+ <strong class="caption"><?= $info["label"] ?></strong> <?= $info["value"] ?>
+ </li>
+ <? endforeach; ?>
+</ul>
diff --git a/themes/greydragon_old/views/movie.html.php b/themes/greydragon_old/views/movie.html.php
new file mode 100644
index 0000000..5043f6f
--- /dev/null
+++ b/themes/greydragon_old/views/movie.html.php
@@ -0,0 +1,38 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<div id="g-item">
+ <?= $theme->photo_top() ?>
+
+ <div id="g-info">
+ <h1><?= $theme->get_item_title($item, TRUE); ?></h1>
+ <div class="g-hideitem"><?= $theme->bb2html(html::purify($item->description), 1) ?></div>
+ </div>
+
+ <?= $theme->add_paginator("top"); ?>
+
+ <div id="g-movie">
+ <?= $theme->resize_top($item) ?>
+ <?= $item->movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")); ?>
+ <?= $theme->resize_bottom($item) ?>
+ </div>
+
+ <?= $theme->add_paginator("bottom"); ?>
+
+ <?= $theme->photo_bottom() ?>
+</div>
diff --git a/themes/greydragon_old/views/no_sidebar.html.php b/themes/greydragon_old/views/no_sidebar.html.php
new file mode 100644
index 0000000..eac82d6
--- /dev/null
+++ b/themes/greydragon_old/views/no_sidebar.html.php
@@ -0,0 +1,19 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<!-- No blocks -->
diff --git a/themes/greydragon_old/views/page.html.php b/themes/greydragon_old/views/page.html.php
new file mode 100644
index 0000000..6c5ff65
--- /dev/null
+++ b/themes/greydragon_old/views/page.html.php
@@ -0,0 +1,259 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+
+<!DOCTYPE html >
+<? $theme->load_sessioninfo(); ?>
+<html <?= $theme->html_attributes() ?> xml:lang="en" lang="en" <?= ($theme->is_rtl)? "dir=rtl" : null; ?> >
+<?
+ $item = $theme->item();
+ if (($theme->enable_pagecache) and (isset($item))):
+ // Page will expire in 60 seconds
+ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 60).'GMT');
+ header("Cache-Control: public");
+ header("Cache-Control: post-check=3600, pre-check=43200", false);
+ header("Content-Type: text/html; charset=UTF-8");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ endif;
+?>
+<!-- <?= $theme->themename ?> v.<?= $theme->themeversion ?> (<?= $theme->colorpack ?> : <?= $theme->framepack ?>) - Copyright (c) 2009-2012 Serguei Dosyukov - All Rights Reserved -->
+<!-- <?= $theme->page_subtype ?> -->
+<head>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<? $theme->start_combining("script,css") ?>
+<? if ($page_title): ?>
+<? $_title = $page_title ?>
+<? else: ?>
+<? if ($theme->item()): ?>
+<? $_title = $theme->get_item_title($theme->item()); ?>
+<? elseif ($theme->tag()): ?>
+<? $_title = t("Photos tagged with %tag_title", array("tag_title" => $theme->bb2html($theme->tag()->name, 2))) ?>
+<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
+<? $_title = $theme->bb2html(item::root()->title, 2); ?>
+<? endif ?>
+<? endif ?>
+<title><?= $_title ?></title>
+<? if ($theme->disable_seosupport): ?>
+<meta name="robots" content="noindex, nofollow, noarchive" />
+<meta name="googlebot" content="noindex, nofollow, noarchive, nosnippet, noodp, noimageindex, notranslate" />
+<meta name="slurp" content="noindex, nofollow, noarchive, nosnippet, noodp, noydir" />
+<meta name="msnbot" content="noindex, nofollow, noarchive, nosnippet, noodp" />
+<meta name="teoma" content="noindex, nofollow, noarchive" />
+<? endif; ?>
+
+<!-- Internet Explorer 9 Meta tags : Start -->
+<meta name="application-name" content="<?= $_title; ?>" />
+<meta name="msapplication-tooltip" content="<?= t("Start"); ?> <?= $_title; ?>" />
+<meta name="msapplication-starturl" content="<?= item::root()->url() ?>" />
+<? if ($theme->allow_root_page): ?>
+<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Page") ?>; action-uri=<?= item::root()->url(); ?><?= $theme->permalinks["root"]; ?>; icon-uri=favicon.ico" />
+<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Album") ?>; action-uri=<?= item::root()->url(); ?><?= $theme->permalinks["enter"]; ?>; icon-uri=favicon.ico" />
+<? else: ?>
+<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Album") ?>; action-uri=<?= item::root()->url(); ?>; icon-uri=favicon.ico" />
+<? endif; ?>
+<? if (identity::active_user()->admin): ?>
+<meta name="msapplication-task-separator" content="gallery3-greydragon" />
+<meta name="msapplication-task" content="name=<?= t("Admin") ?>: <?= t("Dashboard") ?>; action-uri=<?= url::site("admin"); ?>; icon-uri=favicon.ico" />
+<? endif; ?>
+<!-- Internet Explorer 9 Meta tags : End -->
+<link rel="shortcut icon" href="<?= $theme->favicon ?>" type="image/x-icon" />
+<? if ($theme->appletouchicon): ?>
+<link rel="apple-touch-icon" href="<?= $theme->appletouchicon; ?>"/>
+<? endif; ?>
+<?= $theme->script("json2-min.js"); ?>
+<?= $theme->script("jquery.js"); ?>
+<?= $theme->script("jquery.form.js") ?>
+<?= $theme->script("jquery-ui.js") ?>
+<?= $theme->script("gallery.common.js") ?>
+<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
+<script type="text/javascript">
+ var MSG_CANCEL = <?= t('Cancel')->for_js() ?>;
+</script>
+
+<?= $theme->script("gallery.dialog.js"); ?>
+
+<? /* These are page specific but they get combined */ ?>
+<? if ($theme->page_subtype == "photo"): ?>
+<?= $theme->script("jquery.scrollTo.js"); ?>
+<? elseif ($theme->page_subtype == "movie"): ?>
+<?= $theme->script("flowplayer.js") ?>
+<? endif ?>
+
+<?= $theme->head() ?>
+
+<? // Theme specific CSS/JS goes last so that it can override module CSS/JS ?>
+<?= $theme->theme_js_inject(); ?>
+<?= $theme->theme_css_inject(); ?>
+<?= $theme->get_combined("css"); // LOOKING FOR YOUR CSS? It's all been combined into the link ?>
+<?= $theme->custom_css_inject(TRUE); ?>
+<?= $theme->get_combined("script") // LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link ?>
+
+<? if ($theme->thumb_inpage): ?>
+<style type="text/css">
+ #g-column-bottom #g-thumbnav-block, #g-column-top #g-thumbnav-block { display: none; }
+<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?>
+ html { margin-top: 30px !important; }
+<? endif; ?>
+</style>
+<? endif; ?>
+</head>
+<? if ($theme->item()):
+ $item = $theme->item();
+ else:
+ $item = item::root();
+ endif; ?>
+<body <?= $theme->body_attributes() ?><?= ($theme->show_root_page)? ' id="g-rootpage"' : null; ?> <?= $theme->get_bodyclass(); ?>>
+<?= $theme->page_top() ?>
+<?= $theme->site_status() ?>
+<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?>
+ <div id="g-site-menu" class="g-<?= $theme->mainmenu_position; ?>">
+ <?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
+ </div>
+<? endif; ?>
+<div id="g-header">
+<?= $theme->header_top() ?>
+<? if ($theme->viewmode != "mini"): ?>
+<? if ($header_text = module::get_var("gallery", "header_text")): ?>
+<span id="g-header-text"><?= $theme->bb2html($header_text, 1) ?></span>
+<? else: ?>
+ <a id="g-logo" href="<?= item::root()->url() ?><?= ($theme->allow_root_page)? $theme->permalinks["root"] : null; ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>">
+ <img alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= $theme->logopath ?>" />
+ </a>
+<? endif; ?>
+<? endif; ?>
+<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position != "bar")): ?>
+ <div id="g-site-menu" class="g-<?= $theme->mainmenu_position; ?>">
+ <?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
+ </div>
+<? endif ?>
+
+<?= $theme->messages() ?>
+<?= $theme->header_bottom() ?>
+
+<? if ($theme->loginmenu_position == "header"): ?>
+<?= $theme->user_menu() ?>
+<? endif ?>
+<? if (empty($parents)): ?>
+<?= $theme->breadcrumb_menu($theme, null); ?>
+<? else: ?>
+<?= $theme->breadcrumb_menu($theme, $parents); ?>
+<? endif; ?>
+<?= $theme->custom_header(); ?>
+</div>
+<? if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "top")): ?>
+<div id="g-column-top">
+ <?= new View("sidebar.html") ?>
+</div>
+<? endif; ?>
+<div id="g-main">
+ <div id="g-main-in">
+<? if (!$theme->show_root_page): ?>
+ <?= $theme->sidebar_menu($item->url()) ?>
+ <div id="g-view-menu" class="g-buttonset<?= ($theme->sidebarallowed != "any")? " g-buttonset-shift" : null; ?>">
+<? if ($page_subtype == "album"): ?>
+ <?= $theme->album_menu() ?>
+<? elseif ($page_subtype == "photo") : ?>
+ <?= $theme->photo_menu() ?>
+<? elseif ($page_subtype == "movie") : ?>
+ <?= $theme->movie_menu() ?>
+<? elseif ($page_subtype == "tag") : ?>
+ <?= $theme->tag_menu() ?>
+<? endif ?>
+ </div>
+<? endif; ?>
+<? switch ($theme->sidebarvisible):
+ case "left":
+ echo '<div id="g-column-left">';
+ $closediv = TRUE;
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '<div id="g-column-right">';
+ $closediv = TRUE;
+ else:
+ $closediv = FALSE;
+ endif;
+ break;
+ default:
+ echo '<div id="g-column-right">';
+ $closediv = TRUE;
+ break;
+ endswitch; ?>
+<? if (($theme->page_subtype != "login") && ($theme->page_subtype != "reauthenticate")): ?>
+<? if (($theme->sidebarvisible == "none") || ($theme->sidebarvisible == "bottom") || ($theme->sidebarvisible == "top")): ?>
+<? if (($theme->thumb_inpage) and ($page_subtype == "photo")): ?>
+<?= '<div class="g-toolbar"><h1>&nbsp;</h1></div>'; ?>
+<?= $theme->get_block_html("thumbnav"); ?>
+<? endif; ?>
+<? else: ?>
+<?= new View("sidebar.html") ?>
+<? endif; ?>
+<? endif ?>
+<?= ($closediv)? "</div>" : null; ?>
+
+<? switch ($theme->sidebarvisible):
+ case "left":
+ echo '<div id="g-column-centerright">';
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '<div id="g-column-centerleft">';
+ else:
+ echo '<div id="g-column-centerfull">';
+ endif;
+ break;
+ default:
+ echo '<div id="g-column-centerleft">';
+ break;
+ endswitch;
+
+ if ($theme->show_root_page):
+ echo new View("rootpage.html");
+ else:
+ echo $content;
+ endif; ?>
+ </div>
+ </div>
+</div>
+<? if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "bottom")): ?>
+<div id="g-column-bottom">
+ <?= new View("sidebar.html") ?>
+</div>
+<? endif; ?>
+<div id="g-footer">
+<? if ($theme->viewmode != "mini"): ?>
+<?= $theme->footer() ?>
+<? if ($footer_text = module::get_var("gallery", "footer_text")): ?>
+<span id="g-footer-text"><?= $theme->bb2html($footer_text, 1) ?></span>
+<? endif ?>
+ <?= $theme->credits() ?>
+ <ul id="g-footer-rightside"><li><?= $theme->copyright ?></li></ul>
+<? if ($theme->loginmenu_position == "default"): ?>
+ <?= $theme->user_menu() ?>
+<? endif; ?>
+<? endif; ?>
+<?= $theme->custom_footer(); ?>
+</div>
+<?= $theme->page_bottom() ?>
+</body>
+</html>
diff --git a/themes/greydragon_old/views/paginator.html.php b/themes/greydragon_old/views/paginator.html.php
new file mode 100644
index 0000000..5d7a7d6
--- /dev/null
+++ b/themes/greydragon_old/views/paginator.html.php
@@ -0,0 +1,194 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<?
+// This is a generic paginator for album, photo and movie pages. Depending on the page type,
+// there are different sets of variables available. With this data, you can make a paginator
+// that lets you say "You're viewing photo 5 of 35", or "You're viewing photos 10 - 18 of 37"
+// for album views.
+//
+// Available variables for all page types:
+// $page_type - "collection", "item", or "other"
+// $page_subtype - "album", "movie", "photo", "tag", etc.
+// $previous_page_url - the url to the previous page, if there is one
+// $next_page_url - the url to the next page, if there is one
+// $total - the total number of photos in this album
+//
+// Available for the "collection" page types:
+// $page - what page number we're on
+// $max_pages - the maximum page number
+// $page_size - the page size
+// $first_page_url - the url to the first page, or null if we're on the first page
+// $last_page_url - the url to the last page, or null if we're on the last page
+// $first_visible_position - the position number of the first visible photo on this page
+// $last_visible_position - the position number of the last visible photo on this page
+//
+// Available for "item" page types:
+// $position - the position number of this photo
+//
+?>
+
+<?
+ $_pagelist = array();
+
+ switch ($page_type) {
+ case "collection":
+ if (isset($item)):
+ $parent = $item->parent();
+ endif;
+ $current_page = $page;
+ $total_pages = $max_pages;
+ // Prepare page url list
+ for ($i = 1; $i <= $total_pages; $i++):
+ $_pagelist[$i] = url::site(url::merge(array("page" => $i)));
+ endfor;
+ break;
+ case "item":
+ if (isset($item)):
+ $parent = $item->parent();
+ endif;
+
+ if (isset($position)):
+ $current_page = $position;
+ else:
+ $current_page = 1;
+ endif;
+
+ $total_pages = $total;
+ if (isset($parent)):
+ $siblings = $parent->children();
+ for ($i = 1; $i <= $total; $i++):
+ $_pagelist[$i] = $siblings[$i-1]->url();
+ endfor;
+ endif;
+ break;
+ default:
+ $current_page = 1;
+ $total_pages = 1;
+ $_pagelist[1] = url::site();
+ break;
+ }
+
+ if ($total_pages <= 1):
+ $pagination_msg = "&nbsp;";
+ else:
+ $pagination_msg = t("Page:") . ' ';
+ if ($total_pages < 13):
+ for ($i = 1; $i <= $total_pages; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '<span>' . t($i) . '</span>';
+ else:
+ $pagination_msg .= '<span><a href="' . $_pagelist[$i] . '" title="' . t("Page") . ' ' . t($i) . '">' . t($i) . '</a></span>';
+ endif;
+ if ($i < $total_pages):
+ $pagination_msg .= '&middot;';
+ endif;
+ endfor;
+ elseif ($current_page < 9):
+ for ($i = 1; $i <= 10; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '<span>' . t($i) . '</span>';
+ else:
+ $pagination_msg .= '<span><a href="' . $_pagelist[$i] . '" title="' . t("Page") . ' ' . t($i) . '">' . t($i) . '</a></span>';
+ endif;
+ if ($i < 10):
+ $pagination_msg .= '&middot;';
+ endif;
+ endfor;
+
+ $pagination_msg .= '&hellip;';
+ $pagination_msg .= '<span><a href="' . $_pagelist[$total_pages - 1] . '" title="' . t("Page") . ' ' . t($total_pages - 1) . '">' . t($total_pages - 1) . '</a></span>';
+ $pagination_msg .= '&middot;';
+ $pagination_msg .= '<span><a href="' . $_pagelist[$total_pages] . '" title="' . t("Page") . ' ' . t($total_pages) . '">' . t($total_pages) . '</a></span>';
+
+ elseif ($current_page > $total_pages - 8):
+ $pagination_msg .= '<span><a href="' . $_pagelist[1] . '" title="' . t("Page") . ' ' . t(1) . '">' . t(1) . '</a></span>';
+ $pagination_msg .= '&middot;';
+ $pagination_msg .= '<span><a href="' . $_pagelist[2] . '" title="' . t("Page") . ' ' . t(2) . '">' . t(2) . '</a></span>';
+ $pagination_msg .= '&hellip;';
+
+ for ($i = $total_pages - 9; $i <= $total_pages; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '<span>' . t($i) . '</span>';
+ else:
+ $pagination_msg .= '<span><a href="' . $_pagelist[$i] . '" title="' . t("Page") . ' ' . t($i) . '">' . t($i) . '</a></span>';
+ endif;
+ if ($i < $total_pages):
+ $pagination_msg .= '&middot;';
+ endif;
+ endfor;
+
+ else:
+ $pagination_msg .= '<span><a href="' . $_pagelist[1] . '" title="' . t("Page") . ' ' . t(1) . '">' . t(1) . '</a></span>';
+ $pagination_msg .= '&middot;';
+ $pagination_msg .= '<span><a href="' . $_pagelist[2] . '" title="' . t("Page") . ' ' . t(2) . '">' . t(2) . '</a></span>';
+ $pagination_msg .= '&hellip;';
+
+ for ($i = $current_page - 5; $i <= $current_page + 5; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '<span>' . t($i) . '</span>';
+ else:
+ $pagination_msg .= '<span><a href="' . $_pagelist[$i] . '" title="' . t("Page") . ' ' . t($i) . '">' . t($i) . '</a></span>';
+ endif;
+ if ($i < $current_page + 5):
+ $pagination_msg .= '&middot;';
+ endif;
+ endfor;
+
+ $pagination_msg .= '&hellip;';
+ $pagination_msg .= '<span><a href="' . $_pagelist[$total_pages - 1] . '" title="' . t("Page") . ' ' . t($total_pages - 1) . '">' . t($total_pages - 1) . '</a></span>';
+ $pagination_msg .= '&middot;';
+ $pagination_msg .= '<span><a href="' . $_pagelist[$total_pages] . '" title="' . t("Page") . ' ' . t($total_pages) . '">' . t($total_pages) . '</a></span>';
+ endif;
+ endif;
+?>
+
+<ul class="g-paginator">
+ <li class="g-pagination"><?= $pagination_msg ?></li>
+ <li class="g-navigation">
+ <? if ($current_page > 1): ?>
+ <a title="<?= t("first") ?>" id="g-navi-first" href="<?= $_pagelist[1] ?>"><span class="ui-icon ui-icon-first">&nbsp;</span></a>
+ <? else: ?>
+ <span class="ui-icon ui-icon-first-d">&nbsp;</span>
+ <? endif ?>
+
+ <? if (isset($previous_page_url)): ?>
+ <a title="<?= t("previous") ?>" id="g-navi-prev" href="<?= $previous_page_url ?>"><span class="ui-icon ui-icon-prev">&nbsp;</span></a>
+ <? else: ?>
+ <span class="ui-icon ui-icon-prev-d">&nbsp;</span>
+ <? endif ?>
+
+ <? if (isset($parent)): ?>
+ <a title="<?= t("up") ?>" id="g-navi-parent" href="<?= $parent->url("show={$item->id}"); ?>"><span class="ui-icon ui-icon-parent">&nbsp;</span></a>
+ <? else: ?>
+ <span class="ui-icon ui-icon-parent-d">&nbsp;</span>
+ <? endif ?>
+
+ <? if (isset($next_page_url)): ?>
+ <a title="<?= t("next") ?>" class="ui-right" id="g-navi-next" href="<?= $next_page_url ?>"><span class="ui-icon ui-icon-next">&nbsp;</span></a>
+ <? else: ?>
+ <span class="ui-icon ui-icon-next-d">&nbsp;</span>
+ <? endif ?>
+
+ <? if ($current_page < $total_pages): ?>
+ <a title="<?= t("last") ?>" class="ui-right" id="g-navi-last" href="<?= $_pagelist[$total_pages] ?>"><span class="ui-icon ui-icon-last">&nbsp;</span></a>
+ <? else: ?>
+ <span class="ui-icon ui-icon-last-d">&nbsp;</span>
+ <? endif ?>
+ </li>
+</ul> \ No newline at end of file
diff --git a/themes/greydragon_old/views/photo.html.php b/themes/greydragon_old/views/photo.html.php
new file mode 100644
index 0000000..453dd85
--- /dev/null
+++ b/themes/greydragon_old/views/photo.html.php
@@ -0,0 +1,124 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<?
+ if ($theme->desc_allowbbcode):
+ $_description = $theme->bb2html($item->description, 1);
+ else:
+ $_description = nl2br(html::purify($item->description));
+ endif;
+
+ if ($theme->is_photometa_visible):
+ $_description .= '<ul class="g-metadata">' . $theme->thumb_info($item) . '</ul>';
+ endif;
+
+ switch ($theme->photo_popupbox):
+ case "preview":
+ $include_list = FALSE;
+ $include_single = TRUE;
+ break;
+ case "none":
+ $include_list = FALSE;
+ $include_single = FALSE;
+ break;
+ default:
+ $include_list = TRUE;
+ $include_single = TRUE;
+ break;
+ endswitch;
+?>
+
+<div id="g-item">
+ <? $_title = $theme->get_item_title($item, TRUE); ?>
+ <div id="g-info">
+ <h1><?= $_title ?></h1>
+ </div>
+ <?= $theme->add_paginator("top", FALSE); ?>
+ <?= $theme->photo_top() ?>
+ <? if (($theme->photo_descmode == "top") and ($_description)): ?>
+ <div id="g-info"><div class="g-description"><?= $_description ?></div></div>
+ <? endif; ?>
+ <div id="g-photo">
+ <?= $theme->resize_top($item) ?>
+ <? $_resizewidth = $item->resize_width;
+ $siblings = $item->parent()->children(); ?>
+ <div class="g-resize" style="margin-left: -<?= intval($_resizewidth / 2); ?>px; ">
+ <? $script = "<script type=\"text/javascript\">\n";
+ $script .= "$(document).ready(function() {\n";
+ $script .= " if (document.images) {\n";
+ for ($i = 0; ($i <= count($siblings) - 1); $i++):
+ if ($siblings[$i]->rand_key == $item->rand_key): ?>
+ <a style="<?= ($siblings[$i]->rand_key == $item->rand_key)? "display: static;" : "display: none;"; ?>" title="<?= $theme->get_item_title($item); ?>" <?= ($include_single)? "class=\"g-sb-preview\"" : "target=_blank;"; ?> <?= ($include_list)? "rel=\"g-preview\"" : null; ?> href="<?= (access::can("view_full", $item))? $item->file_url() : $item->resize_url(); ?>">
+ <?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize", "alt" => $_title)) ?>
+ </a>
+ <? if ($i < count($siblings) - 1):
+ $script .= " var image_preload_n = new Image();\n image_preload_n.src = \"" . $siblings[$i+1]->resize_url() . "\";\n";
+ endif;
+ if ($i > 0):
+ $script .= " var image_preload_p = new Image();\n image_preload_p.src = \"" . $siblings[$i-1]->resize_url() . "\";\n";
+ endif;
+ else:
+ if ($include_list): ?>
+ <? if (!$siblings[$i]->is_album()): ?>
+ <a title="<?= $theme->get_item_title($siblings[$i]); ?>" class="g-sb-preview g-hide" rel="g-preview" href="<?= (access::can("view_full", $siblings[$i]))? $siblings[$i]->file_url() : $siblings[$i]->resize_url(); ?>">&nbsp;</a>
+ <? endif; ?>
+ <? endif; ?>
+ <? endif; ?>
+ <? endfor; ?>
+ <? $script .= " }\n});\n</script>\n"; ?>
+ <? $_align = "";
+ $_more = FALSE;
+ if ($_description):
+ switch ($theme->photo_descmode):
+ case "overlay_top":
+ $_align = "g-align-top";
+ $_more = TRUE;
+ break;
+ case "overlay_bottom":
+ $_align = "g-align-bottom";
+ $_more = TRUE;
+ break;
+ case "overlay_top_s":
+ $_align = "g-align-top g-align-static";
+ break;
+ case "overlay_bottom_s":
+ $_align = "g-align-bottom g-align-static";
+ break;
+ default:
+ break;
+ endswitch;
+ endif; ?>
+ <? if ($_align): ?>
+ <? if ($_more): ?>
+ <span class="g-more <?= $_align ?>"><?= t("More") ?></span>
+ <? endif ?>
+ <div class="g-description <?= $_align; ?>" style="width: <?= $_resizewidth - 20; ?>px;" >
+ <strong><?= $_title ?></strong>
+ <?= $_description ?>
+ </div>
+ <? endif ?>
+ </div>
+ <?= $theme->resize_bottom($item) ?>
+ </div>
+ <? if (($theme->photo_descmode == "bottom") and ($_description)): ?>
+ <div id="g-info"><div class="g-description"><?= $_description ?></div></div>
+ <? endif; ?>
+ <?= $theme->add_paginator("bottom", FALSE); ?>
+ <?= $theme->photo_bottom() ?>
+</div>
+<?= $script ?> \ No newline at end of file
diff --git a/themes/greydragon_old/views/rootpage.html.php b/themes/greydragon_old/views/rootpage.html.php
new file mode 100644
index 0000000..bcb5fa8
--- /dev/null
+++ b/themes/greydragon_old/views/rootpage.html.php
@@ -0,0 +1,59 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<?
+ $link_url = item::root()->url();
+ if ($theme->allow_root_page):
+ $link_url .= $theme->permalinks["enter"];
+ endif;
+ if ($theme->show_root_desc):
+ if ($theme->root_description):
+ $root_text = $theme->root_description;
+ elseif (isset($item)):
+ $root_text = $item->description;
+ endif;
+ if ($root_text):
+ ?><div id="g-rootpage-quote"><?= $theme->bb2html($root_text, 1); ?></div><?
+ endif;
+ endif;
+
+ $slideshow_list = $theme->get_slideshow_list();
+ $first = TRUE;
+?>
+<div id="g-rootpage-roll"<?= ($root_text)? null : ' class="g-full"'; ?>>
+ <span><a href="<?= $link_url ?>"><?= t("Click to Enter") ?></a></span>
+ <div id="g-rootpage-slideshow">
+ <? foreach ($slideshow_list as $entry): ?>
+ <? $attr = $entry["@attributes"]; ?>
+ <div class="slider-item" style="width: <?= $attr['width']; ?>px; height: <?= $attr["height"]; ?>px; display: <?= ($first)? "block" : "none"; ?>; position: absolute; z-index: 10; opacity: <?= ($first)? "1" : "0"; ?>;">
+ <a href="<?= $link_url; ?>"><img width="<?= $attr["width"]; ?>" height="<?= $attr["height"]; ?>" alt="" src="<?= $attr["url"]; ?>" border="0"/></a>
+ </div>
+ <? $first = FALSE; ?>
+ <? endforeach ?>
+ </div>
+</div>
+<? if (count($slideshow_list) > 0): ?>
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#g-rootpage-slideshow').cycle({
+ fx: '<?= $theme->root_cyclemode; ?>'
+ , timeout: <?= $theme->root_delay * 1000; ?>
+ });
+ });
+</script>
+<? endif; ?> \ No newline at end of file
diff --git a/themes/greydragon_old/views/rootpage.html.php_fix b/themes/greydragon_old/views/rootpage.html.php_fix
new file mode 100644
index 0000000..cfe61d2
--- /dev/null
+++ b/themes/greydragon_old/views/rootpage.html.php_fix
@@ -0,0 +1,46 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<?
+ $link_url = item::root()->url();
+ if ($theme->allow_root_page):
+ $link_url .= $theme->permalinks["enter"];
+ endif;
+ if ($theme->show_root_desc):
+ if ($theme->root_description):
+ $root_text = $theme->root_description;
+ elseif (isset($item)):
+ $root_text = $item->description;
+ endif;
+ if ($root_text):
+ ?><div id="g-rootpage-quote"><?= $theme->bb2html($root_text, 1); ?></div><?
+ endif;
+ endif;
+?>
+<div id="g-rootpage-roll"<?= ($root_text)? null : ' class="g-full"'; ?>>
+<object type="application/x-shockwave-flash" data="<?= url::file("modules/imageblockex/player/minislideshow.swf"); ?>" width="100%" height="100%">
+<param name="movie" value="<?= url::file("modules/imageblockex/player/minislideshow.swf"); ?>" />
+<param name="FlashVars" value="xmlUrl=<?= $theme->root_feed; ?>&amp;delay=<?= $theme->root_delay; ?>&amp;showControls=false&amp;altLink=<?= $link_url ?>&amp;showDropShadow=true&amp;useResizes=true&amp;useFull=true&amp;showLoader=false" />
+<param name="bgcolor" value="#1c242e" />
+<param name="wmode" value="transparent" />
+<param name="menu" value="false" />
+<param name="quality" value="high" />
+</object>
+<div id="g-rootpage-link" onclick="javascript:location='<?= $link_url ?>'" ></div>
+<span><a href="<?= $link_url ?>"><?= t("Click to Enter") ?></a></span>
+</div>
diff --git a/themes/greydragon_old/views/rss_block.html.php b/themes/greydragon_old/views/rss_block.html.php
new file mode 100644
index 0000000..00b9e9d
--- /dev/null
+++ b/themes/greydragon_old/views/rss_block.html.php
@@ -0,0 +1,30 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<ul id="g-feeds">
+<? foreach($feeds as $url => $title): ?>
+ <li style="clear: both;">
+ <span class="ui-icon-left">
+ <a href="<?= rss::url($url) ?>">
+ <span class="ui-icon ui-icon-signal-diag">&nbsp;</span>
+ <?= html::purify($title) ?>
+ </a>
+ </span>
+ </li>
+<? endforeach ?>
+</ul>
diff --git a/themes/greydragon_old/views/search.html.php b/themes/greydragon_old/views/search.html.php
new file mode 100644
index 0000000..dee48eb
--- /dev/null
+++ b/themes/greydragon_old/views/search.html.php
@@ -0,0 +1,35 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<div id="g-search-results">
+ <h1><?= t("Search Results for \"%term\"", array("term" => $q)) ?> </h1>
+
+ <?= $theme->add_paginator("top"); ?>
+ <div class="g-album-grid-container">
+ <ul id="g-album-grid">
+<? if (count($items)): ?>
+ <? foreach ($items as $item): ?>
+ <?= $theme->get_thumb_element($item) ?>
+ <? endforeach ?>
+<? else: ?>
+ <li><?= t("No results found for <b>%term</b>", array("term" => $q)) ?></li>
+<? endif; ?>
+ </ul>
+ </div>
+ <?= $theme->add_paginator("bottom"); ?>
+</div> \ No newline at end of file
diff --git a/themes/greydragon_old/views/sidebar.html.php b/themes/greydragon_old/views/sidebar.html.php
new file mode 100644
index 0000000..03b2778
--- /dev/null
+++ b/themes/greydragon_old/views/sidebar.html.php
@@ -0,0 +1,27 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Grey Dragon Theme - a custom theme for Gallery 3
+ * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
+ * Copyright (C) 2009-2012 Serguei Dosyukov
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+?>
+<?= $theme->sidebar_top() ?>
+<div class="g-toolbar"><h1>&nbsp;</h1></div>
+<? if ((!$user->guest) || (!$theme->sidebar_hideguest)):
+ try { echo $theme->sidebar_blocks(); } catch (Exception $e) { }
+ else:
+ echo "";
+ endif;
+?>
+<?= $theme->sidebar_bottom() ?>
diff --git a/themes/greydragon_old/views/user_profile.html.php b/themes/greydragon_old/views/user_profile.html.php
new file mode 100644
index 0000000..587eec2
--- /dev/null
+++ b/themes/greydragon_old/views/user_profile.html.php
@@ -0,0 +1,44 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<script type="text/javascript">
+ $(document).ready(function() {
+ $("#g-profile-return").click(function(event) {
+ history.go(-1);
+ return false;
+ })
+ });
+</script>
+
+<div id="g-user-profile">
+ <h1><?= t("User profile: %name", array("name" => $user->display_name())) ?></h1>
+ <div id="g-user-profile-operations">
+ <a id="g-profile-return" class="g-button ui-state-default ui-corner-all" href="#">
+ <?= t("Return") ?>
+ </a>
+<? if ($editable): ?>
+ <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("form/edit/users/{$user->id}") ?>">
+ <?= t("Edit") ?>
+ </a>
+ <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("users/form_change_email/{$user->id}") ?>">
+ <?= t("Change email") ?>
+ </a>
+ <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("users/form_change_password/{$user->id}") ?>">
+ <?= t("Change password") ?>
+ </a>
+<? endif ?>
+<? if ($contactable): ?>
+ <a class="g-button ui-state-default ui-corner-all g-dialog-link"
+ href="<?= url::site("user_profile/contact/{$user->id}") ?>">
+ <?= t("Contact") ?>
+ </a>
+<? endif ?>
+ </div>
+ <img src="<?= $user->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
+ alt="<?= html::clean_attribute($user->display_name()) ?>"
+ class="g-avatar g-left" width="40" height="40" />
+<? foreach ($info_parts as $info): ?>
+ <div class="g-block">
+ <h2><?= html::purify($info->title) ?></h2>
+ <div class="g-block-content"><?= $info->view ?></div>
+ </div>
+<? endforeach ?>
+</div>