1
0

Remove unnecessary theme files.

This commit is contained in:
rWatcher 2012-06-27 19:19:36 -04:00
parent 4fe98e39b7
commit c1e9413b2a
5 changed files with 0 additions and 1073 deletions

View File

@ -1,298 +0,0 @@
<?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 ?> (<?= $theme->colorpack ?> : <?= $theme->framepack ?>) - 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; ?>
<!-- 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->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 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->get_bodyclass(); ?>>
<div class="QOverlay" style="left: 0px; top: 0px; width: 100%; height: 100%; position: fixed;">
</div>
<?= $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 ($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)? "?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; ?>
<? 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)): ?>
<? // This block is the original breadcrumb code ?>
<? if (empty($parents)): ?>
<?= $theme->breadcrumb_menu($theme, null); ?>
<? else: ?>
<?= $theme->breadcrumb_menu($theme, $parents); ?>
<? endif; ?>
<? // End Original Breadcrumb code, begin modified code. ?>
<? else: ?>
<?
// This is based on the libraries/My_Theme_View.php -> breadcrumb_menu function.
$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-' . $this->breadcrumbs_position . '">';
$i = 0;
foreach ($breadcrumbs as $breadcrumb):
if ($breadcrumb->url):
$breadcrumb_content .= '<li ' . (($i == 0)? " class=\"g-first\"" : null) . '>';
$breadcrumb_content .= (($i > 0)? " :: " : 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) . '"> '. (($i > 0)? " :: " : 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;
?>
<? endif; // End Edit. ?>
<?= $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>

View File

@ -1,210 +0,0 @@
<?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 . "/" . urlencode($siblings[$i-1]->name));
} 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("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 ?>
<? // 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

@ -1,122 +0,0 @@
<?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.
*/
?>
<?
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->bb2html(html::purify($item->title), 1); ?>
<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;
// rWatcher Modification.
//ORIGINAL LINE $siblings = $item->parent()->children();
$siblings = "";
if (isset($dynamic_siblings)) {
$siblings = $dynamic_siblings;
} else {
$siblings = $item->parent()->children();
}
// End rWatcher Modification
?>
<div class="g-resize" style="margin-left: -<?= intval($_resizewidth / 2); ?>px; ">
<? $script = "<script type=\"text/javascript\">\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->bb2html(html::purify($item->title), 2) ?>" <?= ($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-photo-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->bb2html(html::purify($siblings[$i]->title), 2) ?>" 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</script>\n"; ?>
<? $_align = "";
if ($_description):
switch ($theme->photo_descmode):
case "overlay_top":
$_align = "g-align-top";
break;
case "overlay_bottom":
$_align = "g-align-bottom";
break;
default:
break;
endswitch;
endif; ?>
<? if ($_align): ?>
<span class="g-more <?= $_align ?>"><?= t("More") ?></span>
<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 ?>

View File

@ -1,239 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access."); ?>
<?
// Used album.html.php as starting point.
// 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)):
$siblings = $all_siblings;
if (($theme->disablephotopage) && (count($siblings) > count($children))):
$j = 0;
foreach ($siblings as $i => $sibling):
//if ($sibling->rand_key == $children[$j]->rand_key):
if ($sibling->id == $children[$j]->item_id):
//echo $theme->get_thumb_element($sibling, !$theme->hidecontextmenu);
echo rw_get_thumb_element($children[$j], $theme);
if ($j + 1 < count($children)):
$j++;
endif;
else:
echo $theme->get_thumb_link($sibling);
//echo rw_get_thumb_link($sibling, $theme);
endif;
endforeach;
else:
foreach ($children as $i => $child):
//echo $theme->get_thumb_element($child, !$theme->hidecontextmenu);
echo rw_get_thumb_element($child, $theme);
endforeach;
endif;
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"); ?>
<?
function rw_get_thumb_link($item, $theme) {
// This code is based on grey dragon's get_thumb_link function.
// Change all $this to $theme
if ($item->is_album()):
return "";
endif;
/*
if (access::can("view_full", $item)):
$direct_link = $item->file_url();
else:
$direct_link = $item->resize_url();
endif;*/
$direct_link = $child->full_or_resize_url();
return '<a title="' . $theme->bb2html(html::purify($item->title), 2) . '" style="display: none;" class="g-sb-preview" rel="g-preview" href="' . $direct_link . '">&nbsp;</a>';
}
function rw_get_thumb_element($child, $theme) {
// This code is based on grey dragon's get_thumb_element function.
// Change all $item to $child
// Change all $this to $theme
$thumb_item = $child;
if ($theme->thumb_random):
if ($child->is_album() && ($rnd = item::random_query()->where("parent_id", "=", $child->id)->find()) && $rnd->loaded()):
$thumb_item = $rnd;
endif;
endif;
$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";
if ($thumb_item->has_thumb()):
$is_portrait = ($thumb_item->thumb_height > $thumb_item->thumb_width);
$_shift = "";
switch ($theme->thumb_imgalign):
case "center":
if (($theme->crop_factor == 1) and (!$is_portrait)):
$_shift = 'style="margin-top: ' . intval(($theme->_thumb_size_y - $thumb_item->thumb_height) / 2) . 'px;"';
elseif ($theme->crop_factor > 0):
$_shift = 'style="margin-top: -' . intval(($thumb_item->thumb_height - $theme->_thumb_size_y) / 2) . 'px;"';
endif;
break;
case "bottom":
if (($theme->crop_factor == 1) and (!$is_portrait)):
$_shift = 'style="margin-top: ' . intval($theme->_thumb_size_y - $thumb_item->thumb_height) . 'px;"';
elseif ($theme->crop_factor > 0):
$_shift = 'style="margin-top: -' . intval($thumb_item->thumb_height - $theme->_thumb_size_y) . 'px;"';
endif;
break;
case "fit":
break;
case "top":
default:
break;
endswitch;
else:
$is_portrait = FALSE;
$_shift = 'style="margin-top: 0px;"';
endif;
$content .= ($is_portrait)? " g-portrait" : " g-landscape";
$content .= '">' . $theme->thumb_top($child);
$content .= '<div class="g-thumbslide">';
$thumb_content = '<p class="g-thumbcrop">';
$use_direct_link = (($theme->disablephotopage) && (!$child->is_album()));
$class_name = "g-thumblink";
if ($use_direct_link):
$class_name .= ' g-sb-preview" rel="g-preview';
//if (access::can("view_full", $child)):
//$direct_link = $child->file_url();
//else:
$direct_link = $child->full_or_resize_url();
//endif;
else:
$direct_link = $child->url();
endif;
if ($use_direct_link && module::is_active("exif") && module::info("exif")):
$thumb_content .= '<a class="g-meta-exif-link g-dialog-link" href="' . url::site("exif/show/{$child->id}") . '" title="' . t("Photo details")->for_html_attr() . '">&nbsp;</a>';
endif;
$thumb_content .= '<a title="' . $theme->bb2html(html::purify($child->title), 2) . '" '. $_shift . ' class="' . $class_name . '" href="' . $direct_link . '">';
if ($thumb_item->has_thumb()):
if (($theme->crop_factor > 1) && ($theme->thumb_imgalign == "fit")):
if ($thumb_item->thumb_height > $theme->_thumb_size_y):
if ($is_portrait):
$_max = $theme->_thumb_size_y;
else:
$_max = intval($theme->_thumb_size_x * ($theme->_thumb_size_y / $thumb_item->thumb_height));
endif;
else:
$_max = $theme->_thumb_size_x;
endif;
$_max = min($thumb_item->thumb_width, $_max);
$thumb_content .= $thumb_item->thumb_img(array(), $_max);
else:
$thumb_content .= $thumb_item->thumb_img();
endif;
else:
$thumb_content .= '<img title="No Image" alt="No Image" src="' . $theme->url("images/missing-img.png") . '"/>';
endif;
$thumb_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")):
$thumb_content .= '<ul class="g-description ';
if ($_thumb_descmode == "overlay_top"):
$thumb_content .= 'g-overlay-top';
endif;
if ($_thumb_descmode == "overlay_bottom"):
$thumb_content .= 'g-overlay-bottom';
endif;
$thumb_content .= '"><li class="g-title">' . $theme->bb2html(html::purify($child->title), 2) . '</li>';
if ($_thumb_metamode == "merged"):
$thumb_content .= $theme->thumb_info($child);
endif;
$thumb_content .= '</ul>';
endif;
if (($_thumb_metamode == "default") and ($_thumb_descmode != "overlay_bottom")):
$thumb_content .= '<ul class="g-metadata">' . $theme->thumb_info($child) . '</ul>';
endif;
if ($_thumb_descmode == "bottom"):
$thumb_content .= '<ul class="g-description">';
$thumb_content .= '<li class="g-title">' . $theme->bb2html(html::purify($child->title), 2) . '</li>';
if ($_thumb_metamode == "merged"):
$thumb_content .= $theme->thumb_info($item);
endif;
$thumb_content .= '</ul>';
endif;
/*
if ($addcontext):
$_text = $this->context_menu($item, "#g-item-id-{$item->id} .g-thumbnail");
$thumb_content .= (stripos($_text, '<li>'))? $_text : null;
endif;
*/
try {
$view = new View("frame.html");
$view->thumb_content = $thumb_content;
$content .= $view;
} catch (Exception $e) {
$content .= $thumb_content;
}
$content .= '</div>';
$content .= $theme->thumb_bottom($child);
$content .= '</li>';
return $content;
//print $content;
// End of modified function code.
}
?>

View File

@ -1,204 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?= $theme->html_attributes() ?> xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<? $theme->start_combining("script,css") ?>
<title>
<? if ($page_title): ?>
<?= $page_title ?>
<? else: ?>
<? if ($theme->item()): ?>
<?= $theme->item()->title ?>
<? elseif ($theme->tag()): ?>
<?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?>
<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
<?= item::root()->title ?>
<? endif ?>
<? endif ?>
</title>
<link rel="shortcut icon"
href="<?= url::file(module::get_var("gallery", "favicon_url")) ?>"
type="image/x-icon" />
<? if ($theme->page_type == "collection"): ?>
<? if ($thumb_proportion != 1): ?>
<? $new_width = round($thumb_proportion * 213) ?>
<? $new_height = round($thumb_proportion * 240) ?>
<style type="text/css">
.g-view #g-content #g-album-grid .g-item {
width: <?= $new_width ?>px;
height: <?= $new_height ?>px;
/* <?= $thumb_proportion ?> */
}
</style>
<? endif ?>
<? 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") ?>
<?= $theme->script("superfish/js/superfish.js") ?>
<?= $theme->script("jquery.localscroll.js") ?>
<? /* These are page specific but they get combined */ ?>
<? if ($theme->page_subtype == "photo"): ?>
<?= $theme->script("jquery.scrollTo.js") ?>
<?= $theme->script("gallery.show_full_size.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("ui.init.js") ?>
<?= $theme->css("yui/reset-fonts-grids.css") ?>
<?= $theme->css("superfish/css/superfish.css") ?>
<? if (module::get_var("theme_clean_canvas", "color_variant") == "dark" ): ?>
<?= $theme->css("dark/themeroller/ui.base.css") ?>
<?= $theme->css("dark/screen_colors.css") ?>
<?= $theme->css("dark/screen_candy.css") ?>
<? else: ?>
<?= $theme->css("clean/themeroller/ui.base.css") ?>
<?= $theme->css("clean/screen_colors.css") ?>
<?= $theme->css("clean/screen_candy.css") ?>
<? endif ?>
<?= $theme->css("screen_layout_base.css") ?>
<?= $theme->css("screen_fonts.css") ?>
<? if (module::get_var("theme_clean_canvas", "wide")): ?>
<?= $theme->css("screen_layout_wide.css") ?>
<? else: ?>
<?= $theme->css("screen_layout_fixed.css") ?>
<? endif ?>
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
<!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below -->
<?= $theme->get_combined("script") ?>
<!-- LOOKING FOR YOUR CSS? It's all been combined into the link below -->
<?= $theme->get_combined("css") ?>
</head>
<body <?= $theme->body_attributes() ?>>
<?= $theme->page_top() ?>
<? if (module::get_var("theme_clean_canvas", "wide")): ?>
<div id="doc3" class="yui-t5 g-view">
<? else: ?>
<div id="doc4" class="yui-t5 g-view">
<? endif ?>
<?= $theme->site_status() ?>
<div id="g-header" class="ui-helper-clearfix">
<div id="g-banner">
<? if ($header_text = module::get_var("gallery", "header_text")): ?>
<?= $header_text ?>
<? else: ?>
<a id="g-logo" class="g-left" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>">
<img width="128" height="44" alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= $theme->url("images/canvaslogo.png") ?>" />
</a>
<? endif ?>
<?= $theme->user_menu() ?>
<?= $theme->header_top() ?>
<div id="g-banner-languages">
<? $locales = locales::installed(); ?>
<? if (count($locales) > 1 ) { ?>
<? foreach ($locales as $locale => $display_name) { ?>
<? $locales[$locale] = SafeString::of_safe_html($display_name); ?>
<? } ?>
<? $lang_content = new View("user_languages_block.html"); ?>
<? $lang_content->installed_locales = array_merge(array("" => t("« none »")), $locales); ?>
<? $lang_content->selected = (string) locales::cookie_locale(); ?>
<?= $lang_content ?>
<? } ?>
</div>
<!-- hide the menu until after the page has loaded, to minimize menu flicker -->
<div id="g-site-menu" style="visibility: hidden">
<?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
</div>
<script type="text/javascript"> $(document).ready(function() { $("#g-site-menu").css("visibility", "visible"); }) </script>
<?= $theme->header_bottom() ?>
</div>
<? // rWatcher EDIT: The following code was modifed to allow module-defined breadcrumbs.
// Everything else in this file is a copy of the default page.html.php file.
?>
<? if (!empty($breadcrumbs)): ?>
<ul class="g-breadcrumbs">
<? $i = 0 ?>
<? foreach ($breadcrumbs as $breadcrumb): ?>
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
<!-- Adding ?show=<id> causes Gallery3 to display the page
containing that photo. For now, we just do it for
the immediate parent so that when you go back up a
level you're on the right page. -->
<? if ($breadcrumb->url) : ?>
<a href="<?= $breadcrumb->url ?>">
<? // limit the title length to something reasonable (defaults to 15) ?>
<?= html::purify(text::limit_chars($breadcrumb->title,
module::get_var("gallery", "visible_title_length"))) ?>
</a>
<? else : ?>
<?= html::purify(text::limit_chars($breadcrumb->title,
module::get_var("gallery", "visible_title_length"))) ?>
<? endif ?>
</li>
<? $i++ ?>
<? endforeach ?>
</ul>
<? endif ?>
<? // End modified code ?>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div id="g-content" class="yui-g">
<?= $theme->messages() ?>
<?= $content ?>
</div>
</div>
</div>
<? if (!($theme->item() && !empty($parents))): ?>
<style type="text/css">
/* No breadcrums, position adaption for sidebar needed */
#g-sidebar
{
top: 6px;
}
</style>
<? endif ?>
<div id="g-sidebar" class="yui-b">
<? if ($theme->page_subtype != "login"): ?>
<?= new View("sidebar.html") ?>
<? endif ?>
</div>
</div>
<div id="g-footer" class="ui-helper-clearfix">
<?= $theme->footer() ?>
<? if ($footer_text = module::get_var("gallery", "footer_text")): ?>
<?= $footer_text ?>
<? endif ?>
<? if (module::get_var("gallery", "show_credits")): ?>
<ul id="g-credits" class="g-inline">
<?= $theme->credits() ?>
</ul>
<? endif ?>
</div>
</div>
<?= $theme->page_bottom() ?>
</body>
</html>