';
+ $closediv = TRUE;
+ else:
+ $closediv = FALSE;
+ endif;
+ break;
+ default:
+ echo '
" : null; ?>
+
+ switch ($theme->sidebarvisible):
+ case "left":
+ echo '
';
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '
';
+ else:
+ echo '
';
+ endif;
+ break;
+ default:
+ echo '
';
+ break;
+ endswitch;
+
+ if ($theme->show_root_page):
+ echo new View("rootpage.html");
+ else:
+ echo $content;
+ endif; ?>
+
+
+
+ if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "bottom")): ?>
+
+ = new View("sidebar.html") ?>
+
+ endif; ?>
+
+= $theme->page_bottom() ?>
+
+
diff --git a/3.0/modules/tag_albums/-- Theme Files/greydragon/views/paginator.html.php b/3.0/modules/tag_albums/-- Theme Files/greydragon/views/paginator.html.php
new file mode 100644
index 00000000..5918299c
--- /dev/null
+++ b/3.0/modules/tag_albums/-- Theme Files/greydragon/views/paginator.html.php
@@ -0,0 +1,209 @@
+
+
+// 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 = " ";
+ else:
+ $pagination_msg = t("Page:") . ' ';
+ if ($total_pages < 13):
+ for ($i = 1; $i <= $total_pages; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < $total_pages):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+ elseif ($current_page < 9):
+ for ($i = 1; $i <= 10; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < 10):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+
+ $pagination_msg .= '…';
+ $pagination_msg .= '
' . t($total_pages - 1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t($total_pages) . ' ';
+
+ elseif ($current_page > $total_pages - 8):
+ $pagination_msg .= '
' . t(1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t(2) . ' ';
+ $pagination_msg .= '…';
+
+ for ($i = $total_pages - 9; $i <= $total_pages; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < $total_pages):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+
+ else:
+ $pagination_msg .= '
' . t(1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t(2) . ' ';
+ $pagination_msg .= '…';
+
+ for ($i = $current_page - 5; $i <= $current_page + 5; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < $current_page + 5):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+
+ $pagination_msg .= '…';
+ $pagination_msg .= '
' . t($total_pages - 1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t($total_pages) . ' ';
+ endif;
+ endif;
+?>
+
+
\ No newline at end of file
diff --git a/3.0/modules/tag_albums/-- Theme Files/greydragon/views/tag_albums_album.html.php b/3.0/modules/tag_albums/-- Theme Files/greydragon/views/tag_albums_album.html.php
new file mode 100644
index 00000000..3a348d3b
--- /dev/null
+++ b/3.0/modules/tag_albums/-- Theme Files/greydragon/views/tag_albums_album.html.php
@@ -0,0 +1,135 @@
+
+
+ // 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).
+?>
+
+
+
+= $theme->add_paginator("top"); ?>
+
+ if (($theme->album_descmode == "top") and ($description)): ?>
+
= $theme->bb2html(html::purify($description), 1) ?>
+ endif; ?>
+
+ if (isset($filter_text) && (module::get_var("tag_albums", "tag_index_filter"))): ?>
+
+
+
= $filter_text; ?>
+
+ endif ?>
+
+
+
+ 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 = '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 .= '';
+ $content .= '';
+ if ($thumb_item->has_thumb()):
+ $content .= $thumb_item->thumb_img();
+ else:
+ $content .= ' ';
+ endif;
+ $content .= '
';
+
+ 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 .= '
bb2html(html::purify($child->title), 2) . '';
+ if ($_thumb_metamode == "merged"):
+ $content .= $theme->thumb_info($child);
+ endif;
+ $content .= ' ';
+ endif;
+
+ if (($_thumb_metamode == "default") and ($_thumb_descmode != "overlay_bottom")):
+ $content .= '
';
+ endif;
+
+ if ($_thumb_descmode == "bottom"):
+ $content .= '
';
+ $content .= '' . $theme->bb2html(html::purify($child->title), 2) . ' ';
+ if ($_thumb_metamode == "merged"):
+ $content .= $theme->thumb_info($child);
+ endif;
+ $content .= ' ';
+ endif;
+
+ /*
+ if ($addcontext):
+ $_text = $this->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail");
+ $content .= (stripos($_text, '
'))? $_text : null;
+ endif;
+ */
+
+ $content .= ' ';
+ $content .= $theme->thumb_bottom($child);
+ $content .= ' ';
+
+ print $content;
+ // End rWatcher Edit.
+?>
+ endforeach ?>
+ else: ?>
+ = t("There aren't any photos here yet!") ?>
+ endif; ?>
+
+
+= $theme->dynamic_bottom() ?>
+
+ if (($theme->album_descmode == "bottom") and ($description)): ?>
+
= $theme->bb2html(html::purify($description), 1) ?>
+ endif; ?>
+
+= $theme->add_paginator("bottom"); ?>
diff --git a/3.1/modules/tag_albums/-- Theme Files/greydragon/views/calpage.html.php b/3.1/modules/tag_albums/-- Theme Files/greydragon/views/calpage.html.php
new file mode 100644
index 00000000..9d3341de
--- /dev/null
+++ b/3.1/modules/tag_albums/-- Theme Files/greydragon/views/calpage.html.php
@@ -0,0 +1,297 @@
+
+
+ $theme->load_sessioninfo(); ?>
+
+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->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 ?>
+ if ($theme->disable_seosupport): ?>
+
+
+
+
+
+ endif; ?>
+ if ($theme->blendpagetrans): ?>
+
+
+ endif; ?>
+
+
+
= $_title; ?>" />
+
+ if ($theme->allow_root_page): ?>
+
: = t("Root Page") ?>; action-uri== item::root()->url(); ?>?root=yes; icon-uri=favicon.ico" />
+
: = t("Root Album") ?>; action-uri== item::root()->url(); ?>?root=no; icon-uri=favicon.ico" />
+ else: ?>
+
: = t("Root Album") ?>; action-uri== item::root()->url(); ?>; icon-uri=favicon.ico" />
+ endif; ?>
+ if (identity::active_user()->admin): ?>
+
+
: = t("Dashboard") ?>; action-uri== url::site("admin"); ?>; icon-uri=favicon.ico" />
+ endif; ?>
+
+
+
+ if ($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 */ ?>
+
+= $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(); ?>
+
+
+= $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; ?>
+
+= $theme->get_combined("script") ?>
+
+
+ if ($theme->thumb_inpage): ?>
+
+ endif; ?>
+
+ if ($theme->item()): ?>
+ $item = $theme->item(); ?>
+ else: ?>
+ $item = item::root(); ?>
+ endif; ?>
+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")): ?>
+
+
+ = $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
+
+ endif ?>
+
+ if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "top")): ?>
+
+ = new View("sidebar.html") ?>
+
+ endif; ?>
+
+
+ if (!$theme->show_root_page): ?>
+ = $theme->sidebar_menu($item->url()) ?>
+
+ endif; ?>
+ switch ($theme->sidebarvisible):
+ case "left":
+ echo '
';
+ $closediv = TRUE;
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '
';
+ $closediv = TRUE;
+ else:
+ $closediv = FALSE;
+ endif;
+ break;
+ default:
+ echo '
';
+ $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")): ?>
+= '
'; ?>
+= $theme->get_block_html("thumbnav"); ?>
+ endif; ?>
+ else: ?>
+= new View("sidebar.html") ?>
+ endif; ?>
+ endif ?>
+= ($closediv)? "
" : null; ?>
+
+ switch ($theme->sidebarvisible):
+ case "left":
+ echo '
';
+ break;
+ case "none":
+ case "top":
+ case "bottom":
+ if (($theme->thumb_inpage) and ($page_subtype == "photo")):
+ echo '
';
+ else:
+ echo '
';
+ endif;
+ break;
+ default:
+ echo '
';
+ break;
+ endswitch;
+
+ if ($theme->show_root_page):
+ echo new View("rootpage.html");
+ else:
+ echo $content;
+ endif; ?>
+
+
+
+ if (($theme->page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "bottom")): ?>
+
+ = new View("sidebar.html") ?>
+
+ endif; ?>
+
+= $theme->page_bottom() ?>
+
+
diff --git a/3.1/modules/tag_albums/-- Theme Files/greydragon/views/paginator.html.php b/3.1/modules/tag_albums/-- Theme Files/greydragon/views/paginator.html.php
new file mode 100644
index 00000000..5918299c
--- /dev/null
+++ b/3.1/modules/tag_albums/-- Theme Files/greydragon/views/paginator.html.php
@@ -0,0 +1,209 @@
+
+
+// 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 = " ";
+ else:
+ $pagination_msg = t("Page:") . ' ';
+ if ($total_pages < 13):
+ for ($i = 1; $i <= $total_pages; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < $total_pages):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+ elseif ($current_page < 9):
+ for ($i = 1; $i <= 10; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < 10):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+
+ $pagination_msg .= '…';
+ $pagination_msg .= '
' . t($total_pages - 1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t($total_pages) . ' ';
+
+ elseif ($current_page > $total_pages - 8):
+ $pagination_msg .= '
' . t(1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t(2) . ' ';
+ $pagination_msg .= '…';
+
+ for ($i = $total_pages - 9; $i <= $total_pages; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < $total_pages):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+
+ else:
+ $pagination_msg .= '
' . t(1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t(2) . ' ';
+ $pagination_msg .= '…';
+
+ for ($i = $current_page - 5; $i <= $current_page + 5; $i++):
+ if ($i == $current_page):
+ $pagination_msg .= '
' . t($i) . ' ';
+ else:
+ $pagination_msg .= '
' . t($i) . ' ';
+ endif;
+ if ($i < $current_page + 5):
+ $pagination_msg .= '·';
+ endif;
+ endfor;
+
+ $pagination_msg .= '…';
+ $pagination_msg .= '
' . t($total_pages - 1) . ' ';
+ $pagination_msg .= '·';
+ $pagination_msg .= '
' . t($total_pages) . ' ';
+ endif;
+ endif;
+?>
+
+
\ No newline at end of file
diff --git a/3.1/modules/tag_albums/-- Theme Files/greydragon/views/tag_albums_album.html.php b/3.1/modules/tag_albums/-- Theme Files/greydragon/views/tag_albums_album.html.php
new file mode 100644
index 00000000..3a348d3b
--- /dev/null
+++ b/3.1/modules/tag_albums/-- Theme Files/greydragon/views/tag_albums_album.html.php
@@ -0,0 +1,135 @@
+
+
+ // 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).
+?>
+
+
+
+= $theme->add_paginator("top"); ?>
+
+ if (($theme->album_descmode == "top") and ($description)): ?>
+
= $theme->bb2html(html::purify($description), 1) ?>
+ endif; ?>
+
+ if (isset($filter_text) && (module::get_var("tag_albums", "tag_index_filter"))): ?>
+
+
+
= $filter_text; ?>
+
+ endif ?>
+
+
+
+ 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 = '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 .= '';
+ $content .= '';
+ if ($thumb_item->has_thumb()):
+ $content .= $thumb_item->thumb_img();
+ else:
+ $content .= ' ';
+ endif;
+ $content .= '
';
+
+ 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 .= '
bb2html(html::purify($child->title), 2) . '';
+ if ($_thumb_metamode == "merged"):
+ $content .= $theme->thumb_info($child);
+ endif;
+ $content .= ' ';
+ endif;
+
+ if (($_thumb_metamode == "default") and ($_thumb_descmode != "overlay_bottom")):
+ $content .= '
';
+ endif;
+
+ if ($_thumb_descmode == "bottom"):
+ $content .= '
';
+ $content .= '' . $theme->bb2html(html::purify($child->title), 2) . ' ';
+ if ($_thumb_metamode == "merged"):
+ $content .= $theme->thumb_info($child);
+ endif;
+ $content .= ' ';
+ endif;
+
+ /*
+ if ($addcontext):
+ $_text = $this->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail");
+ $content .= (stripos($_text, '
'))? $_text : null;
+ endif;
+ */
+
+ $content .= ' ';
+ $content .= $theme->thumb_bottom($child);
+ $content .= ' ';
+
+ print $content;
+ // End rWatcher Edit.
+?>
+ endforeach ?>
+ else: ?>
+ = t("There aren't any photos here yet!") ?>
+ endif; ?>
+
+
+= $theme->dynamic_bottom() ?>
+
+ if (($theme->album_descmode == "bottom") and ($description)): ?>
+
= $theme->bb2html(html::purify($description), 1) ?>
+ endif; ?>
+
+= $theme->add_paginator("bottom"); ?>