1
0

Grey Dragon Theme Support.

This commit is contained in:
rWatcher 2011-05-11 19:55:00 -04:00
parent 965f8c8fb4
commit 8150673943
6 changed files with 1282 additions and 0 deletions

View File

@ -0,0 +1,297 @@
<?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-2011 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<? $theme->load_sessioninfo(); ?>
<!-- <?= $theme->themename ?> v.<?= $theme->themeversion ?> (ColorPack: <?= $theme->colorpack ?>) - Copyright (c) 2009-2011 Serguei Dosyukov - All Rights Reserved -->
<html xmlns="http://www.w3.org/1999/xhtml" <?= $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;
?>
<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->bb2html($theme->item()->title, 2); ?>
<? 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; ?>
<? if ($theme->blendpagetrans): ?>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)" />
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)" />
<? 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(); ?>?root=yes; icon-uri=favicon.ico" />
<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Album") ?>; action-uri=<?= item::root()->url(); ?>?root=no; 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->script("animation.js"); ?>
<?= $theme->script("ui.support.js"); ?>
<?= $theme->theme_css_inject(); ?>
<!-- LOOKING FOR YOUR CSS? It's all been combined into the link below -->
<?= $theme->get_combined("css"); ?>
<?= $theme->css_link("colorpacks/" . $theme->colorpack . "/colors.css", FALSE); ?>
<?= $theme->css_link("framepacks/" . $theme->framepack . "/frame.css", FALSE); ?>
<? if ($theme->custom_css_path != ""): ?>
<?= $theme->css_link($theme->custom_css_path, TRUE); ?>
<? endif; ?>
<!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below -->
<?= $theme->get_combined("script") ?>
<!--[if IE 6]>
<link rel="stylesheet" href="<?= $theme->url("css/old_ie.css") ?>" type="text/css" media="screen,print,projection" />
<![endif]-->
<? if ($theme->thumb_inpage): ?>
<style type="text/css"> #g-column-bottom #g-thumbnav-block, #g-column-top #g-thumbnav-block { display: none; } </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->is_rtl)? "class=\"rtl\"" : null; ?> >
<?= $theme->page_top() ?>
<?= $theme->site_status() ?>
<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?>
<style type="text/css"> html { margin-top: 30px !important; } </style>
<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 ($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)? "?root=yes" : 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 ?>
<? 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 ?>
<?
// Custom rWatcher code, based on the breadcrumb menu function.
// The rest of this file is the original page.html.php file from the Grey Dragon theme.
?>
<? if (empty($breadcrumbs)): ?>
<?= $theme->breadcrumb_menu($theme, null); ?>
<? else: ?>
<?
$breadcrumb_content = "";
if ($this->breadcrumbs_position == "hide"):
else:
$limit_title_length = module::get_var("gallery", "visible_title_length", 999);
$breadcrumb_content .= '<ul class="g-breadcrumbs g-' . module::get_var("th_greydragon", "breadcrumbs_position", "default") . '">';
$i = 0;
foreach ($breadcrumbs as $breadcrumb):
if ($breadcrumb->url):
$breadcrumb_content .= '<li ' . (($i == 0)? " class=\"g-first\"" : null) . '>';
$breadcrumb_content .= '<a href="' . $breadcrumb->url . '">';
$breadcrumb_content .= text::limit_chars($theme->bb2html(html::purify($breadcrumb->title), 2), $limit_title_length);
$breadcrumb_content .= '</a></li>';
else:
$breadcrumb_content .= '<li class="g-active ' . (($i == 0)? " g-first" : null) . '">' . text::limit_chars($theme->bb2html(html::purify($breadcrumb->title), 2), $limit_title_length) . '</li>';
endif;
$i++;
endforeach;
$breadcrumb_content .= '</ul>';
endif;
print $breadcrumb_content;
// End Edit.
?>
<? 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">
<?= $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 ?>
<?= $theme->custom_footer(); ?>
</div>
<?= $theme->page_bottom() ?>
</body>
</html>

View File

@ -0,0 +1,209 @@
<?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-2011 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();
// rWatcher Mod
if (isset($dynamic_siblings)):
$current_page = $position;
$total_pages = count($dynamic_siblings);
$siblings = $dynamic_siblings;
for ($i = 1; $i <= $total_pages; $i++):
if ($page_type == "item") {
$_pagelist[$i] = url::site("tag_albums/show/" . $siblings[$i-1]->id . "/" . $tag_id . "/" . $album_id);
} elseif ($page_type == "") {
}
endfor;
else:
// End rWatcher Mod.
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;
$current_page = $position;
$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;
}
// rWatcher Mod
endif;
// End rWatcher Mod.
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 ?>
<? // rWatcher Mod. ?>
<? if (isset($parent_url)): ?>
<a title="<?= t("up") ?>" id="g-navi-parent" href="<?= $parent_url ?>"><span class="ui-icon ui-icon-parent">&nbsp;</span></a>
<? elseif (isset($parent)): ?>
<a title="<?= t("up") ?>" id="g-navi-parent" href="<?= $parent->url() ?>"><span class="ui-icon ui-icon-parent">&nbsp;</span></a>
<? else: ?>
<span class="ui-icon ui-icon-parent-d">&nbsp;</span>
<? endif ?>
<? // End rWatcher Mod. ?>
<? 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>

View File

@ -0,0 +1,135 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?
// The g-info block was taken from album.html.php and $theme->album_top() was changed to $theme->dynamic_top().
// $item->title and $item->description have been changed to $title and $description.
//
// The g-album-grid block was also taken from album.html.php. The section for uploading new photos to an empty album
// has been removed. Also, $theme->context_menu has been removed as well (it was crashing the page).
?>
<div id="g-album-header">
<?= $theme->dynamic_top() ?>
<h1><?= $theme->bb2html(html::purify($title), 1) ?></h1>
</div>
<?= $theme->add_paginator("top"); ?>
<? if (($theme->album_descmode == "top") and ($description)): ?>
<div id="g-info"><div class="g-description"><?= $theme->bb2html(html::purify($description), 1) ?></div></div>
<? endif; ?>
<? if (isset($filter_text) && (module::get_var("tag_albums", "tag_index_filter"))): ?>
<div id="g-tags-filter">
<br/ >
<center><?= $filter_text; ?></center>
</div>
<? endif ?>
<div class="g-album-grid-container">
<ul id="g-album-grid" class="<?= $theme->get_grid_column_class(); ?>">
<? if (count($children)): ?>
<? foreach ($children as $i => $child): ?>
<?
// This code is based on grey dragon's get_thumb_element function.
$thumb_item = $child;
$is_portrait = ($thumb_item->thumb_height > $thumb_item->thumb_width);
$item_class = $child->is_album() ? "g-album" : "g-photo";
$content = '<li id="g-item-id-' . $child->id . '" class="g-item ' . $item_class . ' ' . $theme->thumb_type;
if ($child->is_album()):
$_thumb_descmode = $theme->thumb_descmode_a;
else:
$_thumb_descmode = $theme->thumb_descmode;
endif;
$content .= ($_thumb_descmode == "bottom")? " g-expanded" : " g-default";
$content .= ($is_portrait)? " g-portrait" : " g-landscape";
$content .= '">' . $theme->thumb_top($child);
if ($theme->thumb_topalign):
$_shift = "";
else:
if (($theme->crop_factor == 1) and (!$is_portrait)):
$_shift = 'style="margin-top: ' . intval(($theme->_thumb_size_y - $thumb_item->thumb_height) / 2) . 'px;"';
else:
if (($theme->crop_factor > 0) and ($is_portrait)):
$_shift = 'style="margin-top: -' . intval(($thumb_item->thumb_height - $theme->_thumb_size_y) / 2) . 'px;"';
else:
$_shift = "";
endif;
endif;
endif;
// $ss = 'z-index: 22; opacity: 1; -ms-transform: rotate(' . (-15 + rand(0, 31)) . 'deg);'; style="' . $ss . '"
$content .= '<div class="g-thumbslide"><p class="g-thumbcrop">';
$content .= '<a '. $_shift . ' class="g-thumblink" href="' . $child->url() . '">';
if ($thumb_item->has_thumb()):
$content .= $thumb_item->thumb_img();
else:
$content .= '<img title="No Image" alt="No Image" src="' . $theme->url("images/missing-img.png") . '"/>';
endif;
$content .= '</a></p>';
if (($theme->thumb_metamode != "hide") and ($_thumb_descmode == "overlay_bottom")):
$_thumb_metamode = "merged";
else:
$_thumb_metamode = $theme->thumb_metamode;
endif;
if (($_thumb_descmode == "overlay") or ($_thumb_descmode == "overlay_top") or ($_thumb_descmode == "overlay_bottom")):
$content .= '<ul class="g-description ';
if ($_thumb_descmode == "overlay_top"):
$content .= 'g-overlay-top';
endif;
if ($_thumb_descmode == "overlay_bottom"):
$content .= 'g-overlay-bottom';
endif;
$content .= '"><li class="g-title">' . $theme->bb2html(html::purify($child->title), 2) . '</li>';
if ($_thumb_metamode == "merged"):
$content .= $theme->thumb_info($child);
endif;
$content .= '</ul>';
endif;
if (($_thumb_metamode == "default") and ($_thumb_descmode != "overlay_bottom")):
$content .= '<ul class="g-metadata">' . $theme->thumb_info($child) . '</ul>';
endif;
if ($_thumb_descmode == "bottom"):
$content .= '<ul class="g-description">';
$content .= '<li class="g-title">' . $theme->bb2html(html::purify($child->title), 2) . '</li>';
if ($_thumb_metamode == "merged"):
$content .= $theme->thumb_info($child);
endif;
$content .= '</ul>';
endif;
/*
if ($addcontext):
$_text = $this->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail");
$content .= (stripos($_text, '<li>'))? $_text : null;
endif;
*/
$content .= '</div>';
$content .= $theme->thumb_bottom($child);
$content .= '</li>';
print $content;
// End rWatcher Edit.
?>
<? endforeach ?>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
</ul>
</div>
<?= $theme->dynamic_bottom() ?>
<? if (($theme->album_descmode == "bottom") and ($description)): ?>
<div id="g-info"><div class="g-description"><?= $theme->bb2html(html::purify($description), 1) ?></div></div>
<? endif; ?>
<?= $theme->add_paginator("bottom"); ?>

View File

@ -0,0 +1,297 @@
<?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-2011 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<? $theme->load_sessioninfo(); ?>
<!-- <?= $theme->themename ?> v.<?= $theme->themeversion ?> (ColorPack: <?= $theme->colorpack ?>) - Copyright (c) 2009-2011 Serguei Dosyukov - All Rights Reserved -->
<html xmlns="http://www.w3.org/1999/xhtml" <?= $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;
?>
<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->bb2html($theme->item()->title, 2); ?>
<? 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; ?>
<? if ($theme->blendpagetrans): ?>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)" />
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)" />
<? 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(); ?>?root=yes; icon-uri=favicon.ico" />
<meta name="msapplication-task" content="name=<?= t("Gallery") ?>: <?= t("Root Album") ?>; action-uri=<?= item::root()->url(); ?>?root=no; 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->script("animation.js"); ?>
<?= $theme->script("ui.support.js"); ?>
<?= $theme->theme_css_inject(); ?>
<!-- LOOKING FOR YOUR CSS? It's all been combined into the link below -->
<?= $theme->get_combined("css"); ?>
<?= $theme->css_link("colorpacks/" . $theme->colorpack . "/colors.css", FALSE); ?>
<?= $theme->css_link("framepacks/" . $theme->framepack . "/frame.css", FALSE); ?>
<? if ($theme->custom_css_path != ""): ?>
<?= $theme->css_link($theme->custom_css_path, TRUE); ?>
<? endif; ?>
<!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below -->
<?= $theme->get_combined("script") ?>
<!--[if IE 6]>
<link rel="stylesheet" href="<?= $theme->url("css/old_ie.css") ?>" type="text/css" media="screen,print,projection" />
<![endif]-->
<? if ($theme->thumb_inpage): ?>
<style type="text/css"> #g-column-bottom #g-thumbnav-block, #g-column-top #g-thumbnav-block { display: none; } </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->is_rtl)? "class=\"rtl\"" : null; ?> >
<?= $theme->page_top() ?>
<?= $theme->site_status() ?>
<? if (((!$user->guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?>
<style type="text/css"> html { margin-top: 30px !important; } </style>
<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 ($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)? "?root=yes" : 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 ?>
<? 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 ?>
<?
// Custom rWatcher code, based on the breadcrumb menu function.
// The rest of this file is the original page.html.php file from the Grey Dragon theme.
?>
<? if (empty($breadcrumbs)): ?>
<?= $theme->breadcrumb_menu($theme, null); ?>
<? else: ?>
<?
$breadcrumb_content = "";
if ($this->breadcrumbs_position == "hide"):
else:
$limit_title_length = module::get_var("gallery", "visible_title_length", 999);
$breadcrumb_content .= '<ul class="g-breadcrumbs g-' . module::get_var("th_greydragon", "breadcrumbs_position", "default") . '">';
$i = 0;
foreach ($breadcrumbs as $breadcrumb):
if ($breadcrumb->url):
$breadcrumb_content .= '<li ' . (($i == 0)? " class=\"g-first\"" : null) . '>';
$breadcrumb_content .= '<a href="' . $breadcrumb->url . '">';
$breadcrumb_content .= text::limit_chars($theme->bb2html(html::purify($breadcrumb->title), 2), $limit_title_length);
$breadcrumb_content .= '</a></li>';
else:
$breadcrumb_content .= '<li class="g-active ' . (($i == 0)? " g-first" : null) . '">' . text::limit_chars($theme->bb2html(html::purify($breadcrumb->title), 2), $limit_title_length) . '</li>';
endif;
$i++;
endforeach;
$breadcrumb_content .= '</ul>';
endif;
print $breadcrumb_content;
// End Edit.
?>
<? 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">
<?= $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 ?>
<?= $theme->custom_footer(); ?>
</div>
<?= $theme->page_bottom() ?>
</body>
</html>

View File

@ -0,0 +1,209 @@
<?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-2011 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();
// rWatcher Mod
if (isset($dynamic_siblings)):
$current_page = $position;
$total_pages = count($dynamic_siblings);
$siblings = $dynamic_siblings;
for ($i = 1; $i <= $total_pages; $i++):
if ($page_type == "item") {
$_pagelist[$i] = url::site("tag_albums/show/" . $siblings[$i-1]->id . "/" . $tag_id . "/" . $album_id);
} elseif ($page_type == "") {
}
endfor;
else:
// End rWatcher Mod.
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;
$current_page = $position;
$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;
}
// rWatcher Mod
endif;
// End rWatcher Mod.
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 ?>
<? // rWatcher Mod. ?>
<? if (isset($parent_url)): ?>
<a title="<?= t("up") ?>" id="g-navi-parent" href="<?= $parent_url ?>"><span class="ui-icon ui-icon-parent">&nbsp;</span></a>
<? elseif (isset($parent)): ?>
<a title="<?= t("up") ?>" id="g-navi-parent" href="<?= $parent->url() ?>"><span class="ui-icon ui-icon-parent">&nbsp;</span></a>
<? else: ?>
<span class="ui-icon ui-icon-parent-d">&nbsp;</span>
<? endif ?>
<? // End rWatcher Mod. ?>
<? 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>

View File

@ -0,0 +1,135 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?
// The g-info block was taken from album.html.php and $theme->album_top() was changed to $theme->dynamic_top().
// $item->title and $item->description have been changed to $title and $description.
//
// The g-album-grid block was also taken from album.html.php. The section for uploading new photos to an empty album
// has been removed. Also, $theme->context_menu has been removed as well (it was crashing the page).
?>
<div id="g-album-header">
<?= $theme->dynamic_top() ?>
<h1><?= $theme->bb2html(html::purify($title), 1) ?></h1>
</div>
<?= $theme->add_paginator("top"); ?>
<? if (($theme->album_descmode == "top") and ($description)): ?>
<div id="g-info"><div class="g-description"><?= $theme->bb2html(html::purify($description), 1) ?></div></div>
<? endif; ?>
<? if (isset($filter_text) && (module::get_var("tag_albums", "tag_index_filter"))): ?>
<div id="g-tags-filter">
<br/ >
<center><?= $filter_text; ?></center>
</div>
<? endif ?>
<div class="g-album-grid-container">
<ul id="g-album-grid" class="<?= $theme->get_grid_column_class(); ?>">
<? if (count($children)): ?>
<? foreach ($children as $i => $child): ?>
<?
// This code is based on grey dragon's get_thumb_element function.
$thumb_item = $child;
$is_portrait = ($thumb_item->thumb_height > $thumb_item->thumb_width);
$item_class = $child->is_album() ? "g-album" : "g-photo";
$content = '<li id="g-item-id-' . $child->id . '" class="g-item ' . $item_class . ' ' . $theme->thumb_type;
if ($child->is_album()):
$_thumb_descmode = $theme->thumb_descmode_a;
else:
$_thumb_descmode = $theme->thumb_descmode;
endif;
$content .= ($_thumb_descmode == "bottom")? " g-expanded" : " g-default";
$content .= ($is_portrait)? " g-portrait" : " g-landscape";
$content .= '">' . $theme->thumb_top($child);
if ($theme->thumb_topalign):
$_shift = "";
else:
if (($theme->crop_factor == 1) and (!$is_portrait)):
$_shift = 'style="margin-top: ' . intval(($theme->_thumb_size_y - $thumb_item->thumb_height) / 2) . 'px;"';
else:
if (($theme->crop_factor > 0) and ($is_portrait)):
$_shift = 'style="margin-top: -' . intval(($thumb_item->thumb_height - $theme->_thumb_size_y) / 2) . 'px;"';
else:
$_shift = "";
endif;
endif;
endif;
// $ss = 'z-index: 22; opacity: 1; -ms-transform: rotate(' . (-15 + rand(0, 31)) . 'deg);'; style="' . $ss . '"
$content .= '<div class="g-thumbslide"><p class="g-thumbcrop">';
$content .= '<a '. $_shift . ' class="g-thumblink" href="' . $child->url() . '">';
if ($thumb_item->has_thumb()):
$content .= $thumb_item->thumb_img();
else:
$content .= '<img title="No Image" alt="No Image" src="' . $theme->url("images/missing-img.png") . '"/>';
endif;
$content .= '</a></p>';
if (($theme->thumb_metamode != "hide") and ($_thumb_descmode == "overlay_bottom")):
$_thumb_metamode = "merged";
else:
$_thumb_metamode = $theme->thumb_metamode;
endif;
if (($_thumb_descmode == "overlay") or ($_thumb_descmode == "overlay_top") or ($_thumb_descmode == "overlay_bottom")):
$content .= '<ul class="g-description ';
if ($_thumb_descmode == "overlay_top"):
$content .= 'g-overlay-top';
endif;
if ($_thumb_descmode == "overlay_bottom"):
$content .= 'g-overlay-bottom';
endif;
$content .= '"><li class="g-title">' . $theme->bb2html(html::purify($child->title), 2) . '</li>';
if ($_thumb_metamode == "merged"):
$content .= $theme->thumb_info($child);
endif;
$content .= '</ul>';
endif;
if (($_thumb_metamode == "default") and ($_thumb_descmode != "overlay_bottom")):
$content .= '<ul class="g-metadata">' . $theme->thumb_info($child) . '</ul>';
endif;
if ($_thumb_descmode == "bottom"):
$content .= '<ul class="g-description">';
$content .= '<li class="g-title">' . $theme->bb2html(html::purify($child->title), 2) . '</li>';
if ($_thumb_metamode == "merged"):
$content .= $theme->thumb_info($child);
endif;
$content .= '</ul>';
endif;
/*
if ($addcontext):
$_text = $this->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail");
$content .= (stripos($_text, '<li>'))? $_text : null;
endif;
*/
$content .= '</div>';
$content .= $theme->thumb_bottom($child);
$content .= '</li>';
print $content;
// End rWatcher Edit.
?>
<? endforeach ?>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
</ul>
</div>
<?= $theme->dynamic_bottom() ?>
<? if (($theme->album_descmode == "bottom") and ($description)): ?>
<div id="g-info"><div class="g-description"><?= $theme->bb2html(html::purify($description), 1) ?></div></div>
<? endif; ?>
<?= $theme->add_paginator("bottom"); ?>