1
0

Grey Dragon Theme - initial check in

This commit is contained in:
Serguei Dosyukov 2009-11-30 01:09:08 -06:00
parent 8c47321af7
commit 4b47c5b1a1
52 changed files with 1196 additions and 0 deletions

View File

@ -0,0 +1,33 @@
Grey Dragon Theme Changelog
version 1.5.7
- Status message has been moved into header as popup to prevent obstruction of the main view.
jQuery is used to fade it out in 10 sec.
- Improved logic for dialogs on submit
- Theme related JS has been moved out of the page.html.php
version 1.5.6
- Fixed issue with tollbar buttons not properly aligned/shown when page is resized.
- Copyright info moved into DB. To change default settings add [th_greydragon/copyright] into VARS table.
version 1.5.5
- CSS fixes.
- Theme adjusted to be compatible with latest Git.
- Login links are moved into footer.
- Pagination module redesigned to support new structure of paging data.
version 1.5.4
- CSS fixes.
- Added support for Comments block.
- Improved support for Modal dialogs.
version 1.5.3
- Sync to git.
- Exif menu customization is now part of the theme.
- Sidebar management button is disabled for current mode.
version 1.5.2
- Code, layout, css cleanup.
- New thumbs for buttons.
- First set of Ajax dialogs is ready and now operational: Login, user info, edit album, exit info.
- Fixed some browser related issues.

View File

@ -0,0 +1,33 @@
#sb-content { padding: 0px; margin: 0; }
#g-exif-data { width: auto; min-height: 90%; margin: 10px; text-align: center; color: #ccc; background-color: #101415; overflow: auto; }
#g-exif-data table { border: #eee 1px solid; font-size: 10pt; }
#g-exif-data .g-even { background-color: #aaa; color: #000; }
#g-exif-data .g-odd { background-color: #999; color: #fff; }
/* Login dialog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
form { background: #101415 url('../images/section.png') repeat-x; overflow: hidden; }
form fieldset { border: none; }
form legend { color: #bbb; padding: 6px 0 0 10px; width: 100%; }
form ul { padding: 0; }
form li { padding: 8px 0 0 20px; }
form ul>fieldset>legend { display: none; }
form label { display: block; }
form textarea { width: 98%; }
form input[type="text"],
input[type="password"] { width: 90%; }
#sb-content.html_ajax textarea { width: 270px; }
#sb-content.html_ajax p.g-error { padding-top: 4px; color: red; }
#g-text { min-height: 70px; }
#g-login-form { width: 100%; }
#g-login form ul { min-height: 160px; }
#g-edit-user-form ul { min-height: 276px; }
#g-password-reset { margin-left: 8px; }
#g-edit-album-form fieldset fieldset { border: none; }
#g-edit-album-form fieldset fieldset li { float: left; display: inline; }
#g-add-photos-form { height: 100%; }

View File

@ -0,0 +1,21 @@
html { overflow: auto; }
* { margin: 0px; }
body { min-width: 73em; padding: 0; margin: 0; }
#g-header { position: relative; min-width: 73em; z-index: 5; }
#g-main, #g-main-in { min-width: 72.7em; height: auto; bottom: auto; }
#g-footer { position: relative; height: auto; min-width: 73em; clear: both; display: block; overflow: auto; }
#g-column-left { float: left; width: 18em; min-height: 32em; overflow: hidden; height: 100%; }
#g-column-right { float: right; width: 18em; min-height: 32em; overflow: hidden; height: 100%; }
#g-column-center { margin: 0 19em 0 19em; min-height: 32em; overflow: hidden; height: 100%; }
#g-column-centerleft { margin: 0 19em 0 0; min-height: 32em; overflow: hidden; height: 100%; }
#g-column-centerright { margin: 0 0 0 19em; min-height: 32em; overflow: hidden; height: 100%; }
#g-column-centerfull { position: relative; margin: 0 0; min-height: 31em; overflow: hidden; height: 100%; }
#g-footer-leftside { float: left; display: inline; }
#g-footer-rightside { float: right; display: inline; }
.g-hideitem { display: none; }
#g-main-in { overflow: auto; height: 100%; }

View File

@ -0,0 +1,27 @@
#g-site-menu { position: absolute; bottom: 0px; left: 310px; }
#g-site-menu ul { float: left; padding: 0px; margin: 0px; width: 100%; border: #000000 0px solid; white-space: nowrap; z-index: 100; }
#g-site-menu a { display: block; padding: 3px 5px 4px 5px; text-align: center; width: auto; letter-spacing: 0px; cursor: pointer; }
#g-site-menu li { float: left; padding: 0px; background-color: transparent; border: transparent 1px solid; }
#g-site-menu li a:hover { color: #000000; cursor: pointer; background-color: #303030; }
#g-site-menu li:hover,
#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; }
#g-site-menu li ul a { text-align: left; padding: 4px 0px; text-indent: 8px; letter-spacing: 0px; cursor: pointer; }
#g-site-menu li ul a:hover { background-image: none; cursor: pointer; }
#g-site-menu li ul { border: #000000 1px solid; position: absolute; margin: 0px 0px 0px -1px; width: 135px; height: auto; left: -999em; }
#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; }
#g-site-menu li ul li:hover,
#g-site-menu li ul li.iemhover { border: #C0C0C0 0px solid; background-color: #303030; }
#g-site-menu li li { width: 135px; padding-right: 0px; }
#g-site-menu li ul a { width: 135px; }
#g-site-menu li ul ul { margin: -21px 0px 0px 135px; }
#g-site-menu li:hover ul ul,
#g-site-menu li:hover ul ul ul,
#g-site-menu li.iemhover ul ul,
#g-site-menu li.iemhover ul ul ul { left: -999em; }
#g-site-menu li:hover ul,
#g-site-menu li li:hover ul,
#g-site-menu li li li:hover ul,
#g-site-menu li.iemhover ul,
#g-site-menu li li.iemhover ul,
#g-site-menu li li li.iemhover ul { left: auto; }

View File

@ -0,0 +1,4 @@
body { word-wrap: break-word; }
.g-item .g-metadata:hover { padding: 0px 0 4px 6px; }
#g-quick-search-form input[type="submit"] { padding: 60px 0 0 0; }

View File

@ -0,0 +1,211 @@
/**
* Gallery 3 Grey Dragon Theme
* Copyright (C) 2006-2009 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.
*/
@import url(layout.css);
@import url(forms.css);
html { background-color: #1A2022; overflow: -moz-scrollbars-vertical; overflow-y: scroll; }
body { background: url(../images/background.gif) #1A2022 repeat-x; color: #BBB; font: 0.8em Arial, verdana, sans-serif; }
a { color: #6392CF !important; text-decoration: none; outline: none; -moz-outline-style: none; }
a:focus, a:active, a:hover { text-decoration: none; outline: none; }
img { border: none; }
p { font-size: small; text-indent: 0; }
ul { list-style: none none; }
input[type="submit"] { cursor: pointer; /* hand-shaped cursor */ cursor: hand; /* for IE 5.x */ }
h1 { font-weight: bold; font-size: 1.2em; }
h2 { font-weight: bold; font-size: 1.2em; }
h3 { font-weight: bold; }
h4 { font-weight: bold; }
h5 { font-weight: bold; }
/* Common elements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.txtright { text-align: right; }
.g-metadata { overflow: hidden; }
.ui-icon { display: inline-block; zoom: 1; width: 16px; height: 16px; background-image: url(../images/ui-icons.png); }
.ui-icon-first { background-position: -32px -162px; }
.ui-icon-first-d { background-position: -162px -162px; }
.ui-icon-prev { background-position: -48px -162px; }
.ui-icon-prev-d { background-position: -178px -162px; }
.ui-icon-next { background-position: -64px -162px; }
.ui-icon-next-d { background-position: -194px -162px; }
.ui-icon-last { background-position: -80px -162px; }
.ui-icon-last-d { background-position: -210px -162px; }
.ui-icon-signal-diag { background-position: -16px -178px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-comment { background-position: -227px -219px; width: 27px; height: 20px; }
.ui-icon-left .ui-icon { float: left; margin-right: .2em; }
.ui-icon-right .ui-icon { float: right; margin-left: .2em; }
.g-resize { border: 1px solid #888; padding: 5px; background: #555; }
/* Header section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-header { height: 90px; padding: 0; font-size: 80%; }
#g-logo { position: absolute; top: 8px; left: 16px; }
#g-login-menu { position: absolute; bottom: 10px; right: 14px; background-color: transparent; }
#g-login-menu li { display: inline; padding-left: 1.2em; }
.g-breadcrumbs { position: absolute; bottom: 4px; right: 14px; background-color: transparent; }
.g-breadcrumbs li { display: inline; padding-left: 1em; background: transparent url('../images/ico-separator.png') no-repeat 0 2px; }
.g-breadcrumbs li.g-first { background-image: none; }
/* Main section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-main { display: block; margin: 0; }
#g-main-in { display: block; position: relative; }
#g-column-center, #g-column-centerleft { padding: 6px 6px 6px 16px; }
#g-column-centerfull { padding: 6px 12px 6px 10px; }
#g-column-centerright { padding: 6px 12px 6px 6px; }
#g-column-left { padding: 6px 4px 6px 10px; }
#g-column-right { padding: 6px 10px 6px 4px; }
/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.g-paginator { display: inline-block; width: 100%; padding: 4px 0 6px 0; font-size: 80%; zoom: 1; }
.g-paginator li { display: inline; float: left; margin-left: 0; zoom: 1; }
.g-paginator a { padding: 0 0 0 2px; }
.g-paginator .g-pagination { width: 80%; padding-top: 2px; }
.g-paginator .g-navigation { text-align: right; width: 20%; }
/* Album grid ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.g-thumbcrop { overflow: hidden; position: relative; width: 200px; height: 150px; }
#g-album-grid { padding: 0px; width: 100%; }
#g-album-grid .g-item { position: relative; float: left; padding: 10px 9px 0px 9px; width: 30.5%; height: 190px; background: url('../images/image_thumb.gif') no-repeat; }
#g-album-grid .g-item p { text-align: center; }
#g-album-grid h2 { position: absolute; top: 164px; left: 12px; width: 150px; font: 100%/100% Arial, Helvetica, sans-serif; }
#g-album-grid h2 a { display: block; margin-top: 4px; font: bold 70% Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; text-transform: uppercase; min-height: 2em; }
#g-album-grid .g-album h2 { padding-left: 20px; background: url('../images/ico-album.png') no-repeat 0px 2px; }
.g-item .g-metadata { display: block; position: absolute; margin: 0; padding: 0; top: 172px; left: 198px; width: 14px; height: 14px; background: url(../images/ui-icons.png) -162px -144px; }
.g-item .g-metadata li { padding: 0; margin: 0; text-indent: -9999px; font: bold 70% Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; }
.g-item .g-metadata:hover { padding: 4px 0 0 6px; top: 148px; left: 6px; width: 198px; height: 32px; background: #181818 none; border: 1px #888 solid; z-index: 100; }
.g-item .g-metadata:hover li { text-indent: 0px; }
.g-item .g-context-menu { position: absolute; margin: 0; padding: 0; top: 6px; left: 198px; width: 14px; height: 14px; background: url(../images/ui-icons.png) -178px -144px; }
.g-item .g-context-menu li { width: 100%; padding: 0; margin: 0; text-indent: -9999px; font: bold 70% Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; }
.g-item .g-context-menu:hover { top: 4px; left: 6px; width: 204px; height: auto; background: #181818 none; border: 1px #888 solid; z-index: 100; }
.g-item .g-context-menu ul { display: block; padding: 0; margin: 0; }
.g-item .g-context-menu li li { display: none; font-size: 100%; width: 100%; }
.g-item .g-context-menu li li a { display: block; padding: 4px 6px; }
.g-item .g-context-menu:hover li li { display: block; text-indent: 0px; }
.g-item .g-context-menu li li a:hover { background-color: #303030; }
.ul-table { text-align: center; margin: 0px auto; padding: 0; list-style-type: none; clear: both; }
.ul-table li { float: left; text-align: center; }
#g-info { }
#g-info h1 { padding-bottom: 1px; border-bottom: 1px solid #888; }
#g-info .g-description { display: none; }
/* #g-info h1:hover .g-description { position: relative; z-index: 10; top: 10px; left: 0px; width: 90%; display: block; afloat: left; border: 1px solid #888; padding: 6px; }*/
#g-photo { padding: 6px 0 0 6px; text-align: center; }
#g-albumheader h1 { padding-bottom: 1px; margin-bottom: 6px; border-bottom: 1px solid #888; }
/* Footer section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-footer { padding: 6px 6px 6px 14px; background: url('../images/footer.png') #1A2022 repeat-x top !important; zoom: 1; font-size: 80%; }
#g-footer ul { float: left; color: #999; padding: 0; text-align: left; }
#g-footer li { padding: 0 0 2px 0; }
#g-visitors { float: left; display: inline; margin: 3px 4px 3px 12px; }
#g-copyright { font-size: x-small; color: #808080; }
#g-footer-rightside { padding-right: 6px; text-align: right; }
/* Design blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-quick-search-form { position: absolute; top: 10px; right: 14px; background: none transparent; }
#g-quick-search-form label { display: none; }
#g-quick-search-form li { display: inline; float: left; padding: 0px; }
#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; width: 150px; /* margin-left: 2px; */ }
#g-quick-search-form input[type="submit"] { display: block; width: 23px; height: 23px; text-indent: -9999px; background: transparent url(../images/search.png) no-repeat center top; border: none; overflow: hidden; }
#g-search-results h1 { border-bottom: #888 1px solid; }
/* Sidebar Blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.g-block { margin-bottom: 0.5em; padding-bottom: 4px; border: 1px solid #737373; background-color: #101415; position: relative; }
.g-block h2 { padding: 4px; font-size: 1.2em; background: url('../images/section.png') repeat-x; }
.g-block-content { margin: 4px 10px 0 10px; display: block; zoom: 1; }
/* Image Block ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-image-block>div { margin-left: 1px; margin-right: 1px; }
.g-image-block { text-align: center; }
.g-image-block img { border: 1px solid #888; background: #555; padding: 5px; }
/* Feeds Block ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
ul#g-feeds { padding: 0; margin: 0; }
/* Tags and cloud ~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-tag-cloud ul { padding: 0; font-size: 100%; }
#g-tag-cloud ul li { line-height: 1.2em; }
#g-tag-cloud ul li span { display: none; }
#g-add-tag-form { display: none; }
/* Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-admin-comment-button { width: 27px; right: 10px; text-indent: -900em; }
.g-avatar { float: right; }
#g-comments-link { background: url('../images/view-comments.png') top left no-repeat; }
#g-comments .g-block-content { margin: 0; }
#g-comment-detail ul { padding: 0px; }
#g-comment-detail > ul > li { margin: 4px; padding: 6px; min-height: 40px; border: 1px dotted #737373; }
#g-comment-detail div { margin-right: 48px; margin-top: 8px; }
/* Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-viewformat { z-index: 5; position: absolute; padding: 0; top: 6px; right: 10px; }
#g-viewformat li { float: left; margin-right: 2px; }
#g-viewformat .g-viewthumb-left { background: url('../images/view-left.png') no-repeat left top; }
#g-viewformat .g-viewthumb-right { background: url('../images/view-right.png') no-repeat left top; }
#g-viewformat .g-viewthumb-full { background: url('../images/view-full.png') no-repeat left top; }
#g-viewformat span { line-height: 1px; text-indent: -900em; width: 17px; display: block; height: 15px; }
#g-viewformat span:hover,
#g-viewformat span.g-viewthumb-current { background-position: left bottom; }
#g-view-menu { position: absolute; top: 6px; right: 70px; height: 16px; z-index: 5; zoom: 1; margin: 0 0 6px 0; padding: 0 0 4px 0; }
.g-toolbar { height: 16px; zoom: 1; margin: 0 0 4px 0; padding: 0 0 3px 0; border-bottom: 1px solid #737373; }
.g-menu { margin: 0; padding: 0; text-align: left; }
.g-menu li { display: inline; }
.g-menu-element,
.g-menu-link { display: inline; float: left; margin-right: 4px; }
.g-buttonset ul { height: 16px; }
.g-buttonset .g-menu-link { text-indent: -99999px; width: 22px; height: 15px; }
#g-slideshow-link { background: url("../images/view-slideshow.png") top left no-repeat; }
.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; }
#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; }
#g-slideshow-link:hover, .g-fullsize-link:hover, #g-exifdata-link:hover, #g-comments-link:hover { background-position: left bottom; }
/* ShadowBox Skin ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#sb-body { background: #101415 url('../images/ajax-loading.gif') no-repeat center center; }
#sb-title-inner { display: none; }
#sb-nav #sb-nav-close { background-image: url('../images/close.png'); width: 60px; }
.clear { clear: both; margin-top: -1px; height: 1px; overflow: hidden; }
.g-message-block { position: absolute; z-index: 10; min-width: 30em; padding: 4px 6px; right: 10px; top: 34px; border: 1px #888 solid; background-color: #AAA; overflow: hidden; color: #000; font: bold 9pt Arial, verdana, sans-serif; text-align: center; }

View File

@ -0,0 +1,40 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
*
* 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.
*/
class exif_event_Core {
static function item_created($item) {
if (!$item->is_album()) {
exif::extract($item);
}
}
static function item_deleted($item) {
Database::instance()->delete("exif_records", array("item_id" => $item->id));
}
static function photo_menu($menu, $theme) {
$item = $theme->item();
$menu->append(
Menu::factory("link")
->id("exifdata-link")
->label(t("Photo Details"))
->url(url::site("exif/show/$item->id"))
->css_id("g-exifdata-link"));
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,17 @@
function setupLoginForm() {
setupAjaxForm('#gLoginForm');
}
function setupAjaxForm($form_id) {
var options = {
dataType: "json",
success: function(data) {
if (data.result == "success") {
if (data.location) { window.location = data.location; }
else { window.parent.Shadowbox.close(); }
}
}
};
$($form_id).ajaxForm(options);
};

View File

@ -0,0 +1,14 @@
// Javascript originally by Patrick Griffiths and Dan Webb.
// http://htmldog.com/articles/suckerfish/dropdowns/
sfHover = function() {
var sfEls = document.getElementById("gSiteMenu").getElementsByTagName("ul")[0].getElementsByTagName("li");
if (!sfEls) { return; }
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() { this.className+=" hover"; }
sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" hover\\b"), ""); }
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

View File

@ -0,0 +1,54 @@
/**
* JS support functions for the theme
*/
var myAjaxLoginSubmitOps =
{ dataType: 'json',
success: function(data) {
if (data.result == 'error') {
$('#g-login').html(data.form);
myAjaxLoginSubmit();
} else {
Shadowbox.close();
window.location.reload();
}
}
};
myAjaxLoginSubmit = function() {
$('form#g-login-form').one('submit', function() {
$(this).ajaxSubmit(myAjaxLoginSubmitOps);
return false;
} )
};
var myAjaxSubmitOps =
{ dataType: 'json',
success: function(data) {
if (data.result == 'error') {
$('#sb-content form').html(data.form);
myAjaxSubmit();
} else {
Shadowbox.close();
window.location.reload();
}
}
};
myAjaxSubmit = function() {
$('form').one('submit', function() {
$(this).ajaxSubmit(myAjaxSubmitOps);
return false;
} )
};
$(document).ready( function() {
Shadowbox.setup("a.g-dialog-link", {player: 'ajax', width: 340, height: 316, enableKeys: false, onFinish: myAjaxSubmit});
Shadowbox.setup("a.g-fullsize-link", {player: 'img'});
Shadowbox.setup("a#g-login-link", {player: 'ajax', width: 340, height: 230, enableKeys: false, onFinish: myAjaxLoginSubmit});
Shadowbox.setup("a#g-exifdata-link", {player: 'ajax', width: 420, height: 400});
Shadowbox.setup(".g-context-menu .ui-icon-pencil", {player: 'ajax', width: 340, height: 370, enableKeys: false});
$('.g-message-block').fadeOut(10000);
});

View File

@ -0,0 +1,6 @@
name = "Grey Dragon Theme"
description = "A Crisp theme uses on clear grey colors and minimized on JS overhead"
version = 1.5.6
author = "2009 Serguei Dosyukov"
site = 1
admin = 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,44 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-info">
<?= $theme->album_top() ?>
<h1><?= html::purify($item->title) ?></h1>
<div class="g-description"><?= ($item->description)? bb2html(html::purify($item->description), 1) : null; ?></div>
</div>
<?= $theme->paginator() ?>
<ul id="g-album-grid">
<? if (count($children)): ?>
<? foreach ($children as $i => $child): ?>
<? $item_class = "g-photo"; ?>
<? if ($child->is_album()): ?>
<? $item_class = "g-album"; ?>
<? endif ?>
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
<?= $theme->thumb_top($child) ?>
<p class="g-thumbcrop"><a href="<?= $child->url() ?>">
<?= $child->thumb_img() ?>
</a></p>
<?= $theme->thumb_bottom($child) ?>
<h2><a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
<? $_text = $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<?= (stripos($_text, '<li>'))? $_text : null; ?>
<? if (module::is_active("info")): ?>
<ul class="g-metadata">
<?= $theme->thumb_info($child); ?>
</ul>
<? endif ?>
</li>
<? endforeach ?>
<? else: ?>
<? if ($user->admin || access::can("add", $item)): ?>
<? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?>
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
<? endif; ?>
</ul>
<?= $theme->album_bottom() ?>
<?= $theme->paginator() ?>

View File

@ -0,0 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if ($anchor): ?>
<a name="<?= $anchor ?>"></a>
<? endif ?>
<div id="<?= $css_id ?>" class="g-block">
<h2><?= $title ?></h2>
<div class="g-block-content">
<?= $content ?>
</div>
</div>

View File

@ -0,0 +1,29 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-album-header">
<div id="g-album-header-buttons">
<?= $theme->dynamic_top() ?>
</div>
<h1><?= html::clean($title) ?></h1>
</div>
<ul id="g-album-grid">
<? foreach ($children as $i => $child): ?>
<li class="g-item <?= $child->is_album() ? "g-album" : "" ?>">
<?= $theme->thumb_top($child) ?>
<p class="g-thumbcrop"><a href="<?= $child->url() ?>">
<img id="g-photo-id-<?= $child->id ?>" class="g-thumbnail"
alt="photo" src="<?= $child->thumb_url() ?>"
width="<?= $child->thumb_width ?>"
height="<?= $child->thumb_height ?>" />
</a></p>
<h2><a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
<?= $theme->thumb_bottom($child) ?>
<ul class="g-metadata">
<?= $theme->thumb_info($child) ?>
</ul>
</li>
<? endforeach ?>
</ul>
<?= $theme->dynamic_bottom() ?>
<?= $theme->paginator() ?>

View File

@ -0,0 +1 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>

View File

@ -0,0 +1,9 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<span class="g-metadata">
<? if ($item->description): ?>
<?= bb2html(html::purify($item->description), 1) ?>
<? else: ?>
&nbsp;
<? endif ?>
</span>

View File

@ -0,0 +1,41 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
$("#g-login-form").ready(function() {
$("#g-password-reset").bind('click',
function() {
$.ajax({
url: "<?= url::site("password/reset") ?>",
success: function(data) {
$("#g-login").html(data);
ajaxify_login_reset_form();
return false;
}
});
});
});
function ajaxify_login_reset_form() {
$("#g-login form").ajaxForm({
dataType: "json",
success: function(data) {
if (data.form) {
$("#g-login").replaceWith(data.form);
ajaxify_login_reset_form();
}
if (data.result == "success") {
$("#g-dialog").dialog("close");
window.location.reload();
}
}
});
};
</script>
<div id="g-login">
<?= $form ?>
<? if (identity::is_writable()): ?>
<a href="#" id="g-password-reset"><?= t("Forgot Your Password?") ?></a>
<? endif ?>
</div>

View File

View File

@ -0,0 +1,3 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div class="g-toolbar">&nbsp;</div>

View File

@ -0,0 +1,183 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? include('support/bbtohtml.php'); ?>
<!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" xml:lang="en" lang="en">
<!-- Copyright (c) 2009 DragonSoft. All Rights Reserved -->
<? $sidebaralign = $_REQUEST['align'];
if (empty($sidebaralign)) {
if (isset($_COOKIE['sidebaralign'])) {
$sidebaralign = $_COOKIE['sidebaralign'];
} else {
$sidebaralign = "right";
}
} else {
setcookie("sidebaralign", $sidebaralign, 0);
}
?>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>
<? if ($page_title): ?>
<?= $page_title ?>
<? else: ?>
<? if ($theme->item()): ?>
<? if ($theme->item()->is_album()): ?>
<?= t("Browse Album :: %album_title", array("album_title" => $theme->item()->title)) ?>
<? elseif ($theme->item()->is_photo()): ?>
<?= t("Photo :: %photo_title", array("photo_title" => $theme->item()->title)) ?>
<? else: ?>
<?= t("Movie :: %movie_title", array("movie_title" => $theme->item()->title)) ?>
<? endif ?>
<? elseif ($theme->tag()): ?>
<?= t("Browse Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?>
<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
<?= t("Gallery") ?>
<? endif ?>
<? endif ?></title>
<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" />
<link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" />
<?= $theme->script("jquery.js") ?>
<?= $theme->script("jquery.form.js") ?>
<?= $theme->script("jquery-ui.js") ?>
<?= $theme->head() ?>
<link rel="stylesheet" href="<?= $theme->url("css/screen.css") ?>" type="text/css" media="screen,print,projection" />
<link rel="stylesheet" href="<?= $theme->url("css/menus.css") ?>" type="text/css" media="screen,print,projection" />
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?= $theme->url("css/old_ie.css") ?>" type="text/css" media="screen,print,projection" />
<![endif]-->
<!--[if !IE]>
<link rel="stylesheet" href="<?= $theme->url("css/layout_non_ie.css") ?>" type="text/css" media="screen,print,projection" />
<![endif]-->
<script type="text/javascript" src="<?= $theme->url("js/ui.support.js") ?>"></script>
</head>
<body>
<?= $theme->page_top() ?>
<div id="g-header">
<?= $theme->header_top() ?>
<? if ($header_text = module::get_var("gallery", "header_text")): ?>
<?= $header_text ?>
<? else: ?>
<a id="g-logo" href="<?= item::root()->url() ?>" 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->url("images/logo.png") ?>" />
</a>
<? endif ?>
<? if (!$user->guest): ?>
<div id="g-site-menu">
<?= $theme->site_menu() ?>
</div>
<? endif ?>
<?= $theme->messages() ?>
<?= $theme->header_bottom() ?>
<? if (!empty($parents)): ?>
<ul class="g-breadcrumbs">
<? $i = 0 ?>
<? foreach ($parents as $parent): ?>
<li <? if ($i == 0) print " class=\"g-first\"" ?>>
<a href="<?= $parent->url($parent == $theme->item()->parent() ?
"show={$theme->item()->id}" : null) ?>">
<?= html::purify($parent->title) ?>
</a>
</li>
<? $i++ ?>
<? endforeach ?>
<li class="g-active <? if ($i == 0) print " g-first" ?>"><?= html::purify($theme->item()->title) ?></li>
</ul>
<? endif ?>
</div>
<div id="g-main">
<div id="g-main-in">
<ul id="g-viewformat">
<? $iscurrent = ($sidebaralign == "left"); ?>
<li><?= ($iscurrent) ? null : '<a title="Sidebar Left" href="' . $url . '?align=left">'; ?><span class="g-viewthumb-left <?= ($iscurrent)? "g-viewthumb-current" : null; ?>">Sidebar Left</span><?= ($iscurrent)? null : "</a>"; ?></li>
<? $iscurrent = ($sidebaralign == "full"); ?>
<li><?= ($iscurrent) ? null : '<a title="No Sidebar" href="' . $url . '?align=full">'; ?><span class="g-viewthumb-full <?= ($iscurrent)? "g-viewthumb-current" : null; ?>">No Sidebar</span><?= ($iscurrent)? null : "</a>"; ?></li>
<? $iscurrent = ($sidebaralign == "right"); ?>
<li><?= ($iscurrent) ? null : '<a title="Sidebar Right" href="' . $url . '?align=right">'; ?><span class="g-viewthumb-right <?= ($iscurrent)? "g-viewthumb-current" : null; ?>">Sidebar Right</span><?= ($iscurrent)? null : "</a>"; ?></li>
</ul>
<div id="g-view-menu" class="g-buttonset">
<? 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>
<? if ($sidebaralign=="left"): ?>
<?= '<div id="g-column-left">' ?>
<? elseif ($sidebaralign=="full"): ?>
<? else: ?>
<?= '<div id="g-column-right">' ?>
<? endif ?>
<? if (($theme->page_subtype != "login") && ($sidebaralign != "full")): ?>
<?= new View("sidebar.html") ?>
<? endif ?>
<?= ($sidebaralign != "full")? "</div>" : null ?>
<? if ($sidebaralign=="left"): ?>
<?= '<div id="g-column-centerright">' ?>
<? elseif ($sidebaralign=="full"): ?>
<?= '<div id="g-column-centerfull">' ?>
<? else: ?>
<?= '<div id="g-column-centerleft">' ?>
<? endif ?>
<?= $content ?>
</div>
</div>
</div>
<div id="g-footer">
<?= $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">
<?= $theme->credits() ?>
<?php
$theme_id = module::get_var("gallery", "active_site_theme");
$ini = parse_ini_file(THEMEPATH . "$theme_id/theme.info");
print "\n <li>" . $ini["name"] . "</li>";
print "\n <li>&copy;" . $ini["author"] . "</li>";
?>
</ul>
<? endif ?>
<? $copyright = module::get_var("th_greydragon", "copyright"); ?>
<div id="g-footer-rightside"><?= ($copyright) ? $copyright : 'Copyright &copy; 2009&nbsp;All Rights Reserved'; ?><br /><br />
<? // <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" height="15" width="44" /></a> ?>
</div>
<?= $theme->user_menu() ?>
</div>
<?= $theme->page_bottom() ?>
<!--start player-->
<? // <embed src="/music/collection.m3u" hidden="true" autostart="true" loop="true"></embed>
// <noembed><bgsound src="/music/collection.m3u"></noembed>
?>
<!--end player-->
<?
//<object type="application/x-shockwave-flash" data="http://photo.dragonsoft.us/music/xspf_player/xspf_player.swf?playlist_url=http://photo.dragonsoft.us/music/collection.xspf&autoplay=true&repeat_playlist=true&player_title=KICK&playlist_size=3" width="400" height="151">
//<param name="movie" value="http://photo.dragonsoft.us/music/xspf_player/xspf_player.swf?playlist_url=http://photo.dragonsoft.us/music/collection.xspf&autoplay=true&repeat_playlist=true&player_title=KICK&playlist_size=3" />
//</object>
?>
</body>
</html>

View File

@ -0,0 +1,106 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?
if ($sibling_count <= 1) {
$pagination_msg = "&nbsp;";
}
else
{
$siblings = $item->parent()->children();
$pagination_msg = t("Photo:") . ' ';
if ($sibling_count < 13) {
for ($i = 1; $i <= $sibling_count; $i++) {
if ($i == $position) {
$pagination_msg .= '<span>' . t($i) . '</span>';
} else {
$pagination_msg .= '<span><a href="' . $siblings[$i-1]->url() . '" title="Photo ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < $sibling_count) { $pagination_msg .= '&middot;'; };
}
} elseif ($position < 9) {
for ($i = 1; $i <= 10; $i++) {
if ($i == $position) {
$pagination_msg .= '<span>' . t($i) . '</span>';
} else {
$pagination_msg .= '<span><a href="' . $siblings[$i-1]->url() . '" title="Photo ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < 10) { $pagination_msg .= '&middot;'; };
}
$pagination_msg .= '&hellip;';
$pagination_msg .= '<span><a href="' . $siblings[$sibling_count - 2]->url() . '" title="Photo ' . t($sibling_count - 1) . '">' . t($sibling_count - 1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $siblings[$sibling_count - 1]->url() . '" title="Photo ' . t($sibling_count) . '">' . t($sibling_count) . '</a></span>';
} elseif ($position > $sibling_count - 8) {
$pagination_msg .= '<span><a href="' . $siblings[0]->url() . '" title="Photo ' . t(1) . '">' . t(1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $siblings[1]->url() . '" title="Photo ' . t(2) . '">' . t(2) . '</a></span>';
$pagination_msg .= '&hellip;';
for ($i = $sibling_count - 9; $i <= $sibling_count; $i++) {
if ($i == $position) {
$pagination_msg .= '<span>' . t($i) . '</span>';
} else {
$pagination_msg .= '<span><a href="' . $siblings[$i - 1]->url() . '" title="Photo ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < $sibling_count) { $pagination_msg .= '&middot;'; };
}
} else {
$pagination_msg .= '<span><a href="' . $siblings[0]->url() . '" title="Photo ' . t(1) . '">' . t(1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $siblings[1]->url() . '" title="Photo ' . t(2) . '">' . t(2) . '</a></span>';
$pagination_msg .= '&hellip;';
for ($i = $position - 5; $i <= $position + 5; $i++) {
if ($i == $position) {
$pagination_msg .= '<span>' . t($i) . '</span>';
} else {
$pagination_msg .= '<span><a href="' . $siblings[$i - 1]->url() . '" title="Photo ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < $position + 5) { $pagination_msg .= '&middot;'; };
}
$pagination_msg .= '&hellip;';
$pagination_msg .= '<span><a href="' . $siblings[$sibling_count - 2]->url() . '" title="Photo ' . t($sibling_count - 1) . '">' . t($sibling_count - 1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $siblings[$sibling_count - 1]->url() . '" title="Photo ' . t($sibling_count) . '">' . t($sibling_count) . '</a></span>';
}
}
?>
<ul class="g-pager">
<li class="g-pagination"><?= $pagination_msg; ?></li>
<li class="g-navigation">
<? if ($position > 1): ?>
<a href="<?= $siblings[0]->url() ?>" title="<?= t("first") ?>"><span class="ui-icon ui-icon-first">&nbsp;</span></a>
<? else: ?>
<span class="ui-icon ui-icon-first-d">&nbsp;</span>
<? endif ?>
<? if ($previous_item): ?>
<a href="<?= $previous_item->url() ?>" title="<?= t("previous") ?>"><span class="ui-icon ui-icon-prev">&nbsp;</span></a>
<? else: ?>
<span class="ui-icon ui-icon-prev-d">&nbsp;</span>
<? endif; ?>
<? if ($next_item): ?>
<a href="<?= $next_item->url() ?>" class="ui-right" title="<?= t("next") ?>"><span class="ui-icon ui-icon-next">&nbsp;</span></a>
<? else: ?>
<span class="ui-icon ui-icon-next-d">&nbsp;</span>
<? endif ?>
<? if (($sibling_count > 1) && ($sibling_count > $position)): ?>
<a href="<?= $siblings[$sibling_count-1]->url() ?>" class="ui-right" title="<?= t("last") ?>"><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,154 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?
// 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
//
?>
<?
if (isset($_pagelist)) {
unset($_pagelist);
}
switch ($page_type) {
case "collection":
$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)));
}
break;
case "item":
$current_page = $position;
$total_pages = $total;
$siblings = $item->parent()->children();
for ($i = 1; $i <= $total; $i++) {
$_pagelist[$i] = $siblings[$i-1]->url();
}
break;
default:
$current_page = 1;
$total_pages = 1;
$_pagelist[1] = url::site();
break;
}
if ($total_pages <= 1) {
$pagination_msg = "&nbsp;";
} else {
$pagination_msg = t("Page:") . ' ';
if ($total_pages < 13) {
for ($i = 1; $i <= $total_pages; $i++) {
if ($i == $current_page) {
$pagination_msg .= '<span>' . t($i) . '</span>';
} else {
$pagination_msg .= '<span><a href="' . $_pagelist[$i] . '" title="Page ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < $total_pages) { $pagination_msg .= '&middot;'; };
}
} 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="Page ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < 10) { $pagination_msg .= '&middot;'; };
}
$pagination_msg .= '&hellip;';
$pagination_msg .= '<span><a href="' . $_pagelist[$total_pages - 1] . '" title="Page ' . t($total_pages - 1) . '">' . t($total_pages - 1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $_pagelist[$total_pages] . '" title="Page ' . t($total_pages) . '">' . t($total_pages) . '</a></span>';
} elseif ($current_page > $total_pages - 8) {
$pagination_msg .= '<span><a href="' . $_pagelist[1] . '" title="Page ' . t(1) . '">' . t(1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $_pagelist[2] . '" title="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="Page ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < $total_pages) { $pagination_msg .= '&middot;'; };
}
} else {
$pagination_msg .= '<span><a href="' . $_pagelist[1] . '" title="Page ' . t(1) . '">' . t(1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $_pagelist[2] . '" title="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="Page ' . t($i) . '">' . t($i) . '</a></span>';
}
if ($i < $current_page + 5) { $pagination_msg .= '&middot;'; };
}
$pagination_msg .= '&hellip;';
$pagination_msg .= '<span><a href="' . $_pagelist[$total_pages - 1] . '" title="Page ' . t($total_pages - 1) . '">' . t($total_pages - 1) . '</a></span>';
$pagination_msg .= '&middot;';
$pagination_msg .= '<span><a href="' . $_pagelist[$total_pages] . '" title="Page ' . t($total_pages) . '">' . t($total_pages) . '</a></span>';
}
}
?>
<ul class="g-paginator">
<li class="g-pagination"><?= $pagination_msg ?></li>
<li class="g-navigation">
<? if ($current_page > 1): ?>
<a href="<?= $_pagelist[1] ?>" title="<?= t("first") ?>"><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 href="<?= $previous_page_url ?>" title="<?= t("previous") ?>"><span class="ui-icon ui-icon-prev">&nbsp;</span></a>
<? else: ?>
<span class="ui-icon ui-icon-prev-d">&nbsp;</span>
<? endif ?>
<? if (isset($next_page_url)): ?>
<a href="<?= $next_page_url ?>" class="ui-right" title="<?= t("next") ?>"><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 href="<?= $_pagelist[$total_pages] ?>" class="ui-right" title="<?= t("last") ?>"><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,28 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-item">
<?= $theme->photo_top() ?>
<div id="g-info">
<h1><?= html::purify($item->title) ?></h1>
<div class="g-hideitem"><?= bb2html(html::purify($item->description), 1) ?></div>
</div>
<?= $theme->paginator() ?>
<? // = new View("pager_photo.html") ?>
<div id="g-photo">
<?= $theme->resize_top($item) ?>
<? if (access::can("view_full", $item)): ?>
<a href="<?= $item->file_url() ?>" rel="shadowbox;player=img" title="<?= html::purify($item->title) ?>">
<? endif ?>
<?= $item->resize_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize")) ?>
<? if (access::can("view_full", $item)): ?>
</a>
<? endif ?>
<?= $theme->resize_bottom($item) ?>
</div>
<?= $theme->paginator() ?>
<?// = new View("pager_photo.html") ?>
<?= $theme->photo_bottom() ?>
</div>

View File

@ -0,0 +1,13 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<ul id="g-feeds">
<? foreach($feeds as $url => $title): ?>
<li style="clear: both;">
<span class="ui-icon-left">
<a href="<?= rss::url($url) ?>">
<span class="ui-icon ui-icon-signal-diag">&nbsp;</span>
<?= html::purify($title) ?>
</a>
</span>
</li>
<? endforeach ?>
</ul>

View File

@ -0,0 +1,30 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-search-results">
<h1><?= t("Search Results for \"%term\"", array("term" => $q)) ?> </h1>
<? if (count($items)): ?>
<?= $theme->pager() ?>
<ul id="g-album-grid">
<? foreach ($items as $item): ?>
<? $item_class = "g-photo"; ?>
<? if ($item->is_album()): ?>
<? $item_class = "g-album"; ?>
<? endif ?>
<li class="g-item <?= $item_class ?>">
<p class="g-thumbcrop"><a href="<?= $item->url() ?>">
<?= $item->thumb_img() ?>
</a></p>
<h2><a href="<?= $item->url() ?>"><?= html::purify($item->title) ?></a></h2>
</li>
<? endforeach ?>
</ul>
<?= $theme->pager() ?>
<? else: ?>
<p>&nbsp;</p>
<p><?= t("No results found for <b>%term</b>", array("term" => $q)) ?></p>
<? endif; ?>
</div>

View File

@ -0,0 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= $theme->sidebar_top() ?>
<div class="g-toolbar">&nbsp;</div>
<?= $theme->sidebar_blocks() ?>
<?= $theme->sidebar_bottom() ?>

View File

@ -0,0 +1,63 @@
<?php
// Syntax Sample:
// --------------
// [img]http://elouai.com/images/star.gif[/img]
// [url="http://elouai.com"]eLouai[/url]
// [size="25"]HUGE[/size]
// [color="red"]RED[/color]
// [b]bold[/b]
// [i]italic[/i]
// [u]underline[/u]
// [list][*]item[*]item[*]item[/list]
// [code]value="123";[/code]
// [quote]John said yadda yadda yadda[/quote]
function bb2html($text, $mixmode) {
static $bbcode_mappings = array(
"#\\[b\\](.*?)\\[/b\\]#" => "<strong>$1</strong>",
"#\\[i\\](.*?)\\[/i\\]#" => "<em>$1</em>",
"#\\[u\\](.*?)\\[/u\\]#" => "<u>$1</u>",
"#\\[s\\](.*?)\\[/s\\]#" => "<strike>$1</strike>",
"#\\[o\\](.*?)\\[/o\\]#" => "<overline>$1</overline>",
"#\\[url\\](.*?)\[/url\\]#" => "<a href=\"$1\">$1</a>",
"#\\[url=(.*?)\\](.*?)\[/url\\]#" => "<a href=\"$1\" target=\"_blank\">$2</a>",
"#\\[mail=(.*?)\\](.*?)\[/mail\\]#" => "<a href=\"mailto:$1\" target=\"_blank\">$2</a>",
"#\\[img\\](.*?)\\[/img\\]#" => "<img src=\"$1\" alt=\"\" />",
"#\\[img=(.*?)\\](.*?)\[/img\\]#" => "<img src=\"$1\" alt=\"$2\" />",
"#\\[quote\\](.*?)\\[/quote\\]#" => "<blockquote><p>$1</p></blockquote>",
"#\\[code\\](.*?)\\[/code\\]#" => "<pre>$1</pre>",
"#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "<span style=\"font-size: $1;\">$2</span>",
"#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "<span style=\"color: $1;\">$2</span>",
"#\\[class=([^\\[]*)\\]([^\\[]*)\\[/class\\]#" => "<span class=\"$1\">$2</span>",
"#\\[center\\](.*?)\\[/center\\]#" => "<div style=\"text-align: center;\">$1</div>",
"#\\[list\\](.*?)\\[/list\\]#" => "<ul>$1</ul>",
"#\\[ul\\](.*?)\\[/ul\\]#" => "<ul>$1</ul>",
"#\\[li\\](.*?)\\[/li\\]#" => "<li>$1</li>",
);
// Replace any html brackets with HTML Entities to prevent executing HTML or script
// Don't use strip_tags here because it breaks [url] search by replacing & with amp
if ($mixmode == 1)
{
$newtext = str_replace("&lt;", "<", $text);
$newtext = str_replace("&gt;", ">", $newtext);
$newtext = str_replace("&quot;", "\"", $newtext);
} else {
$newtext = str_replace("<", "&lt;", $text);
$newtext = str_replace(">", "&gt;", $newtext);
$newtext = str_replace("&amp;quot;", "&quot;", $newtext);
}
// Convert new line chars to html <br /> tags
$newtext = nl2br($newtext);
if (strpos($text, "[") !== false) {
$newtext = preg_replace(array_keys($bbcode_mappings), array_values($bbcode_mappings), $newtext);
}
return stripslashes($newtext); //stops slashing, useful when pulling from db
}
?>

View File

@ -0,0 +1,17 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script language="text/javascript" type="text/javascript">
$("#g-add-tag-form").ready(function() {
var url = $("#g-tag-cloud").attr("title") + "/autocomplete";
$("#g-add-tag-form input:text").autocomplete(
url, {
max: 30,
multiple: true,
multipleSeparator: ',',
cacheLength: 1}
);
});
</script>
<div id="g-tag-cloud" title="<?= url::site("tags") ?>">
<?= $cloud ?>
</div>
<?= $form ?>