1
0

Merge commit 'bd9a5e38bf21c2c57baad01f8d5f529ad5ca8783'

This commit is contained in:
Bharat Mediratta 2013-01-08 12:02:15 -05:00
commit 36c2d74bae
72 changed files with 4706 additions and 0 deletions

View File

@ -0,0 +1,131 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 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 Admin_g1_import_Controller extends Admin_Controller {
public function index() {
if (g1_import::is_configured()) {
g1_import::init();
}
$view = new Admin_View('admin.html');
$view->page_title = t('Gallery 1 import');
$view->content = new View('admin_g1_import.html');
if (is_dir(g1_import::$album_dir)) {
$view->content->g1_stats = $g1_stats = g1_import::g1_stats();
$view->content->g3_stats = $g3_stats = g1_import::g3_stats();
$view->content->g1_sizes = g1_import::common_sizes();
$view->content->g1_version = g1_import::version();
// Don't count tags because we don't track them in g1_map
$view->content->g1_resource_count =
$g1_stats['users'] + $g1_stats['groups'] + $g1_stats['albums'] +
$g1_stats['photos'] + $g1_stats['movies'] + $g1_stats['comments'];
$view->content->g3_resource_count =
$g3_stats['user'] + $g3_stats['group'] + $g3_stats['album'] +
$g3_stats['item'] + $g3_stats['comment'] + $g3_stats['tag'];
}
$view->content->form = $this->_get_import_form();
$view->content->version = '';
$view->content->thumb_size = module::get_var('gallery', 'thumb_size');
$view->content->resize_size = module::get_var('gallery', 'resize_size');
if (g1_import::is_initialized()) {
if (count(g1_import::$warn_utf8)>0) {
message::error(t('Your G1 contains %count folder(s) containing nonstandard characters that G3 doesn\'t work with: <pre>%names</pre>Please rename the above folders in G1 before trying to import your data.', array('count' => count(g1_import::$warn_utf8), 'names' => "\n\n ".implode("\n ", g1_import::$warn_utf8)."\n\n")));
}
if ((bool)ini_get('eaccelerator.enable') || (bool)ini_get('xcache.cacher')) {
message::warning(t('The eAccelerator and XCache PHP performance extensions are known to cause issues. If you\'re using either of those and are having problems, please disable them while you do your import. Add the following lines: <pre>%lines</pre> to gallery3/.htaccess and remove them when the import is done.', array('lines' => "\n\n php_value eaccelerator.enable 0\n php_value xcache.cacher off\n php_value xcache.optimizer off\n\n")));
}
foreach (array('notification', 'search', 'exif') as $module_id) {
if (module::is_active($module_id)) {
message::warning(
t('<a href="%url">Deactivating</a> the <b>%module_id</b> module during your import will make it faster',
array('url' => url::site('admin/modules'), 'module_id' => $module_id)));
}
}
} else if (g1_import::is_configured()) {
$view->content->form->configure_g1_import->albums_path->add_error('invalid', 1);
}
print $view;
}
public function save() {
access::verify_csrf();
$form = $this->_get_import_form();
if ($form->validate()) {
$albums_path = $form->configure_g1_import->albums_path->value;
if (!is_file($albums_path) && file_exists("$albums_path/albums.php")) {
$albums_path = "$albums_path/albums.php";
}
if (($g1_init_error = g1_import::is_valid_albums_path($albums_path)) == 'ok') {
message::success(t('Gallery 1 path saved'));
module::set_var('g1_import', 'albums_path', $albums_path);
url::redirect('admin/g1_import');
} else {
$form->configure_g1_import->albums_path->add_error($g1_init_error, 1);
}
}
$view = new Admin_View('admin.html');
$view->content = new View('admin_g1_import.html');
$view->content->form = $form;
print $view;
}
public function autocomplete() {
$directories = array();
$path_prefix = Input::instance()->get('q');
foreach (glob('{$path_prefix}*') as $file) {
if (is_dir($file) && !is_link($file)) {
$directories[] = $file;
// If we find an albums.php, include it as well
if (file_exists("$file/albums.php")) {
$directories[] = "$file/albums.php";
}
}
}
print implode("\n", $directories);
}
private function _get_import_form() {
$albums_path = module::get_var('g1_import', 'albums_path', '');
$form = new Forge(
'admin/g1_import/save', '', 'post', array('id' => 'g-admin-configure-g1-import-form'));
$group = $form->group('configure_g1_import')->label(t('Configure Gallery 1 Import'));
$group->input('albums_path')->label(t('Filesystem path to your Gallery 1 albums.php file'))
->value($albums_path);
$group->albums_path->error_messages(
'invalid', t('The path you entered is not a Gallery 1 installation.'));
$group->albums_path->error_messages(
'broken', t('Your Gallery 1 install isn\'t working properly. Please verify it!'));
$group->albums_path->error_messages(
'missing', t('The path you entered does not exist.'));
$group->submit('')->value(g1_import::$album_dir=='' ? t('Change') : t('Continue'));
return $form;
}
}

View File

@ -0,0 +1,106 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 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 G1_Controller extends Controller {
/**
* Redirect Gallery 1 urls to their appropriate matching Gallery 3 url.
*
* We use mod_rewrite to create this path, so Gallery 1 urls like this:
* /gallery/Wedding/
* /gallery/Wedding/aaa
* /albums/Wedding/aaa.jpg
*
* Show up here like this:
* /g1/map?path=/gallery/Wedding/
* /g1/map?path=/gallery/Wedding/aaa
* /g1/map?path=/albums/Wedding/aaa.jpg
*/
public function map() {
$input = Input::instance();
$path = $input->get('path');
$page = $input->get('page');
if(!is_numeric($page)) $page = '';
if($path=='view_album.php' || $path=='slideshow.php') $path = $input->get('set_albumName');
if($path=='view_photo.php') $path = $input->get('set_albumName').'/'.$input->get('id');
if($path=='main.php') { //we do only name based g2 mapping here
$item = item::root();
access::required('view', $item);
url::redirect($item->abs_url(), '301');
}
// Item names come in as FolderX/ItemX
$album = 0;
$pos = strrpos($path, '/');
if($pos!==false) {
// Get ItemX into g1_item
$g1_item = substr($path,$pos+1,strlen($path));
// Get FolderX into g1_item
$g1_album = substr($path,0,$pos);
}
else {
$album = 1;
$g1_item = '';
$g1_album = $path;
}
// Only binary files (the item itself, not the html) may have file extensions
$binary = 0;
$pos = strrpos($g1_item, '.');
if($pos!==false) {
$binary = 1;
$g1_item = substr($g1_item, 0, $pos);
}
if(($pos=strrpos($g1_item, '.sized'))!==false||($pos=strrpos($g1_item, '.thumb'))!==false) {
$mapping = ORM::factory('g1_map')->where('album', '=', $g1_album)->where('item', '=', substr($g1_item,0, $pos))->where('resource_type', '=', $album ? 'album':'item')->find();
}
else {
$mapping = ORM::factory('g1_map')->where('album', '=', $g1_album)->where('item', '=', $g1_item)->where('resource_type', '=', $album ? 'album':'item')->find();
}
if(!$mapping->loaded()) {
throw new Kohana_404_Exception();
}
$item = ORM::factory('item', $mapping->id);
if (!$item->loaded()) {
throw new Kohana_404_Exception();
}
access::required('view', $item);
if($binary) {
if(strrpos($g1_item, '.sized')!==false) {
url::redirect($item->resize_url(true), '301');
}
else if(strrpos($g1_item, '.thumb')!==false) {
url::redirect($item->thumb_url(true), '301');
}
else {
url::redirect($item->file_url(true), '301');
}
}
else {
$url = $item->abs_url();
if($page!='') {
$url .= (strpos($url,'?')!==false ? '&':'?').'page='.$page;
}
url::redirect($url, '301');
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,419 @@
<?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2008 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.
*/
/**
* This class provides an API for parsing Gallery 1 data files
* Updated to Gallery 3 by Thomas E. Horner
*/
class Gallery1DataParser {
/**
* Verify that the given path holds an albumdb and that the albumdb is readable
*
* @param string $path Path to albums
* @return boolean True if the path is valid, otherwise false
*/
function isValidAlbumsPath($path) {
if (file_exists($path . 'albumdb.dat')
&& is_readable($path . 'albumdb.dat')) {
return true;
} else {
return false;
}
}
/**
* Load and return user metadata from given file
*
* @param string $fileName Path to user file to unserialize
* @return array GalleryStatus a status code,
* object Unserialized user metadata
*/
function loadFile($fileName) {
$fileName = str_replace('//','/',$fileName);
if (!file_exists($fileName) || !is_readable($fileName)) {
if (file_exists($fileName . '.bak') &&
is_readable($fileName . '.bak')) {
$fileName .= '.bak';
} else {
message::warning(
t('Gallery1 inconsistency: Missing or not readable file %file',
array('file' => $fileName)));
return array('ERROR_BAD_PARAMETER', null);
}
}
$tmp = file($fileName);
if (empty($tmp)) {
message::warning(
t('Gallery1 inconsistency: Empty file %file',
array('file' => $fileName)));
return array('ERROR_MISSING_VALUE', null);
}
$tmp = join('', $tmp);
/*
* We renamed User.php to Gallery_User.php in v1.2, so port forward
* any saved user objects.
*/
if (stripos($tmp, 'O:4:"user"')!==false) {
$tmp = str_ireplace('O:4:"user"', 'O:12:"gallery_user"', $tmp);
}
/*
* Gallery3 already contains a class named Image so
* we need to rename the G1 Image class to G1Img here
*/
if (stripos($tmp, 'O:5:"image"')!==false) {
$tmp = str_ireplace('O:5:"image"', 'O:5:"G1Img"', $tmp);
}
$object = unserialize($tmp);
return array(null, $object);
}
/**
* Fetch an array of albums from a given path
*
* @param string $path Path to albums directory
* @return array GalleryStatus a status code,
* array of objects
*/
function getAlbumList($path) {
list ($ret, $albumOrder) = Gallery1DataParser::loadFile($path . 'albumdb.dat');
if ($ret) {
return array($ret, null);
}
/* TODO: check that there is an $albumOrder */
foreach ($albumOrder as $albumName) {
list ($ret, $albumFields) =
Gallery1DataParser::loadAlbumFields($path . $albumName . DIRECTORY_SEPARATOR);
if ($ret) {
return array($ret,'');
}
$albumList[$albumName] = $albumFields;
}
return array(null, $albumList);
}
/**
* Fetch an associative array of parentalbum names from a given path to gallery1 albums
*
* @param string $path Path to albums directory
* @return array GalleryStatus a status code,
* array of albums and their parents
*/
function getParentAlbumList($path) {
list ($ret, $albumOrder) = Gallery1DataParser::loadFile($path . 'albumdb.dat');
if ($ret) {
return array($ret, null);
}
foreach ($albumOrder as $albumName) {
list ($ret, $albumFields) =
Gallery1DataParser::loadAlbumFields($path . $albumName . DIRECTORY_SEPARATOR);
if ($ret) {
return array($ret,'');
}
$parentAlbumList[$albumName] = $albumFields['parentAlbumName'];
}
return array(null, $parentAlbumList);
}
/**
* Build a data tree of albums
*
* @param string $path Path to albums directory
* @return array GalleryStatus a status code,
* array of albumnames and their children, and their children...
*/
function getAlbumHierarchy($path) {
list ($ret, $parentAlbumList) = Gallery1DataParser::getParentAlbumList($path);
if ($ret) {
return array($ret, null);
}
foreach ($parentAlbumList as $myName => $parentName) {
if (!isset($tempAlbums[$myName])) {
$tempAlbums[$myName] = array();
}
if (empty($parentName) || $parentName == '.root') {
$hierarchy[$myName] = &$tempAlbums[$myName];
} else {
if (!isset($tempAlbums[$parentName])) {
$tempAlbums[$parentName] = array();
}
$tempAlbums[$parentName][$myName] = &$tempAlbums[$myName];
}
}
return array(null, $hierarchy);
}
/**
* Fetch an array of albums with no parents
*
* @param string $path Path to albums directory
* @return array GalleryStatus a status code,
* array of albumnames
*/
function getRootAlbums($path) {
list ($ret, $albumOrder) = Gallery1DataParser::loadFile($path . 'albumdb.dat');
if ($ret) {
return array($ret, null);
}
foreach ($albumOrder as $albumName) {
list ($ret, $albumFields) =
Gallery1DataParser::loadAlbumFields($path . $albumName . DIRECTORY_SEPARATOR);
if ($ret) {
return array($ret,'');
}
if ($albumFields['parentAlbumName'] == '.root') {
$rootAlbums[] = $albumName;
}
}
return array(null, $rootAlbums);
}
/**
* Load and return album metadata from given directory
*
* @param string $path Path to album directory
* @return array GalleryStatus a status code,
* object Unserialized album metadata
*/
function loadAlbumFields($path) {
$tmp = trim($path);
if ($tmp[strlen($tmp)-1] != DIRECTORY_SEPARATOR) {
$tmp .= DIRECTORY_SEPARATOR;
}
$path = trim($tmp);
$albumPath = explode(DIRECTORY_SEPARATOR, $path);
$albumName = $albumPath[count($albumPath)-2];
list ($ret, $album) = Gallery1DataParser::loadFile($path . 'album.dat');
if ($ret) {
return array($ret, null);
}
$album->fields['name'] = $albumName;
if (!$album->fields['parentAlbumName']) {
$album->fields['parentAlbumName'] = '.root';
}
return array(null, $album->fields);
}
/**
* Count the number of photos in an album dir
*
* @param string $path Path to album directory
* @return array GalleryStatus a status code,
* integer Count of photos
*/
function getPhotoCount($path) {
list ($ret, $photos) = Gallery1DataParser::loadFile($path . 'photos.dat');
if ($ret) {
return array($ret, null);
}
$photoCount = count($photos);
return array(null, $photoCount);
}
/**
* Count the photo data from an album dir
*
* @param string $path Path to album directory
* @return array GalleryStatus a status code,
* array Galleryphotos
*/
function getPhotos($path) {
list ($ret, $photos) = Gallery1DataParser::loadFile($path . DIRECTORY_SEPARATOR . 'photos.dat');
if ($ret) {
return array($ret, null);
}
return array(null, $photos);
}
/**
* Load user uids from path
*
* @param string $path Path to album directory
* @return array GalleryStatus a status code,
* array Associative array of uids and usernames
*/
function getUserUids($path) {
static $uids;
if (!isset($uids[$path])) {
if (!isset($uids)) {
$uids = array();
}
list ($ret, $userDB) =
Gallery1DataParser::loadFile($path . '.users' . DIRECTORY_SEPARATOR . 'userdb.dat');
if ($ret) {
return array($ret, null);
}
$uids[$path] = array();
foreach ($userDB->userMap as $username => $uid) {
if (Gallery1DataParser::isValidUid($path, $uid)
&& !Gallery1DataParser::isValidUid($path, $username)
&& !preg_match('/nobody|everybody|loggedin/i', $username)) {
$uids[$path][$uid] = $username;
}
}
}
return array(null, $uids[$path]);
}
/**
* Validate user id string from gallery v1.x.x
*
* @param string $uid Uid to be tested
* @return boolean
*/
function isValidUidString($uid) {
if (preg_match('/^\d{9,}_\d+$/', $uid)) {
return TRUE;
} else {
return FALSE;
}
}
/**
* Validate user id from gallery v1.x.x
*
* @param string $path
* @param string $uid Uid to be tested
* @return boolean
*/
function isValidUid($path, $uid) {
static $valid;
if (!isset($valid[$path][$uid])) {
if (!isset($valid)) {
$valid = array();
}
if (!isset($valid[$path])) {
$valid[$path] = array();
}
if (Gallery1DataParser::isValidUidString($uid)) {
list ($ret, $fields) = Gallery1DataParser::getUserFieldsByUid($path, $uid);
if (!$ret) {
$valid[$path][$uid] = TRUE;
} else {
$valid[$path][$uid] = FALSE;
}
} else {
$valid[$path][$uid] = FALSE;
}
}
return $valid[$path][$uid];
}
/**
* Load user metadata given a path and uid
*
* @param string $path Path to album directory
* @param string $uid Uid to import
* @return array GalleryStatus a status code,
* array User metadata
*/
function getUserFieldsByUid($path, $uid) {
static $fields;
if (!isset($fields[$path][$uid])) {
if (!isset($fields)) {
$fields = array();
}
if (!isset($fields[$path])) {
$fields[$path] = array();
}
$fields[$path][$uid] = array();
if (Gallery1DataParser::isValidUidString($uid)) {
list ($ret, $user) = Gallery1DataParser::loadFile($path . '.users' . DIRECTORY_SEPARATOR . $uid);
if ($ret) {
return array($ret, null);
}
foreach ($user as $key => $value) {
$fields[$path][$uid][$key] = $value;
}
}
}
return array(null, $fields[$path][$uid]);
}
/**
* Load user metadata given a path and username
*
* @param string $path Path to album directory
* @param string $username Username to import
* @return array GalleryStatus a status code,
* array User metadata
*/
function getUserFieldsByUsername($path, $username) {
list ($ret, $uids) = Gallery1DataParser::getUserUids($path);
if ($ret) {
return array($ret, null);
}
$usernames = array_flip($uids);
$uid = $usernames[$username];
list ($ret, $fields) = Gallery1DataParser::getUserFieldsByUid($path, $uid);
if ($ret) {
return array($ret, null);
}
return array(null, $fields);
}
}
/* Define these classes so that unserialize can use them */
/**
* A stub class into which various G1 objects can be unserialized.
*/
class G1AlbumDB{ }
/**
* A stub class into which various G1 objects can be unserialized.
*/
class Album { }
/**
* A stub class into which various G1 objects can be unserialized.
*/
class Gallery_UserDB { }
/**
* A stub class into which various G1 objects can be unserialized.
*/
class Gallery_User { }
/**
* A stub class into which various G1 objects can be unserialized.
*/
class AlbumItem { }
/**
* A stub class into which various G1 objects can be unserialized.
*/
class G1Img { }
/**
* A stub class into which various G1 objects can be unserialized.
*/
class Comment { }

File diff suppressed because it is too large Load Diff

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-2011 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 g1_import_event_Core {
static function item_deleted($item) {
db::build()
->delete("g1_maps")
->where("id", "=", $item->id)
->execute();
}
static function item_created($item) {
g1_import::copy_matching_thumbnails_and_resizes($item);
}
static function admin_menu($menu, $theme) {
$menu
->get("settings_menu")
->append(Menu::factory("link")
->id("g1_import")
->label(t("Gallery 1 import"))
->url(url::site("admin/g1_import")));
}
}

View File

@ -0,0 +1,46 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 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 g1_import_installer {
static function install() {
$db = Database::instance();
$db->query("CREATE TABLE IF NOT EXISTS {g1_maps} (
`id` int(9) NOT NULL,
`album` varchar(128) NOT NULL,
`item` varchar(128) default NULL,
`resource_type` varchar(64) default NULL,
PRIMARY KEY (`id`, `resource_type`),
KEY `g1_map_index` (`album`, `item`))
DEFAULT CHARSET=utf8;");
module::set_version("g1_import", 1);
}
static function upgrade($version) {
$db = Database::instance();
/* reserved for future versions
if ($version == 1) {
module::set_version('g1_import', $version = 2);
}
//*/
}
static function uninstall() {
}
}

View File

@ -0,0 +1,215 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 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 g1_import_task_Core {
static function available_tasks() {
$version = '';
if (g1_import::is_configured()) {
g1_import::init();
// Guard from common case where the import has been
// completed and the original files have been removed.
if (is_dir(g1_import::$album_dir)) {
$version = g1_import::version();
}
}
if (g1_import::is_initialized()) {
return array(Task_Definition::factory()
->callback('g1_import_task::import')
->name(t('Import from Gallery 1'))
->description(
t('Gallery %version detected', array('version' => $version)))
->severity(log::SUCCESS));
}
return array();
}
static function import($task) {
$start = microtime(true);
g1_import::init();
$stats = $task->get('stats');
$done = $task->get('done');
$total = $task->get('total');
$completed = $task->get('completed');
$mode = $task->get('mode');
$queue = $task->get('queue');
if (!isset($mode)) {
$stats = g1_import::g1_stats();
$stats['items'] = $stats['photos'] + $stats['movies'];
unset($stats['photos']);
unset($stats['movies']);
$stats['fix'] = 1;
$task->set('stats', $stats);
$task->set('total', $total = array_sum(array_values($stats)));
$completed = 0;
$mode = 0;
$done = array();
foreach (array_keys($stats) as $key) {
$done[$key] = 0;
}
$task->set('done', $done);
}
$modes = array('users', 'albums', 'items', 'comments', 'highlights', 'fix', 'done');
while (!$task->done && microtime(true) - $start < 1.5) {
if ($done[$modes[$mode]] >= $stats[$modes[$mode]]) {
// Nothing left to do for this mode. Advance.
$mode++;
$task->set('last_id', 0);
$queue = array();
// Start the loop from the beginning again. This way if we get to a mode that requires no
// actions (eg, if the G1 comments module isn't installed) we won't try to do any comments
// queries.. in the next iteration we'll just skip over that mode.
if ($modes[$mode] != 'done') {
continue;
}
}
switch($modes[$mode]) {
case 'users':
$done['users'] = $stats['users']-1;
$task->status = t(
'Ignoring users (%count of %total)',
array('count' => $done['users'], 'total' => $stats['users']));
break;
case 'albums':
if (empty($queue)) {
if(count(g1_import::$tree)==0) {
g1_import::g1_stats();
}
$task->set('queue', $queue = array('' => g1_import::$tree));
}
$log_message = g1_import::import_album($queue);
if ($log_message) {
$task->log($log_message);
}
$task->status = t(
'Importing albums (%count of %total)',
array('count' => $done['albums'] + 1, 'total' => $stats['albums']));
break;
case 'items':
if (empty($queue)) {
if (count(g1_import::$queued_items)==0) {
g1_import::g1_stats();
}
$queuelen = 100;
$thisstart = $task->get('last_id', 0);
$nextstart = $thisstart + $queuelen;
$task->set('last_id', $nextstart);
$task->set('queue', $queue = array_splice(g1_import::$queued_items, $thisstart, $queuelen));
}
$log_message = g1_import::import_item($queue);
if ($log_message) {
$task->log($log_message);
}
$task->status = t(
'Importing photos (%count of %total)',
array('count' => $done['items'] + 1, 'total' => $stats['items']));
break;
case 'comments':
if (empty($queue)) {
if (count(g1_import::$queued_comments)==0) {
g1_import::g1_stats();
}
$queuelen = 100;
$thisstart = $task->get('last_id', 0);
$nextstart = $thisstart + $queuelen;
$task->set('last_id', $nextstart);
$task->set('queue', $queue = array_splice(g1_import::$queued_comments, $thisstart, $queuelen));
}
$log_message = g1_import::import_comment($queue);
if ($log_message) {
$task->log($log_message);
}
$task->status = t(
'Importing comments (%count of %total)',
array('count' => $done['comments'] + 1, 'total' => $stats['comments']));
break;
case 'highlights':
if (empty($queue)) {
if (count(g1_import::$queued_highlights)==0) {
g1_import::g1_stats();
}
$queuelen = 100;
$thisstart = $task->get('last_id', 0);
$nextstart = $thisstart + $queuelen;
$task->set('last_id', $nextstart);
$task->set('queue', $queue = array_splice(g1_import::$queued_highlights, $thisstart, $queuelen));
}
$log_message = g1_import::set_album_highlight($queue);
if ($log_message) {
$task->log($log_message);
}
$task->status = t(
'Album highlights (%count of %total)',
array('count' => $done['highlights'] + 1, 'total' => $stats['highlights']));
break;
case 'fix':
if (empty($queue)) {
if (count(g1_import::$albums_flat)==0) {
g1_import::g1_stats();
}
$task->set('queue', $queue = 'dummy');
}
$log_message = g1_import::hotfix_all();
if ($log_message) {
$task->log($log_message);
}
$task->status = t(
'Final Hotfixing (%count of %total)',
array('count' => $done['fix'] + 1, 'total' => $stats['fix']));
break;
case 'done':
$task->status = t('Import complete');
$task->done = true;
$task->state = 'success';
break;
}
if (!$task->done) {
$done[$modes[$mode]]++;
$completed++;
}
}
$task->percent_complete = 100 * ($completed / $total);
$task->set('completed', $completed);
$task->set('mode', $mode);
$task->set('queue', $queue);
$task->set('done', $done);
}
}

View File

@ -0,0 +1,39 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 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.
*/
/**
* A wrapper for exceptions to report more details in case
* it's a ORM validation exception.
*/
class G1_Import_Exception extends Exception {
public function __construct($message, Exception $previous=null, $additional_messages=null) {
if ($additional_messages) {
$message .= "\n" . implode("\n", $additional_messages);
}
if ($previous && $previous instanceof ORM_Validation_Exception) {
$message .= "\nORM validation errors: " . print_r($previous->validation->errors(), true);
}
if ($previous) {
$message .= "\n" . (string) $previous;
}
// The $previous parameter is supported in PHP 5.3.0+.
parent::__construct($message);
}
}

View File

@ -0,0 +1,21 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 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 G1_Map_Model_Core extends ORM {
}

View File

@ -0,0 +1,7 @@
name = "Gallery1 Import"
description = "Import your Gallery 1 content into Gallery 3"
version = 1
author_name = "Thomas E. Horner"
author_url = "http://www.t-horner.com"
info_url = "http://www.t-horner.com/g1_import"
discuss_url = "http://gallery.menalto.com/forum_module_g1_import"

View File

@ -0,0 +1,180 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= $theme->css("jquery.autocomplete.css") ?>
<?= $theme->script("jquery.autocomplete.js") ?>
<script type="text/javascript">
$("document").ready(function() {
$("form input[name=albums_path]").autocomplete(
"<?= url::site("__ARGS__") ?>".replace("__ARGS__", "admin/g1_import/autocomplete"),
{
max: 256,
loadingClass: "g-loading-small",
});
});
</script>
<div id="g-admin-g1-import" class="g-block">
<h1> <?= t("Gallery 1 import") ?> </h1>
<p>
<?= t("Import your Gallery 1 photos, movies and comments into your new Gallery 3 installation.") ?>
</p>
<script type="text/javascript">
$(document).ready(function() {
$("#g-admin-g1-import-tabs").tabs()
<? if (!isset($g1_version)): ?>
.tabs("disable", 1)
.tabs("disable", 2)
<? elseif ($g3_resource_count > .9 * $g1_resource_count): ?>
.tabs("select", 2)
<? else: ?>
.tabs("select", 1)
<? endif ?>
;
// Show the tabs after the page has loaded to prevent Firefox from rendering the
// unstyled page and then flashing.
$("#g-admin-g1-import-tabs").show();
});
</script>
<div id="g-admin-g1-import-tabs" class="g-block-content" style="display: none">
<ul>
<li>
<a href="#g-admin-g1-import-configure"><?= t("1. Configure Gallery 1 path") ?></a>
</li>
<li>
<a href="#g-admin-g1-import-import"><?= t("2. Import!") ?></a>
</li>
<li>
<a href="#g-admin-g1-import-notes"><?= t("3. After your import") ?></a>
</li>
<li>
<form action="https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHLwYJKoZIhvcNAQcEoIIHIDCCBxwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBl9M8nZaRRG+MoyhSZXG/cTNctBq1NOBXI2s187tCow5fCH6+d3mIjml+JnLKM+FOBAimVf0aQCAYYXkuh3cCdVfJT9sXgWHg2QCSa3w7Fr+09L5XoR5GNZKIhQw6JO1hTzfbcLI8ZgcH19wySM1R3q4/JQtmIN7ceg8Zes46aFTELMAkGBSsOAwIaBQAwgawGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIAu+fCpByy8GAgYi9d7goOeYwMDLl77oQnx/3j2oay/opQIJIL9cSIGiciXjsvBGkGbb5+AYq9nOpusiSebQXCRZqfiCZ1pAX5dNYFAvRb70EiKbwREUl9cupGAHyRXJsOQdPeentYH/G4Ky6pO7zXb2y4rrFPrIL5dqQ+81TPUlYZeU9O4FHiGv9WF6rZsLktWuEoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTEwNTE4MTU0OTQwWjAjBgkqhkiG9w0BCQQxFgQUBscluHpKHgzpejl6ykkiN6QWB0AwDQYJKoZIhvcNAQEBBQAEgYBDQ+5soc/GJDW0I0Cx0S+uWjcaYX05It8eGpkmTR4NNeBDfGSukTpgJ5d4i7Nz9Sc2BxgU7WL5oXncVGoQNDR8Q6vWGP8RbyAg194vEuGC/5xWuTcqFPKFtZhfr4VnbmcFeZyAl4Gq2W6pG6nf9ln8h+ies/Sxd/aAL3XG62N+wg==-----END PKCS7-----">
<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_GB/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." style="background-color: transparent">
<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/de_DE/i/scr/pixel.gif" width="1" height="1">
</form>
</li>
</ul>
<div id="g-admin-g1-import-configure" class="g-block-content">
<?= $form ?>
</div>
<div id="g-admin-g1-import-import">
<? if (isset($g1_version)): ?>
<ul>
<li>
<?= t("Gallery version %version detected", array("version" => $g1_version)) ?>
</li>
<? if ($g1_sizes["thumb"]["size"] && $thumb_size != $g1_sizes["thumb"]["size"]): ?>
<li>
<?= t("Your most common thumbnail size in Gallery 1 is %g1_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.",
array("g1_pixels" => $g1_sizes["thumb"]["size"],
"g3_pixels" => $thumb_size,
"url" => html::mark_clean(url::site("admin/theme_options")))) ?>
</li>
<? endif ?>
<? if ($g1_sizes["resize"]["size"] && $resize_size != $g1_sizes["resize"]["size"]): ?>
<li>
<?= t("Your most common intermediate size in Gallery 1 is %g1_pixels pixels, but your Gallery 3 intermediate size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.",
array("g1_pixels" => $g1_sizes["resize"]["size"],
"g3_pixels" => $resize_size,
"url" => html::mark_clean(url::site("admin/theme_options")))) ?>
</li>
<? endif ?>
<li>
<?
$t = array();
$t[] = t2("1 user", "%count users", $g1_stats["users"]);
$t[] = t2("1 group", "%count groups", $g1_stats["groups"]);
$t[] = t2("1 album", "%count albums", $g1_stats["albums"]);
$t[] = t2("1 photo", "%count photos/movies", $g1_stats["photos"] + $g1_stats["movies"]);
$t[] = t2("1 comment", "%count comments", $g1_stats["comments"]);
$t[] = t2("1 tagged photo/movie/album", "%count tagged photos/movies/albums",
$g1_stats["tags"]);
?>
<?= t("Your Gallery 1 has the following importable data in it: %t0, %t1, %t2, %t3, %t4, %t5",
array("t0" => $t[0], "t1" => $t[1], "t2" => $t[2],
"t3" => $t[3], "t4" => $t[4], "t5" => $t[5])) ?>
</li>
<? if ($g3_resource_count): ?>
<li>
<?
$t = array();
$t[] = t2("1 user", "%count users", $g3_stats["user"]);
$t[] = t2("1 group", "%count groups", $g3_stats["group"]);
$t[] = t2("1 album", "%count albums", $g3_stats["album"]);
$t[] = t2("1 photo/movie", "%count photos/movies", $g3_stats["item"]);
$t[] = t2("1 comment", "%count comments", $g3_stats["comment"]);
$t[] = t2("1 tagged photo/movie/album", "%count tagged photos/movies/albums", $g3_stats["tag"]);
?>
<?= t("It looks like you've imported the following Gallery 1 data already: %t0, %t1, %t2, %t3, %t4, %t5",
array("t0" => $t[0], "t1" => $t[1], "t2" => $t[2],
"t3" => $t[3], "t4" => $t[4], "t5" => $t[5])) ?>
</li>
<? endif ?>
</ul>
<p>
<a class="g-button g-dialog-link ui-state-default ui-corner-all"
href="<?= url::site("admin/maintenance/start/g1_import_task::import?csrf=$csrf") ?>">
<?= t("Begin import!") ?>
</a>
</p>
<? endif ?>
</div>
<div id="g-admin-g1-import-notes" class="g-text">
<ul>
<li>
<?= t("Gallery 3 does not support per-user / per-item permissions. <b>Review permissions!</b>") ?>
</li>
<li>
<?= t("The only supported file formats are JPG, PNG and GIF, FLV and MP4. Other formats will be skipped.") ?>
</li>
<li>
<p>
<?= t("Redirecting G1 Gallery URLs once your migration is complete. Put this block at the top of %path and all gallery urls will be redirected to Gallery 3",
array("path" => g1_import::$gallery_dir.DIRECTORY_SEPARATOR.'.htaccess') ) ?>
</p>
<textarea id="g-g1-gallery-redirect-rules" rows="4" cols="60">&lt;IfModule mod_rewrite.c&gt;
Options +FollowSymLinks
RewriteEngine On
<? /* RewriteBase <?= html::clean(g1_import::$gallery_url) ?> */ ?>
RewriteRule ^(.*)$ <?= url::site("g1/map?path=\$1") ?> [QSA,L,R=301]
&lt;/IfModule&gt;</textarea>
<script type="text/javascript">
$(document).ready(function() {
$("#g-g1-gallery-redirect-rules").click(function(event) {
this.select();
});
});
</script>
</li>
<li>
<p>
<?= t("Redirecting G1 Album URLs once your migration is complete. Put this block at the top of %path and all album image urls will be redirected to Gallery 3",
array("path" => g1_import::$album_dir.DIRECTORY_SEPARATOR.'.htaccess') ) ?>
</p>
<textarea id="g-g1-album-redirect-rules" rows="4" cols="60">&lt;IfModule mod_rewrite.c&gt;
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ <?= url::site("g1/map?path=\$1") ?> [QSA,L,R=301]
&lt;/IfModule&gt;</textarea>
<script type="text/javascript">
$(document).ready(function() {
$("#g-g1-album-redirect-rules").click(function(event) {
this.select();
});
});
</script>
</li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,59 @@
/**
* Fix display in IE 6, 7, and 8
*/
#g-banner {
z-index: 2;
zoom: 1;
}
#g-sidebar {
overflow: hidden;
}
#g-photo,
#g-movie {
zoom: 1;
}
#g-photo .g-context-menu,
#g-movie .g-context-menu {
width: 240px;
}
input.submit {
clear: none !important;
display: inline !important;
}
.g-short-form input.text,
.g-short-form input.submit {
font-size: 1em;
line-height: 1em;
padding: .38em .3em;
}
#g-search-form input#q {
width: 300px;
}
#g-add-tag-form input.textbox {
width: 110px !important;
}
#g-add-tag-form input[type='submit'] {
padding: .3em 0 !important;
}
#g-dialog .g-cancel {
display: inline-block !important;
float: none !important;
}
.g-paginator .g-text-right {
width: 29%;
}
.g-paginator .ui-icon-right {
width: 60px;
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,7 @@
@import "ui.core.css";
@import "ui.theme.css";
@import "ui.datepicker.css";
@import "ui.dialog.css";
@import "ui.progressbar.css";
@import "ui.resizable.css";
@import "ui.tabs.css";

View File

@ -0,0 +1,37 @@
/*
* jQuery UI CSS Framework
* Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

View File

@ -0,0 +1,62 @@
/* Datepicker
----------------------------------*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:left; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}

View File

@ -0,0 +1,13 @@
/* Dialog
----------------------------------*/
.ui-dialog { position: relative; padding: .2em; width: 300px; }
.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }

View File

@ -0,0 +1,4 @@
/* Progressbar
----------------------------------*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }

View File

@ -0,0 +1,13 @@
/* Resizable
----------------------------------*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}

View File

@ -0,0 +1,9 @@
/* Tabs
----------------------------------*/
.ui-tabs {padding: .2em;}
.ui-tabs .ui-tabs-nav { padding: .2em .2em 0 .2em; position: relative; }
.ui-tabs .ui-tabs-nav li { float: left; border-bottom: 0 !important; margin: 0 .2em -1px 0; padding: 0; list-style: none; }
.ui-tabs .ui-tabs-nav li a { display:block; text-decoration: none; padding: .5em 1em; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: .1em; border-bottom: 0; }
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border: 0; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }

View File

@ -0,0 +1,243 @@
/*
* jQuery UI CSS Framework
* Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* To view and modify this theme, visit http://ui.jquery.com/themeroller/?tr=&ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
.ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
.ui-widget-header a { color: #ffffff; }
.ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
.ui-widget-content a { color: #222222; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #444444; background: #444444 50% 50% repeat-x; font-weight: bold; color: #999999; outline: none; }
.ui-state-default a { color: #2e6e9e; text-decoration: none; outline: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #444444 50% 50% repeat-x; font-weight: bold; color: #999999; outline: none; }
.ui-state-hover a { color: #1d5987; text-decoration: none; outline: none; }
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #999999; background: #444444 50% 50% repeat-x; font-weight: bold; color: #e17009; outline: none; }
.ui-state-active a { color: #e17009; outline: none; text-decoration: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fad42e; background: #fbec88 50% 50% repeat-x; color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec 50% 50% repeat-x; color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; }
.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,131 @@
/**
* Initialize jQuery UI and Gallery Plugins
*/
$(document).ready(function() {
// Initialize Superfish menus (hidden, then shown to address IE issue)
$("#g-site-menu .g-menu").hide().addClass("sf-menu");
$("#g-site-menu .g-menu").superfish({
delay: 500,
animation: {
opacity:'show',
height:'show'
},
pathClass: "g-selected",
speed: 'fast'
}).show();
// Initialize status message effects
$("#g-action-status li").gallery_show_message();
// Initialize dialogs
$(".g-dialog-link").gallery_dialog();
// Initialize short forms
$(".g-short-form").gallery_short_form();
// Apply jQuery UI icon, hover, and rounded corner styles
$("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all");
if ($("#g-view-menu").length) {
$("#g-view-menu ul").removeClass("g-menu").removeClass("sf-menu");
$("#g-view-menu a").addClass("ui-icon");
}
// Apply jQuery UI icon and hover styles to context menus
if ($(".g-context-menu").length) {
$(".g-context-menu li").addClass("ui-state-default");
$(".g-context-menu a").addClass("g-button ui-icon-left");
$(".g-context-menu a").prepend("<span class=\"ui-icon\"></span>");
$(".g-context-menu a span").each(function() {
var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString();
$(this).addClass(iconClass);
});
}
// Remove titles for menu options since we're displaying that text anyway
$(".sf-menu a, .sf-menu li").removeAttr("title");
// Album and search results views
if ($("#g-album-grid").length) {
// Set equal height for album items and vertically align thumbnails/metadata
$('.g-item').equal_heights().gallery_valign();
// Initialize thumbnail hover effect
$(".g-item").hover(
function() {
// Insert a placeholder to hold the item's position in the grid
var placeHolder = $(this).clone().attr("id", "g-place-holder");
$(this).after($(placeHolder));
// Style and position the hover item
var position = $(this).position();
$(this).css("top", position.top).css("left", position.left);
$(this).addClass("g-hover-item");
// Initialize the contextual menu
$(this).gallery_context_menu();
// Set the hover item's height
$(this).height("auto");
var context_menu = $(this).find(".g-context-menu");
var adj_height = $(this).height() + context_menu.height();
if ($(this).next().height() > $(this).height()) {
$(this).height($(this).next().height());
} else if ($(this).prev().height() > $(this).height()) {
$(this).height($(this).prev().height());
} else {
$(this).height(adj_height);
}
},
function() {
// Reset item height and position
if ($(this).next().height()) {
var sib_height = $(this).next().height();
} else {
var sib_height = $(this).prev().height();
}
if ($.browser.msie && $.browser.version >= 8) {
sib_height = sib_height + 1;
}
$(this).css("height", sib_height);
$(this).css("position", "relative");
$(this).css("top", 0).css("left", 0);
// Remove the placeholder and hover class from the item
$(this).removeClass("g-hover-item");
$(this).gallery_valign();
$("#g-place-holder").remove();
}
);
// Realign any thumbnails that change so that when we rotate a thumb it stays centered.
$(".g-item").bind("gallery.change", function() {
$(".g-item").each(function() {
$(this).height($(this).find("img").height() + 2);
});
$(".g-item").equal_heights().gallery_valign();
});
}
// Photo/Item item view
if ($("#g-photo,#g-movie").length) {
// Ensure the resized image fits within its container
$("#g-photo,#g-movie").gallery_fit_photo();
// Initialize context menus
$("#g-photo,#g-movie").hover(function(){
$(this).gallery_context_menu();
});
// Add scroll effect for links to named anchors
$.localScroll({
queue: true,
duration: 1000,
hash: true
});
$(this).find(".g-dialog-link").gallery_dialog();
$(this).find(".g-ajax-link").gallery_ajax();
}
// Initialize button hover effect
$.fn.gallery_hover_init();
});

View File

@ -0,0 +1,6 @@
name = "Gallery SMK Theme"
description = "A crisp and distinctive theme that uses large fonts and icons for easy navigation and an enjoyable browsing experience mod with carbon elements."
version = 1
author = "Thomas E. Horner"
site = 1
admin = 0

BIN
3.0/themes/smk/thumbnail.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,44 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? // @todo Set hover on AlbumGrid list items for guest users ?>
<div id="g-info">
<?= $theme->album_top() ?>
<h1><?= html::purify($item->title) ?></h1>
<div class="g-description"><?= nl2br(html::purify($item->description)) ?></div>
</div>
<ul id="g-album-grid" class="ui-helper-clearfix">
<? 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) ?>
<a href="<?= $child->url() ?>">
<? if ($child->has_thumb()): ?>
<?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
<? endif ?>
</a>
<?= $theme->thumb_bottom($child) ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<h2><span class="<?= $item_class ?>"></span>
<a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
<ul class="g-metadata">
<?= $theme->thumb_info($child) ?>
</ul>
</li>
<? endforeach ?>
<? else: ?>
<? if ($user->admin || access::can("add", $item)): ?>
<? $addurl = url::site("uploader/index/$item->id") ?>
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
<? endif; ?>
</ul>
<?= $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" class="ui-helper-clearfix">
<? foreach ($children as $i => $child): ?>
<li class="g-item <?= $child->is_album() ? "g-album" : "" ?>">
<?= $theme->thumb_top($child) ?>
<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>
<h2><?= html::purify($child->title) ?></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,19 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-item">
<?= $theme->photo_top() ?>
<?= $theme->paginator() ?>
<div id="g-movie" class="ui-helper-clearfix">
<?= $theme->resize_top($item) ?>
<?= $item->movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?>
<?= $theme->resize_bottom($item) ?>
</div>
<div id="g-info">
<h1><?= html::purify($item->title) ?></h1>
<div><?= nl2br(html::purify($item->description)) ?></div>
</div>
<?= $theme->photo_bottom() ?>
</div>

View File

@ -0,0 +1,11 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<ul class="g-message-block">
<li class="g-warning">
<? if (block_manager::get_active("site_sidebar")): ?>
<?= t("Active sidebar blocks have no content.") ?>
<? else: ?>
<?= t("No active sidebar blocks.") ?>
<? endif ?>
<a href="<?= url::site("admin/sidebar") ?>"><?= t("configure blocks") ?></a>
</li>
</ul>

View File

@ -0,0 +1,161 @@
<?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") ?>
<?= $theme->css("themeroller/ui.base.css") ?>
<?= $theme->css("screen.css") ?>
<!--[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() ?>
<div id="doc4" class="yui-t5 g-view">
<?= $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="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= url::file("lib/images/logo.png") ?>" />
</a>
<? endif ?>
<?= $theme->user_menu() ?>
<?= $theme->header_top() ?>
<!-- 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>
<? if ($theme->item() && !empty($parents)): ?>
<ul class="g-breadcrumbs">
<? $i = 0 ?>
<? foreach ($parents as $parent): ?>
<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. ?>
<a href="<?= $parent->url($parent->id == $theme->item()->parent_id ?
"show={$theme->item()->id}" : null) ?>">
<? // limit the title length to something reasonable (defaults to 15) ?>
<?= html::purify(text::limit_chars($parent->title,
module::get_var("gallery", "visible_title_length"))) ?>
</a>
</li>
<? $i++ ?>
<? endforeach ?>
<li class="g-active<? if ($i == 0) print " g-first" ?>">
<?= html::purify(text::limit_chars($theme->item()->title,
module::get_var("gallery", "visible_title_length"))) ?>
</li>
</ul>
<? endif ?>
</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>
<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>

View File

@ -0,0 +1,87 @@
<?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
//
?>
<ul class="g-paginator ui-helper-clearfix">
<li class="g-first">
<? if ($page_type == "collection"): ?>
<? if (isset($first_page_url)): ?>
<a href="<?= $first_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
<? else: ?>
<a class="g-button ui-icon-left ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
<? endif ?>
<? endif ?>
<? if (isset($previous_page_url)): ?>
<a href="<?= $previous_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
<? else: ?>
<a class="g-button ui-icon-left ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
<? endif ?>
</li>
<li class="g-info">
<? if ($total): ?>
<? if ($page_type == "collection"): ?>
<?= /* @todo This message isn't easily localizable */
t2("Photo %from_number of %count",
"Photos %from_number - %to_number of %count",
$total,
array("from_number" => $first_visible_position,
"to_number" => $last_visible_position,
"count" => $total)) ?>
<? else: ?>
<?= t("%position of %total", array("position" => $position, "total" => $total)) ?>
<? endif ?>
<? else: ?>
<?= t("No photos") ?>
<? endif ?>
</li>
<li class="g-text-right">
<? if (isset($next_page_url)): ?>
<a href="<?= $next_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
<? else: ?>
<a class="g-button ui-state-disabled ui-icon-right ui-corner-all">
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
<? endif ?>
<? if ($page_type == "collection"): ?>
<? if (isset($last_page_url)): ?>
<a href="<?= $last_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
<? else: ?>
<a class="g-button ui-state-disabled ui-icon-right ui-corner-all">
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
<? endif ?>
<? endif ?>
</li>
</ul>

View File

@ -0,0 +1,51 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if (access::can("view_full", $theme->item())): ?>
<!-- Use javascript to show the full size as an overlay on the current page -->
<script type="text/javascript">
$(document).ready(function() {
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
$(".g-fullsize-link").click(function() {
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
return false;
});
// After the image is rotated or replaced we have to reload the image dimensions
// so that the full size view isn't distorted.
$("#g-photo").bind("gallery.change", function() {
$.ajax({
url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>",
dataType: "json",
success: function(data, textStatus) {
full_dims = data.full;
}
});
});
});
</script>
<? endif ?>
<div id="g-item">
<?= $theme->photo_top() ?>
<?= $theme->paginator() ?>
<div id="g-photo">
<?= $theme->resize_top($item) ?>
<? if (access::can("view_full", $item)): ?>
<a href="<?= $item->file_url() ?>" class="g-fullsize-link" title="<?= t("View full size")->for_html_attr() ?>">
<? endif ?>
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
<? if (access::can("view_full", $item)): ?>
</a>
<? endif ?>
<?= $theme->resize_bottom($item) ?>
</div>
<div id="g-info">
<h1><?= html::purify($item->title) ?></h1>
<div><?= nl2br(html::purify($item->description)) ?></div>
</div>
<?= $theme->photo_bottom() ?>
</div>

View File

@ -0,0 +1,16 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= $theme->sidebar_top() ?>
<div id="g-view-menu" class="g-buttonset ui-helper-clearfix">
<? 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>
<?= $theme->sidebar_blocks() ?>
<?= $theme->sidebar_bottom() ?>