diff --git a/3.0/client/PHP/Gallery3.php b/3.0/client/PHP/Gallery3.php index 30dae4f1..782740c6 100644 --- a/3.0/client/PHP/Gallery3.php +++ b/3.0/client/PHP/Gallery3.php @@ -1,7 +1,7 @@ -albumTree.add(id -1 ?>, parent_id -1 ?>, "title ?>", pf+'relative_url() ?>'); +albumTree.add(id -1 ?>, parent_id -1 ?>, "title) ?>", pf+'relative_url() ?>'); viewable()->children(null, null, array(array("type", "=", "album"))) as $child){ addtree($child); diff --git a/3.0/modules/albumtree/views/albumtree_block_list.html.php b/3.0/modules/albumtree/views/albumtree_block_list.html.php index 58daf0ce..08ab3f04 100644 --- a/3.0/modules/albumtree/views/albumtree_block_list.html.php +++ b/3.0/modules/albumtree/views/albumtree_block_list.html.php @@ -15,7 +15,7 @@ function makelist($album,$level){ //print out the list item ?>
  • - title ?> + title) ?>
  • - + viewable()->children(null, null, array(array("type", "=", "album"))) as $child){ diff --git a/3.1/modules/bitly/helpers/bitly_theme.php b/3.0/modules/arrow_nav/helpers/arrow_nav_theme.php similarity index 80% rename from 3.1/modules/bitly/helpers/bitly_theme.php rename to 3.0/modules/arrow_nav/helpers/arrow_nav_theme.php index 392d2c48..529046ef 100644 --- a/3.1/modules/bitly/helpers/bitly_theme.php +++ b/3.0/modules/arrow_nav/helpers/arrow_nav_theme.php @@ -1,24 +1,26 @@ -script("bitly.js"); - } -} +page_subtype == "photo") { + return $theme->script("arrow_nav.js"); + } + } +} diff --git a/3.0/modules/arrow_nav/js/arrow_nav.js b/3.0/modules/arrow_nav/js/arrow_nav.js new file mode 100644 index 00000000..28ef7917 --- /dev/null +++ b/3.0/modules/arrow_nav/js/arrow_nav.js @@ -0,0 +1,17 @@ +$(document).keydown(function(e) { + var url; + + if (e.keyCode == 37) { + // Left key pressed + url = $('.g-paginator .g-first a').attr("href"); + // Right key pressed + } else if (e.keyCode == 39) { + url = $('.g-paginator .g-text-right a').attr("href"); + } + + if(url != undefined) { + window.location = url; + } + + return false; +}); diff --git a/3.0/modules/arrow_nav/module.info b/3.0/modules/arrow_nav/module.info new file mode 100644 index 00000000..abae7113 --- /dev/null +++ b/3.0/modules/arrow_nav/module.info @@ -0,0 +1,3 @@ +name = "Arrow Navigation" +description = "Use the left/right arrow keys to go to the previous/next photo" +version = 1 diff --git a/3.0/modules/author/helpers/author.php b/3.0/modules/author/helpers/author.php index ae259ec8..d4ee9dc6 100644 --- a/3.0/modules/author/helpers/author.php +++ b/3.0/modules/author/helpers/author.php @@ -1,7 +1,7 @@ /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2011 Bharat Mediratta + * Copyright (C) 2000-2012 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 diff --git a/3.0/modules/developer/views/block.txt.php b/3.0/modules/developer/views/block.txt.php index 28a8d9db..8ad56eed 100644 --- a/3.0/modules/developer/views/block.txt.php +++ b/3.0/modules/developer/views/block.txt.php @@ -3,7 +3,7 @@ /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2011 Bharat Mediratta + * Copyright (C) 2000-2012 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 diff --git a/3.0/modules/developer/views/controller.txt.php b/3.0/modules/developer/views/controller.txt.php index 664ff987..6c2369e1 100644 --- a/3.0/modules/developer/views/controller.txt.php +++ b/3.0/modules/developer/views/controller.txt.php @@ -2,7 +2,7 @@ /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2011 Bharat Mediratta + * Copyright (C) 2000-2012 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 diff --git a/3.0/modules/developer/views/event.txt.php b/3.0/modules/developer/views/event.txt.php index 32a48520..71a4ae58 100644 --- a/3.0/modules/developer/views/event.txt.php +++ b/3.0/modules/developer/views/event.txt.php @@ -2,7 +2,7 @@ /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2011 Bharat Mediratta + * Copyright (C) 2000-2012 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 diff --git a/3.0/modules/developer/views/installer.txt.php b/3.0/modules/developer/views/installer.txt.php index cf6662d5..e5e03273 100644 --- a/3.0/modules/developer/views/installer.txt.php +++ b/3.0/modules/developer/views/installer.txt.php @@ -2,7 +2,7 @@ /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2011 Bharat Mediratta + * Copyright (C) 2000-2012 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 diff --git a/3.0/modules/developer/views/theme.txt.php b/3.0/modules/developer/views/theme.txt.php index e4467f43..57439b67 100644 --- a/3.0/modules/developer/views/theme.txt.php +++ b/3.0/modules/developer/views/theme.txt.php @@ -2,7 +2,7 @@ /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2011 Bharat Mediratta + * Copyright (C) 2000-2012 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 diff --git a/3.0/modules/displaytags/helpers/displaytags_block.php b/3.0/modules/displaytags/helpers/displaytags_block.php index 8fc530f1..9b1b1028 100644 --- a/3.0/modules/displaytags/helpers/displaytags_block.php +++ b/3.0/modules/displaytags/helpers/displaytags_block.php @@ -1,7 +1,7 @@ . * + *************************************************************************/ +class Admin_Emboss_Controller extends Admin_Controller { + public function index() { + $view = new Admin_View('admin.html'); + $view->page_title = t('Emboss'); + $view->content = new View('admin_emboss.html'); + + $images = ORM::factory('emboss_overlay')->find_all(); + + $view->content->images = $images; + $view->content->emboss_thumbs = module::get_var('emboss','thumbs',0); + $view->content->emboss_resize = module::get_var('emboss','resize',1); + $view->content->emboss_full = module::get_var('emboss','full',1); + + print $view; + } + + static function update() { + access::verify_csrf(); + emboss::update_overlay_options($_POST); + emboss::evaluate_overlays(); + emboss::check_for_dirty(); + url::redirect('admin/emboss'); + } + + static function new_overlay() { + access::verify_csrf(); + $file = $_FILES['overlay']; + emboss::upload_new_overlay($file); + emboss::check_for_dirty(); + url::redirect('admin/emboss'); + } + + static function delete_overlay() { + access::verify_csrf(); + emboss::_delete_overlay($_REQUEST['name']); + emboss::check_for_dirty(); + url::redirect('admin/emboss'); + } + + static function clear_log() { + db::build() + ->delete() + ->from('logs') + ->where('category','=','emboss') + ->execute(); + url::redirect('admin/emboss'); + } + + static function uninstall() { + access::verify_csrf(); + emboss::uninstall(); + url::redirect('admin/modules'); + } +} \ No newline at end of file diff --git a/3.0/modules/emboss/helpers/emboss.php b/3.0/modules/emboss/helpers/emboss.php new file mode 100644 index 00000000..84c50aa2 --- /dev/null +++ b/3.0/modules/emboss/helpers/emboss.php @@ -0,0 +1,459 @@ +. * + *************************************************************************/ +class emboss_Core { + + static function reconcile() + { + emboss::copy_new(VARPATH . 'albums', VARPATH . 'originals'); + emboss::remove_old(VARPATH . 'albums', VARPATH . 'originals'); + } + + private function error($msg) + { + log::error('emboss',$msg); + message::error($msg); + } + + private function success($msg) + { + log::success('emboss',$msg); + message::success($msg); + } + + private function info($msg) + { + log::info('emboss',$msg); + message::info($msg); + } + + private function copy_new($src,$dst) + { + if( ! is_dir($src) ) + return; + + if(! file_exists($dst) ) + { + log::info('emboss',"Creating directory $dst"); + if(! @mkdir($dst) ) + { + emboss::error("Failed to create $dst"); + return; + } + } + if(! is_dir($dst) ) + { + emboss::error("Existing $dst is not a directory"); + return; + } + + if( ! ($dh = opendir($src)) ) + { + emboss::error("Failed to open $src for reading"); + return; + } + + while( $file = readdir($dh) ) + { + if($file=='.'||$file=='..') + continue; + + $srcpath = $src . '/' . $file; + $dstpath = $dst . '/' . $file; + + if( is_dir($srcpath) ) + { + emboss::copy_new($srcpath, $dstpath); + } + else + { + if(! file_exists($dstpath) ) + { + log::info('emboss',"Copying $file to $dst"); + if(! @copy($srcpath,$dstpath) ) + { + emboss::error("Failed to copy $file to $dst"); + } + } + } + } + + closedir($dh); + } + + private function remove_old($src,$archive) + { + if( ! is_dir($archive) ) + return; + + if(! (file_exists($src) && is_dir($src)) ) + { + log::info('emboss',"Removing directory $src"); + emboss::rmdir_recursive($archive); + return; + } + + if( ! ($dh = opendir($archive)) ) + { + emboss::error("Failed to open $archive for reading"); + return; + } + + while( $file = readdir($dh) ) + { + if($file=='.' || $file=='..') + continue; + + $srcpath = $src . '/' . $file; + $archivepath = $archive . '/' . $file; + + if( is_dir($archivepath) ) + { + emboss::remove_old($srcpath,$archivepath); + } + else + { + if( ! file_exists($srcpath) ) + { + log::info('emboss',"Removing $file from $archive"); + if(! @unlink($archivepath) ) + emboss::error("Failed to remove $file from $archive"); + } + } + } + + closedir($dh); + } + + private function rmdir_recursive($dir) { + if(!$dh = @opendir($dir)) + return; + + while ( $obj = readdir($dh)) + { + if($obj=='.' || $obj=='..') continue; + if (!@unlink($dir.'/'.$obj)) + emboss::rmdir_recursive($dir.'/'.$obj); + } + + closedir($dh); + @rmdir($dir); + } + + static function mkdir_recursive($dir) { + $dirs = explode('/', $dir); + $newdir = ''; + for($i=1; $iselect('id') + ->from('emboss_overlays') + ->where('name','=',$name) + ->execute() + ->count(); + + if($n>0) { + emboss::error(t("Overlay named $name already exists.")); + @unlink($tmp); + return; + } + + $width = $image_info[0]; + $height = $image_info[1]; + $where1 = array('width','=',$width); + $where2 = array('height','=',$height); + $where = array($where1,$where2); + + $n = db::build() + ->select('id') + ->from('emboss_overlays') + ->where('width','=',$width) + ->where('height','=',$height) + ->execute() + ->count(); + + if($n>0) { + emboss::error(t("Overlay with dimensions $width x $height already exists.")); + @unlink($tmp); + return; + } + + @rename($tmp, VARPATH . 'modules/emboss/' . $name); + + $overlay = ORM::factory('emboss_overlay'); + $overlay->name = $name; + $overlay->width = $width; + $overlay->height = $height; + $overlay->active = 1; + $overlay->save(); + + emboss::success('Succesfully uploaded overlay ' . $file['name']); + emboss::evaluate_overlays(); + } + + static function _delete_overlay($overlay) + { + $query = db::build() + ->select('id') + ->from('emboss_overlays') + ->where('name','=',$overlay) + ->execute(); + $n = $query->count(); + + $qual = '(database table: g3_emboss_overlay)'; + if($n<1) { + message::error("Internal error... $overlay missing $qual"); + return; + } + if($n>1) { + message::error("Internal error... $overlay has multiple entries $qual"); + return; + } + + $overlay_id = $query[0]->id; + + $q = db::build() + ->from('emboss_overlays') + ->where('id','=',$overlay_id) + ->delete() + ->execute(); + + @unlink(VARPATH . 'modules/emboss/' . $overlay); + + $query = db::build() + ->update('emboss_mappings') + ->where('cur_overlay_id','=',$overlay_id) + ->set('cur_overlay_id',-1) + ->execute(); + + $query = db::build() + ->update('emboss_mappings') + ->where('best_overlay_id','=',$overlay_id) + ->set('best_overlay_id',-1) + ->execute(); + + emboss::success("Succesfully deleted $overlay"); + emboss::evaluate_overlays(); + } + + public function usage_count($overlay_id) + { + $n = db::build() + ->select() + ->from('emboss_mappings') + ->where('best_overlay_id','=',$overlay_id) + ->execute() + ->count(); + return ($n>0 ? $n : ''); + } + + static function update_overlay_options($post) + { + $options = array('method','size','gravity','transparency'); + foreach ($options as $option) { + module::set_var('emboss',$option,$post["$option"]); + } + + db::build()->update('emboss_overlays')->set('active',0)->execute(); + $activeOverlays = $post['active_overlays']; + if(is_array($activeOverlays)) { + foreach ($activeOverlays as $overlay) { + $q = ORM::factory('emboss_overlay')->where('name','=',$overlay)->find(); + $q->active=1; + $q->save(); + } + } + } + + static function evaluate_overlays() + { + $overlays = ORM::factory('emboss_overlay')->where('active','=',1)->find_all(); + $images = ORM::factory('item')->where('type','=','photo')->find_all(); + + $n_new = 0; + $n_update = 0; + $n_none = 0; + + $has_changes=0; + foreach ($images as $image) { + $overlay_id = emboss::determine_best_overlay($image,$overlays); + if($overlay_id < 0) { + $n_none++; + } + + $q = ORM::factory('emboss_mapping')->where('image_id','=',$image->id)->find(); + if( ! $q->loaded() ) { + if($overlay_id>0) { + $n_new++; + } + $q->image_id = $image->id; + $q->best_overlay_id = $overlay_id; + $q->cur_overlay_id = -1; + $q->cur_gravity = 'unset'; + $q->cur_transparency = -1; + $q->save(); + } else if($q->best_overlay_id != $overlay_id) { + if($overlay_id>0) { + $n_update++; + } + $q->best_overlay_id = $overlay_id; + $q->save(); + } + } + + if($n_none) { + emboss::info('Cannot find an overlay for '.$n_none . t2(' image',' images')); + } + if($n_new) { + emboss::info($n_new . t2(' image needs',' images need',$n_new) . + ' now have an overlay available'); + } + if($n_update) { + emboss::info(t2('This changes the overlay for 1 image', + "This changes the overlay for $n_update images", + $n_update)); + } + + if($n_none || $n_new || $n_update) { + + } else{ + message::info('All photos are being embossed with the correct overlay'); + } + } + + static function determine_best_overlay($image,$overlays=NULL) + { + if(!$overlays) { + $overlays = ORM::factory('emboss_overlay')->where('active','=',1)->find_all(); + } + + $method = module::get_var('emboss','method'); + $size = 0.01 * module::get_var('emboss','size'); + + $W = $size * $image->width; + $H = $size * $image->height; + + $bestID = -1; + $bestScore=0; + foreach ($overlays as $overlay) { + $score = $overlay->score($W,$H,$method); + if ( $score>0 && $score>$bestScore ) { + $bestScore = $score; + $bestID = $overlay->id; + } + } + return $bestID; + } + + static function check_for_dirty() + { + $q = emboss::find_dirty(); + $n = $q->count(); + if($n>0) { + $url = url::site('admin/maintenance/start/emboss_task::update_overlays?csrf=__CSRF__'); + site_status::warning( + t2("One of your photos needs to be (re)embossed. Click here to fix it", + "%count of your photos need to be (re)embossed. Click here to fix them", + $n, + array('attrs' => html::mark_clean(sprintf('href="%s" class="g-dialog-link"',$url)))), + 'emboss_dirty'); + } else { + site_status::clear('emboss_dirty'); + } + } + + public function find_dirty() + { + $gravity = module::get_var('emboss','gravity'); + $transparency = module::get_var('emboss','transparency'); + + $q = db::build() + ->select() + ->from('emboss_mappings') + ->or_where('cur_overlay_id','!=',db::expr('best_overlay_id')) + ->or_where('cur_gravity','!=',$gravity) + ->or_where('cur_transparency','!=',$transparency) + ->execute(); + + return $q; + } + + public function uninstall() + { + $items = ORM::factory('item')->find_all(); + foreach($items as $item) { + $path = $item->file_path() . $name; + $orig = str_replace(VARPATH.'albums/',VARPATH.'originals/',$path); + if(file_exists($orig)) { + @unlink($path); + @rename($orig,$path); + } + } + graphics::mark_dirty(1,1); + + Database::instance()->query('DROP TABLE {emboss_overlays}'); + Database::instance()->query('DROP TABLE {emboss_mappings}'); + Database::instancs()->query("delete from {modules} where name='emboss'"); + + log::info('emboss','module uninstalled (database dropped/overlays removed)'); + } + + +} diff --git a/3.0/modules/emboss/helpers/emboss_event.php b/3.0/modules/emboss/helpers/emboss_event.php new file mode 100644 index 00000000..c09c8f5d --- /dev/null +++ b/3.0/modules/emboss/helpers/emboss_event.php @@ -0,0 +1,121 @@ +. * + *************************************************************************/ +class emboss_event_Core { + static function admin_menu($menu,$theme) { + module::set_var('emboss','admin_menu',1); + $menu->get('content_menu') + ->append( + Menu::factory('link') + ->id('emboss') + ->label(t('Emboss')) + ->url(url::site('admin/emboss'))); + } + + static function item_moved($item,$olddir) + { + if( ! ($item->is_photo() || $item->is_album()) ) { + return; + } + + $name = $item->name; + $old_path = $olddir->file_path() . '/' . $name; + $new_path = $item->file_path(); + + if( $new_path == $old_path) { + return; + } + + $old_orig = str_replace(VARPATH . 'albums/', VARPATH . 'originals/', $old_path); + $new_orig = str_replace(VARPATH . 'albums/', VARPATH . 'originals/', $new_path); + $new_dir = str_replace('/'.$name , '',$new_orig); + + if( file_exists($old_orig)) + { + emboss::mkdir_recursive($new_dir); + @rename($old_orig,$new_orig); + log::info('emboss','Moved '.$item->name.' to '.str_replace(VARPATH,'',$new_dir)); + } + } + + static function item_updated($original,$item) + { + if( ! ($item->is_photo() || $item->is_album()) ) { + return; + } + $oldpath = $original->file_path(); + $newpath = $item->file_path(); + if( $oldpath != $newpath ) { + $oldorig = str_replace(VARPATH.'albums/',VARPATH.'originals/',$oldpath); + $neworig = str_replace(VARPATH.'albums/',VARPATH.'originals/',$newpath); + log::info('emboss',"rename $oldorig to $neworig"); + @rename($oldorig,$neworig); + } + } + + static function item_deleted($item) + { + if( ! $item->is_photo() ) { + return; + } + + $name = $item->name; + $id = $item->id; + $path = $item->file_path(); + $orig = str_replace(VARPATH.'albums/',VARPATH.'originals/',$path); + + @unlink($orig); + + db::build() + ->from('emboss_mappings') + ->where('image_id','=',$id) + ->delete() + ->execute(); + + log::info('emboss',"item_deleted: $name"); + } + + static function item_created($item) + { + if( ! $item->is_photo() ) { + return; + } + + $path = $item->file_path(); + $dirs = explode('/',$path); + array_pop($dirs); + $dir = implode('/',$dirs); + + $orig = str_replace(VARPATH.'albums/',VARPATH.'originals/',$path); + $origdir = str_replace(VARPATH.'albums/',VARPATH.'originals/',$dir); + + emboss::mkdir_recursive($origdir); + @copy($path,$orig); + + $q = ORM::factory('emboss_mapping'); + $q->image_id = $item->id; + $q->best_overlay_id = emboss::determine_best_overlay($item); + $q->cur_overlay_id = -1; + $q->cur_gravity = ''; + $q->cur_transparency = -1; + $q->save(); + + emboss::check_for_dirty(); + } + +} + diff --git a/3.0/modules/emboss/helpers/emboss_installer.php b/3.0/modules/emboss/helpers/emboss_installer.php new file mode 100644 index 00000000..663d671f --- /dev/null +++ b/3.0/modules/emboss/helpers/emboss_installer.php @@ -0,0 +1,67 @@ +. * + *************************************************************************/ +class emboss_installer { + static function install() { + $db = Database::instance(); + $db->query("CREATE TABLE IF NOT EXISTS {emboss_overlays} ( + `id` int(9) NOT NULL auto_increment, + `active` tinyint(4) NOT NULL DEFAULT 1, + `name` varchar(64) NOT NULL, + `width` int(9) NOT NULL, + `height` int(9) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY(`name`))"); + + $db->query("CREATE TABLE IF NOT EXISTS {emboss_mappings} ( + `id` int(9) NOT NULL auto_increment, + `image_id` int(9) NOT NULL, + `best_overlay_id` int(9) NOT NULL, + `cur_overlay_id` int(9), + `cur_gravity` varchar(16), + `cur_transparency` tinyint(4), + PRIMARY KEY (`id`), + UNIQUE KEY(`image_id`))"); + + @mkdir(VARPATH . 'originals'); + @mkdir(VARPATH . 'modules'); + @mkdir(VARPATH . 'modules/emboss'); + module::set_version('emboss',1); + log::success('emboss','Emboss Installed'); + } + + static function upgrade($version) + { + module::set_version('emboss',$verion=1); + log::info('emboss',"Upgrade to version $version / No action taken"); + } + + static function activate() + { + log::info('emboss','Emboss Activated'); + emboss::reconcile(); + } + + static function deactivate() + { + log::info('emboss','Emboss Deactivated'); + } + + static function uninstall() { + emboss::uninstall(); + } +} diff --git a/3.0/modules/emboss/helpers/emboss_task.php b/3.0/modules/emboss/helpers/emboss_task.php new file mode 100644 index 00000000..b0673b26 --- /dev/null +++ b/3.0/modules/emboss/helpers/emboss_task.php @@ -0,0 +1,150 @@ +. * + *************************************************************************/ +class emboss_task_Core { + + static function available_tasks() { + $q = emboss::find_dirty(); + $n = $q->count(); + + $description = ( ($n==0) + ? (t('All photo overlays are up to date') ) + : t2('one Photo needs its emboss overlay updated', + "$n Photos need their emboss overlay updated", $n) ); + + $tasks[] = Task_Definition::factory() + ->callback('emboss_task::update_overlays') + ->name(t('Update photo embossing')) + ->description($description) + ->severity($n>0 ? log::WARNING : log::SUCCESS); + return $tasks; + } + + static function update_overlays($task) + { + $errors = array(); + try { + $mode = $task->get('mode','init'); + switch($mode) { + case 'init': + $q = emboss::find_dirty(); + foreach ($q as $item) { + $ids[] = array('id'=>$item->id, + 'image_id'=>$item->image_id, + 'overlay_id'=>$item->best_overlay_id); + } + $count = count($ids); + + if($count>0) { + $task->set('ids',$ids); + $task->set('count',$count); + $task->set('current',0); + $task->set('mode','continue'); + } else { + $task->done = true; + $task->state = 'success'; + $task->percent_complete = 100; + site_status::clear('emboss_dirty'); + return; + } + break; + + case 'continue': + $ids = $task->get('ids'); + $count = $task->get('count'); + $current = $task->get('current'); + break; + } + + $i = 1*$current; + $id = $ids[$i]; + $current++; + $task->set('current',$current); + + emboss_task::do_embossing($id['id'],$id['image_id'],$id['overlay_id']); + + if($current>=$count) { + $task->done = true; + $task->state = 'success'; + $task->percent_complete = 100; + $task->status = 'Complete'; + site_status::clear('emboss_dirty'); + } else { + $task->percent_complete = $current/$count * 100; + $task->status = t("Reembossed $current of $count photos"); + } + + + } catch (Exception $e) { + Kohana_Log::add('error',(string)$e); + $task->done = true; + $task->state = 'error'; + $task->status = $e->getMessage(); + $errors[] = (string)$e; + } + if ($errors) { + $task->log($errors); + } + } + + static function do_embossing($id,$image_id,$overlay_id) + { + $gravity = module::get_var('emboss','gravity'); + $transparency = module::get_var('emboss','transparency'); + + $item = ORM::factory('item')->where('id','=',$image_id)->find(); + $path = $item->file_path() . $name; + $orig = str_replace(VARPATH.'albums/',VARPATH.'originals/',$path); + + @unlink($path); + + if($overlay_id<0) { + log::info('emboss','Remove embossing from '.$item->name); + @copy($orig,$path); + + } else { + $overlay = ORM::factory('emboss_overlay')->where('id','=',$overlay_id)->find(); + $overlay_path = VARPATH.'modules/emboss/'.$overlay->name; + + $opts['file'] = $overlay_path; + $opts['position'] = $gravity; + $opts['transparency'] = 100-$transparency; + + log::info('emboss','Embossing '.$item->name.' with '.$overlay->name); + + gallery_graphics::composite($orig,$path,$opts); + } + + $item->thumb_dirty = 1; + $item->resize_dirty = 1; + $item->save(); + + graphics::generate($item); + + db::build()->update('emboss_mappings') + ->where('id','=',$id) + ->set('cur_overlay_id',$overlay_id) + ->set('cur_gravity',$gravity) + ->set('cur_transparency',$transparency) + ->execute(); + } + + + +} + + diff --git a/3.0/modules/emboss/models/emboss_mapping.php b/3.0/modules/emboss/models/emboss_mapping.php new file mode 100644 index 00000000..1037c269 --- /dev/null +++ b/3.0/modules/emboss/models/emboss_mapping.php @@ -0,0 +1,3 @@ +. * + *************************************************************************/ +class Emboss_Overlay_Model_Core extends ORM { + protected $sorting = array('width' => 'desc', 'height' => 'desc'); + + public function score($W,$H,$function) + { + /************************************************************* + * (W,H) = Image (Width,Height) + * (w,h) = Overlay (width,height) + *************************************************************/ + + $w = $this->width; + $h = $this->height; + if( ($w>$W) || ($h>$H) ) { return 0; } + + /************************************************************* + * Minimize Margin Method + ************************************************************* + * Score = (W^2 + H^2) - ((W-w)^2 + (H-h)^2) + * = (W^2 - (W-w)^2) + (H^2 - (H-h)^2) + * = (2Ww - w^2) + (2Hh - h^2) + * = (2W-w)w + (2H-h)h + *************************************************************/ + + if($function == 'margin') { + $score = ( (2*$W - $w)*$w + (2*$H - $h)*$h ); + } + + /************************************************************* + * Aspect Ratio Weighted + ************************************************************* + * if h < w*(H/W) + * peak value = area on diagonal (w*h) + * null value = 0 on w axis (h=0) + * quadratic fit between: + * Score = W/H h^2 + * if w < h*(W/H) + * Score = H/W w^2 (by symmetry) + *************************************************************/ + + else if($function == 'diag') { + if($h*$W < $w*$H) { + $score = $h*$h*($W/$H); + } else { + $score = $w*$w*($H/$W); + } + } + + /************************************************************* + * Area Method (Default if no match to $function) + ************************************************************* + * Score = w * h + *************************************************************/ + + else { + $score = $w * $h; + } + + return $score; + } + + public function area() + { + return $this->width * $this->height; + } + +} \ No newline at end of file diff --git a/3.0/modules/emboss/module.info b/3.0/modules/emboss/module.info new file mode 100644 index 00000000..14bb7231 --- /dev/null +++ b/3.0/modules/emboss/module.info @@ -0,0 +1,7 @@ +name = "Emboss" +description = "A different watermarking module" +version = 1 +author_name = "mikemayer67" +author_url = "http://www.vmwishes.com" +info_url = "http://codex.gallery2.org/Gallery3:Modules:emboss" +discuss_url = "http://gallery.menalto.com/node/105339" diff --git a/3.0/modules/emboss/views/admin_emboss.html.php b/3.0/modules/emboss/views/admin_emboss.html.php new file mode 100644 index 00000000..86745948 --- /dev/null +++ b/3.0/modules/emboss/views/admin_emboss.html.php @@ -0,0 +1,125 @@ + +/************************************************************************* + * Copyright (C) 2012 Michel A. Mayer * + * * + * 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 3 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, see . * + *************************************************************************/ + + +
    +
    +

    Upload New Overlay

    + + +'overlay','style'=>'margin: .5em 0 .5em 0'))?> +'Upload','style'=>'display:block; float:none'),'Upload')?> + +
    +
    +
    +'options'))?> + +

    Available Overlays

    + + + + + + + + + name; + $data['checked'] = $image->active; + ?> + + + + + + + + +
    ActiveImageSizeUsage
    name?>width?> x height?>id)?>name.'&csrf='.access::csrf_token(), 'delete')?>
    +Check All / +Uncheck All +
    +'Update','style'=>'display:block; float:none'),'Update')?> +
    +

    Embossing Parameters

    + + + + + + + + +0; $i-=5) { $sizes["$i"]="$i%"; } ?> + + + + + + + +
    Best Fit Method:'Maximum Overlay Area', + 'margin'=>'Minimize Borders', + 'diag' =>'Aspect Ratio Weighted'), + module::get_var('emboss','method','area')) ?>
    Location: 'Northwest', + 'north' => 'North', + 'northeast' => 'Northeast', + 'east' => 'East', + 'southeast' => 'Southeast', + 'south' => 'South', + 'southwest' => 'Southwest', + 'south' => 'South', + 'center' => 'Center'), + module::get_var('emboss','gravity','Center')) ?>
    Desired Size:
    Transparency:
    +
    +'Update','style'=>'display:block; float:none'),'Update')?> +
    +
    +
    + + + +
    diff --git a/3.0/modules/exif_gps/controllers/admin_exif_gps.php b/3.0/modules/exif_gps/controllers/admin_exif_gps.php index 0abc5f25..ca3003f6 100644 --- a/3.0/modules/exif_gps/controllers/admin_exif_gps.php +++ b/3.0/modules/exif_gps/controllers/admin_exif_gps.php @@ -1,7 +1,7 @@ join("hidden_items", "items.id", "hidden_items.item_id", "LEFT OUTER"); + $this->where("hidden_items.item_id", "IS", NULL); + return parent::children($limit, $offset, $where, $order_by); } - return $messages; } } diff --git a/3.0/modules/hide/models/hidden_item.php b/3.0/modules/hide/models/hidden_item.php index bc98f59c..5f00b6a6 100644 --- a/3.0/modules/hide/models/hidden_item.php +++ b/3.0/modules/hide/models/hidden_item.php @@ -1,7 +1,7 @@ "", "updates" => 0); $refreshCache = true; } - + //Check the ability to access the Gallery3 GitHub $GitHub = null; try { @@ -93,6 +93,29 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { $update_count = 0; if($refreshCache == true){ + // Only poll GalleryModules.com once for the ini file. + $fp = fopen('gm.ini', 'w'); + $fp2 = fopen('gm_core.ini','w'); + if(function_exists("curl_init")) { + $cp = curl_init("http://www.gallerymodules.com/gallerymodules.ini"); + curl_setopt($cp, CURLOPT_FILE, $fp); + $buffer = curl_exec($cp); + curl_close($cp); + fclose($fp); + + $cp = curl_init("http://www.gallerymodules.com/core.ini"); + curl_setopt($cp, CURLOPT_FILE, $fp2); + $buffer = curl_exec($cp); + curl_close($cp); + fclose($fp2); + } else { + fwrite($fp,file_get_contents("http://www.gallerymodules.com/gallerymodules.ini")); + fclose($fp); + + fwrite($fp2,file_get_contents("http://www.gallerymodules.com/sandbox/core.ini")); + fclose($fp2); + } + foreach (module::available() as $this_module_name => $module_info) { $font_color_local = "black"; @@ -115,8 +138,6 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { list ($core_version, $core_server) = $this->get_remote_module_version($this_module_name, "CORE"); $font_color_core = $this->get_module_version_color ($module_info->version, $module_info->code_version, $core_version); if(!is_numeric($core_version)) { - list ($contrib_version, $contrib_server) = $this->get_remote_module_version($this_module_name, "CONTRIB"); - $font_color_contrib = $this->get_module_version_color ($module_info->version, $module_info->code_version, $contrib_version); list ($gh_version, $gh_server) = $this->get_remote_module_version($this_module_name, "GH"); $font_color_gh = $this->get_module_version_color ($module_info->version, $module_info->code_version, $gh_version); } @@ -132,14 +153,7 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { $core_dlink = "http://github.com/gallery/gallery3/tree/master/modules/".$this_module_name; } } - - if (is_numeric($contrib_version)) { - if($contrib_version > $module_info->version) { - $contrib_dlink = "http://github.com/gallery/gallery3-contrib/tree/master/". - substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name; - } - } - + if (is_numeric($gh_version)) { if($gh_version > $module_info->version) { $this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))); @@ -171,6 +185,9 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { Cache::instance()->set("moduleupdates_cache_updates", serialize($cache_updates), array("ModuleUpdates"), null); log::success("moduleupdates", t("Completed checking remote GitHub for modules updates.")); } + + unlink('gm.ini'); + unlink('gm_core.ini'); $view->content->vars = $cache; $view->content->update_time = $cache_updates['date']; @@ -243,7 +260,6 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { return $font_color; } - /** * Parses the known GitHub repositories for new versions of modules. * @@ -252,7 +268,6 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { * gather the version information. Uses the following locations; * * http://github.com/gallery/gallery3 - * http://github.com/gallery/gallery3-contrib * http://www.gallerymodules.com * * @author brentil @@ -267,87 +282,51 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { $file = null; switch ($server_location) { - case "CONTRIB": - //Check the Gallery3 Community Contributions GitHub - if ($file == null) { - try { - $thisInstalledVersion = gallery::VERSION; - //Gallery versions prior to 3.0.2 contained the codename in the version string - if (substr_count($thisInstalledVersion, ' ') > 0 ){ - $thisInstalledVersion = substr_replace($thisInstalledVersion,"",strpos($thisInstalledVersion," ")); - } - //Truncate the minor version number - if (substr_count($thisInstalledVersion, '.') > 1 ){ - $thisInstalledVersion = substr_replace($thisInstalledVersion,"",strripos($thisInstalledVersion,".")); - } - $file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/". - $thisInstalledVersion ."/modules/".$module_name."/module.info", "r"); - - if ($file != null) { - $server = '(GCC)'; - } - } - catch (Exception $e) { - //echo 'Message: ' .$e->getMessage() . '
    '; - } - } - break; case "CORE": //Check the main Gallery3 GitHub if ($file == null) { try { - $file = fopen ("http://github.com/gallery/gallery3/raw/master/modules/".$module_name."/module.info", "r"); - if ($file != null) { - $server = '(G)'; - } + if(file_exists('gm_core.ini')) { + $file = 1; + } + if ($file != null) { + $gm_core_array = parse_ini_file('gm_core.ini',true); + $server = '(G)'; + } } catch (Exception $e) { } } break; case "GH": - //Check GalleryModules.com - if ($file == null) { + //Parse ini file from GalleryModules.com try { - $this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))); - if($this_gm_repo == "30"){ - $file = fopen ("http://www.gallerymodules.com/m/".$module_name, "r"); - } else { - $file = fopen ("http://www.gallerymodules.com/".$this_gm_repo."m/".$module_name, "r"); - } - if ($file != null) { - $server = '(GH)'; - } + $this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))); + if(file_exists('gm.ini')) { + $file = 1; + } + if ($file != null) { + $gm_array = parse_ini_file('gm.ini',true); + $server = '(GH)'; + } } catch (Exception $e) { + echo $e; } - } break; - } + } - if ($file != null) { - while (!feof ($file)) { - $line = fgets ($file, 1024); - if ($server_location == "GH"){ - //GH stores only the version info - if($line == "Not entered" or $line == "See git") { - $line = ""; - } - if (substr_count($line, '.') > 0) { - $line = str_replace('.','',$line); - } - $version = $line; - break; - } else { - //Regular expression to find & gather the version number in the remote module.info file - if (preg_match ("@version = (.*)@i", $line, $out)) { - $version = $out[1]; - break; - } - } + if ($file != null) { + if ($server_location == "GH"){ + if($this_gm_repo == "30") { + $version = $gm_array[$module_name]['g3']; + } else { + $version = $gm_array[$module_name]['g31']; } - fclose ($file); + } else { + $version = $gm_core_array[$module_name]['version']; } + } return array ($version, $server); } diff --git a/3.0/modules/moduleupdates/helpers/moduleupdates_event.php b/3.0/modules/moduleupdates/helpers/moduleupdates_event.php index ebafb880..440cf409 100644 --- a/3.0/modules/moduleupdates/helpers/moduleupdates_event.php +++ b/3.0/modules/moduleupdates/helpers/moduleupdates_event.php @@ -1,6 +1,6 @@ delete("ModuleUpdates"); //create the blank ModuleUpdates cache entry with an expiration of 0 days @@ -34,7 +34,7 @@ class moduleupdates_installer { } static function upgrade($version) { - module::set_version("moduleupdates", 8); + module::set_version("moduleupdates", 10); //Remove the ModuleUpdates cache entry 'JIC' Cache::instance()->delete("ModuleUpdates"); //Empty the ModuleUpdates cache entry so our new version starts from scratch diff --git a/3.0/modules/moduleupdates/module.info b/3.0/modules/moduleupdates/module.info index 7c73c340..aebec9d3 100755 --- a/3.0/modules/moduleupdates/module.info +++ b/3.0/modules/moduleupdates/module.info @@ -1,7 +1,7 @@ name = "ModuleUpdates" description = "Compares your installed module version against the ones stored in the GitHub." -version = 8 +version = 10 author_name = "brentil" author_url = "http://gallery.menalto.com/user/153736" info_url = "http://codex.gallery2.org/Gallery3:Modules:moduleupdates" -discuss_url = "http://gallery.menalto.com/node/96574" +discuss_url = "http://gallery.menalto.com/node/96574" \ No newline at end of file diff --git a/3.0/modules/moduleupdates/views/admin_moduleupdates.html.php b/3.0/modules/moduleupdates/views/admin_moduleupdates.html.php index 18ff31ed..b5722d21 100644 --- a/3.0/modules/moduleupdates/views/admin_moduleupdates.html.php +++ b/3.0/modules/moduleupdates/views/admin_moduleupdates.html.php @@ -24,7 +24,7 @@
      -
    • +
    Core Modules @@ -45,7 +45,7 @@ - +
    Community Contributed Modules @@ -53,7 +53,6 @@
    Installed") ?>
    -
    @@ -62,7 +61,6 @@ "> "; ?> *"; } ?> "; } ?> - "; ?> *"; } ?> $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "".$module_name['contrib_version']."";} else { echo $module_name['contrib_version']; } ?> "; } ?> "; ?> *"; } ?> $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "".$module_name['gh_version']."";} else { echo $module_name['gh_version']; } ?> "; } ?> diff --git a/3.0/modules/navcarousel/controllers/navcarousel.php b/3.0/modules/navcarousel/controllers/navcarousel.php index 3b5401a7..d35c897a 100644 --- a/3.0/modules/navcarousel/controllers/navcarousel.php +++ b/3.0/modules/navcarousel/controllers/navcarousel.php @@ -1,7 +1,7 @@ get_uas_and_ips(); + + $view = new Admin_View("admin.html"); + $view->page_title = t("Session explorer"); + $view->content = new View("admin_session_explorer.html"); + $view->content->uas = $uas; + $view->content->ips = $ips; + $view->content->sample_size = $sample_size; + print $view; + } + + private function get_uas_and_ips() { + $uas = array(); + $ips = array(); + $sample_size = 0; + + $d = new Session_Database_Driver(); + foreach (db::build() + ->select("session_id") + ->from("sessions") + ->execute() as $r) { + $data = $this->unserialize_session($d->read($r->session_id)); + $ua = $data["user_agent"]; + $ip = $data["ip_address"]; + if (!isset($uas[$ua])) { + $uas[$ua] = 0; + } + if (!isset($ips[$ip])) { + $ips[$ip] = 0; + } + $uas[$ua]++; + $ips[$ip]++; + + // Limit the sample size once we've found N user agents + if (++$sample_size == 5000) { + break; + } + } + arsort($uas); + arsort($ips); + + // Top N only + array_splice($uas, 15); + array_splice($ips, 15); + + return array($uas, $ips, $sample_size); + } + + // Adapted from + // http://us3.php.net/manual/en/function.session-decode.php#101687 + // by jason at joeymail dot net + function unserialize_session($data) { + if (strlen($data) == 0) { + return array(); + } + + // match all the session keys and offsets + preg_match_all('/(^|;|\})([a-zA-Z0-9_]+)\|/i', $data, $matches_array, PREG_OFFSET_CAPTURE); + + $return_array = array(); + + $last_offset = null; + $current_key = ''; + foreach ($matches_array[2] as $value) { + $offset = $value[1]; + if(!is_null($last_offset)) { + $value_text = substr($data, $last_offset, $offset - $last_offset); + $return_array[$current_key] = unserialize($value_text); + } + $current_key = $value[0]; + $last_offset = $offset + strlen($current_key) + 1; + } + + $value_text = substr($data, $last_offset); + try { + $return_array[$current_key] = unserialize($value_text); + } catch (ErrorException $e) { + // Dunno why unserialize fails. If it fails enough, it'll show up in the aggregate + // counts and we can deal with it. + return array("user_agent" => "[unserialize fail]", "ip_address" => "[unserialize fail]"); + } + return $return_array; + } +} \ No newline at end of file diff --git a/3.1/modules/adsense/helpers/adsense_event.php b/3.0/modules/session_explorer/helpers/session_explorer_event.php similarity index 78% rename from 3.1/modules/adsense/helpers/adsense_event.php rename to 3.0/modules/session_explorer/helpers/session_explorer_event.php index d72165e1..ef305e39 100644 --- a/3.1/modules/adsense/helpers/adsense_event.php +++ b/3.0/modules/session_explorer/helpers/session_explorer_event.php @@ -1,7 +1,7 @@ get("settings_menu") + $menu->get("statistics_menu") ->append(Menu::factory("link") - ->id("adsense_menu") - ->label(t("Adsense")) - ->url(url::site("admin/adsense"))); + ->id("session_explorer") + ->label(t("Explore sessions")) + ->url(url::site("admin/session_explorer"))); } } diff --git a/3.0/modules/session_explorer/module.info b/3.0/modules/session_explorer/module.info new file mode 100644 index 00000000..4ec227af --- /dev/null +++ b/3.0/modules/session_explorer/module.info @@ -0,0 +1,7 @@ +name = "Session Explorer" +description = "Explore the sessions currently active in your Gallery" +version = 1 +author_name = "Gallery Team" +author_url = "http://codex.gallery2.org/Gallery:Team" +info_url = "http://codex.gallery2.org/Gallery3:Modules:session_explorer" +discuss_url = "http://gallery.menalto.com/forum_module_session_explorer" diff --git a/3.0/modules/session_explorer/views/admin_session_explorer.html.php b/3.0/modules/session_explorer/views/admin_session_explorer.html.php new file mode 100644 index 00000000..efaf95c6 --- /dev/null +++ b/3.0/modules/session_explorer/views/admin_session_explorer.html.php @@ -0,0 +1,47 @@ + +
    +

    +

    + $sample_size)) ?> +

    + +
    +

    + + + + + + + + + $count): ?> + "> + + + + + +
    +
    + +
    +

    + + + + + + + + + $count): ?> + "> + + + + + +
    +
    +
    diff --git a/3.0/modules/sharephoto/controllers/admin_sharephoto.php b/3.0/modules/sharephoto/controllers/admin_sharephoto.php index 89ebf438..d353a97a 100644 --- a/3.0/modules/sharephoto/controllers/admin_sharephoto.php +++ b/3.0/modules/sharephoto/controllers/admin_sharephoto.php @@ -1,7 +1,7 @@ _get_view(); + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_form(); + if ($form->validate()) { + module::set_var("social_share", "facebook_share_enabled", $form->facebook_share_settings->facebook_share_enabled->value); + module::set_var("social_share", "facebook_share_layout", $form->facebook_share_settings->facebook_share_layout->value); + module::set_var("social_share", "facebook_share_link_text", $form->facebook_share_settings->facebook_share_link_text->value); + module::set_var("social_share", "facebook_like_enabled", $form->facebook_like_settings->facebook_like_enabled->value); + module::set_var("social_share", "facebook_like_appId", $form->facebook_like_settings->facebook_like_appId->value); + module::set_var("social_share", "facebook_like_adminId", $form->facebook_like_settings->facebook_like_adminId->value); + module::set_var("social_share", "facebook_like_site_name", $form->facebook_like_settings->facebook_like_site_name->value); + module::set_var("social_share", "facebook_like_code_type", $form->facebook_like_settings->facebook_like_code_type->value); + module::set_var("social_share", "facebook_like_show_faces", $form->facebook_like_settings->facebook_like_show_faces->value, true); + module::set_var("social_share", "facebook_like_send", $form->facebook_like_settings->facebook_like_send->value, true); + module::set_var("social_share", "facebook_like_action", $form->facebook_like_settings->facebook_like_action->value); + module::set_var("social_share", "facebook_like_layout", $form->facebook_like_settings->facebook_like_layout->value); + module::set_var("social_share", "google_enabled", $form->google_settings->google_enabled->value); + module::set_var("social_share", "google_size", $form->google_settings->google_size->value); + module::set_var("social_share", "google_annotation", $form->google_settings->google_annotation->value); + module::set_var("social_share", "twitter_enabled", $form->twitter_settings->twitter_enabled->value); + module::set_var("social_share", "twitter_count_location", $form->twitter_settings->twitter_count_location->value); + module::set_var("social_share", "twitter_size", $form->twitter_settings->twitter_size->value); + message::success(t("Your settings have been saved.")); + url::redirect("admin/social_share"); + } + + print $this->_get_view($form); + } + + private function _get_view($form=null) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_social_share.html"); + $v->content->form = empty($form) ? $this->_get_form() : $form; + return $v; + } + + private function _get_form() { + $form = new Forge("admin/social_share/handler", "", "post", array("id" => "g-admin-form")); + + $group_facebook_share = $form->group("facebook_share_settings")->label(t("Facebook Share Button Settings")); + $group_facebook_share->checkbox("facebook_share_enabled")->label(t("Display the button")) + ->checked(module::get_var("social_share", "facebook_share_enabled", false) == 1); + $group_facebook_share->dropdown("facebook_share_layout") + ->label(t("The button layout to use")) + ->options(array( "button" => t("Button"), + "icon_link" => t("Icon and Link"), + "icon" => t("Icon"))) + ->selected(module::get_var("social_share", "facebook_share_layout")); + $group_facebook_share->input("facebook_share_link_text")->label(t('Enter the text to place next to the Facebook icon.')) + ->value(module::get_var("social_share", "facebook_share_link_text", "Share")); + + $group_facebook_like = $form->group("facebook_like_settings")->label(t("Facebook Like Button Settings")); + $group_facebook_like->checkbox("facebook_like_enabled")->label(t("Display the button")) + ->checked(module::get_var("social_share", "facebook_like_enabled", false) == 1); + $group_facebook_like->input("facebook_like_appId")->label(t('Enter the appId from FaceBook Create an App. You must get your *own* appID. If you see the number "123456789012345" it is only a demo.
    + Note: www.example.com/ is different than example.com/')) + ->value(module::get_var("social_share", "facebook_like_appId", "123456789012345")) + ->rules("valid_numeric"); + $group_facebook_like->input("facebook_like_adminId")->label(t('Enter yournumeric ID, which you can get as the "Admin" field in Stage 2 of FaceBook Like Button Config. If you see the number "123456789012345" it is only a demo.
    ')) + ->value(module::get_var("social_share", "facebook_like_adminId", "123456789012345")) + ->rules("valid_numeric"); + $group_facebook_like->input("facebook_like_site_name")->label(t('Enter the site name you want to show on Facebook.')) + ->value(module::get_var("social_share", "facebook_like_site_name", "Gallery")); + $group_facebook_like->dropdown("facebook_like_code_type") + ->label(t("The type of Ccde to display for the button")) + ->options(array( "html5" => t("HTML5 (allows the Send button and better dialogs)"), + "xfbml" => t("XFBML (allows the Send button and better dialogs)"), + "iframe" => t("iFrame"))) + ->selected(module::get_var("social_share", "facebook_like_code_type")); + $group_facebook_like->checkbox("facebook_like_show_faces")->label(t("Display profile photos of the Facebook friends who 'Like' below the Like button (standard layout only).")) + ->checked(module::get_var("social_share", "facebook_like_show_faces")); + $group_facebook_like->checkbox("facebook_like_send")->label(t("Include a Send button with the Like button. This only works with the XFBML version.")) + ->checked(module::get_var("social_share", "facebook_like_send")); + $group_facebook_like->dropdown("facebook_like_action") + ->label(t("Verb to display")) + ->options(array("like" => t("Like"), + "recommend" => t("Recommend"))) + ->selected(module::get_var("social_share", "facebook_like_action")); + $group_facebook_like->dropdown("facebook_like_layout") + ->label(t("Layout style. Determines the size and amount of social context next to the button")) + ->options(array("standard" => t("Standard."), + "button_count" => t("Button count"), + "box_count" => t("Box count"))) + ->selected(module::get_var("social_share", "facebook_like_layout")); + + $group_google = $form->group("google_settings")->label(t("Google+ +1 Button Settings")); + $group_google->checkbox("google_enabled")->label(t("Display the button")) + ->checked(module::get_var("social_share", "google_enabled", false) == 1); + $group_google->dropdown("google_size") + ->label(t("Size of the button")) + ->options(array("standard" => t("Standard (24px)"), + "small" => t("Small (15px)"), + "medium" => t("Medium (20px)"), + "tall" => t("Tall (60px)"))) + ->selected(module::get_var("social_share", "google_size")); + $group_google->dropdown("google_annotation") + ->label(t("Annotation location")) + ->options(array("inline" => t("Inline"), + "bubble" => t("Bubble"), + "none" => t("None"))) + ->selected(module::get_var("social_share", "google_annotation")); + + $group_twitter = $form->group("twitter_settings")->label(t("Twitter Tweet Settings")); + $group_twitter->checkbox("twitter_enabled")->label(t("Display the button")) + ->checked(module::get_var("social_share", "twitter_enabled", false) == 1); + $group_twitter->dropdown("twitter_count_location") + ->label(t("Tweet count location")) + ->options(array("horizontal" => t("Horizontal"), + "vertical" => t("Vertical"), + "none" => t("None"))) + ->selected(module::get_var("social_share", "twitter_count_location")); + $group_twitter->dropdown("twitter_size") + ->label(t("Size of the button. Large does not work with a vertical count location")) + ->options(array("medium" => t("Medium"), + "large" => t("Large"))) + ->selected(module::get_var("social_share", "twitter_size")); + + $form->submit("submit")->value(t("Save")); + return $form; + } +} \ No newline at end of file diff --git a/3.1/modules/iptc/helpers/iptc_block.php b/3.0/modules/social_share/helpers/social_share_block.php similarity index 59% rename from 3.1/modules/iptc/helpers/iptc_block.php rename to 3.0/modules/social_share/helpers/social_share_block.php index 1a6ed955..6f592da3 100644 --- a/3.1/modules/iptc/helpers/iptc_block.php +++ b/3.0/modules/social_share/helpers/social_share_block.php @@ -17,27 +17,31 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class iptc_block_Core { +class social_share_block_Core { static function get_site_list() { - return array("iptc" => t("IPTC info")); - } + return array( + "social_share" => t("Social Share")); + } static function get($block_id, $theme) { - $block = ""; - switch ($block_id) { - case "iptc": - if ($theme->item()) { - $details = iptc::get($theme->item()); - if (count($details) > 0) { - $block = new Block(); - $block->css_id = "g-metadata"; - $block->title = t("IPTC info"); - $block->content = new View("iptc_block.html"); - $block->content->details = $details; - } - } - break; - } + + $block = new Block(); + $block->css_id = "g-social-share"; + $block->title = 'Share With Friends'; + $block->content = ''; + if(module::get_var("social_share", "facebook_share_enabled")){ + $block->content .= new View("facebook_share.html"); + } + if(module::get_var("social_share", "facebook_like_enabled")){ + $block->content .= new View("facebook_like.html"); + } + if(module::get_var("social_share", "google_enabled")){ + $block->content .= new View("google.html"); + } + if(module::get_var("social_share", "twitter_enabled")){ + $block->content .= new View("twitter.html"); + } + return $block; } } \ No newline at end of file diff --git a/3.1/modules/navcarousel/helpers/navcarousel_event.php b/3.0/modules/social_share/helpers/social_share_event.php similarity index 85% rename from 3.1/modules/navcarousel/helpers/navcarousel_event.php rename to 3.0/modules/social_share/helpers/social_share_event.php index a636ea23..c7ed1580 100644 --- a/3.1/modules/navcarousel/helpers/navcarousel_event.php +++ b/3.0/modules/social_share/helpers/social_share_event.php @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class navcarousel_event_Core { +class social_share_event_Core { static function admin_menu($menu, $theme) { $menu->get("settings_menu") ->append(Menu::factory("link") - ->id("navcarousel_menu") - ->label(t("Navigation carousel")) - ->url(url::site("admin/navcarousel"))); + ->id("social_share_menu") + ->label(t("Social Share")) + ->url(url::site("admin/social_share"))); } } diff --git a/3.0/modules/social_share/helpers/social_share_installer.php b/3.0/modules/social_share/helpers/social_share_installer.php new file mode 100644 index 00000000..153589c1 --- /dev/null +++ b/3.0/modules/social_share/helpers/social_share_installer.php @@ -0,0 +1,56 @@ +script("twitter.js"); - $theme->css("twitter.css"); + if ($theme->item()) { + $item = $theme->item(); + $url = $item->thumb_url(true); + $appId = module::get_var("social_share", "facebook_like_appId"); + $adminId = module::get_var("social_share", "facebook_like_adminId"); + $site_name = module::get_var("social_share", "facebook_like_site_name"); + $selfURL = url::abs_current(true); + return "\t + title\"/> + + + + + "; + } } -} +} \ No newline at end of file diff --git a/3.0/modules/social_share/module.info b/3.0/modules/social_share/module.info new file mode 100644 index 00000000..288bdf7d --- /dev/null +++ b/3.0/modules/social_share/module.info @@ -0,0 +1,7 @@ +name = "Social Share" +description = "Adds links to share the page to social media sites in the sidebar." +version = 2 +author_name = "jasonhardin" +author_url = "http://codex.gallery2.org/User:psychoph" +info_url = "http://codex.gallery2.org/Gallery3:Modules:social_share" +discuss_url = "http://gallery.menalto.com/forum_module_social_share" \ No newline at end of file diff --git a/3.0/modules/social_share/views/admin_social_share.html.php b/3.0/modules/social_share/views/admin_social_share.html.php new file mode 100644 index 00000000..e1fd724f --- /dev/null +++ b/3.0/modules/social_share/views/admin_social_share.html.php @@ -0,0 +1,6 @@ + +
    +

    + +
    +
    diff --git a/3.0/modules/social_share/views/facebook_like.html.php b/3.0/modules/social_share/views/facebook_like.html.php new file mode 100644 index 00000000..a831607e --- /dev/null +++ b/3.0/modules/social_share/views/facebook_like.html.php @@ -0,0 +1,75 @@ + + +
    + + + + + +
    + + + + + + + + + +
    + + +
    +item()) { + $item = $theme->item(); +} else { + $item = ORM::factory("item", 1); +} +if (access::user_can($guest, "view", $item)) { + $show_like_code = true; +} +?> diff --git a/3.0/modules/social_share/views/facebook_share.html.php b/3.0/modules/social_share/views/facebook_share.html.php new file mode 100644 index 00000000..0c832b31 --- /dev/null +++ b/3.0/modules/social_share/views/facebook_share.html.php @@ -0,0 +1,5 @@ + +
    +"> + +
    \ No newline at end of file diff --git a/3.0/modules/social_share/views/google.html.php b/3.0/modules/social_share/views/google.html.php new file mode 100644 index 00000000..f928a358 --- /dev/null +++ b/3.0/modules/social_share/views/google.html.php @@ -0,0 +1,19 @@ + +
    + +
    " + annotation=""> +
    + + + +
    \ No newline at end of file diff --git a/3.0/modules/social_share/views/twitter.html.php b/3.0/modules/social_share/views/twitter.html.php new file mode 100644 index 00000000..a63ea68e --- /dev/null +++ b/3.0/modules/social_share/views/twitter.html.php @@ -0,0 +1,21 @@ + +
    + + +
    \ No newline at end of file diff --git a/3.0/modules/square_thumbs/helpers/square_thumbs_graphics.php b/3.0/modules/square_thumbs/helpers/square_thumbs_graphics.php index a8641039..fed231da 100644 --- a/3.0/modules/square_thumbs/helpers/square_thumbs_graphics.php +++ b/3.0/modules/square_thumbs/helpers/square_thumbs_graphics.php @@ -1,7 +1,7 @@ group("edit_theme")->label(t("General Settings")); $group->input("favicon") - ->label(t("URL (or relative path) to your favicon.ico")) + ->label(t("URL (relative path) to your favicon.ico")) ->value(module::get_var("gallery", "favicon_url")); $group->input("appletouchicon") - ->label(t("URL (or relative path) to your apple-touch-icon.png")) + ->label(t("URL (relative path) to apple-touch-icon.png")) ->value(module::get_var("gallery", "appletouchicon_url")); + $group->input("logo_path") + ->label(t("URL (relative path) to custom logo")) + ->value(module::get_var("gallery", "logo_path")); $group->input("slideshow_time") ->label(t("Slideshow timeout (in ms)")) ->value(module::get_var("th_pear4gallery3", "slideshow_time", "5000")); @@ -89,6 +92,9 @@ class Admin_Theme_Options_Controller extends Admin_Controller { /* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ $group = $form->group("edit_theme_adv_main")->label(t("Advanced Options - General")); + $group->checkbox("hide_item_count") + ->label(t("Hide Album Count")) + ->checked(module::get_var("th_pear4gallery3", "hide_item_count")); $group->checkbox("hide_logo") ->label(t("Hide Bottom Pear Logo")) ->checked(module::get_var("th_pear4gallery3", "hide_logo")); @@ -108,11 +114,14 @@ class Admin_Theme_Options_Controller extends Admin_Controller { ->checked(module::get_var("th_pear4gallery3", "show_breadcrumbs")); $group->dropdown("sidebar_view") ->label(t("Show Sidebar mode")) - ->options(array("hidden" => t("Hidden (Default)"), "static" => t("Always visible"), "toggle" => t("Toggleable"))) + ->options(array("hidden" => t("Hidden (Default)"), "static" => t("Always visible"), "toggle" => t("Hover"), "button" => t("Togglable via button"))) ->selected(module::get_var("th_pear4gallery3", "sidebar_view")); $group->input("ga_code") ->label(t("Google analytics code.")) ->value(module::get_var("th_pear4gallery3", "ga_code")); + $group->input("skimm_lim") + ->label(t("Limit amount of thumbs in album skimming")) + ->value(module::get_var("th_pear4gallery3", "skimm_lim", "50")); /* Advanced Options - Mosaic page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -155,6 +164,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { $group->checkbox("build_resize")->label(t("Mark all Image Resizes for Rebuild"))->checked(false); $group->checkbox("build_thumbs")->label(t("Mark all Thumbnails for Rebuild"))->checked(false); $group->checkbox("build_exif")->label(t("Mark Exif Info data for reload"))->checked(false); + $iptccheck = module::is_active("iptc") and module::info("iptc"); if ($iptccheck): $group->checkbox("build_iptc")->label(t("Mark IPTC Info data for reload"))->checked(false); endif; @@ -208,6 +218,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { } protected function legacy() { + module::clear_var("th_pear4gallery3", "hide_item_count"); module::clear_var("th_pear4gallery3", "hide_logo"); module::clear_var("th_pear4gallery3", "mainmenu_view"); module::clear_var("th_pear4gallery3", "show_guest_menu"); @@ -216,6 +227,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::clear_var("th_pear4gallery3", "show_sidebar"); module::clear_var("th_pear4gallery3", "sidebar_view"); module::clear_var("th_pear4gallery3", "ga_code"); + module::clear_var("th_pear4gallery3", "skimm_lim"); module::clear_var("th_pear4gallery3", "mosaic_effect"); } @@ -259,12 +271,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller { endif; $purge_cache = $form->maintenance->purge_cache->value; - $thumb_descmode_a = $form->edit_theme_adv_thumb->thumb_descmode_a->value; - $thumb_descmode = $form->edit_theme_adv_thumb->thumb_descmode->value; - $thumb_metamode = $form->edit_theme_adv_thumb->thumb_metamode->value; - $photo_descmode = $form->edit_theme_adv_photo->photo_descmode->value; - $photo_popupbox = $form->edit_theme_adv_photo->photo_popupbox->value; - if ($build_resize): graphics::remove_rule("gallery", "resize", "gallery_graphics::resize"); graphics::add_rule("gallery", "resize", "gallery_graphics::resize", @@ -291,12 +297,13 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::set_var("gallery", "page_size", 50); module::set_var("gallery", "favicon_url", $form->edit_theme->favicon->value); module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value); + module::set_var("gallery", "logo_path", $form->edit_theme->logo_path->value); - $this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value); $this->save_item_state("slideshow_time", $form->edit_theme->slideshow_time->value != 5000, filter_var($form->edit_theme->slideshow_time->value, FILTER_VALIDATE_INT, array('options' => array('default' => 5000, 'min_range' => 1000)))); // * Advanced Options - General ****************************************** + $this->save_item_state("hide_item_count", $form->edit_theme_adv_main->hide_item_count->value, TRUE); $this->save_item_state("hide_logo", $form->edit_theme_adv_main->hide_logo->value, TRUE); $this->save_item_state("mainmenu_view", $form->edit_theme_adv_main->mainmenu_view->value != "grid", $form->edit_theme_adv_main->mainmenu_view->value); $this->save_item_state("show_guest_menu",$form->edit_theme_adv_main->show_guest_menu->value, TRUE); @@ -304,6 +311,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { $this->save_item_state("show_breadcrumbs",$form->edit_theme_adv_main->show_breadcrumbs->value, TRUE); $this->save_item_state("sidebar_view",$form->edit_theme_adv_main->sidebar_view->value != "hidden", $form->edit_theme_adv_main->sidebar_view->value); $this->save_item_state("ga_code", $form->edit_theme_adv_main->ga_code->value, $form->edit_theme_adv_main->ga_code->value); + $this->save_item_state("skimm_lim", $form->edit_theme_adv_main->skimm_lim->value != 50, $form->edit_theme_adv_main->skimm_lim->value); // * Advanced Options - Photo page *************************************** $this->save_item_state("mosaic_effect", $form->edit_theme_adv_mosaic->mosaic_effect->value != "blind", $form->edit_theme_adv_mosaic->mosaic_effect->value); @@ -316,10 +324,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::event("theme_edit_form_completed", $form); - if ($_priorratio != $thumb_ratio): - message::warning(t("Thumb aspect ratio has been changed. Consider rebuilding thumbs if needed.")); - endif; - message::success(t("Updated theme details")); if ($build_exif): diff --git a/3.0/themes/pear4gallery3/admin/views/admin_include.html.php b/3.0/themes/pear4gallery3/admin/views/admin_include.html.php index 8d818bb7..7d02b05c 100644 --- a/3.0/themes/pear4gallery3/admin/views/admin_include.html.php +++ b/3.0/themes/pear4gallery3/admin/views/admin_include.html.php @@ -39,9 +39,9 @@ #gd-admin p.g-error { padding-left: 30px; border: none; margin-bottom: 0; background-image: none; } #g-content { padding: 0 1em; width: 97%; font-size: 1em; } -#g-content form ul li input { display: inline; float: left; margin-right: 0.8em; } -#g-content form ul li select { display: inline; float: left; margin-right: 0.8em; width: 50.6%; padding: 0 0 0 .2em; } -#g-content form ul li input[type='text'] { width: 50%; } +#g-content form ul li input { display: inline; float: left; margin-right: 0.8em; } +#g-content form ul li select { display: inline; float: left; margin-right: 0.8em; width: 35%; padding: 0 0 0 .2em; } +#g-content form ul li input[type='text'] { width: 35%; } #g-content form ul li textarea { height: 6em; } #g-content form input[type="submit"] { border: #5b86ab 2px solid; padding: 0.3em; color: #fff; background: url(/themes/greydragon/images/button-grad-vs.png) #5580a6 repeat-x left top; } #g-content form input[type="submit"]:hover, @@ -50,7 +50,7 @@ input.ui-state-hover { background-image: url(/themes/greydragon/images/button-gr - - - -
    -
    - -
    -
    - -
    -
    - -
    +
    + + +
    -
    - - album_bottom() ?> -paginator() ?> diff --git a/3.0/themes/pear4gallery3/views/dynamic.html.php b/3.0/themes/pear4gallery3/views/dynamic.html.php index a8a4d362..7f3b9c40 100644 --- a/3.0/themes/pear4gallery3/views/dynamic.html.php +++ b/3.0/themes/pear4gallery3/views/dynamic.html.php @@ -1,29 +1,6 @@ -
    -
    - dynamic_top() ?> -
    -

    -
    - -
      - $child): ?> -
    • "> - thumb_top($child) ?> - - photo - -

      title) ?>

      - thumb_bottom($child) ?> - -
    • - -
    +dynamic_top() ?> + + dynamic_bottom() ?> -paginator() ?> diff --git a/3.0/themes/pear4gallery3/views/exif_dialog.html.php b/3.0/themes/pear4gallery3/views/exif_dialog.html.php index 7c845a06..32d3fae0 100644 --- a/3.0/themes/pear4gallery3/views/exif_dialog.html.php +++ b/3.0/themes/pear4gallery3/views/exif_dialog.html.php @@ -4,7 +4,7 @@ .g-odd { background: #333; } .g-even { background: #222; } -

    +

    diff --git a/3.0/themes/pear4gallery3/views/facebook_comment.html.php b/3.0/themes/pear4gallery3/views/facebook_comment.html.php new file mode 100644 index 00000000..1558d68c --- /dev/null +++ b/3.0/themes/pear4gallery3/views/facebook_comment.html.php @@ -0,0 +1,16 @@ + +
    +
    + + +
    + + diff --git a/3.0/themes/pear4gallery3/views/hoverView.html.php b/3.0/themes/pear4gallery3/views/hoverView.html.php index b38ad8f7..eb1f59c5 100644 --- a/3.0/themes/pear4gallery3/views/hoverView.html.php +++ b/3.0/themes/pear4gallery3/views/hoverView.html.php @@ -3,21 +3,21 @@
    - -
    +
    -
    -
    -
    -
    - - -
    - -
    -
    +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    diff --git a/3.0/themes/pear4gallery3/views/page.html.php b/3.0/themes/pear4gallery3/views/page.html.php index c0170162..ef6c2719 100644 --- a/3.0/themes/pear4gallery3/views/page.html.php +++ b/3.0/themes/pear4gallery3/views/page.html.php @@ -1,14 +1,18 @@ +page_subtype == "photo"): foreach (end($parents)->viewable()->children() as $i => $child) if(!($child->is_album() || $child->is_movie())) - if($child->url() == $_SERVER['REQUEST_URI']): - $page_size = module::get_var("gallery","page_size"); ?> - - - - - + if($child->url() == $_SERVER['REQUEST_URI']) { + header("HTTP/1.1 302 Found"); + header("Location: ".end($parents)->url()."#img=$i&viewMode=detail&redirected=true"); + die(0); + }?> @@ -49,9 +53,11 @@ script("json2-min.js") ?> - script("jquery-1.6.2.min.js") ?> + script("jquery-1.7.1.min.js") ?> script("jquery.form.js") ?> - script("jquery-ui-1.8.16.custom.min.js") ?> + script("jquery-ui-1.8.17.custom.min.js") ?> + script("jquery.endless-scroll.js") ?> + script("jquery.getscrollbarwidth.js") ?> script("gallery.common.js") ?> diff --git a/3.0/themes/pear4gallery3/views/search.html.php b/3.0/themes/pear4gallery3/views/search.html.php new file mode 100644 index 00000000..3436a00c --- /dev/null +++ b/3.0/themes/pear4gallery3/views/search.html.php @@ -0,0 +1,48 @@ + + +" id="g-search-form" class="g-short-form"> +
    + + + +
      +
    • + + +
    • +
    • + for_html_attr() ?>" class="submit" /> +
    • +
    +
    + + +
    +

    + + + + paginator() ?> + + +

    + %term", array("term" => $q)) ?> +

    + + +
    diff --git a/3.0/themes/pear4gallery3/views/thumbs.html.php b/3.0/themes/pear4gallery3/views/thumbs.html.php new file mode 100644 index 00000000..716ad657 --- /dev/null +++ b/3.0/themes/pear4gallery3/views/thumbs.html.php @@ -0,0 +1,73 @@ + +paginator() ?> + + + $child): ?> + 50) break; ?> + + is_album()): ?> + url()."/'+getAlbumHash(skimimg);"; ?> + + + is_photo()): ?> + + is_movie()): ?> + url()."';"; ?> + + + + + + + admin || access::can("add", $item)): ?> + id") ?> +
  • Add some.", + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?>
  • + +
  • + + diff --git a/3.0/themes/three_nids/admin/helpers/three_nids_event.php b/3.0/themes/three_nids/admin/helpers/three_nids_event.php index abb221fc..17d20012 100644 --- a/3.0/themes/three_nids/admin/helpers/three_nids_event.php +++ b/3.0/themes/three_nids/admin/helpers/three_nids_event.php @@ -1,7 +1,7 @@ nvps = new ArrayList (); - nvps.add(new BasicNameValuePair("user", USERNAME)); - nvps.add(new BasicNameValuePair("password", USERNAME)); - post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8)); - response = httpclient.execute(post); - String api_key = gson.fromJson(new BufferedReader( - new InputStreamReader(response.getEntity().getContent())).readLine(), String.class); - System.out.println("API Key:" + api_key); - - // Get the JSON representation of the root album, which we know has id 1 - HttpGet get = new HttpGet(BASE_URL + "/rest/item/1"); - get.setHeader("X-Gallery-Request-Method", "GET"); - get.setHeader("X-Gallery-Request-Key", api_key); - response = httpclient.execute(get); - - System.out.println( - "Response: " + new BufferedReader(new InputStreamReader(response.getEntity().getContent())).readLine()); - } -} diff --git a/3.1/client/Java/README b/3.1/client/Java/README deleted file mode 100644 index 2a11795f..00000000 --- a/3.1/client/Java/README +++ /dev/null @@ -1,10 +0,0 @@ -This is very, very rough sample code for how to do some Java REST -requests. To run this code: - -1) Edit Demo.java and set the BASE_URL to your Gallery3 install. -2) Edit USERNAME and PASSWORD as appropriate -3) In a shell, do "sh build.sh" -4) In a shell, do "sh run.sh" - -Note that there is NO error checking, so if something goes wrong -you'll have to debug it. diff --git a/3.1/client/Java/build.sh b/3.1/client/Java/build.sh deleted file mode 100644 index 146932bd..00000000 --- a/3.1/client/Java/build.sh +++ /dev/null @@ -1 +0,0 @@ -javac -classpath lib/httpclient-4.0.1.jar:lib/httpcore-4.0.1.jar:lib/gson-1.4.jar Demo.java diff --git a/3.1/client/Java/lib/commons-logging-api-1.1.1.jar b/3.1/client/Java/lib/commons-logging-api-1.1.1.jar deleted file mode 100644 index bd451168..00000000 Binary files a/3.1/client/Java/lib/commons-logging-api-1.1.1.jar and /dev/null differ diff --git a/3.1/client/Java/lib/gson-1.4.jar b/3.1/client/Java/lib/gson-1.4.jar deleted file mode 100644 index b9c33d03..00000000 Binary files a/3.1/client/Java/lib/gson-1.4.jar and /dev/null differ diff --git a/3.1/client/Java/lib/httpclient-4.0.1.jar b/3.1/client/Java/lib/httpclient-4.0.1.jar deleted file mode 100644 index e9c961f1..00000000 Binary files a/3.1/client/Java/lib/httpclient-4.0.1.jar and /dev/null differ diff --git a/3.1/client/Java/lib/httpcore-4.0.1.jar b/3.1/client/Java/lib/httpcore-4.0.1.jar deleted file mode 100644 index 4638daa5..00000000 Binary files a/3.1/client/Java/lib/httpcore-4.0.1.jar and /dev/null differ diff --git a/3.1/client/Java/run.sh b/3.1/client/Java/run.sh deleted file mode 100644 index 94ccb6e6..00000000 --- a/3.1/client/Java/run.sh +++ /dev/null @@ -1 +0,0 @@ -java -classpath lib/httpclient-4.0.1.jar:lib/httpcore-4.0.1.jar:lib/commons-logging-api-1.1.1.jar:lib/gson-1.4.jar:. Demo diff --git a/3.1/client/PHP/.gitignore b/3.1/client/PHP/.gitignore deleted file mode 100644 index b4700053..00000000 --- a/3.1/client/PHP/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# local file to provide configuration for the client code. See README. -local_config.php diff --git a/3.1/client/PHP/Gallery3.php b/3.1/client/PHP/Gallery3.php deleted file mode 100644 index fb97ddf8..00000000 --- a/3.1/client/PHP/Gallery3.php +++ /dev/null @@ -1,205 +0,0 @@ - $user, "password" => $pass)); - return $response; - } - - /** - * Construct a new Gallery3 instance associated with a remote resource - * @param string remote url - * @param string authentication token - * @return object Gallery3 - */ - static function factory($url=null, $token=null) { - $obj = new Gallery3(); - $obj->token = $token; - $obj->url = $url; - if ($url && $token) { - $obj->load(); - } - return $obj; - } - - /** - * Constructor. - */ - public function __construct() { - $this->data = new stdClass(); - $this->token = null; - $this->url = null; - } - - /** - * Set a value on the remote resource's entity. You must call save for it to take effect. - * - * @param string key - * @param string value - * @return object Gallery3 - * @chainable - */ - public function set($key, $value) { - $this->data->entity->$key = $value; - return $this; - } - - /** - * Replace the members for the remote resource - * - * @param array members - * @return object Gallery3 - * @chainable - */ - public function set_members($members) { - $this->data->members = $members; - return $this; - } - - /** - * Attach a file to the remote resource. - * - * @param string path to a local file (eg: /tmp/foo.jpg) - * @return object Gallery3 - */ - public function set_file($file) { - $this->file = $file; - return $this; - } - - /** - * Save any local changes made to this resource. If this is an existing resource, we'll return - * the resource itself. If we're creating a new resource, return the newly created resource. - * - * @return object Gallery3 - */ - public function create($url, $token) { - if (!is_string($url)) { - throw new Gallery3_Exception("Invalid url: " . var_export($url)); - } - - $response = Gallery3_Helper::request( - "post", $url, $token, array("entity" => $this->data->entity), $this->file); - $this->url = $response->url; - $this->token = $token; - return $this->load(); - } - - /** - * Save any local changes made to this resource. If this is an existing resource, we'll return - * the resource itself. If we're creating a new resource, return the newly created resource. - * - * @return object Gallery3 - */ - public function save() { - $data = array(); - $data["entity"] = array_diff((array)$this->data->entity, $this->original_entity); - if (isset($this->data->members)) { - $data["members"] = $this->data->members; - } - if ($this->file) { - $response = Gallery3_Helper::request("put", $this->url, $this->token, $data, $this->file); - } else { - $response = Gallery3_Helper::request("put", $this->url, $this->token, $data); - } - return $this->load(); - } - - /** - * Delete the remote resource. - * - * @return object Gallery3 - */ - public function delete() { - Gallery3_Helper::request("delete", $this->url, $this->token); - $this->data = array(); - $this->url = null; - return $this; - } - - /** - * Reload the resource from a given url. This is useful after the remote resource has been - * modified. - * - * @return object Gallery3 - */ - public function load() { - $response = Gallery3_Helper::request("get", $this->url, $this->token); - $this->data = $response; - $this->original_entity = isset($response->entity) ? (array)$response->entity : null; - return $this; - } -} - -class Gallery3_Helper { - static function request($method, $url, $token=null, $params=array(), $file=null) { - $req = new HTTP_Request($url); - $req->setMethod($method == "get" ? HTTP_REQUEST_METHOD_GET : HTTP_REQUEST_METHOD_POST); - $req->addHeader("X-Gallery-Request-Method", $method); - if ($token) { - $req->addHeader("X-Gallery-Request-Key", $token); - } - foreach ($params as $key => $value) { - $req->addPostData($key, is_string($value) ? $value : json_encode($value)); - } - if ($file) { - $req->addFile("file", $file, mime_content_type($file)); - } - $req->sendRequest(); - - switch ($req->getResponseCode()) { - case 200: - case 201: - return json_decode($req->getResponseBody()); - - case 403: - throw new Gallery3_Forbidden_Exception($req->getResponseBody()); - - default: - throw new Gallery3_Exception($req->getResponseBody()); - } - } -} - -class Gallery3_Exception extends Exception { -} - -class Gallery3_Forbidden_Exception extends Gallery3_Exception { -} \ No newline at end of file diff --git a/3.1/client/PHP/README b/3.1/client/PHP/README deleted file mode 100644 index 4035bae1..00000000 --- a/3.1/client/PHP/README +++ /dev/null @@ -1,4 +0,0 @@ -# Create a local file called local_config.php and add the following content: -$SITE_URL = "http:///gallery3/index.php/rest"; -$USER = ""; -$PASSWORD = ""; diff --git a/3.1/client/PHP/example.php b/3.1/client/PHP/example.php deleted file mode 100644 index 5bfc49a2..00000000 --- a/3.1/client/PHP/example.php +++ /dev/null @@ -1,112 +0,0 @@ -set("name", "My Tag") - ->create($tags->url, $auth); -alert("Created tag: {$tag->url}"); - -$album = Gallery3::factory() - ->set("type", "album") - ->set("name", "Sample Album") - ->set("title", "This is my Sample Album") - ->create($root->url, $auth); -alert("Created album: {$album->url} {$album->data->entity->title}"); - - -alert("Modify the album"); -$album - ->set("title", "This is the new title") - ->save(); -alert("New title: {$album->data->entity->title}"); - -for ($i = 0; $i < 2; $i++) { - $photo = Gallery3::factory() - ->set("type", "photo") - ->set("name", "Sample Photo.png") - ->set("title", "Sample Photo") - ->set_file("test1.png") - ->create($album->url, $auth); - alert("Uploaded photo: {$photo->url}"); -} -$album->load(); -alert("Album members: " . join(", ", $album->data->members) . ""); - - -alert("Replace the data file"); -$photo->set_file("test2.png") - ->save(); - - -$comment = Gallery3::factory() - ->set("item", $album->data->members[0]) - ->set("type", "comment") - ->set("text", "This is a random comment-- whee!") - ->create($comments->url, $auth); -alert("Comment: {$comment->url}"); - -alert("Reorder the album"); -$album - ->set_members(array($album->data->members[1], $album->data->members[0])) - ->set("sort_column", "weight") - ->save(); -alert("New order: " . join(", ", $album->data->members) . ""); - -alert("Search for the photo"); -$photos = Gallery3::factory($root->url, $auth) - ->set("name", "Sample") - ->load(); -alert("Found: {$photos->data->members[0]}"); - - -alert("Grab a random photo"); -$photos = Gallery3::factory("{$root->url}?random=true", $auth) - ->load(); -alert("Found: {$photos->data->members[0]}"); - - -alert("Tag the album (using the album's relationships: {$album->data->relationships->tags->url})"); -$tag_relationship1 = Gallery3::factory() - ->set("tag", $tag->url) - ->set("item", $root->url) - ->create($album->data->relationships->tags->url, $auth); -alert("Tag: {$tag_relationship1->url}"); - - -alert("Tag the photo (using the tag's relationships: {$tag->data->relationships->items->url})"); -$tag_relationship2 = Gallery3::factory() - ->set("tag", $tag->url) - ->set("item", $photo->url) - ->create($tag->data->relationships->items->url, $auth); -alert("Tag: {$tag_relationship2->url}"); - -alert("Un-tag the photo"); -$tag_relationship2->delete(); -$tag->load(); -alert("1 remaining tag: {$tag->data->relationships->items->members[0]}"); - -alert("Delete the album and tag"); -$album->delete(); -$tag->delete(); - -alert("Done!"); - -function alert($msg) { - print "$msg
    \n"; - flush(); -} -?> \ No newline at end of file diff --git a/3.1/client/PHP/test1.png b/3.1/client/PHP/test1.png deleted file mode 100644 index ca8e0e95..00000000 Binary files a/3.1/client/PHP/test1.png and /dev/null differ diff --git a/3.1/client/PHP/test2.png b/3.1/client/PHP/test2.png deleted file mode 100644 index fdc97779..00000000 Binary files a/3.1/client/PHP/test2.png and /dev/null differ diff --git a/3.1/modules/about_this_album/helpers/about_this_album_block.php b/3.1/modules/about_this_album/helpers/about_this_album_block.php deleted file mode 100644 index aefafff5..00000000 --- a/3.1/modules/about_this_album/helpers/about_this_album_block.php +++ /dev/null @@ -1,76 +0,0 @@ - t("About This Album")); - } - - static function get($block_id, $theme) { - switch ($block_id) { - case "aboutthisalbum": - $item = $theme->item; - if ((!$item) or (!$theme->item->is_album())) { - return ""; - } - if ($theme->item->is_album()) { - $block = new Block(); - $block->css_id = "g-about-this-album"; - $block->content = new View("about_this_album.html"); - - if ($theme->item()->id == item::root()->id) { - $block->title = t("About this Site"); - $block->content->album_count = ORM::factory("item")->where("type", "=", "album")->where("id", "<>", 1)->count_all(); - $block->content->photo_count = ORM::factory("item")->where("type", "=", "photo")->count_all(); - $block->content->vcount = Database::instance()->query("SELECT SUM({items}.view_count) as c FROM {items} WHERE type=\"photo\"")->current()->c; - } Else { - $block->title = t("About this Album"); - $block->content->album_count = $item->descendants_count(array(array("type", "=", "album"))); - $block->content->photo_count = $item->descendants_count(array(array("type", "=", "photo"))); - // $block->content->vcount= $theme->item()->view_count; - $descds = $item->descendants(); - $descds_view = 0; - foreach ($descds as $descd) { - if ($descd->is_photo()) { - $descds_view += $descd->view_count; - } - } - $block->content->vcount = $descds_view; - if ($item->description) { - $block->content->description = html::clean($item->description); - } - } - - - $all_tags = ORM::factory("tag") - ->join("items_tags", "items_tags.tag_id", "tags.id") - ->join("items", "items.id", "items_tags.item_id", "LEFT") - ->where("items.parent_id", "=", $item->id) - ->order_by("tags.id", "ASC") - ->find_all(); - if (count($all_tags) > 0) { - $block->content->all_tags = $all_tags; - } - } - break; - } - return $block; - } -} diff --git a/3.1/modules/about_this_album/module.info b/3.1/modules/about_this_album/module.info deleted file mode 100644 index 19a0e6f1..00000000 --- a/3.1/modules/about_this_album/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "About this Album" -description = "Show some simple, specific and useful info about a given album" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:about_this_album" -discuss_url = "http://gallery.menalto.com/forum_module_about_this_album" diff --git a/3.1/modules/about_this_album/views/about_this_album.html.php b/3.1/modules/about_this_album/views/about_this_album.html.php deleted file mode 100644 index 01dee4f7..00000000 --- a/3.1/modules/about_this_album/views/about_this_album.html.php +++ /dev/null @@ -1,68 +0,0 @@ - - -
    - 0): ?> - - - - - - - - - - - - - -
    - - - - 0): ?> -
    - - - ""): ?> - - -
    - - - 0): ?> -
    - - - - id) { - $tag = ORM::factory("tag", $one_tag->id); - $display_tags[] = array(html::clean($tag->name), $tag->url()); - $last_tagid = $one_tag->id; - } - } - - // Sort the array. - asort($display_tags); - - // Print out the list of tags as clickable links. - $not_first = 0; - foreach ($display_tags as $one_tag) { - if ($not_first++ > 0) { - print ", "; - } - print "" . $one_tag[0] . ""; - } -?> - -
    -
    diff --git a/3.1/modules/about_this_photo/helpers/about_this_photo_block.php b/3.1/modules/about_this_photo/helpers/about_this_photo_block.php deleted file mode 100644 index 267f3904..00000000 --- a/3.1/modules/about_this_photo/helpers/about_this_photo_block.php +++ /dev/null @@ -1,71 +0,0 @@ - t("About This Photo")); - } - - static function get($block_id, $theme) { - $block = new Block(); - switch ($block_id) { - case "simple": - $item = $theme->item; - if ((!$item) or (!$item->is_photo())) { - return ""; - } - $block->css_id = "g-about-this-photo"; - $block->title = t("About this photo"); - $block->content = new View("about_this_photo.html"); - - // exif API doesn't give easy access to individual keys, so do this the hard way - if (module::is_active("exif")) { - $exif = ORM::factory("exif_record")->where("item_id", "=", $theme->item()->id)->find(); - if ($exif->loaded()) { - $exif = unserialize($exif->data); - $timestamp = strtotime($exif["DateTime"]); - //$block->content->date = gallery::date($timestamp); - $block->content->date = date('D j M Y', $timestamp); - $block->content->time = gallery::time($timestamp); - } - } - - $block->content->vcount = $theme->item()->view_count; - - // IPTC - copied more or less from iptc.php - if (module::is_active("iptc")) { - $record = ORM::factory("iptc_record")->where("item_id", "=", $theme->item()->id)->find(); - if ($record->loaded()) { - $record = unserialize($record->data); - $block->content->name = $record["ObjectName"]; - $block->content->caption = $record["Caption"]; - - } - } - - if (module::is_active("tag")) { - $block->content->tags = tag::item_tags($theme->item()); - } - break; - } - return $block; - } -} - diff --git a/3.1/modules/about_this_photo/module.info b/3.1/modules/about_this_photo/module.info deleted file mode 100644 index 876b111b..00000000 --- a/3.1/modules/about_this_photo/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "About this Photo" -description = "Show some simple, specific and useful info about a given photo" -version = 3 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:about_this_photo" -discuss_url = "http://gallery.menalto.com/forum_module_about_this_photo" diff --git a/3.1/modules/about_this_photo/views/about_this_photo.html.php b/3.1/modules/about_this_photo/views/about_this_photo.html.php deleted file mode 100644 index f0ef130a..00000000 --- a/3.1/modules/about_this_photo/views/about_this_photo.html.php +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/3.1/modules/adsense/controllers/admin_adsense.php b/3.1/modules/adsense/controllers/admin_adsense.php deleted file mode 100644 index 05f0c6ad..00000000 --- a/3.1/modules/adsense/controllers/admin_adsense.php +++ /dev/null @@ -1,57 +0,0 @@ -page_title = t("Adsense settings"); - $view->content = new View("admin_adsense.html"); - $view->content->form = $this->_get_admin_form(); - print $view; - } - - public function save() { - access::verify_csrf(); - $form = $this->_get_admin_form(); - if ($form->validate()) { - module::set_var("adsense", "code", $form->adsense->code->value); - module::set_var("adsense", "location", $form->adsense->location->value); - message::success(t("Adsense settings updated")); - url::redirect("admin/adsense"); - } else { - print $form; - } - } - - private function _get_admin_form() { - $form = new Forge("admin/adsense/save", "", "post", array("id" => "g-adsense-admin-form")); - $adsense_settings = $form->group("adsense")->label(t("Adsense settings")); - $adsense_settings->textarea("code")->label(t("Adsense code")) - ->value(module::get_var("adsense", "code")); - $adsense_settings->dropdown("location") - ->label(t("Where should the ads be displayed?")) - ->options(array("header" => t("In the header"), - "sidebar" => t("In the sidebar"), - "footer" => t("In the footer"))) - ->selected(module::get_var("adsense", "location")); - $adsense_settings->submit("save")->value(t("Save")); - return $form; - } -} - diff --git a/3.1/modules/adsense/helpers/adsense_block.php b/3.1/modules/adsense/helpers/adsense_block.php deleted file mode 100644 index 7c00cb45..00000000 --- a/3.1/modules/adsense/helpers/adsense_block.php +++ /dev/null @@ -1,39 +0,0 @@ - t("Adsense")); - } - - static function get($block_id, $theme) { - $block = ""; - switch ($block_id) { - case "adsense": - if (module::get_var("adsense", "location") == "sidebar") { - $block = new Block(); - $block->css_id = "g-adsense"; - $block->title = t("Adsense"); - $block->content = new View("adsense_block.html"); - } - break; - } - return $block; - } -} \ No newline at end of file diff --git a/3.1/modules/adsense/helpers/adsense_theme.php b/3.1/modules/adsense/helpers/adsense_theme.php deleted file mode 100644 index 4b7a6d0f..00000000 --- a/3.1/modules/adsense/helpers/adsense_theme.php +++ /dev/null @@ -1,54 +0,0 @@ -' . $code . ' - '; - - return $google_code; - } - } - - static function footer($theme) { - if(module::get_var("adsense","location") == "footer") { - $code = module::get_var("adsense", "code"); - if (!$code) { - return; - } - $google_code = ' - - '; - - return $google_code; - } - } -} diff --git a/3.1/modules/adsense/module.info b/3.1/modules/adsense/module.info deleted file mode 100644 index 066e0ade..00000000 --- a/3.1/modules/adsense/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Adsense" -description = "Display Google Adsense ads" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:adsense" -discuss_url = "http://gallery.menalto.com/forum_module_adsense" diff --git a/3.1/modules/adsense/views/admin_adsense.html.php b/3.1/modules/adsense/views/admin_adsense.html.php deleted file mode 100644 index f994fae5..00000000 --- a/3.1/modules/adsense/views/admin_adsense.html.php +++ /dev/null @@ -1,7 +0,0 @@ - -
    -

    -
    - -
    -
    diff --git a/3.1/modules/adsense/views/adsense_block.html.php b/3.1/modules/adsense/views/adsense_block.html.php deleted file mode 100644 index 53f8b20a..00000000 --- a/3.1/modules/adsense/views/adsense_block.html.php +++ /dev/null @@ -1,17 +0,0 @@ -' . $code . ' - '; - - echo $google_code; -} -?> - diff --git a/3.1/modules/albumpassword/controllers/admin_albumpassword.php b/3.1/modules/albumpassword/controllers/admin_albumpassword.php deleted file mode 100644 index d146a194..00000000 --- a/3.1/modules/albumpassword/controllers/admin_albumpassword.php +++ /dev/null @@ -1,69 +0,0 @@ -content = new View("admin_albumpassword.html"); - - // Generate a form for controlling the admin section. - $view->content->albumpassword_form = $this->_get_admin_form(); - - // Display the page. - print $view; - } - - private function _get_admin_form() { - // Make a new form for changing admin settings for this module. - $form = new Forge("admin/albumpassword/saveprefs", "", "post", - array("id" => "g-album-password-admin-form")); - - // Should protected items be hidden, or completely in-accessable? - $albumpassword_group = $form->group("album_password_group"); - $albumpassword_group->checkbox("hideonly") - ->label(t("Do not require passwords")) - ->checked(module::get_var("albumpassword", "hideonly")); - - // Add a save button to the form. - $albumpassword_group->submit("save_settings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } - - public function saveprefs() { - // Save user specified preferences. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Retrieve submitted form data. - if (Input::instance()->post("hideonly") == false) { - module::set_var("albumpassword", "hideonly", false); - } else { - module::set_var("albumpassword", "hideonly", true); - } - // Display a success message and redirect back to the TagsMap admin page. - message::success(t("Your settings have been saved.")); - url::redirect("admin/albumpassword"); - } -} diff --git a/3.1/modules/albumpassword/controllers/albumpassword.php b/3.1/modules/albumpassword/controllers/albumpassword.php deleted file mode 100644 index bf79698d..00000000 --- a/3.1/modules/albumpassword/controllers/albumpassword.php +++ /dev/null @@ -1,181 +0,0 @@ -form = $this->_get_password_form($id); - print $view; - } - - public function login() { - // Display prompt to allow visitors to use their passwords. - - // Create the page. - $view = new View("loginpassword.html"); - $view->form = $this->_get_login_form(); - print $view; - } - - public function remove($id) { - // Remove a password from an album - - // Make sure user has view/edit privileges for this item - $item = ORM::factory("item", $id); - access::required("view", $item); - access::required("edit", $item); - - // Check for and delete the password and any cached ids assigned to it. - $existing_password = ORM::factory("items_albumpassword")->where("album_id", "=", $id)->find_all(); - if (count($existing_password) > 0) { - foreach ($existing_password as $one_password) { - db::build()->delete("albumpassword_idcaches")->where("password_id", "=", $one_password->id)->execute(); - } - db::build()->delete("items_albumpasswords")->where("album_id", "=", $id)->execute(); - message::success(t("Password Removed.")); - } - - // Redirect the user back to the album. - url::redirect(url::abs_site("albums/" . $id)); - } - - public function savepassword() { - // Save a newly assigned password. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Convert submitted data to local variables. - $album_id = Input::instance()->post("item_id"); - $album_password = strtolower(Input::instance()->post("assignpassword_password")); - - // Check for, and remove, any existing passwords and cached ids. - $existing_password = ORM::factory("items_albumpassword")->where("album_id", "=", $album_id)->find_all(); - if (count($existing_password) > 0) { - foreach ($existing_password as $one_password) { - db::build()->delete("albumpassword_idcaches")->where("password_id", "=", $one_password->id)->execute(); - } - db::build()->delete("items_albumpasswords")->where("album_id", "=", $album_id)->execute(); - } - - // Save the new password. - $new_password = ORM::factory("items_albumpassword"); - $new_password->album_id = $album_id; - $new_password->password = $album_password; - $new_password->save(); - - // Add the album to the id cache. - $cached_album = ORM::factory("albumpassword_idcache"); - $cached_album->password_id = $new_password->id; - $cached_album->item_id = $album_id; - $cached_album->save(); - - // Check for any sub-items within the album, add all of them to the id cache. - $items = ORM::factory("item", $album_id) - ->viewable() - ->descendants(); - if (count($items) > 0) { - foreach ($items as $one_item) { - $cached_item = ORM::factory("albumpassword_idcache"); - $cached_item->password_id = $new_password->id; - $cached_item->item_id = $one_item->id; - $cached_item->save(); - } - } - - // Display a success message and close the dialog. - message::success(t("Password saved.")); - json::reply(array("result" => "success")); - } - - public function logout() { - // Delete a stored password cookie. - cookie::delete("g3_albumpassword"); - cookie::delete("g3_albumpassword_id"); - url::redirect(url::abs_site("albums/1")); - } - - public function checkpassword() { - // Check that a password is valid, then store in a browser cookie. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Convert submitted data to local variables. - $album_password = strtolower(Input::instance()->post("albumpassword_password")); - - // See if the submitted password matches any in the database. - $existing_password = ORM::factory("items_albumpassword") - ->where("password", "=", $album_password) - ->find_all(); - - if (count($existing_password) > 0) { - // If the password if valid, then store it, and display a success message. - // If not, close the dialog and display a rejected message. - cookie::delete("g3_albumpassword_id"); - cookie::set("g3_albumpassword", $album_password); - message::success(t("Password Accepted.")); - json::reply(array("result" => "success")); - } else { - message::error(t("Password Rejected.")); - json::reply(array("result" => "success")); - } - } - - private function _get_password_form($id) { - // Generate a form for assigning a new password. - $form = new Forge("albumpassword/savepassword", "", "post", - array("id" => "g-assign-password-form")); - $assignpassword_group = $form->group("Enter Password") - ->label(t("Enter Password:")); - $assignpassword_group->hidden("item_id")->value($id); - $assignpassword_group->input("assignpassword_password") - ->id('assignpassword_password') - ->label(t("Password:")); - $assignpassword_group->submit("save_password")->value(t("Save")); - - // Return the newly generated form. - return $form; - } - - private function _get_login_form($id) { - // Generate a form for allowing visitors to enter in their passwords. - $form = new Forge("albumpassword/checkpassword", "", "post", - array("id" => "g-login-password-form")); - - $assignpassword_group = $form->group("Enter Password") - ->label(t("Enter Password:")); - $assignpassword_group->password("albumpassword_password") - ->id('albumpassword_password') - ->label(t("Password:")); - - $assignpassword_group->submit("")->value(t("Login")); - - // Return the newly generated form. - return $form; - } -} diff --git a/3.1/modules/albumpassword/helpers/MY_access.php b/3.1/modules/albumpassword/helpers/MY_access.php deleted file mode 100644 index bda1db32..00000000 --- a/3.1/modules/albumpassword/helpers/MY_access.php +++ /dev/null @@ -1,49 +0,0 @@ -where("item_id", "=", $item->id)->order_by("cache_id")->find_all(); - if (count($item_protected) > 0) { - $existing_password = ORM::factory("items_albumpassword")->where("id", "=", $item_protected[0]->password_id)->find(); - if ($existing_password->loaded()) { - if ((cookie::get("g3_albumpassword") != $existing_password->password) && - (identity::active_user()->id != $item->owner_id) && - (!identity::active_user()->admin)) { - throw new Kohana_404_Exception(); - } - } - } - } - } -} diff --git a/3.1/modules/albumpassword/helpers/MY_item.php b/3.1/modules/albumpassword/helpers/MY_item.php deleted file mode 100644 index 07f81906..00000000 --- a/3.1/modules/albumpassword/helpers/MY_item.php +++ /dev/null @@ -1,71 +0,0 @@ -admin) { - - // Display items that are not in idcaches. - $model->and_open()->join("albumpassword_idcaches", "items.id", "albumpassword_idcaches.item_id", "LEFT OUTER") - ->and_where("albumpassword_idcaches.item_id", "IS", NULL); - - // If in hide only mode, check and see if the current item is protected. - // If it is, log the user in with the password to view it. - if (module::get_var("albumpassword", "hideonly") == true) { - $existing_cacheditem = ORM::factory("albumpassword_idcache")->where("item_id", "=", $model->id)->order_by("cache_id")->find_all(); - if (count($existing_cacheditem) > 0) { - $existing_cacheditem_password = ORM::factory("items_albumpassword")->where("id", "=", $existing_cacheditem[0]->password_id)->find_all(); - if (cookie::get("g3_albumpassword") != $existing_cacheditem_password[0]->password) { - cookie::set("g3_albumpassword", $existing_cacheditem_password[0]->password); - cookie::set("g3_albumpassword_id", $existing_cacheditem_password[0]->id); - $model->or_where("albumpassword_idcaches.password_id", "=", $existing_cacheditem_password[0]->id); - } - } - } - - // ... Unless their password id corresponds with a valid password. - $existing_password = ORM::factory("items_albumpassword")->where("password", "=", cookie::get("g3_albumpassword"))->find_all(); - if (count($existing_password) > 0) { - foreach ($existing_password as $one_password) { - if (cookie::get("g3_albumpassword_id") != "") { - if (cookie::get("g3_albumpassword_id") == $one_password->id) { - $model->or_where("albumpassword_idcaches.password_id", "=", $one_password->id); - } - } else { - $model->or_where("albumpassword_idcaches.password_id", "=", $one_password->id); - } - } - } - - // Or the current user is the owner of the item. - $model->or_where("items.owner_id", "=", identity::active_user()->id)->close(); - } - - return $model; - } -} diff --git a/3.1/modules/albumpassword/helpers/albumpassword_event.php b/3.1/modules/albumpassword/helpers/albumpassword_event.php deleted file mode 100644 index b6b93e81..00000000 --- a/3.1/modules/albumpassword/helpers/albumpassword_event.php +++ /dev/null @@ -1,158 +0,0 @@ -item()) { - return; - } - $item = $theme->item(); - - // If there isn't currently a password stored in the cookie, - // then display the enter password link. - if (cookie::get("g3_albumpassword") == "") { - $menu->append(Menu::factory("dialog") - ->id("albumpassword_login") - ->css_id("g-album-password-login") - ->url(url::site("albumpassword/login")) - ->label(t("Unlock albums"))); - } else { - // If a password has been entered already - // display the log out link, and links to the protected albums - $menu->append(Menu::factory("submenu") - ->id("albumpassword_protected") - ->css_id("g-album-password-protected") - ->label(t("Protected albums"))); - $menu->get("albumpassword_protected") - ->append(Menu::factory("link") - ->id("albumpassword_logout") - ->css_id("g-album-password-logout") - ->url(url::site("albumpassword/logout")) - ->label(t("Clear password"))); - $existing_password = ""; - if (cookie::get("g3_albumpassword_id") != "") { - $existing_password = ORM::factory("items_albumpassword") - ->where("password", "=", cookie::get("g3_albumpassword")) - ->where("id", "=", cookie::get("g3_albumpassword_id")) - ->find_all(); - } else { - $existing_password = ORM::factory("items_albumpassword") - ->where("password", "=", cookie::get("g3_albumpassword")) - ->find_all(); - } - if (count($existing_password) > 0) { - $counter = 0; - while ($counter < count($existing_password)) { - $item_album = ORM::factory("item")->where("id", "=", $existing_password[$counter]->album_id)->find(); - $menu->get("albumpassword_protected") - ->append(Menu::factory("link") - ->id("albumpassword_album" . $counter) - ->label(html::purify($item_album->title)) - ->css_id("g-album-password-album" . $counter) - ->url(url::abs_site("{$item_album->type}s/{$item_album->id}"))); - $counter++; - } - } - } - - // If this is an album without a password, display a link for assigning one. - // If this is an album with a password, display a link to remove it. - if ($item->is_album()) { - if ((access::can("view", $item)) && (access::can("edit", $item))) { - $existing_password = ORM::factory("items_albumpassword") - ->where("album_id", "=", $item->id) - ->find_all(); - if (count($existing_password) > 0) { - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("albumpassword_remove") - ->label(t("Remove password")) - ->css_id("g-album-password-remove") - ->url(url::site("albumpassword/remove/" . $item->id))); - } elseif ($item->id != 1) { - $passworded_subitems = ORM::factory("item", $item->id) - ->and_open()->join("albumpassword_idcaches", "items.id", "albumpassword_idcaches.item_id", "LEFT OUTER") - ->where("albumpassword_idcaches.item_id", "IS NOT", NULL)->close() - ->descendants(); - - $existing_cacheditem = ORM::factory("albumpassword_idcache")->where("item_id", "=", $item->id)->order_by("cache_id")->find_all(); - if ((count($existing_cacheditem) == 0) && count($passworded_subitems) == 0) { - $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("albumpassword_assign") - ->label(t("Assign password")) - ->css_id("g-album-password-assign") - ->url(url::site("albumpassword/assign/" . $item->id))); - } - } - } - } - } - - static function item_deleted($item) { - // Check for and delete the password and any cached ids assigned to it. - $existing_password = ORM::factory("items_albumpassword")->where("album_id", "=", $item->id)->find_all(); - if (count($existing_password) > 0) { - foreach ($existing_password as $one_password) { - db::build()->delete("albumpassword_idcaches")->where("password_id", "=", $one_password->id)->execute(); - } - db::build()->delete("items_albumpasswords")->where("album_id", "=", $item->id)->execute(); - message::success(t("Password Removed.")); - } else { - db::build()->delete("albumpassword_idcaches")->where("item_id", "=", $item->id)->execute(); - } - } - - static function item_created($item) { - // Check for any already existing password on parent album(s), if found, generate cache data for the new item. - $existing_password = ORM::factory("albumpassword_idcache")->where("item_id", "=", $item->parent_id)->order_by("cache_id")->find_all(); - if (count($existing_password) > 0) { - $new_cachedid = ORM::factory("albumpassword_idcache"); - $new_cachedid->password_id = $existing_password[0]->password_id; - $new_cachedid->item_id = $item->id; - $new_cachedid->save(); - } - } - - static function item_moved($item, $old_parent) { - // Delete any existing cache data. - db::build()->delete("albumpassword_idcaches")->where("item_id", "=", $item->id)->execute(); - - // Check for a password on the new parent, generate cache data if necessary. - $existing_password = ORM::factory("albumpassword_idcache")->where("item_id", "=", $item->parent_id)->order_by("cache_id")->find_all(); - if (count($existing_password) > 0) { - $new_cachedid = ORM::factory("albumpassword_idcache"); - $new_cachedid->password_id = $existing_password[0]->password_id; - $new_cachedid->item_id = $item->id; - $new_cachedid->save(); - } - } - - static function admin_menu($menu, $theme) { - // Add a link to the Album Password admin page to the Content menu. - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("albumpassword") - ->label(t("Album Password Settings")) - ->url(url::site("admin/albumpassword"))); - } -} diff --git a/3.1/modules/albumpassword/helpers/albumpassword_installer.php b/3.1/modules/albumpassword/helpers/albumpassword_installer.php deleted file mode 100644 index 93a6d0c0..00000000 --- a/3.1/modules/albumpassword/helpers/albumpassword_installer.php +++ /dev/null @@ -1,72 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {items_albumpasswords} ( - `id` int(9) NOT NULL auto_increment, - `album_id` int(9) NOT NULL, - `password` varchar(64) NOT NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); - - // Create a table to store a list of all protected items in. - $db->query("CREATE TABLE IF NOT EXISTS {albumpassword_idcaches} ( - `cache_id` int(9) NOT NULL auto_increment, - `password_id` int(9) NOT NULL, - `item_id` int(9) NOT NULL, - PRIMARY KEY (`cache_id`)) - DEFAULT CHARSET=utf8;"); - - // Set the default value for this module's behavior. - module::set_var("albumpassword", "hideonly", true); - - // Set the module's version number. - module::set_version("albumpassword", 3); - } - - static function upgrade($version) { - $db = Database::instance(); - if ($version == 1) { - // Set the default value for this module's behavior. - module::set_var("albumpassword", "hideonly", true); - module::set_version("albumpassword", $version = 2); - } - if ($version == 2) { - // Create a table to store a list of all protected items in. - $db->query("CREATE TABLE IF NOT EXISTS {albumpassword_idcaches} ( - `cache_id` int(9) NOT NULL auto_increment, - `password_id` int(9) NOT NULL, - `item_id` int(9) NOT NULL, - PRIMARY KEY (`cache_id`)) - DEFAULT CHARSET=utf8;"); - module::set_version("albumpassword", $version = 3); - } - } - - static function uninstall() { - // Delete the password table before uninstalling. - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {items_albumpasswords};"); - $db->query("DROP TABLE IF EXISTS {albumpassword_idcaches};"); - module::delete("albumpassword"); - } -} diff --git a/3.1/modules/albumpassword/helpers/albumpassword_task.php b/3.1/modules/albumpassword/helpers/albumpassword_task.php deleted file mode 100644 index 07f620e1..00000000 --- a/3.1/modules/albumpassword/helpers/albumpassword_task.php +++ /dev/null @@ -1,197 +0,0 @@ -join("albumpassword_idcaches", "items_albumpasswords.id", "albumpassword_idcaches.password_id", "LEFT OUTER") - ->and_where("albumpassword_idcaches.password_id", "IS", NULL)->count_all(); - - $tasks = array(); - - $tasks[] = Task_Definition::factory() - ->callback("albumpassword_task::update_idcaches") - ->name(t("Rebuild Album Password ID Caches DB")) - ->description(t("Logs the contents of all protected albums into the db.")) - ->severity($bad_albums ? log::WARNING : log::SUCCESS); - - $tasks[] = Task_Definition::factory() - ->callback("albumpassword_task::lowercase_passwords") - ->name(t("Fix Password DB Casing")) - ->description(t("Fixes case sensitivity issues.")) - ->severity(log::SUCCESS); - - return $tasks; - } - - static function lowercase_passwords($task) { - // Converts all passwords to lower case. - - $start = microtime(true); - $total = $task->get("total"); - $existing_passwords = ORM::factory("items_albumpassword")->find_all(); - - if (empty($total)) { - // Set the initial values for all variables. - $task->set("total", count($existing_passwords)); - $total = $task->get("total"); - $task->set("last_password_id", 0); - $task->set("completed_passwords", 0); - } - - // Retrieve the values for variables from the last time this - // function was run. - $last_password_id = $task->get("last_password_id"); - $completed_passwords = $task->get("completed_passwords"); - - foreach (ORM::factory("items_albumpassword") - ->where("id", ">", $last_password_id) - ->order_by("id") - ->find_all(100) as $one_password) { - $one_password->password = strtolower($one_password->password); - $one_password->save(); - - $last_password_id = $one_password->id; - $completed_passwords++; - - if ($completed_passwords == count($existing_passwords) || microtime(true) - $start > 1.5) { - break; - } - } - - $task->set("last_password_id", $last_password_id); - $task->set("completed_passwords", $completed_passwords); - - if ($completed_passwords == count($existing_passwords)) { - $task->done = true; - $task->state = "success"; - $task->percent_complete = 100; - } else { - $task->percent_complete = round(100 * $completed_passwords / count($existing_passwords)); - } - $task->status = t2("One password fixed", "%count / %total passwords fixed", $completed_passwords, - array("total" => count($existing_passwords))); - } - - static function update_idcaches($task) { - // Populate the idcaches table with the contents of all protected albums. - - $start = microtime(true); - $total = $task->get("total"); - $existing_passwords = ORM::factory("items_albumpassword")->find_all(); - // If this is the first time this function has been run, - // delete and re-create the idcaches table, and set up - // some initial variables. - if (empty($total)) { - // Delete the idcache table and make a new one. - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {albumpassword_idcaches};"); - $db->query("CREATE TABLE IF NOT EXISTS {albumpassword_idcaches} ( - `cache_id` int(9) NOT NULL auto_increment, - `password_id` int(9) NOT NULL, - `item_id` int(9) NOT NULL, - PRIMARY KEY (`cache_id`)) - DEFAULT CHARSET=utf8;"); - - // Set the initial values for all variables. - $task->set("total", count($existing_passwords)); - $total = $task->get("total"); - $task->set("last_album_counter", 0); - $task->set("last_id", 0); - $task->set("completed_albums", 0); - $task->set("completed_items", 0); - $task->set("total_items", 0); - } - - // Retrieve the values for variables from the last time this - // function was run. - $last_album_counter = $task->get("last_album_counter"); - $completed_albums = $task->get("completed_albums"); - $completed_items = $task->get("completed_items"); - $total_items = $task->get("total_items"); - $last_id = $task->get("last_id"); - - // If completed_items is 0, then we're just starting to process this - // album. Add the album to idcaches before adding it's contents. - if ($completed_items == 0) { - // Add the album to the id cache. - $cached_album = ORM::factory("albumpassword_idcache"); - $cached_album->password_id = $existing_passwords[$last_album_counter]->id; - $cached_album->item_id = $existing_passwords[$last_album_counter]->album_id; - $cached_album->save(); - - // Set total_items to the number of items in this album. - $total_items = ORM::factory("item", $existing_passwords[$last_album_counter]->album_id) - ->descendants_count(); - $task->set("total_items", $total_items); - } - - // Add each item in the album to idcaches. - foreach (ORM::factory("item", $existing_passwords[$last_album_counter]->album_id) - ->where("id", ">", $last_id) - ->order_by("id") - ->descendants(100) as $item) { - - $cached_item = ORM::factory("albumpassword_idcache"); - $cached_item->password_id =$existing_passwords[$last_album_counter]->id; - $cached_item->item_id = $item->id; - $cached_item->save(); - - $last_id = $item->id; - $completed_items++; - - // Set a time limit so the script doesn't time out. - if (microtime(true) - $start > 1.5) { - break; - } - } // end foreach - - // If completed_items equals total_items, then we've - // processed everything in the current album. - // Increase variables and set everything up for the - // next album. - if ($completed_items == $total_items) { - $completed_items = 0; - $last_album_counter++; - $completed_albums++; - $last_id = 0; - } - - // Store the current values of the variables for the next - // time this function is called. - $task->set("last_album_counter", $last_album_counter); - $task->set("last_id", $last_id); - $task->set("completed_albums", $completed_albums); - $task->set("completed_items", $completed_items); - - // Display the number of albums that have been completed before exiting. - if ($total == $completed_albums) { - $task->done = true; - $task->state = "success"; - $task->percent_complete = 100; - $task->status = t("Scanning Protected Album $completed_albums of $total"); - } else { - $task->percent_complete = round(100 * $completed / $total); - $task->status = t("Scanning Protected Album $completed_albums of $total -- $completed_items / $total_items files"); - } - } -} diff --git a/3.1/modules/albumpassword/models/albumpassword_idcache.php b/3.1/modules/albumpassword/models/albumpassword_idcache.php deleted file mode 100644 index e3d80667..00000000 --- a/3.1/modules/albumpassword/models/albumpassword_idcache.php +++ /dev/null @@ -1,21 +0,0 @@ - -

    - -

    -
    -
    - -

    -
    diff --git a/3.1/modules/albumpassword/views/assignpassword.html.php b/3.1/modules/albumpassword/views/assignpassword.html.php deleted file mode 100644 index c1a60b8d..00000000 --- a/3.1/modules/albumpassword/views/assignpassword.html.php +++ /dev/null @@ -1,7 +0,0 @@ -
    -
      -
    • - -
    • -
    -
    diff --git a/3.1/modules/albumpassword/views/loginpassword.html.php b/3.1/modules/albumpassword/views/loginpassword.html.php deleted file mode 100644 index 750ffbed..00000000 --- a/3.1/modules/albumpassword/views/loginpassword.html.php +++ /dev/null @@ -1,7 +0,0 @@ -
    -
      -
    • - -
    • -
    -
    diff --git a/3.1/modules/albumtree/helpers/albumtree_block.php b/3.1/modules/albumtree/helpers/albumtree_block.php deleted file mode 100644 index f812ab17..00000000 --- a/3.1/modules/albumtree/helpers/albumtree_block.php +++ /dev/null @@ -1,38 +0,0 @@ - t("Album tree")); - } - - static function get($block_id) { - $block = new Block(); - switch ($block_id) { - case "albumtree": - $style = module::get_var("albumtree", "style", "select"); - $block->css_id = "g-albumtree"; - $block->title = t("Album Tree"); - $block->content = new View("albumtree_block_{$style}.html"); - $block->content->root = item::root(); - break; - } - return $block; - } -} \ No newline at end of file diff --git a/3.1/modules/albumtree/helpers/albumtree_installer.php b/3.1/modules/albumtree/helpers/albumtree_installer.php deleted file mode 100644 index 77c7066f..00000000 --- a/3.1/modules/albumtree/helpers/albumtree_installer.php +++ /dev/null @@ -1,33 +0,0 @@ - - diff --git a/3.1/modules/albumtree/views/albumtree_block_dtree.html.php b/3.1/modules/albumtree/views/albumtree_block_dtree.html.php deleted file mode 100644 index 257181f1..00000000 --- a/3.1/modules/albumtree/views/albumtree_block_dtree.html.php +++ /dev/null @@ -1,414 +0,0 @@ - - - - -
    -
    - -
    -
    diff --git a/3.1/modules/albumtree/views/albumtree_block_list.html.php b/3.1/modules/albumtree/views/albumtree_block_list.html.php deleted file mode 100644 index 62d8c0ad..00000000 --- a/3.1/modules/albumtree/views/albumtree_block_list.html.php +++ /dev/null @@ -1,30 +0,0 @@ - - - -
      - -
    • - title ?> -
    • -viewable()->children(null, null, array(array("type", "=", "album"))) as $child){ - makelist($child,$level+1); - } -} -makelist($root,0); -?> -
    - - diff --git a/3.1/modules/albumtree/views/albumtree_block_select.html.php b/3.1/modules/albumtree/views/albumtree_block_select.html.php deleted file mode 100644 index c4633d27..00000000 --- a/3.1/modules/albumtree/views/albumtree_block_select.html.php +++ /dev/null @@ -1,16 +0,0 @@ - - diff --git a/3.1/modules/atom/helpers/atom.php b/3.1/modules/atom/helpers/atom.php deleted file mode 100644 index e2f2d9ce..00000000 --- a/3.1/modules/atom/helpers/atom.php +++ /dev/null @@ -1,36 +0,0 @@ -element->appendChild($this->dom->createElement("name", $name)); - return $this; - } - - public function email($email) { - $this->element->appendChild($this->dom->createElement("email", $email)); - return $this; - } - - public function uri($uri) { - $this->element->appendChild($this->dom->createElement("uri", $uri)); - return $this; - } -} diff --git a/3.1/modules/atom/libraries/Atom_Base.php b/3.1/modules/atom/libraries/Atom_Base.php deleted file mode 100644 index 0cb33b0b..00000000 --- a/3.1/modules/atom/libraries/Atom_Base.php +++ /dev/null @@ -1,76 +0,0 @@ -dom = $dom; - $this->element = $dom->createElement($element_name); - } else { - $this->dom = new DOMDocument('1.0', 'utf-8'); - $this->element = $this->dom->createElementNS("http://www.w3.org/2005/Atom", $element_name); - } - $this->dom->appendChild($this->element); - $this->element_name = $element_name; - return $this; - } - - public function get_element() { - $this->add_children_to_base_element(); - return $this->element; - } - - public function as_xml() { - $this->add_children_to_base_element(); - $this->dom->formatOutput = true; - return $this->dom->saveXML(); - } - - public function as_json() { - $this->add_children_to_base_element(); - /* Both Google and Yahoo generate their JSON from XML. We could do that, too. */ - return null; - } - - public function load_xml($xml) { - /* Load XML into our DOM. We can also validate against the RELAX NG schema from the Atom RFC. */ - } - - protected function add_child($element_type, $element_name) { - // @todo check if element_type is of Atom_Base; this can also be done with no magic - $element = new $element_type($element_name, $this->dom); - $this->children[$element_name][] = $element; - return end($this->children[$element_name]); - } - - protected function add_children_to_base_element() { - foreach ($this->children as $element_type => $elements) { - $base_element = $this->element; - foreach ($elements as $id => $element) { - $base_element->appendChild($element->get_element()); - } - } - } -} \ No newline at end of file diff --git a/3.1/modules/atom/libraries/Atom_Entry.php b/3.1/modules/atom/libraries/Atom_Entry.php deleted file mode 100644 index ceb5738e..00000000 --- a/3.1/modules/atom/libraries/Atom_Entry.php +++ /dev/null @@ -1,52 +0,0 @@ -element->appendChild($this->dom->createElement("id", $id)); - return $this; - } - - public function updated($timestamp) { - $this->element->appendChild( - $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp))); - return $this; - } - - public function title($title) { - $this->element->appendChild($this->dom->createElement("title", $title)); - return $this; - } - - public function content($text, $type="html") { - $content = $this->dom->createElement("content", html::chars($text)); - $content->setAttribute("type", $type); - $this->element->appendChild($content); - return $this; - } - - public function author() { - return $this->add_child("Atom_Author", "author"); - } - - public function link() { - return $this->add_child("Atom_Link", "link"); - } -} diff --git a/3.1/modules/atom/libraries/Atom_Feed.php b/3.1/modules/atom/libraries/Atom_Feed.php deleted file mode 100644 index 9625f951..00000000 --- a/3.1/modules/atom/libraries/Atom_Feed.php +++ /dev/null @@ -1,47 +0,0 @@ -element->appendChild($this->dom->createElement("id", $id)); - return $this; - } - - public function title($title) { - /* @todo Add optional type argument that defaults to "text" */ - $this->element->appendChild($this->dom->createElement("title", $title)); - return $this; - } - - public function updated($timestamp) { - $this->element->appendChild( - $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp))); - return $this; - } - - public function link() { - return $this->add_child("Atom_Link", "link"); - } - - public function entry() { - /* Create new empty entry. */ - return $this->add_child("Atom_Entry", "entry"); - } -} diff --git a/3.1/modules/atom/libraries/Atom_Link.php b/3.1/modules/atom/libraries/Atom_Link.php deleted file mode 100644 index 723675c1..00000000 --- a/3.1/modules/atom/libraries/Atom_Link.php +++ /dev/null @@ -1,41 +0,0 @@ -element->setAttribute("rel", $rel); - return $this; - } - - public function type($type) { - $this->element->setAttribute("type", $type); - return $this; - } - - public function title($title) { - $this->element->setAttribute("title", $title); - return $this; - } - - public function href($href) { - $this->element->setAttribute("href", $href); - return $this; - } -} diff --git a/3.1/modules/atom/libraries/Gallery_Atom_Entry.php b/3.1/modules/atom/libraries/Gallery_Atom_Entry.php deleted file mode 100644 index ab6e655c..00000000 --- a/3.1/modules/atom/libraries/Gallery_Atom_Entry.php +++ /dev/null @@ -1,39 +0,0 @@ -id(html::chars(url::abs_current())); - $this->link() - ->rel("self") - ->href(url::abs_current()); - } - - public function link() { - return $this->add_child("Gallery_Atom_Link", "link"); - } -} diff --git a/3.1/modules/atom/libraries/Gallery_Atom_Feed.php b/3.1/modules/atom/libraries/Gallery_Atom_Feed.php deleted file mode 100644 index 138421a2..00000000 --- a/3.1/modules/atom/libraries/Gallery_Atom_Feed.php +++ /dev/null @@ -1,39 +0,0 @@ -id(html::chars(url::abs_current())); - $this->link() - ->rel("self") - ->href(url::abs_current()); - } - - public function link() { - return $this->add_child("Gallery_Atom_Link", "link"); - } -} diff --git a/3.1/modules/atom/libraries/Gallery_Atom_Link.php b/3.1/modules/atom/libraries/Gallery_Atom_Link.php deleted file mode 100644 index def0d497..00000000 --- a/3.1/modules/atom/libraries/Gallery_Atom_Link.php +++ /dev/null @@ -1,45 +0,0 @@ -rel("related") - ->type(rest::ATOM) - ->title($title) - ->href(sprintf("%s%s", url::base(true, "http"), $relative_uri)); - return $this; - } - - public function related_image($relative_uri, $title="", $image_type="jpeg") { - if (empty($title)) { - $title = t("Get related image"); - } - - $this->rel("related") - ->type("image/" . $image_type) - ->title($title) - ->href(sprintf("%s%s", url::base(true, "http"), $relative_uri)); - return $this; - } -} diff --git a/3.1/modules/atom/module.info b/3.1/modules/atom/module.info deleted file mode 100644 index 77f5c0b8..00000000 --- a/3.1/modules/atom/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Atom" -description = "Enable Atom feeds in your Gallery" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:atom" -discuss_url = "http://gallery.menalto.com/forum_module_atom" diff --git a/3.1/modules/autorotate/helpers/autorotate.php b/3.1/modules/autorotate/helpers/autorotate.php deleted file mode 100644 index 50cc1ab3..00000000 --- a/3.1/modules/autorotate/helpers/autorotate.php +++ /dev/null @@ -1,68 +0,0 @@ -is_photo() && $item->mime_type == "image/jpeg") { - require_once(MODPATH . "exif/lib/exif.php"); - $exif_raw = read_exif_data_raw($item->file_path(), false); - if (isset($exif_raw['ValidEXIFData'])) { - $orientation = $exif_raw["IFD0"]["Orientation"]; - $degrees = 0; - if ($orientation == '3: Upside-down') { - $degrees = 180; - } - else if ($orientation == '8: 90 deg CW') { - $degrees = -90; - } - else if ($orientation == '6: 90 deg CCW') { - $degrees = 90; - } - if($degrees) { - $tmpfile = tempnam(TMPPATH, "rotate"); - gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees), $item); - // Update EXIF info - $data = new PelDataWindow(file_get_contents($tmpfile)); - if (PelJpeg::isValid($data)) { - $jpeg = $file = new PelJpeg(); - $jpeg->load($data); - $exif = $jpeg->getExif(); - if($exif !== null) { - $tiff = $exif->getTiff(); - $ifd0 = $tiff->getIfd(); - $orientation = $ifd0->getEntry(PelTag::ORIENTATION); - $orientation->setValue(1); - file_put_contents($tmpfile, $file->getBytes()); - } - } - $item->set_data_file($tmpfile); - $item->save(); - unlink($tmpfile); - } - } - } - return; - } -} \ No newline at end of file diff --git a/3.1/modules/autorotate/helpers/autorotate_event.php b/3.1/modules/autorotate/helpers/autorotate_event.php deleted file mode 100644 index fe23ef8e..00000000 --- a/3.1/modules/autorotate/helpers/autorotate_event.php +++ /dev/null @@ -1,32 +0,0 @@ -getMessage() . "\n" . $e->getTraceAsString()); - } - } -} \ No newline at end of file diff --git a/3.1/modules/autorotate/helpers/autorotate_installer.php b/3.1/modules/autorotate/helpers/autorotate_installer.php deleted file mode 100644 index 3fa0d203..00000000 --- a/3.1/modules/autorotate/helpers/autorotate_installer.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @version $Revision: 463 $ - * @date $Date: 2006-11-18 23:25:24 +0100 (Sat, 18 Nov 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - - -/* Initialize Gettext, if available. This must be done before any - * part of PEL calls Pel::tra() or Pel::fmt() --- this is ensured if - * every piece of code using those two functions require() this file. - * - * If Gettext is not available, wrapper functions will be created, - * allowing PEL to function, but without any translations. - * - * The PEL translations are stored in './locale'. It is important to - * use an absolute path here because the lookups will be relative to - * the current directory. */ - -if (function_exists('dgettext')) { - bindtextdomain('pel', dirname(__FILE__) . '/locale'); -} else { - - /** - * Pretend to lookup a message in a specific domain. - * - * This is just a stub which will return the original message - * untranslated. The function will only be defined if the Gettext - * extension has not already defined it. - * - * @param string $domain the domain. - * - * @param string $str the message to be translated. - * - * @return string the original, untranslated message. - */ - function dgettext($domain, $str) { - return $str; - } -} - - -/** - * Class with miscellaneous static methods. - * - * This class will contain various methods that govern the overall - * behavior of PEL. - * - * Debugging output from PEL can be turned on and off by assigning - * true or false to {@link Pel::$debug}. - * - * @author Martin Geisler - * @package PEL - */ -class Pel { - - /** - * Flag for controlling debug information. - * - * The methods producing debug information ({@link debug()} and - * {@link warning()}) will only output something if this variable is - * set to true. - * - * @var boolean - */ - private static $debug = false; - - /** - * Flag for strictness of parsing. - * - * If this variable is set to true, then most errors while loading - * images will result in exceptions being thrown. Otherwise a - * warning will be emitted (using {@link Pel::warning}) and the - * exceptions will be appended to {@link Pel::$exceptions}. - * - * Some errors will still be fatal and result in thrown exceptions, - * but an effort will be made to skip over as much garbage as - * possible. - * - * @var boolean - */ - private static $strict = false; - - /** - * Stored exceptions. - * - * When {@link Pel::$strict} is set to false exceptions will be - * accumulated here instead of being thrown. - */ - private static $exceptions = array(); - - - /** - * Return list of stored exceptions. - * - * When PEL is parsing in non-strict mode, it will store most - * exceptions instead of throwing them. Use this method to get hold - * of them when a call returns. - * - * Code for using this could look like this: - * - * - * Pel::setStrictParsing(true); - * Pel::clearExceptions(); - * - * $jpeg = new PelJpeg($file); - * - * // Check for exceptions. - * foreach (Pel::getExceptions() as $e) { - * printf("Exception: %s\n", $e->getMessage()); - * if ($e instanceof PelEntryException) { - * // Warn about entries that couldn't be loaded. - * printf("Warning: Problem with %s.\n", - * PelTag::getName($e->getType(), $e->getTag())); - * } - * } - * - * - * This gives applications total control over the amount of error - * messages shown and (hopefully) provides the necessary information - * for proper error recovery. - * - * @return array the exceptions. - */ - static function getExceptions() { - return self::$exceptions; - } - - - /** - * Clear list of stored exceptions. - * - * Use this function before a call to some method if you intend to - * check for exceptions afterwards. - */ - static function clearExceptions() { - self::$exceptions = array(); - } - - - /** - * Conditionally throw an exception. - * - * This method will throw the passed exception when strict parsing - * in effect (see {@link setStrictParsing()}). Otherwise the - * exception is stored (it can be accessed with {@link - * getExceptions()}) and a warning is issued (with {@link - * Pel::warning}). - * - * @param PelException $e the exceptions. - */ - static function maybeThrow(PelException $e) { - if (self::$strict) { - throw $e; - } else { - self::$exceptions[] = $e; - self::warning('%s (%s:%s)', $e->getMessage(), - basename($e->getFile()), $e->getLine()); - } - } - - - /** - * Enable/disable strict parsing. - * - * If strict parsing is enabled, then most errors while loading - * images will result in exceptions being thrown. Otherwise a - * warning will be emitted (using {@link Pel::warning}) and the - * exceptions will be stored for later use via {@link - * getExceptions()}. - * - * Some errors will still be fatal and result in thrown exceptions, - * but an effort will be made to skip over as much garbage as - * possible. - * - * @param boolean $flag use true to enable strict parsing, false to - * diable. - */ - function setStrictParsing($flag) { - self::$strict = $flag; - } - - - /** - * Get current setting for strict parsing. - * - * @return boolean true if strict parsing is in effect, false - * otherwise. - */ - function getStrictParsing() { - return self::$strict; - } - - - /** - * Enable/disable debugging output. - * - * @param boolean $flag use true to enable debug output, false to - * diable. - */ - function setDebug($flag) { - self::$debug = $flag; - } - - - /** - * Get current setting for debug output. - * - * @return boolean true if debug is enabled, false otherwise. - */ - function getDebug() { - return self::$debug; - } - - - /** - * Conditionally output debug information. - * - * This method works just like printf() except that it always - * terminates the output with a newline, and that it only outputs - * something if the {@link Pel::$debug} is true. - * - * @param string $format the format string. - * - * @param mixed $args,... any number of arguments can be given. The - * arguments will be available for the format string as usual with - * sprintf(). - */ - static function debug() { - if (self::$debug) { - $args = func_get_args(); - $str = array_shift($args); - vprintf($str . "\n", $args); - } - } - - - /** - * Conditionally output a warning. - * - * This method works just like printf() except that it prepends the - * output with the string 'Warning: ', terminates the output with a - * newline, and that it only outputs something if the PEL_DEBUG - * defined to some true value. - * - * @param string $format the format string. - * - * @param mixed $args,... any number of arguments can be given. The - * arguments will be available for the format string as usual with - * sprintf(). - */ - static function warning() { - if (self::$debug) { - $args = func_get_args(); - $str = array_shift($args); - vprintf('Warning: ' . $str . "\n", $args); - } - } - - - /** - * Translate a string. - * - * This static function will use Gettext to translate a string. By - * always using this function for static string one is assured that - * the translation will be taken from the correct text domain. - * Dynamic strings should be passed to {@link fmt} instead. - * - * @param string the string that should be translated. - * - * @return string the translated string, or the original string if - * no translation could be found. - */ - static function tra($str) { - return dgettext('pel', $str); - } - - - /** - * Translate and format a string. - * - * This static function will first use Gettext to translate a format - * string, which will then have access to any extra arguments. By - * always using this function for dynamic string one is assured that - * the translation will be taken from the correct text domain. If - * the string is static, use {@link tra} instead as it will be - * faster. - * - * @param string $format the format string. This will be translated - * before being used as a format string. - * - * @param mixed $args,... any number of arguments can be given. The - * arguments will be available for the format string as usual with - * sprintf(). - * - * @return string the translated string, or the original string if - * no translation could be found. - */ - static function fmt() { - $args = func_get_args(); - $str = array_shift($args); - return vsprintf(dgettext('pel', $str), $args); - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelConvert.php b/3.1/modules/autorotate/lib/pel/PelConvert.php deleted file mode 100644 index 31c4b2a6..00000000 --- a/3.1/modules/autorotate/lib/pel/PelConvert.php +++ /dev/null @@ -1,397 +0,0 @@ - - * @version $Revision: 387 $ - * @date $Date: 2005-10-05 13:02:52 +0200 (Wed, 05 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/** - * Conversion functions to and from bytes and integers. - * - * The functions found in this class are used to convert bytes into - * integers of several sizes ({@link bytesToShort}, {@link - * bytesToLong}, and {@link bytesToRational}) and convert integers of - * several sizes into bytes ({@link shortToBytes} and {@link - * longToBytes}). - * - * All the methods are static and they all rely on an argument that - * specifies the byte order to be used, this must be one of the class - * constants {@link LITTLE_ENDIAN} or {@link BIG_ENDIAN}. These - * constants will be referred to as the pseudo type PelByteOrder - * throughout the documentation. - * - * @author Martin Geisler - * @package PEL - */ -class PelConvert { - - /** - * Little-endian (Intel) byte order. - * - * Data stored in little-endian byte order store the least - * significant byte first, so the number 0x12345678 becomes 0x78 - * 0x56 0x34 0x12 when stored with little-endian byte order. - */ - const LITTLE_ENDIAN = true; - - /** - * Big-endian (Motorola) byte order. - * - * Data stored in big-endian byte order store the most significant - * byte first, so the number 0x12345678 becomes 0x12 0x34 0x56 0x78 - * when stored with big-endian byte order. - */ - const BIG_ENDIAN = false; - - - /** - * Convert an unsigned short into two bytes. - * - * @param int the unsigned short that will be converted. The lower - * two bytes will be extracted regardless of the actual size passed. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - * - * @return string the bytes representing the unsigned short. - */ - static function shortToBytes($value, $endian) { - if ($endian == self::LITTLE_ENDIAN) - return chr($value) . chr($value >> 8); - else - return chr($value >> 8) . chr($value); - } - - - /** - * Convert a signed short into two bytes. - * - * @param int the signed short that will be converted. The lower - * two bytes will be extracted regardless of the actual size passed. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - * - * @return string the bytes representing the signed short. - */ - static function sShortToBytes($value, $endian) { - /* We can just use shortToBytes, since signed shorts fits well - * within the 32 bit signed integers used in PHP. */ - return self::shortToBytes($value, $endian); - } - - - /** - * Convert an unsigned long into four bytes. - * - * Because PHP limits the size of integers to 32 bit signed, one - * cannot really have an unsigned integer in PHP. But integers - * larger than 2^31-1 will be promoted to 64 bit signed floating - * point numbers, and so such large numbers can be handled too. - * - * @param int the unsigned long that will be converted. The - * argument will be treated as an unsigned 32 bit integer and the - * lower four bytes will be extracted. Treating the argument as an - * unsigned integer means that the absolute value will be used. Use - * {@link sLongToBytes} to convert signed integers. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - * - * @return string the bytes representing the unsigned long. - */ - static function longToBytes($value, $endian) { - /* We cannot convert the number to bytes in the normal way (using - * shifts and modulo calculations) because the PHP operator >> and - * function chr() clip their arguments to 2^31-1, which is the - * largest signed integer known to PHP. But luckily base_convert - * handles such big numbers. */ - $hex = str_pad(base_convert($value, 10, 16), 8, '0', STR_PAD_LEFT); - if ($endian == self::LITTLE_ENDIAN) - return (chr(hexdec($hex{6} . $hex{7})) . - chr(hexdec($hex{4} . $hex{5})) . - chr(hexdec($hex{2} . $hex{3})) . - chr(hexdec($hex{0} . $hex{1}))); - else - return (chr(hexdec($hex{0} . $hex{1})) . - chr(hexdec($hex{2} . $hex{3})) . - chr(hexdec($hex{4} . $hex{5})) . - chr(hexdec($hex{6} . $hex{7}))); - } - - - /** - * Convert a signed long into four bytes. - * - * @param int the signed long that will be converted. The argument - * will be treated as a signed 32 bit integer, from which the lower - * four bytes will be extracted. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - * - * @return string the bytes representing the signed long. - */ - static function sLongToBytes($value, $endian) { - /* We can convert the number into bytes in the normal way using - * shifts and modulo calculations here (in contrast with - * longToBytes) because PHP automatically handles 32 bit signed - * integers for us. */ - if ($endian == self::LITTLE_ENDIAN) - return (chr($value) . - chr($value >> 8) . - chr($value >> 16) . - chr($value >> 24)); - else - return (chr($value >> 24) . - chr($value >> 16) . - chr($value >> 8) . - chr($value)); - } - - - /** - * Extract an unsigned byte from a string of bytes. - * - * @param string the bytes. - * - * @param int the offset. The byte found at the offset will be - * returned as an integer. The must be at least one byte available - * at offset. - * - * @return int the unsigned byte found at offset, e.g., an integer - * in the range 0 to 255. - */ - static function bytesToByte($bytes, $offset) { - return ord($bytes{$offset}); - } - - - /** - * Extract a signed byte from bytes. - * - * @param string the bytes. - * - * @param int the offset. The byte found at the offset will be - * returned as an integer. The must be at least one byte available - * at offset. - * - * @return int the signed byte found at offset, e.g., an integer in - * the range -128 to 127. - */ - static function bytesToSByte($bytes, $offset) { - $n = self::bytesToByte($bytes, $offset); - if ($n > 127) - return $n - 256; - else - return $n; - } - - - /** - * Extract an unsigned short from bytes. - * - * @param string the bytes. - * - * @param int the offset. The short found at the offset will be - * returned as an integer. There must be at least two bytes - * available beginning at the offset given. - * - * @return int the unsigned short found at offset, e.g., an integer - * in the range 0 to 65535. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - */ - static function bytesToShort($bytes, $offset, $endian) { - if ($endian == self::LITTLE_ENDIAN) - return (ord($bytes{$offset+1}) * 256 + - ord($bytes{$offset})); - else - return (ord($bytes{$offset}) * 256 + - ord($bytes{$offset+1})); - } - - - /** - * Extract a signed short from bytes. - * - * @param string the bytes. - * - * @param int the offset. The short found at offset will be returned - * as an integer. There must be at least two bytes available - * beginning at the offset given. - * - * @return int the signed byte found at offset, e.g., an integer in - * the range -32768 to 32767. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - */ - static function bytesToSShort($bytes, $offset, $endian) { - $n = self::bytesToShort($bytes, $offset, $endian); - if ($n > 32767) - return $n - 65536; - else - return $n; - } - - - /** - * Extract an unsigned long from bytes. - * - * @param string the bytes. - * - * @param int the offset. The long found at offset will be returned - * as an integer. There must be at least four bytes available - * beginning at the offset given. - * - * @return int the unsigned long found at offset, e.g., an integer - * in the range 0 to 4294967295. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - */ - static function bytesToLong($bytes, $offset, $endian) { - if ($endian == self::LITTLE_ENDIAN) - return (ord($bytes{$offset+3}) * 16777216 + - ord($bytes{$offset+2}) * 65536 + - ord($bytes{$offset+1}) * 256 + - ord($bytes{$offset})); - else - return (ord($bytes{$offset}) * 16777216 + - ord($bytes{$offset+1}) * 65536 + - ord($bytes{$offset+2}) * 256 + - ord($bytes{$offset+3})); - } - - - /** - * Extract a signed long from bytes. - * - * @param string the bytes. - * - * @param int the offset. The long found at offset will be returned - * as an integer. There must be at least four bytes available - * beginning at the offset given. - * - * @return int the signed long found at offset, e.g., an integer in - * the range -2147483648 to 2147483647. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - */ - static function bytesToSLong($bytes, $offset, $endian) { - $n = self::bytesToLong($bytes, $offset, $endian); - if ($n > 2147483647) - return $n - 4294967296; - else - return $n; - } - - - /** - * Extract an unsigned rational from bytes. - * - * @param string the bytes. - * - * @param int the offset. The rational found at offset will be - * returned as an array. There must be at least eight bytes - * available beginning at the offset given. - * - * @return array the unsigned rational found at offset, e.g., an - * array with two integers in the range 0 to 4294967295. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - */ - static function bytesToRational($bytes, $offset, $endian) { - return array(self::bytesToLong($bytes, $offset, $endian), - self::bytesToLong($bytes, $offset+4, $endian)); - } - - - /** - * Extract a signed rational from bytes. - * - * @param string the bytes. - * - * @param int the offset. The rational found at offset will be - * returned as an array. There must be at least eight bytes - * available beginning at the offset given. - * - * @return array the signed rational found at offset, e.g., an array - * with two integers in the range -2147483648 to 2147483647. - * - * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link - * BIG_ENDIAN}. - */ - static function bytesToSRational($bytes, $offset, $endian) { - return array(self::bytesToSLong($bytes, $offset, $endian), - self::bytesToSLong($bytes, $offset+4, $endian)); - } - - - /** - * Format bytes for dumping. - * - * This method is for debug output, it will format a string as a - * hexadecimal dump suitable for display on a terminal. The output - * is printed directly to standard out. - * - * @param string the bytes that will be dumped. - * - * @param int the maximum number of bytes to dump. If this is left - * out (or left to the default of 0), then the entire string will be - * dumped. - */ - static function bytesToDump($bytes, $max = 0) { - $s = strlen($bytes); - - if ($max > 0) - $s = min($max, $s); - - $line = 24; - - for ($i = 0; $i < $s; $i++) { - printf('%02X ', ord($bytes{$i})); - - if (($i+1) % $line == 0) - print("\n"); - } - print("\n"); - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelDataWindow.php b/3.1/modules/autorotate/lib/pel/PelDataWindow.php deleted file mode 100644 index 523f8277..00000000 --- a/3.1/modules/autorotate/lib/pel/PelDataWindow.php +++ /dev/null @@ -1,525 +0,0 @@ - - * @version $Revision: 387 $ - * @date $Date: 2005-10-05 13:02:52 +0200 (Wed, 05 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelException.php'); -require_once('PelConvert.php'); -/**#@-*/ - - -/** - * An exception thrown when an invalid offset is encountered. - * - * @package PEL - * @subpackage Exception - */ -class PelDataWindowOffsetException extends PelException {} - -/** - * An exception thrown when an invalid window is encountered. - * - * @package PEL - * @subpackage Exception - */ -class PelDataWindowWindowException extends PelException {} - -/** - * The window. - * - * @package PEL - */ -class PelDataWindow { - - /** - * The data held by this window. - * - * The string can contain any kind of data, including binary data. - * - * @var string - */ - private $data = ''; - - /** - * The byte order currently in use. - * - * This will be the byte order used when data is read using the for - * example the {@link getShort} function. It must be one of {@link - * PelConvert::LITTLE_ENDIAN} and {@link PelConvert::BIG_ENDIAN}. - * - * @var PelByteOrder - * @see setByteOrder, getByteOrder - */ - private $order; - - /** - * The start of the current window. - * - * All offsets used for access into the data will count from this - * offset, effectively limiting access to a window starting at this - * byte. - * - * @var int - * @see setWindowStart - */ - private $start = 0; - - /** - * The size of the current window. - * - * All offsets used for access into the data will be limited by this - * variable. A valid offset must be strictly less than this - * variable. - * - * @var int - * @see setWindowSize - */ - private $size = 0; - - - /** - * Construct a new data window with the data supplied. - * - * @param string the data that this window will contain. The data - * will be copied into the new data window. - * - * @param boolean the initial byte order of the window. This must - * be either {@link PelConvert::LITTLE_ENDIAN} or {@link - * PelConvert::BIG_ENDIAN}. This will be used when integers are - * read from the data, and it can be changed later with {@link - * setByteOrder()}. - */ - function __construct($d = '', $e = PelConvert::LITTLE_ENDIAN) { - $this->data = $d; - $this->order = $e; - $this->size = strlen($d); - } - - - /** - * Get the size of the data window. - * - * @return int the number of bytes covered by the window. The - * allowed offsets go from 0 up to this number minus one. - * - * @see getBytes() - */ - function getSize() { - return $this->size; - } - - - /** - * Change the byte order of the data. - * - * @param PelByteOrder the new byte order. This must be either - * {@link PelConvert::LITTLE_ENDIAN} or {@link - * PelConvert::BIG_ENDIAN}. - */ - function setByteOrder($o) { - $this->order = $o; - } - - - /** - * Get the currently used byte order. - * - * @return PelByteOrder this will be either {@link - * PelConvert::LITTLE_ENDIAN} or {@link PelConvert::BIG_ENDIAN}. - */ - function getByteOrder() { - return $this->order; - } - - - /* Move the start of the window forward. - * - * @param int the new start of the window. All new offsets will be - * calculated from this new start offset, and the size of the window - * will shrink to keep the end of the window in place. - */ - function setWindowStart($start) { - if ($start < 0 || $start > $this->size) - throw new PelDataWindowWindowException('Window [%d, %d] does ' . - 'not fit in window [0, %d]', - $start, $this->size, $this->size); - - $this->start += $start; - $this->size -= $start; - } - - - /** - * Adjust the size of the window. - * - * The size can only be made smaller. - * - * @param int the desired size of the window. If the argument is - * negative, the window will be shrunk by the argument. - */ - function setWindowSize($size) { - if ($size < 0) - $size += $this->size; - - if ($size < 0 || $size > $this->size) - throw new PelDataWindowWindowException('Window [0, %d] ' . - 'does not fit in window [0, %d]', - $size, $this->size); - $this->size = $size; - } - - - /** - * Make a new data window with the same data as the this window. - * - * @param mixed if an integer is supplied, then it will be the start - * of the window in the clone. If left unspecified, then the clone - * will inherit the start from this object. - * - * @param mixed if an integer is supplied, then it will be the size - * of the window in the clone. If left unspecified, then the clone - * will inherit the size from this object. - * - * @return PelDataWindow a new window that operates on the same data - * as this window, but (optionally) with a smaller window size. - */ - function getClone($start = false, $size = false) { - $c = clone $this; - - if (is_int($start)) - $c->setWindowStart($start); - - if (is_int($size)) - $c->setWindowSize($size); - - return $c; - } - - - /** - * Validate an offset against the current window. - * - * @param int the offset to be validated. If the offset is negative - * or if it is greater than or equal to the current window size, - * then a {@link PelDataWindowOffsetException} is thrown. - * - * @return void if the offset is valid nothing is returned, if it is - * invalid a new {@link PelDataWindowOffsetException} is thrown. - */ - private function validateOffset($o) { - if ($o < 0 || $o >= $this->size) - throw new PelDataWindowOffsetException('Offset %d not within [%d, %d]', - $o, 0, $this->size-1); - } - - - /** - * Return some or all bytes visible in the window. - * - * This method works just like the standard {@link substr()} - * function in PHP with the exception that it works within the - * window of accessible bytes and does strict range checking. - * - * @param int the offset to the first byte returned. If a negative - * number is given, then the counting will be from the end of the - * window. Invalid offsets will result in a {@link - * PelDataWindowOffsetException} being thrown. - * - * @param int the size of the sub-window. If a negative number is - * given, then that many bytes will be omitted from the result. - * - * @return string a subset of the bytes in the window. This will - * always return no more than {@link getSize()} bytes. - */ - function getBytes($start = false, $size = false) { - if (is_int($start)) { - if ($start < 0) - $start += $this->size; - - $this->validateOffset($start); - } else { - $start = 0; - } - - if (is_int($size)) { - if ($size <= 0) - $size += $this->size - $start; - - $this->validateOffset($start+$size); - } else { - $size = $this->size - $start; - } - - return substr($this->data, $this->start + $start, $size); - } - - - /** - * Return an unsigned byte from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first byte in the current allowed window. The last - * valid offset is equal to {@link getSize()}-1. Invalid offsets - * will result in a {@link PelDataWindowOffsetException} being - * thrown. - * - * @return int the unsigned byte found at offset. - */ - function getByte($o = 0) { - /* Validate the offset --- this throws an exception if offset is - * out of range. */ - $this->validateOffset($o); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Return an unsigned byte. */ - return PelConvert::bytesToByte($this->data, $o); - } - - - /** - * Return a signed byte from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first byte in the current allowed window. The last - * valid offset is equal to {@link getSize()}-1. Invalid offsets - * will result in a {@link PelDataWindowOffsetException} being - * thrown. - * - * @return int the signed byte found at offset. - */ - function getSByte($o = 0) { - /* Validate the offset --- this throws an exception if offset is - * out of range. */ - $this->validateOffset($o); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Return a signed byte. */ - return PelConvert::bytesToSByte($this->data, $o); - } - - - /** - * Return an unsigned short read from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first short available in the current allowed window. - * The last valid offset is equal to {@link getSize()}-2. Invalid - * offsets will result in a {@link PelDataWindowOffsetException} - * being thrown. - * - * @return int the unsigned short found at offset. - */ - function getShort($o = 0) { - /* Validate the offset+1 to see if we can safely get two bytes --- - * this throws an exception if offset is out of range. */ - $this->validateOffset($o); - $this->validateOffset($o+1); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Return an unsigned short. */ - return PelConvert::bytesToShort($this->data, $o, $this->order); - } - - - /** - * Return a signed short read from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first short available in the current allowed window. - * The last valid offset is equal to {@link getSize()}-2. Invalid - * offsets will result in a {@link PelDataWindowOffsetException} - * being thrown. - * - * @return int the signed short found at offset. - */ - function getSShort($o = 0) { - /* Validate the offset+1 to see if we can safely get two bytes --- - * this throws an exception if offset is out of range. */ - $this->validateOffset($o); - $this->validateOffset($o+1); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Return a signed short. */ - return PelConvert::bytesToSShort($this->data, $o, $this->order); - } - - - /** - * Return an unsigned long read from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first long available in the current allowed window. - * The last valid offset is equal to {@link getSize()}-4. Invalid - * offsets will result in a {@link PelDataWindowOffsetException} - * being thrown. - * - * @return int the unsigned long found at offset. - */ - function getLong($o = 0) { - /* Validate the offset+3 to see if we can safely get four bytes - * --- this throws an exception if offset is out of range. */ - $this->validateOffset($o); - $this->validateOffset($o+3); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Return an unsigned long. */ - return PelConvert::bytesToLong($this->data, $o, $this->order); - } - - - /** - * Return a signed long read from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first long available in the current allowed window. - * The last valid offset is equal to {@link getSize()}-4. Invalid - * offsets will result in a {@link PelDataWindowOffsetException} - * being thrown. - * - * @return int the signed long found at offset. - */ - function getSLong($o = 0) { - /* Validate the offset+3 to see if we can safely get four bytes - * --- this throws an exception if offset is out of range. */ - $this->validateOffset($o); - $this->validateOffset($o+3); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Return a signed long. */ - return PelConvert::bytesToSLong($this->data, $o, $this->order); - } - - - /** - * Return an unsigned rational read from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first rational available in the current allowed - * window. The last valid offset is equal to {@link getSize()}-8. - * Invalid offsets will result in a {@link - * PelDataWindowOffsetException} being thrown. - * - * @return array the unsigned rational found at offset. A rational - * number is represented as an array of two numbers: the enumerator - * and denominator. Both of these numbers will be unsigned longs. - */ - function getRational($o = 0) { - return array($this->getLong($o), $this->getLong($o+4)); - } - - - /** - * Return a signed rational read from the data. - * - * @param int the offset into the data. An offset of zero will - * return the first rational available in the current allowed - * window. The last valid offset is equal to {@link getSize()}-8. - * Invalid offsets will result in a {@link - * PelDataWindowOffsetException} being thrown. - * - * @return array the signed rational found at offset. A rational - * number is represented as an array of two numbers: the enumerator - * and denominator. Both of these numbers will be signed longs. - */ - function getSRational($o = 0) { - return array($this->getSLong($o), $this->getSLong($o+4)); - } - - - /** - * String comparison on substrings. - * - * @param int the offset into the data. An offset of zero will make - * the comparison start with the very first byte available in the - * window. The last valid offset is equal to {@link getSize()} - * minus the length of the string. If the string is too long, then - * a {@link PelDataWindowOffsetException} will be thrown. - * - * @param string the string to compare with. - * - * @return boolean true if the string given matches the data in the - * window, at the specified offset, false otherwise. The comparison - * will stop as soon as a mismatch if found. - */ - function strcmp($o, $str) { - /* Validate the offset of the final character we might have to - * check. */ - $s = strlen($str); - $this->validateOffset($o); - $this->validateOffset($o + $s - 1); - - /* Translate the offset into an offset into the data. */ - $o += $this->start; - - /* Check each character, return as soon as the answer is known. */ - for ($i = 0; $i < $s; $i++) { - if ($this->data{$o + $i} != $str{$i}) - return false; - } - - /* All characters matches each other, return true. */ - return true; - } - - - /** - * Return a string representation of the data window. - * - * @return string a description of the window with information about - * the number of bytes accessible, the total number of bytes, and - * the window start and stop. - */ - function __toString() { - return Pel::fmt('DataWindow: %d bytes in [%d, %d] of %d bytes', - $this->size, - $this->start, $this->start + $this->size, - strlen($this->data)); - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntry.php b/3.1/modules/autorotate/lib/pel/PelEntry.php deleted file mode 100644 index b3c1d15c..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntry.php +++ /dev/null @@ -1,382 +0,0 @@ - - * @version $Revision: 442 $ - * @date $Date: 2006-09-17 14:45:10 +0200 (Sun, 17 Sep 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelException.php'); -require_once('PelFormat.php'); -require_once('PelTag.php'); -require_once('Pel.php'); -/**#@-*/ - - -/** - * Exception indicating a problem with an entry. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelEntryException extends PelException { - - /** - * The IFD type (if known). - * - * @var int - */ - protected $type; - - /** - * The tag of the entry (if known). - * - * @var PelTag - */ - protected $tag; - - /** - * Get the IFD type associated with the exception. - * - * @return int one of {@link PelIfd::IFD0}, {@link PelIfd::IFD1}, - * {@link PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link - * PelIfd::INTEROPERABILITY}. If no type is set, null is returned. - */ - function getIfdType() { - return $this->type; - } - - - /** - * Get the tag associated with the exception. - * - * @return PelTag the tag. If no tag is set, null is returned. - */ - function getTag() { - return $this->tag; - } - -} - - -/** - * Exception indicating that an unexpected format was found. - * - * The documentation for each tag in {@link PelTag} will detail any - * constrains. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelUnexpectedFormatException extends PelEntryException { - - /** - * Construct a new exception indicating an invalid format. - * - * @param int the type of IFD. - * - * @param PelTag the tag for which the violation was found. - * - * @param PelFormat the format found. - * - * @param PelFormat the expected format. - */ - function __construct($type, $tag, $found, $expected) { - parent::__construct('Unexpected format found for %s tag: PelFormat::%s. ' . - 'Expected PelFormat::%s instead.', - PelTag::getName($type, $tag), - strtoupper(PelFormat::getName($found)), - strtoupper(PelFormat::getName($expected))); - $this->tag = $tag; - $this->type = $type; - } -} - - -/** - * Exception indicating that an unexpected number of components was - * found. - * - * Some tags have strict limits as to the allowed number of - * components, and this exception is thrown if the data violates such - * a constraint. The documentation for each tag in {@link PelTag} - * explains the expected number of components. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelWrongComponentCountException extends PelEntryException { - - /** - * Construct a new exception indicating a wrong number of - * components. - * - * @param int the type of IFD. - * - * @param PelTag the tag for which the violation was found. - * - * @param int the number of components found. - * - * @param int the expected number of components. - */ - function __construct($type, $tag, $found, $expected) { - parent::__construct('Wrong number of components found for %s tag: %d. ' . - 'Expected %d.', - PelTag::getName($type, $tag), $found, $expected); - $this->tag = $tag; - $this->type = $type; - } -} - - -/** - * Common ancestor class of all {@link PelIfd} entries. - * - * As this class is abstract you cannot instantiate objects from it. - * It only serves as a common ancestor to define the methods common to - * all entries. The most important methods are {@link getValue()} and - * {@link setValue()}, both of which is abstract in this class. The - * descendants will give concrete implementations for them. - * - * If you have some data coming from an image (some raw bytes), then - * the static method {@link newFromData()} is helpful --- it will look - * at the data and give you a proper decendent of {@link PelEntry} - * back. - * - * If you instead want to have an entry for some data which take the - * form of an integer, a string, a byte, or some other PHP type, then - * don't use this class. You should instead create an object of the - * right subclass ({@link PelEntryShort} for short integers, {@link - * PelEntryAscii} for strings, and so on) directly. - * - * @author Martin Geisler - * @package PEL - */ -abstract class PelEntry { - - /** - * Type of IFD containing this tag. - * - * This must be one of the constants defined in {@link PelIfd}: - * {@link PelIfd::IFD0} for the main image IFD, {@link PelIfd::IFD1} - * for the thumbnail image IFD, {@link PelIfd::EXIF} for the Exif - * sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or {@link - * PelIfd::INTEROPERABILITY} for the interoperability sub-IFD. - * - * @var int - */ - protected $ifd_type; - - /** - * The bytes representing this entry. - * - * Subclasses must either override {@link getBytes()} or, if - * possible, maintain this property so that it always contains a - * true representation of the entry. - * - * @var string - */ - protected $bytes = ''; - - /** - * The {@link PelTag} of this entry. - * - * @var PelTag - */ - protected $tag; - - /** - * The {@link PelFormat} of this entry. - * - * @var PelFormat - */ - protected $format; - - /** - * The number of components of this entry. - * - * @var int - */ - protected $components; - - - /** - * Return the tag of this entry. - * - * @return PelTag the tag of this entry. - */ - function getTag() { - return $this->tag; - } - - - /** - * Return the type of IFD which holds this entry. - * - * @return int one of the constants defined in {@link PelIfd}: - * {@link PelIfd::IFD0} for the main image IFD, {@link PelIfd::IFD1} - * for the thumbnail image IFD, {@link PelIfd::EXIF} for the Exif - * sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or {@link - * PelIfd::INTEROPERABILITY} for the interoperability sub-IFD. - */ - function getIfdType() { - return $this->ifd_type; - } - - - /** - * Update the IFD type. - * - * @param int must be one of the constants defined in {@link - * PelIfd}: {@link PelIfd::IFD0} for the main image IFD, {@link - * PelIfd::IFD1} for the thumbnail image IFD, {@link PelIfd::EXIF} - * for the Exif sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or - * {@link PelIfd::INTEROPERABILITY} for the interoperability - * sub-IFD. - */ - function setIfdType($type) { - $this->ifd_type = $type; - } - - - /** - * Return the format of this entry. - * - * @return PelFormat the format of this entry. - */ - function getFormat() { - return $this->format; - } - - - /** - * Return the number of components of this entry. - * - * @return int the number of components of this entry. - */ - function getComponents() { - return $this->components; - } - - - /** - * Turn this entry into bytes. - * - * @param PelByteOrder the desired byte order, which must be either - * {@link Convert::LITTLE_ENDIAN} or {@link Convert::BIG_ENDIAN}. - * - * @return string bytes representing this entry. - */ - function getBytes($o) { - return $this->bytes; - } - - - /** - * Get the value of this entry as text. - * - * The value will be returned in a format suitable for presentation, - * e.g., rationals will be returned as 'x/y', ASCII strings will be - * returned as themselves etc. - * - * @param boolean some values can be returned in a long or more - * brief form, and this parameter controls that. - * - * @return string the value as text. - */ - abstract function getText($brief = false); - - - /** - * Get the value of this entry. - * - * The value returned will generally be the same as the one supplied - * to the constructor or with {@link setValue()}. For a formatted - * version of the value, one should use {@link getText()} instead. - * - * @return mixed the unformatted value. - */ - abstract function getValue(); - - - /** - * Set the value of this entry. - * - * The value should be in the same format as for the constructor. - * - * @param mixed the new value. - * - * @abstract - */ - function setValue($value) { - /* This (fake) abstract method is here to make it possible for the - * documentation to refer to PelEntry::setValue(). - * - * It cannot declared abstract in the proper PHP way, for then PHP - * wont allow subclasses to define it with two arguments (which is - * what PelEntryCopyright does). - */ - throw new PelException('setValue() is abstract.'); - } - - - /** - * Turn this entry into a string. - * - * @return string a string representation of this entry. This is - * mostly for debugging. - */ - function __toString() { - $str = Pel::fmt(" Tag: 0x%04X (%s)\n", - $this->tag, PelTag::getName($this->ifd_type, $this->tag)); - $str .= Pel::fmt(" Format : %d (%s)\n", - $this->format, PelFormat::getName($this->format)); - $str .= Pel::fmt(" Components: %d\n", $this->components); - if ($this->getTag() != PelTag::MAKER_NOTE && - $this->getTag() != PelTag::PRINT_IM) - $str .= Pel::fmt(" Value : %s\n", print_r($this->getValue(), true)); - $str .= Pel::fmt(" Text : %s\n", $this->getText()); - return $str; - } -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryAscii.php b/3.1/modules/autorotate/lib/pel/PelEntryAscii.php deleted file mode 100644 index bdffe4bb..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryAscii.php +++ /dev/null @@ -1,482 +0,0 @@ - - * @version $Revision: 443 $ - * @date $Date: 2006-09-17 20:32:04 +0200 (Sun, 17 Sep 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntry.php'); -/**#@-*/ - - -/** - * Class for holding a plain ASCII string. - * - * This class can hold a single ASCII string, and it will be used as in - * - * $entry = $ifd->getEntry(PelTag::IMAGE_DESCRIPTION); - * print($entry->getValue()); - * $entry->setValue('This is my image. I like it.'); - * - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryAscii extends PelEntry { - - /** - * The string hold by this entry. - * - * This is the string that was given to the {@link __construct - * constructor} or later to {@link setValue}, without any final NULL - * character. - * - * @var string - */ - private $str; - - - /** - * Make a new PelEntry that can hold an ASCII string. - * - * @param int the tag which this entry represents. This should be - * one of the constants defined in {@link PelTag}, e.g., {@link - * PelTag::IMAGE_DESCRIPTION}, {@link PelTag::MODEL}, or any other - * tag with format {@link PelFormat::ASCII}. - * - * @param string the string that this entry will represent. The - * string must obey the same rules as the string argument to {@link - * setValue}, namely that it should be given without any trailing - * NULL character and that it must be plain 7-bit ASCII. - */ - function __construct($tag, $str = '') { - $this->tag = $tag; - $this->format = PelFormat::ASCII; - $this->setValue($str); - } - - - /** - * Give the entry a new ASCII value. - * - * This will overwrite the previous value. The value can be - * retrieved later with the {@link getValue} method. - * - * @param string the new value of the entry. This should be given - * without any trailing NULL character. The string must be plain - * 7-bit ASCII, the string should contain no high bytes. - * - * @todo Implement check for high bytes? - */ - function setValue($str) { - $this->components = strlen($str)+1; - $this->str = $str; - $this->bytes = $str . chr(0x00); - } - - - /** - * Return the ASCII string of the entry. - * - * @return string the string held, without any final NULL character. - * The string will be the same as the one given to {@link setValue} - * or to the {@link __construct constructor}. - */ - function getValue() { - return $this->str; - } - - - /** - * Return the ASCII string of the entry. - * - * This methods returns the same as {@link getValue}. - * - * @param boolean not used with ASCII entries. - * - * @return string the string held, without any final NULL character. - * The string will be the same as the one given to {@link setValue} - * or to the {@link __construct constructor}. - */ - function getText($brief = false) { - return $this->str; - } - -} - - -/** - * Class for holding a date and time. - * - * This class can hold a timestamp, and it will be used as - * in this example where the time is advanced by one week: - * - * $entry = $ifd->getEntry(PelTag::DATE_TIME_ORIGINAL); - * $time = $entry->getValue(); - * print('The image was taken on the ' . date($time, 'jS')); - * $entry->setValue($time + 7 * 24 * 3600); - * - * - * The example used a standard UNIX timestamp, which is the default - * for this class. - * - * But the Exif format defines dates outside the range of a UNIX - * timestamp (about 1970 to 2038) and so you can also get access to - * the timestamp in two other formats: a simple string or a Julian Day - * Count. Please see the Calendar extension in the PHP Manual for more - * information about the Julian Day Count. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryTime extends PelEntryAscii { - - /** - * Constant denoting a UNIX timestamp. - */ - const UNIX_TIMESTAMP = 1; - /** - * Constant denoting a Exif string. - */ - const EXIF_STRING = 2; - /** - * Constant denoting a Julian Day Count. - */ - const JULIAN_DAY_COUNT = 3; - - /** - * The Julian Day Count of the timestamp held by this entry. - * - * This is an integer counting the number of whole days since - * January 1st, 4713 B.C. The fractional part of the timestamp held - * by this entry is stored in {@link $seconds}. - * - * @var int - */ - private $day_count; - - /** - * The number of seconds into the day of the timestamp held by this - * entry. - * - * The number of whole days is stored in {@link $day_count} and the - * number of seconds left-over is stored here. - * - * @var int - */ - private $seconds; - - - /** - * Make a new entry for holding a timestamp. - * - * @param int the Exif tag which this entry represents. There are - * only three standard tags which hold timestamp, so this should be - * one of the constants {@link PelTag::DATE_TIME}, {@link - * PelTag::DATE_TIME_ORIGINAL}, or {@link - * PelTag::DATE_TIME_DIGITIZED}. - * - * @param int the timestamp held by this entry in the correct form - * as indicated by the third argument. For {@link UNIX_TIMESTAMP} - * this is an integer counting the number of seconds since January - * 1st 1970, for {@link EXIF_STRING} this is a string of the form - * 'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a - * floating point number where the integer part denotes the day - * count and the fractional part denotes the time of day (0.25 means - * 6:00, 0.75 means 18:00). - * - * @param int the type of the timestamp. This must be one of - * {@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or - * {@link JULIAN_DAY_COUNT}. - */ - function __construct($tag, $timestamp, $type = self::UNIX_TIMESTAMP) { - parent::__construct($tag); - $this->setValue($timestamp, $type); - } - - - /** - * Return the timestamp of the entry. - * - * The timestamp held by this entry is returned in one of three - * formats: as a standard UNIX timestamp (default), as a fractional - * Julian Day Count, or as a string. - * - * @param int the type of the timestamp. This must be one of - * {@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or - * {@link JULIAN_DAY_COUNT}. - * - * @return int the timestamp held by this entry in the correct form - * as indicated by the type argument. For {@link UNIX_TIMESTAMP} - * this is an integer counting the number of seconds since January - * 1st 1970, for {@link EXIF_STRING} this is a string of the form - * 'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a - * floating point number where the integer part denotes the day - * count and the fractional part denotes the time of day (0.25 means - * 6:00, 0.75 means 18:00). - */ - function getValue($type = self::UNIX_TIMESTAMP) { - switch ($type) { - case self::UNIX_TIMESTAMP: - $seconds = jdtounix($this->day_count); - if ($seconds === false) - /* jdtounix() return false if the Julian Day Count is outside - * the range of a UNIX timestamp. */ - return false; - else - return $seconds + $this->seconds; - - case self::EXIF_STRING: - list($month, $day, $year) = explode('/', jdtogregorian($this->day_count)); - $hours = (int)($this->seconds / 3600); - $minutes = (int)($this->seconds % 3600 / 60); - $seconds = $this->seconds % 60; - return sprintf('%04d:%02d:%02d %02d:%02d:%02d', - $year, $month, $day, $hours, $minutes, $seconds); - case self::JULIAN_DAY_COUNT: - return $this->day_count + $this->seconds / 86400; - default: - throw new PelInvalidArgumentException('Expected UNIX_TIMESTAMP (%d), ' . - 'EXIF_STRING (%d), or ' . - 'JULIAN_DAY_COUNT (%d) for $type, '. - 'got %d.', - self::UNIX_TIMESTAMP, - self::EXIF_STRING, - self::JULIAN_DAY_COUNT, - $type); - } - } - - - /** - * Update the timestamp held by this entry. - * - * @param int the timestamp held by this entry in the correct form - * as indicated by the third argument. For {@link UNIX_TIMESTAMP} - * this is an integer counting the number of seconds since January - * 1st 1970, for {@link EXIF_STRING} this is a string of the form - * 'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a - * floating point number where the integer part denotes the day - * count and the fractional part denotes the time of day (0.25 means - * 6:00, 0.75 means 18:00). - * - * @param int the type of the timestamp. This must be one of - * {@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or - * {@link JULIAN_DAY_COUNT}. - * - * @todo How to deal with timezones? Use the TimeZoneOffset tag - * 0x882A? - */ - function setValue($timestamp, $type = self::UNIX_TIMESTAMP) { - switch ($type) { - case self::UNIX_TIMESTAMP: - $this->day_count = unixtojd($timestamp); - $this->seconds = $timestamp % 86400; - break; - - case self::EXIF_STRING: - /* Clean the timestamp: some timestamps are broken other - * separators than ':' and ' '. */ - $d = split('[^0-9]+', $timestamp); - $this->day_count = gregoriantojd($d[1], $d[2], $d[0]); - $this->seconds = $d[3]*3600 + $d[4]*60 + $d[5]; - break; - - case self::JULIAN_DAY_COUNT: - $this->day_count = (int)floor($timestamp); - $this->seconds = (int)(86400 * ($timestamp - floor($timestamp))); - break; - - default: - throw new PelInvalidArgumentException('Expected UNIX_TIMESTAMP (%d), ' . - 'EXIF_STRING (%d), or ' . - 'JULIAN_DAY_COUNT (%d) for $type, '. - 'got %d.', - self::UNIX_TIMESTAMP, - self::EXIF_STRING, - self::JULIAN_DAY_COUNT, - $type); - } - - /* Now finally update the string which will be used when this is - * turned into bytes. */ - parent::setValue($this->getValue(self::EXIF_STRING)); - } -} - - -/** - * Class for holding copyright information. - * - * The Exif standard specifies a certain format for copyright - * information where the one {@link PelTag::COPYRIGHT copyright - * tag} holds both the photographer and editor copyrights, separated - * by a NULL character. - * - * This class is used to manipulate that tag so that the format is - * kept to the standard. A common use would be to add a new copyright - * tag to an image, since most cameras do not add this tag themselves. - * This would be done like this: - * - * - * $entry = new PelEntryCopyright('Copyright, Martin Geisler, 2004'); - * $ifd0->addEntry($entry); - * - * - * Here we only set the photographer copyright, use the optional - * second argument to specify the editor copyright. If there is only - * an editor copyright, then let the first argument be the empty - * string. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryCopyright extends PelEntryAscii { - - /** - * The photographer copyright. - * - * @var string - */ - private $photographer; - - /** - * The editor copyright. - * - * @var string - */ - private $editor; - - - /** - * Make a new entry for holding copyright information. - * - * @param string the photographer copyright. Use the empty string - * if there is no photographer copyright. - * - * @param string the editor copyright. Use the empty string if - * there is no editor copyright. - */ - function __construct($photographer = '', $editor = '') { - parent::__construct(PelTag::COPYRIGHT); - $this->setValue($photographer, $editor); - } - - - /** - * Update the copyright information. - * - * @param string the photographer copyright. Use the empty string - * if there is no photographer copyright. - * - * @param string the editor copyright. Use the empty string if - * there is no editor copyright. - */ - function setValue($photographer = '', $editor = '') { - $this->photographer = $photographer; - $this->editor = $editor; - - if ($photographer == '' && $editor != '') - $photographer = ' '; - - if ($editor == '') - parent::setValue($photographer); - else - parent::setValue($photographer . chr(0x00) . $editor); - } - - - /** - * Retrive the copyright information. - * - * The strings returned will be the same as the one used previously - * with either {@link __construct the constructor} or with {@link - * setValue}. - * - * @return array an array with two strings, the photographer and - * editor copyrights. The two fields will be returned in that - * order, so that the first array index will be the photographer - * copyright, and the second will be the editor copyright. - */ - function getValue() { - return array($this->photographer, $this->editor); - } - - - /** - * Return a text string with the copyright information. - * - * The photographer and editor copyright fields will be returned - * with a '-' in between if both copyright fields are present, - * otherwise only one of them will be returned. - * - * @param boolean if false, then the strings '(Photographer)' and - * '(Editor)' will be appended to the photographer and editor - * copyright fields (if present), otherwise the fields will be - * returned as is. - * - * @return string the copyright information in a string. - */ - function getText($brief = false) { - if ($brief) { - $p = ''; - $e = ''; - } else { - $p = ' ' . Pel::tra('(Photographer)'); - $e = ' ' . Pel::tra('(Editor)'); - } - - if ($this->photographer != '' && $this->editor != '') - return $this->photographer . $p . ' - ' . $this->editor . $e; - - if ($this->photographer != '') - return $this->photographer . $p; - - if ($this->editor != '') - return $this->editor . $e; - - return ''; - } -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryByte.php b/3.1/modules/autorotate/lib/pel/PelEntryByte.php deleted file mode 100644 index f6482d0c..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryByte.php +++ /dev/null @@ -1,275 +0,0 @@ - - * @version $Revision: 419 $ - * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntryNumber.php'); -/**#@-*/ - - -/** - * Class for holding unsigned bytes. - * - * This class can hold bytes, either just a single byte or an array of - * bytes. The class will be used to manipulate any of the Exif tags - * which has format {@link PelFormat::BYTE}. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryByte extends PelEntryNumber { - - /** - * Make a new entry that can hold an unsigned byte. - * - * The method accept several integer arguments. The {@link - * getValue} method will always return an array except for when a - * single integer argument is given here. - * - * @param PelTag the tag which this entry represents. This - * should be one of the constants defined in {@link PelTag} - * which has format {@link PelFormat::BYTE}. - * - * @param int $value... the byte(s) that this entry will represent. - * The argument passed must obey the same rules as the argument to - * {@link setValue}, namely that it should be within range of an - * unsigned byte, that is between 0 and 255 (inclusive). If not, - * then a {@link PelOverflowException} will be thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->min = 0; - $this->max = 255; - $this->format = PelFormat::BYTE; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Convert a number into bytes. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - function numberToBytes($number, $order) { - return chr($number); - } - -} - - -/** - * Class for holding signed bytes. - * - * This class can hold bytes, either just a single byte or an array of - * bytes. The class will be used to manipulate any of the Exif tags - * which has format {@link PelFormat::BYTE}. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntrySByte extends PelEntryNumber { - - /** - * Make a new entry that can hold a signed byte. - * - * The method accept several integer arguments. The {@link getValue} - * method will always return an array except for when a single - * integer argument is given here. - * - * @param PelTag the tag which this entry represents. This - * should be one of the constants defined in {@link PelTag} - * which has format {@link PelFormat::BYTE}. - * - * @param int $value... the byte(s) that this entry will represent. - * The argument passed must obey the same rules as the argument to - * {@link setValue}, namely that it should be within range of a - * signed byte, that is between -128 and 127 (inclusive). If not, - * then a {@link PelOverflowException} will be thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->min = -128; - $this->max = 127; - $this->format = PelFormat::SBYTE; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Convert a number into bytes. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - function numberToBytes($number, $order) { - return chr($number); - } - -} - - -/** - * Class used to manipulate strings in the format Windows XP uses. - * - * When examining the file properties of an image in Windows XP one - * can fill in title, comment, author, keyword, and subject fields. - * Filling those fields and pressing OK will result in the data being - * written into the Exif data in the image. - * - * The data is written in a non-standard format and can thus not be - * loaded directly --- this class is needed to translate it into - * normal strings. - * - * It is important that entries from this class are only created with - * the {@link PelTag::XP_TITLE}, {@link PelTag::XP_COMMENT}, {@link - * PelTag::XP_AUTHOR}, {@link PelTag::XP_KEYWORD}, and {@link - * PelTag::XP_SUBJECT} tags. If another tag is used the data will no - * longer be correctly decoded when reloaded with PEL. (The data will - * be loaded as an {@link PelEntryByte} entry, which isn't as useful.) - * - * This class is to be used as in - * - * $entry = $ifd->getEntry(PelTag::XP_TITLE); - * print($entry->getValue()); - * $entry->setValue('My favorite cat'); - * - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryWindowsString extends PelEntry { - - /** - * The string hold by this entry. - * - * This is the string that was given to the {@link __construct - * constructor} or later to {@link setValue}, without any extra NULL - * characters or any such nonsense. - * - * @var string - */ - private $str; - - - /** - * Make a new PelEntry that can hold a Windows XP specific string. - * - * @param int the tag which this entry represents. This should be - * one of {@link PelTag::XP_TITLE}, {@link PelTag::XP_COMMENT}, - * {@link PelTag::XP_AUTHOR}, {@link PelTag::XP_KEYWORD}, and {@link - * PelTag::XP_SUBJECT} tags. If another tag is used, then this - * entry will be incorrectly reloaded as a {@link PelEntryByte}. - * - * @param string the string that this entry will represent. It will - * be passed to {@link setValue} and thus has to obey its - * requirements. - */ - function __construct($tag, $str = '') { - $this->tag = $tag; - $this->format = PelFormat::BYTE; - $this->setValue($str); - } - - - /** - * Give the entry a new value. - * - * This will overwrite the previous value. The value can be - * retrieved later with the {@link getValue} method. - * - * @param string the new value of the entry. This should be use the - * Latin-1 encoding and be given without any extra NULL characters. - */ - function setValue($str) { - $l = strlen($str); - - $this->components = 2 * ($l + 1); - $this->str = $str; - $this->bytes = ''; - for ($i = 0; $i < $l; $i++) - $this->bytes .= $str{$i} . chr(0x00); - - $this->bytes .= chr(0x00) . chr(0x00); - } - - - /** - * Return the string of the entry. - * - * @return string the string held, without any extra NULL - * characters. The string will be the same as the one given to - * {@link setValue} or to the {@link __construct constructor}. - */ - function getValue() { - return $this->str; - } - - - /** - * Return the string of the entry. - * - * This methods returns the same as {@link getValue}. - * - * @param boolean not used. - * - * @return string the string held, without any extra NULL - * characters. The string will be the same as the one given to - * {@link setValue} or to the {@link __construct constructor}. - */ - function getText($brief = false) { - return $this->str; - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryLong.php b/3.1/modules/autorotate/lib/pel/PelEntryLong.php deleted file mode 100644 index 1ae4b30b..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryLong.php +++ /dev/null @@ -1,182 +0,0 @@ - - * @version $Revision: 419 $ - * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntryNumber.php'); -/**#@-*/ - - -/** - * Class for holding unsigned longs. - * - * This class can hold longs, either just a single long or an array of - * longs. The class will be used to manipulate any of the Exif tags - * which can have format {@link PelFormat::LONG} like in this - * example: - * - * $w = $ifd->getEntry(PelTag::EXIF_IMAGE_WIDTH); - * $w->setValue($w->getValue() / 2); - * $h = $ifd->getEntry(PelTag::EXIF_IMAGE_HEIGHT); - * $h->setValue($h->getValue() / 2); - * - * Here the width and height is updated to 50% of their original - * values. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryLong extends PelEntryNumber { - - /** - * Make a new entry that can hold an unsigned long. - * - * The method accept its arguments in two forms: several integer - * arguments or a single array argument. The {@link getValue} - * method will always return an array except for when a single - * integer argument is given here, or when an array with just a - * single integer is given. - * - * This means that one can conveniently use objects like this: - * - * $a = new PelEntryLong(PelTag::EXIF_IMAGE_WIDTH, 123456); - * $b = $a->getValue() - 654321; - * - * where the call to {@link getValue} will return an integer instead - * of an array with one integer element, which would then have to be - * extracted. - * - * @param PelTag the tag which this entry represents. This - * should be one of the constants defined in {@link PelTag}, - * e.g., {@link PelTag::IMAGE_WIDTH}, or any other tag which can - * have format {@link PelFormat::LONG}. - * - * @param int $value... the long(s) that this entry will - * represent or an array of longs. The argument passed must obey - * the same rules as the argument to {@link setValue}, namely that - * it should be within range of an unsigned long (32 bit), that is - * between 0 and 4294967295 (inclusive). If not, then a {@link - * PelExifOverflowException} will be thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->min = 0; - $this->max = 4294967295; - $this->format = PelFormat::LONG; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Convert a number into bytes. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - function numberToBytes($number, $order) { - return PelConvert::longToBytes($number, $order); - } -} - - -/** - * Class for holding signed longs. - * - * This class can hold longs, either just a single long or an array of - * longs. The class will be used to manipulate any of the Exif tags - * which can have format {@link PelFormat::SLONG}. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntrySLong extends PelEntryNumber { - - /** - * Make a new entry that can hold a signed long. - * - * The method accept its arguments in two forms: several integer - * arguments or a single array argument. The {@link getValue} - * method will always return an array except for when a single - * integer argument is given here, or when an array with just a - * single integer is given. - * - * @param PelTag the tag which this entry represents. This - * should be one of the constants defined in {@link PelTag} - * which have format {@link PelFormat::SLONG}. - * - * @param int $value... the long(s) that this entry will represent - * or an array of longs. The argument passed must obey the same - * rules as the argument to {@link setValue}, namely that it should - * be within range of a signed long (32 bit), that is between - * -2147483648 and 2147483647 (inclusive). If not, then a {@link - * PelOverflowException} will be thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->min = -2147483648; - $this->max = 2147483647; - $this->format = PelFormat::SLONG; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Convert a number into bytes. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - function numberToBytes($number, $order) { - return PelConvert::sLongToBytes($number, $order); - } -} - - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryNumber.php b/3.1/modules/autorotate/lib/pel/PelEntryNumber.php deleted file mode 100644 index 2301bb62..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryNumber.php +++ /dev/null @@ -1,309 +0,0 @@ - - * @version $Revision: 419 $ - * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelException.php'); -require_once('PelEntry.php'); -/**#@-*/ - - -/** - * Exception cast when numbers overflow. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelOverflowException extends PelException { - - /** - * Construct a new overflow exception. - * - * @param int the value that is out of range. - * - * @param int the minimum allowed value. - * - * @param int the maximum allowed value. - */ - function __construct($v, $min, $max) { - parent::__construct('Value %.0f out of range [%.0f, %.0f]', - $v, $min, $max); - } -} - - -/** - * Class for holding numbers. - * - * This class can hold numbers, with range checks. - * - * @author Martin Geisler - * @package PEL - */ -abstract class PelEntryNumber extends PelEntry { - - /** - * The value held by this entry. - * - * @var array - */ - protected $value = array(); - - /** - * The minimum allowed value. - * - * Any attempt to change the value below this variable will result - * in a {@link PelOverflowException} being thrown. - * - * @var int - */ - protected $min; - - /** - * The maximum allowed value. - * - * Any attempt to change the value over this variable will result in - * a {@link PelOverflowException} being thrown. - * - * @var int - */ - protected $max; - - /** - * The dimension of the number held. - * - * Normal numbers have a dimension of one, pairs have a dimension of - * two, etc. - * - * @var int - */ - protected $dimension = 1; - - - /** - * Change the value. - * - * This method can change both the number of components and the - * value of the components. Range checks will be made on the new - * value, and a {@link PelOverflowException} will be thrown if the - * value is found to be outside the legal range. - * - * The method accept several number arguments. The {@link getValue} - * method will always return an array except for when a single - * number is given here. - * - * @param int|array $value... the new value(s). This can be zero or - * more numbers, that is, either integers or arrays. The input will - * be checked to ensure that the numbers are within the valid range. - * If not, then a {@link PelOverflowException} will be thrown. - * - * @see getValue - */ - function setValue(/* $value... */) { - $value = func_get_args(); - $this->setValueArray($value); - } - - - /** - * Change the value. - * - * This method can change both the number of components and the - * value of the components. Range checks will be made on the new - * value, and a {@link PelOverflowException} will be thrown if the - * value is found to be outside the legal range. - * - * @param array the new values. The array must contain the new - * numbers. - * - * @see getValue - */ - function setValueArray($value) { - foreach ($value as $v) - $this->validateNumber($v); - - $this->components = count($value); - $this->value = $value; - } - - - /** - * Return the numeric value held. - * - * @return int|array this will either be a single number if there is - * only one component, or an array of numbers otherwise. - */ - function getValue() { - if ($this->components == 1) - return $this->value[0]; - else - return $this->value; - } - - - /** - * Validate a number. - * - * This method will check that the number given is within the range - * given my {@link getMin()} and {@link getMax()}, inclusive. If - * not, then a {@link PelOverflowException} is thrown. - * - * @param int|array the number in question. - * - * @return void nothing, but will throw a {@link - * PelOverflowException} if the number is found to be outside the - * legal range and {@link Pel::$strict} is true. - */ - function validateNumber($n) { - if ($this->dimension == 1) { - if ($n < $this->min || $n > $this->max) - Pel::maybeThrow(new PelOverflowException($n, - $this->min, - $this->max)); - } else { - for ($i = 0; $i < $this->dimension; $i++) - if ($n[$i] < $this->min || $n[$i] > $this->max) - Pel::maybeThrow(new PelOverflowException($n[$i], - $this->min, - $this->max)); - } - } - - - /** - * Add a number. - * - * This appends a number to the numbers already held by this entry, - * thereby increasing the number of components by one. - * - * @param int|array the number to be added. - */ - function addNumber($n) { - $this->validateNumber($n); - $this->value[] = $n; - $this->components++; - } - - - /** - * Convert a number into bytes. - * - * The concrete subclasses will have to implement this method so - * that the numbers represented can be turned into bytes. - * - * The method will be called once for each number held by the entry. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - abstract function numberToBytes($number, $order); - - - /** - * Turn this entry into bytes. - * - * @param PelByteOrder the desired byte order, which must be either - * {@link PelConvert::LITTLE_ENDIAN} or {@link - * PelConvert::BIG_ENDIAN}. - * - * @return string bytes representing this entry. - */ - function getBytes($o) { - $bytes = ''; - for ($i = 0; $i < $this->components; $i++) { - if ($this->dimension == 1) { - $bytes .= $this->numberToBytes($this->value[$i], $o); - } else { - for ($j = 0; $j < $this->dimension; $j++) { - $bytes .= $this->numberToBytes($this->value[$i][$j], $o); - } - } - } - return $bytes; - } - - - /** - * Format a number. - * - * This method is called by {@link getText} to format numbers. - * Subclasses should override this method if they need more - * sophisticated behavior than the default, which is to just return - * the number as is. - * - * @param int the number which will be formatted. - * - * @param boolean it could be that there is both a verbose and a - * brief formatting available, and this argument controls that. - * - * @return string the number formatted as a string suitable for - * display. - */ - function formatNumber($number, $brief = false) { - return $number; - } - - - /** - * Get the numeric value of this entry as text. - * - * @param boolean use brief output? The numbers will be separated - * by a single space if brief output is requested, otherwise a space - * and a comma will be used. - * - * @return string the numbers(s) held by this entry. - */ - function getText($brief = false) { - if ($this->components == 0) - return ''; - - $str = $this->formatNumber($this->value[0]); - for ($i = 1; $i < $this->components; $i++) { - $str .= ($brief ? ' ' : ', '); - $str .= $this->formatNumber($this->value[$i]); - } - - return $str; - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryRational.php b/3.1/modules/autorotate/lib/pel/PelEntryRational.php deleted file mode 100644 index 3dd503c8..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryRational.php +++ /dev/null @@ -1,290 +0,0 @@ - - * @version $Revision: 419 $ - * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntryLong.php'); -/**#@-*/ - - -/** - * Class for holding unsigned rational numbers. - * - * This class can hold rational numbers, consisting of a numerator and - * denominator both of which are of type unsigned long. Each rational - * is represented by an array with just two entries: the numerator and - * the denominator, in that order. - * - * The class can hold either just a single rational or an array of - * rationals. The class will be used to manipulate any of the Exif - * tags which can have format {@link PelFormat::RATIONAL} like in this - * example: - * - * - * $resolution = $ifd->getEntry(PelTag::X_RESOLUTION); - * $resolution->setValue(array(1, 300)); - * - * - * Here the x-resolution is adjusted to 1/300, which will be 300 DPI, - * unless the {@link PelTag::RESOLUTION_UNIT resolution unit} is set - * to something different than 2 which means inches. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryRational extends PelEntryLong { - - /** - * Make a new entry that can hold an unsigned rational. - * - * @param PelTag the tag which this entry represents. This should - * be one of the constants defined in {@link PelTag}, e.g., {@link - * PelTag::X_RESOLUTION}, or any other tag which can have format - * {@link PelFormat::RATIONAL}. - * - * @param array $value... the rational(s) that this entry will - * represent. The arguments passed must obey the same rules as the - * argument to {@link setValue}, namely that each argument should be - * an array with two entries, both of which must be within range of - * an unsigned long (32 bit), that is between 0 and 4294967295 - * (inclusive). If not, then a {@link PelOverflowException} will be - * thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->format = PelFormat::RATIONAL; - $this->dimension = 2; - $this->min = 0; - $this->max = 4294967295; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Format a rational number. - * - * The rational will be returned as a string with a slash '/' - * between the numerator and denominator. - * - * @param array the rational which will be formatted. - * - * @param boolean not used. - * - * @return string the rational formatted as a string suitable for - * display. - */ - function formatNumber($number, $brief = false) { - return $number[0] . '/' . $number[1]; - } - - - /** - * Get the value of an entry as text. - * - * The value will be returned in a format suitable for presentation, - * e.g., rationals will be returned as 'x/y', ASCII strings will be - * returned as themselves etc. - * - * @param boolean some values can be returned in a long or more - * brief form, and this parameter controls that. - * - * @return string the value as text. - */ - function getText($brief = false) { - if (isset($this->value[0])) - $v = $this->value[0]; - - switch ($this->tag) { - case PelTag::FNUMBER: - //CC (e->components, 1, v); - return Pel::fmt('f/%.01f', $v[0]/$v[1]); - - case PelTag::APERTURE_VALUE: - //CC (e->components, 1, v); - //if (!v_rat.denominator) return (NULL); - return Pel::fmt('f/%.01f', pow(2, $v[0]/$v[1]/2)); - - case PelTag::FOCAL_LENGTH: - //CC (e->components, 1, v); - //if (!v_rat.denominator) return (NULL); - return Pel::fmt('%.1f mm', $v[0]/$v[1]); - - case PelTag::SUBJECT_DISTANCE: - //CC (e->components, 1, v); - //if (!v_rat.denominator) return (NULL); - return Pel::fmt('%.1f m', $v[0]/$v[1]); - - case PelTag::EXPOSURE_TIME: - //CC (e->components, 1, v); - //if (!v_rat.denominator) return (NULL); - if ($v[0]/$v[1] < 1) - return Pel::fmt('1/%d sec.', $v[1]/$v[0]); - else - return Pel::fmt('%d sec.', $v[0]/$v[1]); - - case PelTag::GPS_LATITUDE: - case PelTag::GPS_LONGITUDE: - $degrees = $this->value[0][0]/$this->value[0][1]; - $minutes = $this->value[1][0]/$this->value[1][1]; - $seconds = $this->value[2][0]/$this->value[2][1]; - - return sprintf('%s° %s\' %s" (%.2f°)', - $degrees, $minutes, $seconds, - $degrees + $minutes/60 + $seconds/3600); - - default: - return parent::getText($brief); - } - } -} - - -/** - * Class for holding signed rational numbers. - * - * This class can hold rational numbers, consisting of a numerator and - * denominator both of which are of type unsigned long. Each rational - * is represented by an array with just two entries: the numerator and - * the denominator, in that order. - * - * The class can hold either just a single rational or an array of - * rationals. The class will be used to manipulate any of the Exif - * tags which can have format {@link PelFormat::SRATIONAL}. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntrySRational extends PelEntrySLong { - - /** - * Make a new entry that can hold a signed rational. - * - * @param PelTag the tag which this entry represents. This should - * be one of the constants defined in {@link PelTag}, e.g., {@link - * PelTag::SHUTTER_SPEED_VALUE}, or any other tag which can have - * format {@link PelFormat::SRATIONAL}. - * - * @param array $value... the rational(s) that this entry will - * represent. The arguments passed must obey the same rules as the - * argument to {@link setValue}, namely that each argument should be - * an array with two entries, both of which must be within range of - * a signed long (32 bit), that is between -2147483648 and - * 2147483647 (inclusive). If not, then a {@link - * PelOverflowException} will be thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->format = PelFormat::SRATIONAL; - $this->dimension = 2; - $this->min = -2147483648; - $this->max = 2147483647; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Format a rational number. - * - * The rational will be returned as a string with a slash '/' - * between the numerator and denominator. Care is taken to display - * '-1/2' instead of the ugly but mathematically equivalent '1/-2'. - * - * @param array the rational which will be formatted. - * - * @param boolean not used. - * - * @return string the rational formatted as a string suitable for - * display. - */ - function formatNumber($number, $brief = false) { - if ($number[1] < 0) - /* Turn output like 1/-2 into -1/2. */ - return (-$number[0]) . '/' . (-$number[1]); - else - return $number[0] . '/' . $number[1]; - } - - - /** - * Get the value of an entry as text. - * - * The value will be returned in a format suitable for presentation, - * e.g., rationals will be returned as 'x/y', ASCII strings will be - * returned as themselves etc. - * - * @param boolean some values can be returned in a long or more - * brief form, and this parameter controls that. - * - * @return string the value as text. - */ - function getText($brief = false) { - if (isset($this->value[0])) - $v = $this->value[0]; - - switch ($this->tag) { - case PelTag::SHUTTER_SPEED_VALUE: - //CC (e->components, 1, v); - //if (!v_srat.denominator) return (NULL); - return Pel::fmt('%.0f/%.0f sec. (APEX: %d)', - $v[0], $v[1], pow(sqrt(2), $v[0]/$v[1])); - - case PelTag::BRIGHTNESS_VALUE: - //CC (e->components, 1, v); - // - // TODO: figure out the APEX thing, or remove this so that it is - // handled by the default clause at the bottom. - return sprintf('%d/%d', $v[0], $v[1]); - //FIXME: How do I calculate the APEX value? - - case PelTag::EXPOSURE_BIAS_VALUE: - //CC (e->components, 1, v); - //if (!v_srat.denominator) return (NULL); - return sprintf('%s%.01f', $v[0]*$v[1] > 0 ? '+' : '', $v[0]/$v[1]); - - default: - return parent::getText($brief); - } - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryShort.php b/3.1/modules/autorotate/lib/pel/PelEntryShort.php deleted file mode 100644 index 72e499d7..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryShort.php +++ /dev/null @@ -1,599 +0,0 @@ - - * @version $Revision: 419 $ - * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntryNumber.php'); -require_once('PelConvert.php'); -require_once('Pel.php'); -/**#@-*/ - - -/** - * Class for holding signed shorts. - * - * This class can hold shorts, either just a single short or an array - * of shorts. The class will be used to manipulate any of the Exif - * tags which has format {@link PelFormat::SHORT} like in this - * example: - * - * - * $w = $ifd->getEntry(PelTag::EXIF_IMAGE_WIDTH); - * $w->setValue($w->getValue() / 2); - * $h = $ifd->getEntry(PelTag::EXIF_IMAGE_HEIGHT); - * $h->setValue($h->getValue() / 2); - * - * - * Here the width and height is updated to 50% of their original - * values. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryShort extends PelEntryNumber { - - /** - * Make a new entry that can hold an unsigned short. - * - * The method accept several integer arguments. The {@link - * getValue} method will always return an array except for when a - * single integer argument is given here. - * - * This means that one can conveniently use objects like this: - * - * $a = new PelEntryShort(PelTag::EXIF_IMAGE_HEIGHT, 42); - * $b = $a->getValue() + 314; - * - * where the call to {@link getValue} will return an integer - * instead of an array with one integer element, which would then - * have to be extracted. - * - * @param PelTag the tag which this entry represents. This should be - * one of the constants defined in {@link PelTag}, e.g., {@link - * PelTag::IMAGE_WIDTH}, {@link PelTag::ISO_SPEED_RATINGS}, - * or any other tag with format {@link PelFormat::SHORT}. - * - * @param int $value... the short(s) that this entry will - * represent. The argument passed must obey the same rules as the - * argument to {@link setValue}, namely that it should be within - * range of an unsigned short, that is between 0 and 65535 - * (inclusive). If not, then a {@link PelOverFlowException} will be - * thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->min = 0; - $this->max = 65535; - $this->format = PelFormat::SHORT; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Convert a number into bytes. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - function numberToBytes($number, $order) { - return PelConvert::shortToBytes($number, $order); - } - - - /** - * Get the value of an entry as text. - * - * The value will be returned in a format suitable for presentation, - * e.g., instead of returning '2' for a {@link - * PelTag::METERING_MODE} tag, 'Center-Weighted Average' is - * returned. - * - * @param boolean some values can be returned in a long or more - * brief form, and this parameter controls that. - * - * @return string the value as text. - */ - function getText($brief = false) { - switch ($this->tag) { - case PelTag::METERING_MODE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Unknown'); - case 1: - return Pel::tra('Average'); - case 2: - return Pel::tra('Center-Weighted Average'); - case 3: - return Pel::tra('Spot'); - case 4: - return Pel::tra('Multi Spot'); - case 5: - return Pel::tra('Pattern'); - case 6: - return Pel::tra('Partial'); - case 255: - return Pel::tra('Other'); - default: - return $this->value[0]; - } - - case PelTag::COMPRESSION: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 1: - return Pel::tra('Uncompressed'); - case 6: - return Pel::tra('JPEG compression'); - default: - return $this->value[0]; - - } - - case PelTag::PLANAR_CONFIGURATION: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 1: - return Pel::tra('chunky format'); - case 2: - return Pel::tra('planar format'); - default: - return $this->value[0]; - } - - case PelTag::SENSING_METHOD: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 1: - return Pel::tra('Not defined'); - case 2: - return Pel::tra('One-chip color area sensor'); - case 3: - return Pel::tra('Two-chip color area sensor'); - case 4: - return Pel::tra('Three-chip color area sensor'); - case 5: - return Pel::tra('Color sequential area sensor'); - case 7: - return Pel::tra('Trilinear sensor'); - case 8: - return Pel::tra('Color sequential linear sensor'); - default: - return $this->value[0]; - } - - case PelTag::LIGHT_SOURCE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Unknown'); - case 1: - return Pel::tra('Daylight'); - case 2: - return Pel::tra('Fluorescent'); - case 3: - return Pel::tra('Tungsten (incandescent light)'); - case 4: - return Pel::tra('Flash'); - case 9: - return Pel::tra('Fine weather'); - case 10: - return Pel::tra('Cloudy weather'); - case 11: - return Pel::tra('Shade'); - case 12: - return Pel::tra('Daylight fluorescent'); - case 13: - return Pel::tra('Day white fluorescent'); - case 14: - return Pel::tra('Cool white fluorescent'); - case 15: - return Pel::tra('White fluorescent'); - case 17: - return Pel::tra('Standard light A'); - case 18: - return Pel::tra('Standard light B'); - case 19: - return Pel::tra('Standard light C'); - case 20: - return Pel::tra('D55'); - case 21: - return Pel::tra('D65'); - case 22: - return Pel::tra('D75'); - case 24: - return Pel::tra('ISO studio tungsten'); - case 255: - return Pel::tra('Other'); - default: - return $this->value[0]; - } - - case PelTag::FOCAL_PLANE_RESOLUTION_UNIT: - case PelTag::RESOLUTION_UNIT: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 2: - return Pel::tra('Inch'); - case 3: - return Pel::tra('Centimeter'); - default: - return $this->value[0]; - } - - case PelTag::EXPOSURE_PROGRAM: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Not defined'); - case 1: - return Pel::tra('Manual'); - case 2: - return Pel::tra('Normal program'); - case 3: - return Pel::tra('Aperture priority'); - case 4: - return Pel::tra('Shutter priority'); - case 5: - return Pel::tra('Creative program (biased toward depth of field)'); - case 6: - return Pel::tra('Action program (biased toward fast shutter speed)'); - case 7: - return Pel::tra('Portrait mode (for closeup photos with the background out of focus'); - case 8: - return Pel::tra('Landscape mode (for landscape photos with the background in focus'); - default: - return $this->value[0]; - } - - case PelTag::ORIENTATION: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 1: - return Pel::tra('top - left'); - case 2: - return Pel::tra('top - right'); - case 3: - return Pel::tra('bottom - right'); - case 4: - return Pel::tra('bottom - left'); - case 5: - return Pel::tra('left - top'); - case 6: - return Pel::tra('right - top'); - case 7: - return Pel::tra('right - bottom'); - case 8: - return Pel::tra('left - bottom'); - default: - return $this->value[0]; - } - - case PelTag::YCBCR_POSITIONING: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 1: - return Pel::tra('centered'); - case 2: - return Pel::tra('co-sited'); - default: - return $this->value[0]; - } - - case PelTag::YCBCR_SUB_SAMPLING: - //CC (e->components, 2, v); - if ($this->value[0] == 2 && $this->value[1] == 1) - return 'YCbCr4:2:2'; - if ($this->value[0] == 2 && $this->value[1] == 2) - return 'YCbCr4:2:0'; - - return $this->value[0] . ', ' . $this->value[1]; - - case PelTag::PHOTOMETRIC_INTERPRETATION: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 2: - return 'RGB'; - case 6: - return 'YCbCr'; - default: - return $this->value[0]; - } - - case PelTag::COLOR_SPACE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 1: - return 'sRGB'; - case 2: - return 'Adobe RGB'; - case 0xffff: - return Pel::tra('Uncalibrated'); - default: - return $this->value[0]; - } - - case PelTag::FLASH: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0x0000: - return Pel::tra('Flash did not fire.'); - case 0x0001: - return Pel::tra('Flash fired.'); - case 0x0005: - return Pel::tra('Strobe return light not detected.'); - case 0x0007: - return Pel::tra('Strobe return light detected.'); - case 0x0009: - return Pel::tra('Flash fired, compulsory flash mode.'); - case 0x000d: - return Pel::tra('Flash fired, compulsory flash mode, return light not detected.'); - case 0x000f: - return Pel::tra('Flash fired, compulsory flash mode, return light detected.'); - case 0x0010: - return Pel::tra('Flash did not fire, compulsory flash mode.'); - case 0x0018: - return Pel::tra('Flash did not fire, auto mode.'); - case 0x0019: - return Pel::tra('Flash fired, auto mode.'); - case 0x001d: - return Pel::tra('Flash fired, auto mode, return light not detected.'); - case 0x001f: - return Pel::tra('Flash fired, auto mode, return light detected.'); - case 0x0020: - return Pel::tra('No flash function.'); - case 0x0041: - return Pel::tra('Flash fired, red-eye reduction mode.'); - case 0x0045: - return Pel::tra('Flash fired, red-eye reduction mode, return light not detected.'); - case 0x0047: - return Pel::tra('Flash fired, red-eye reduction mode, return light detected.'); - case 0x0049: - return Pel::tra('Flash fired, compulsory flash mode, red-eye reduction mode.'); - case 0x004d: - return Pel::tra('Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected.'); - case 0x004f: - return Pel::tra('Flash fired, compulsory flash mode, red-eye reduction mode, return light detected.'); - case 0x0058: - return Pel::tra('Flash did not fire, auto mode, red-eye reduction mode.'); - case 0x0059: - return Pel::tra('Flash fired, auto mode, red-eye reduction mode.'); - case 0x005d: - return Pel::tra('Flash fired, auto mode, return light not detected, red-eye reduction mode.'); - case 0x005f: - return Pel::tra('Flash fired, auto mode, return light detected, red-eye reduction mode.'); - default: - return $this->value[0]; - } - - case PelTag::CUSTOM_RENDERED: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Normal process'); - case 1: - return Pel::tra('Custom process'); - default: - return $this->value[0]; - } - - case PelTag::EXPOSURE_MODE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Auto exposure'); - case 1: - return Pel::tra('Manual exposure'); - case 2: - return Pel::tra('Auto bracket'); - default: - return $this->value[0]; - } - - case PelTag::WHITE_BALANCE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Auto white balance'); - case 1: - return Pel::tra('Manual white balance'); - default: - return $this->value[0]; - } - - case PelTag::SCENE_CAPTURE_TYPE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Standard'); - case 1: - return Pel::tra('Landscape'); - case 2: - return Pel::tra('Portrait'); - case 3: - return Pel::tra('Night scene'); - default: - return $this->value[0]; - } - - case PelTag::GAIN_CONTROL: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Normal'); - case 1: - return Pel::tra('Low gain up'); - case 2: - return Pel::tra('High gain up'); - case 3: - return Pel::tra('Low gain down'); - case 4: - return Pel::tra('High gain down'); - default: - return $this->value[0]; - } - - case PelTag::SATURATION: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Normal'); - case 1: - return Pel::tra('Low saturation'); - case 2: - return Pel::tra('High saturation'); - default: - return $this->value[0]; - } - - case PelTag::CONTRAST: - case PelTag::SHARPNESS: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Normal'); - case 1: - return Pel::tra('Soft'); - case 2: - return Pel::tra('Hard'); - default: - return $this->value[0]; - } - - case PelTag::SUBJECT_DISTANCE_RANGE: - //CC (e->components, 1, v); - switch ($this->value[0]) { - case 0: - return Pel::tra('Unknown'); - case 1: - return Pel::tra('Macro'); - case 2: - return Pel::tra('Close view'); - case 3: - return Pel::tra('Distant view'); - default: - return $this->value[0]; - } - - case PelTag::SUBJECT_AREA: - switch ($this->components) { - case 2: - return Pel::fmt('(x,y) = (%d,%d)', $this->value[0], $this->value[1]); - case 3: - return Pel::fmt('Within distance %d of (x,y) = (%d,%d)', - $this->value[0], $this->value[1], $this->value[2]); - case 4: - return Pel::fmt('Within rectangle (width %d, height %d) around (x,y) = (%d,%d)', - $this->value[0], $this->value[1], - $this->value[2], $this->value[3]); - - default: - return Pel::fmt('Unexpected number of components (%d, expected 2, 3, or 4).', $this->components); - } - - default: - return parent::getText($brief); - } - } -} - - -/** - * Class for holding signed shorts. - * - * This class can hold shorts, either just a single short or an array - * of shorts. The class will be used to manipulate any of the Exif - * tags which has format {@link PelFormat::SSHORT}. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntrySShort extends PelEntryNumber { - - /** - * Make a new entry that can hold a signed short. - * - * The method accept several integer arguments. The {@link - * getValue} method will always return an array except for when a - * single integer argument is given here. - * - * @param PelTag the tag which this entry represents. This - * should be one of the constants defined in {@link PelTag} - * which has format {@link PelFormat::SSHORT}. - * - * @param int $value... the signed short(s) that this entry will - * represent. The argument passed must obey the same rules as the - * argument to {@link setValue}, namely that it should be within - * range of a signed short, that is between -32768 to 32767 - * (inclusive). If not, then a {@link PelOverFlowException} will be - * thrown. - */ - function __construct($tag /* $value... */) { - $this->tag = $tag; - $this->min = -32768; - $this->max = 32767; - $this->format = PelFormat::SSHORT; - - $value = func_get_args(); - array_shift($value); - $this->setValueArray($value); - } - - - /** - * Convert a number into bytes. - * - * @param int the number that should be converted. - * - * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and - * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. - * - * @return string bytes representing the number given. - */ - function numberToBytes($number, $order) { - return PelConvert::sShortToBytes($number, $order); - } -} - - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelEntryUndefined.php b/3.1/modules/autorotate/lib/pel/PelEntryUndefined.php deleted file mode 100644 index 8ee8df34..00000000 --- a/3.1/modules/autorotate/lib/pel/PelEntryUndefined.php +++ /dev/null @@ -1,416 +0,0 @@ - - * @version $Revision: 380 $ - * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntry.php'); -/**#@-*/ - - -/** - * Class for holding data of any kind. - * - * This class can hold bytes of undefined format. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryUndefined extends PelEntry { - - /** - * Make a new PelEntry that can hold undefined data. - * - * @param PelTag the tag which this entry represents. This - * should be one of the constants defined in {@link PelTag}, - * e.g., {@link PelTag::SCENE_TYPE}, {@link - * PelTag::MAKER_NOTE} or any other tag with format {@link - * PelFormat::UNDEFINED}. - * - * @param string the data that this entry will be holding. Since - * the format is undefined, no checking will be done on the data. - */ - function __construct($tag, $data = '') { - $this->tag = $tag; - $this->format = PelFormat::UNDEFINED; - $this->setValue($data); - } - - - /** - * Set the data of this undefined entry. - * - * @param string the data that this entry will be holding. Since - * the format is undefined, no checking will be done on the data. - */ - function setValue($data) { - $this->components = strlen($data); - $this->bytes = $data; - } - - - /** - * Get the data of this undefined entry. - * - * @return string the data that this entry is holding. - */ - function getValue() { - return $this->bytes; - } - - - /** - * Get the value of this entry as text. - * - * The value will be returned in a format suitable for presentation. - * - * @param boolean some values can be returned in a long or more - * brief form, and this parameter controls that. - * - * @return string the value as text. - */ - function getText($brief = false) { - switch ($this->tag) { - case PelTag::FILE_SOURCE: - //CC (e->components, 1, v); - switch (ord($this->bytes{0})) { - case 0x03: - return 'DSC'; - default: - return sprintf('0x%02X', ord($this->bytes{0})); - } - - case PelTag::SCENE_TYPE: - //CC (e->components, 1, v); - switch (ord($this->bytes{0})) { - case 0x01: - return 'Directly photographed'; - default: - return sprintf('0x%02X', ord($this->bytes{0})); - } - - case PelTag::COMPONENTS_CONFIGURATION: - //CC (e->components, 4, v); - $v = ''; - for ($i = 0; $i < 4; $i++) { - switch (ord($this->bytes{$i})) { - case 0: - $v .= '-'; - break; - case 1: - $v .= 'Y'; - break; - case 2: - $v .= 'Cb'; - break; - case 3: - $v .= 'Cr'; - break; - case 4: - $v .= 'R'; - break; - case 5: - $v .= 'G'; - break; - case 6: - $v .= 'B'; - break; - default: - $v .= 'reserved'; - break; - } - if ($i < 3) $v .= ' '; - } - return $v; - - case PelTag::MAKER_NOTE: - // TODO: handle maker notes. - return $this->components . ' bytes unknown MakerNote data'; - - default: - return '(undefined)'; - } - } - -} - - -/** - * Class for a user comment. - * - * This class is used to hold user comments, which can come in several - * different character encodings. The Exif standard specifies a - * certain format of the {@link PelTag::USER_COMMENT user comment - * tag}, and this class will make sure that the format is kept. - * - * The most basic use of this class simply stores an ASCII encoded - * string for later retrieval using {@link getValue}: - * - * - * $entry = new PelEntryUserComment('An ASCII string'); - * echo $entry->getValue(); - * - * - * The string can be encoded with a different encoding, and if so, the - * encoding must be given using the second argument. The Exif - * standard specifies three known encodings: 'ASCII', 'JIS', and - * 'Unicode'. If the user comment is encoded using a character - * encoding different from the tree known encodings, then the empty - * string should be passed as encoding, thereby specifying that the - * encoding is undefined. - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryUserComment extends PelEntryUndefined { - - /** - * The user comment. - * - * @var string - */ - private $comment; - - /** - * The encoding. - * - * This should be one of 'ASCII', 'JIS', 'Unicode', or ''. - * - * @var string - */ - private $encoding; - - /** - * Make a new entry for holding a user comment. - * - * @param string the new user comment. - * - * @param string the encoding of the comment. This should be either - * 'ASCII', 'JIS', 'Unicode', or the empty string specifying an - * undefined encoding. - */ - function __construct($comment = '', $encoding = 'ASCII') { - parent::__construct(PelTag::USER_COMMENT); - $this->setValue($comment, $encoding); - } - - - /** - * Set the user comment. - * - * @param string the new user comment. - * - * @param string the encoding of the comment. This should be either - * 'ASCII', 'JIS', 'Unicode', or the empty string specifying an - * unknown encoding. - */ - function setValue($comment = '', $encoding = 'ASCII') { - $this->comment = $comment; - $this->encoding = $encoding; - parent::setValue(str_pad($encoding, 8, chr(0)) . $comment); - } - - - /** - * Returns the user comment. - * - * The comment is returned with the same character encoding as when - * it was set using {@link setValue} or {@link __construct the - * constructor}. - * - * @return string the user comment. - */ - function getValue() { - return $this->comment; - } - - - /** - * Returns the encoding. - * - * @return string the encoding of the user comment. - */ - function getEncoding() { - return $this->encoding; - } - - - /** - * Returns the user comment. - * - * @return string the user comment. - */ - function getText($brief = false) { - return $this->comment; - } - -} - - -/** - * Class to hold version information. - * - * There are three Exif entries that hold version information: the - * {@link PelTag::EXIF_VERSION}, {@link - * PelTag::FLASH_PIX_VERSION}, and {@link - * PelTag::INTEROPERABILITY_VERSION} tags. This class manages - * those tags. - * - * The class is used in a very straight-forward way: - * - * $entry = new PelEntryVersion(PelTag::EXIF_VERSION, 2.2); - * - * This creates an entry for an file complying to the Exif 2.2 - * standard. It is easy to test for standards level of an unknown - * entry: - * - * if ($entry->getTag() == PelTag::EXIF_VERSION && - * $entry->getValue() > 2.0) { - * echo 'Recent Exif version.'; - * } - * - * - * @author Martin Geisler - * @package PEL - */ -class PelEntryVersion extends PelEntryUndefined { - - /** - * The version held by this entry. - * - * @var float - */ - private $version; - - - /** - * Make a new entry for holding a version. - * - * @param PelTag the tag. This should be one of {@link - * PelTag::EXIF_VERSION}, {@link PelTag::FLASH_PIX_VERSION}, - * or {@link PelTag::INTEROPERABILITY_VERSION}. - * - * @param float the version. The size of the entries leave room for - * exactly four digits: two digits on either side of the decimal - * point. - */ - function __construct($tag, $version = 0.0) { - parent::__construct($tag); - $this->setValue($version); - } - - - /** - * Set the version held by this entry. - * - * @param float the version. The size of the entries leave room for - * exactly four digits: two digits on either side of the decimal - * point. - */ - function setValue($version = 0.0) { - $this->version = $version; - $major = floor($version); - $minor = ($version - $major)*100; - parent::setValue(sprintf('%02.0f%02.0f', $major, $minor)); - } - - - /** - * Return the version held by this entry. - * - * @return float the version. This will be the same as the value - * given to {@link setValue} or {@link __construct the - * constructor}. - */ - function getValue() { - return $this->version; - } - - - /** - * Return a text string with the version. - * - * @param boolean controls if the output should be brief. Brief - * output omits the word 'Version' so the result is just 'Exif x.y' - * instead of 'Exif Version x.y' if the entry holds information - * about the Exif version --- the output for FlashPix is similar. - * - * @return string the version number with the type of the tag, - * either 'Exif' or 'FlashPix'. - */ - function getText($brief = false) { - $v = $this->version; - - /* Versions numbers like 2.0 would be output as just 2 if we don't - * add the '.0' ourselves. */ - if (floor($this->version) == $this->version) - $v .= '.0'; - - switch ($this->tag) { - case PelTag::EXIF_VERSION: - if ($brief) - return Pel::fmt('Exif %s', $v); - else - return Pel::fmt('Exif Version %s', $v); - - case PelTag::FLASH_PIX_VERSION: - if ($brief) - return Pel::fmt('FlashPix %s', $v); - else - return Pel::fmt('FlashPix Version %s', $v); - - case PelTag::INTEROPERABILITY_VERSION: - if ($brief) - return Pel::fmt('Interoperability %s', $v); - else - return Pel::fmt('Interoperability Version %s', $v); - } - - if ($brief) - return $v; - else - return Pel::fmt('Version %s', $v); - - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelException.php b/3.1/modules/autorotate/lib/pel/PelException.php deleted file mode 100644 index b090fd0e..00000000 --- a/3.1/modules/autorotate/lib/pel/PelException.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @version $Revision: 396 $ - * @date $Date: 2005-10-24 00:36:10 +0200 (Mon, 24 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/** - * A printf() capable exception. - * - * This class is a simple extension of the standard Exception class in - * PHP, and all the methods defined there retain their original - * meaning. - * - * @package PEL - * @subpackage Exception - */ -class PelException extends Exception { - - /** - * Construct a new PEL exception. - * - * @param string $fmt an optional format string can be given. It - * will be used as a format string for vprintf(). The remaining - * arguments will be available for the format string as usual with - * vprintf(). - * - * @param mixed $args,... any number of arguments to be used with - * the format string. - */ - function __construct(/* fmt, args... */) { - $args = func_get_args(); - $fmt = array_shift($args); - parent::__construct(vsprintf($fmt, $args)); - } -} - - -/** - * Exception throw if invalid data is found. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelInvalidDataException extends PelException {} - -/** - * Exception throw if an invalid argument is passed. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelInvalidArgumentException extends PelException {} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelExif.php b/3.1/modules/autorotate/lib/pel/PelExif.php deleted file mode 100644 index 6f85d695..00000000 --- a/3.1/modules/autorotate/lib/pel/PelExif.php +++ /dev/null @@ -1,175 +0,0 @@ - - * @version $Revision: 380 $ - * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelJpegContent.php'); -require_once('PelException.php'); -require_once('PelFormat.php'); -require_once('PelEntry.php'); -require_once('PelTiff.php'); -require_once('PelIfd.php'); -require_once('PelTag.php'); -require_once('Pel.php'); -/**#@-*/ - - -/** - * Class representing Exif data. - * - * Exif data resides as {@link PelJpegContent data} and consists of a - * header followed by a number of {@link PelJpegIfd IFDs}. - * - * The interesting method in this class is {@link getTiff()} which - * will return the {@link PelTiff} object which really holds the data - * which one normally think of when talking about Exif data. This is - * because Exif data is stored as an extension of the TIFF file - * format. - * - * @author Martin Geisler - * @package PEL - */ -class PelExif extends PelJpegContent { - - /** - * Exif header. - * - * The Exif data must start with these six bytes to be considered - * valid. - */ - const EXIF_HEADER = "Exif\0\0"; - - /** - * The PelTiff object contained within. - * - * @var PelTiff - */ - private $tiff = null; - - - /** - * Construct a new Exif object. - * - * The new object will be empty --- use the {@link load()} method to - * load Exif data from a {@link PelDataWindow} object, or use the - * {@link setTiff()} to change the {@link PelTiff} object, which is - * the true holder of the Exif {@link PelEntry entries}. - */ - function __construct() { - - } - - - /** - * Load and parse Exif data. - * - * This will populate the object with Exif data, contained as a - * {@link PelTiff} object. This TIFF object can be accessed with - * the {@link getTiff()} method. - */ - function load(PelDataWindow $d) { - Pel::debug('Parsing %d bytes of Exif data...', $d->getSize()); - - /* There must be at least 6 bytes for the Exif header. */ - if ($d->getSize() < 6) - throw new PelInvalidDataException('Expected at least 6 bytes of Exif ' . - 'data, found just %d bytes.', - $d->getSize()); - - /* Verify the Exif header */ - if ($d->strcmp(0, self::EXIF_HEADER)) { - $d->setWindowStart(strlen(self::EXIF_HEADER)); - } else { - throw new PelInvalidDataException('Exif header not found.'); - } - - /* The rest of the data is TIFF data. */ - $this->tiff = new PelTiff(); - $this->tiff->load($d); - } - - - /** - * Change the TIFF information. - * - * Exif data is really stored as TIFF data, and this method can be - * used to change this data from one {@link PelTiff} object to - * another. - * - * @param PelTiff the new TIFF object. - */ - function setTiff(PelTiff $tiff) { - $this->tiff = $tiff; - } - - - /** - * Get the underlying TIFF object. - * - * The actual Exif data is stored in a {@link PelTiff} object, and - * this method provides access to it. - * - * @return PelTiff the TIFF object with the Exif data. - */ - function getTiff() { - return $this->tiff; - } - - - /** - * Produce bytes for the Exif data. - * - * @return string bytes representing this object. - */ - function getBytes() { - return self::EXIF_HEADER . $this->tiff->getBytes(); - } - - - /** - * Return a string representation of this object. - * - * @return string a string describing this object. This is mostly - * useful for debugging. - */ - function __toString() { - return Pel::tra("Dumping Exif data...\n") . - $this->tiff->__toString(); - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelFormat.php b/3.1/modules/autorotate/lib/pel/PelFormat.php deleted file mode 100644 index 4b2badcd..00000000 --- a/3.1/modules/autorotate/lib/pel/PelFormat.php +++ /dev/null @@ -1,225 +0,0 @@ - - * @version $Revision: 380 $ - * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/** - * Namespace for functions operating on Exif formats. - * - * This class defines the constants that are to be used whenever one - * has to refer to the format of an Exif tag. They will be - * collectively denoted by the pseudo-type PelFormat throughout the - * documentation. - * - * All the methods defined here are static, and they all operate on a - * single argument which should be one of the class constants. - * - * @author Martin Geisler - * @package PEL - */ -class PelFormat { - - /** - * Unsigned byte. - * - * Each component will be an unsigned 8-bit integer with a value - * between 0 and 255. - * - * Modelled with the {@link PelEntryByte} class. - */ - const BYTE = 1; - - /** - * ASCII string. - * - * Each component will be an ASCII character. - * - * Modelled with the {@link PelEntryAscii} class. - */ - const ASCII = 2; - - /** - * Unsigned short. - * - * Each component will be an unsigned 16-bit integer with a value - * between 0 and 65535. - * - * Modelled with the {@link PelEntryShort} class. - */ - const SHORT = 3; - - /** - * Unsigned long. - * - * Each component will be an unsigned 32-bit integer with a value - * between 0 and 4294967295. - * - * Modelled with the {@link PelEntryLong} class. - */ - const LONG = 4; - - /** - * Unsigned rational number. - * - * Each component will consist of two unsigned 32-bit integers - * denoting the enumerator and denominator. Each integer will have - * a value between 0 and 4294967295. - * - * Modelled with the {@link PelEntryRational} class. - */ - const RATIONAL = 5; - - /** - * Signed byte. - * - * Each component will be a signed 8-bit integer with a value - * between -128 and 127. - * - * Modelled with the {@link PelEntrySByte} class. - */ - const SBYTE = 6; - - /** - * Undefined byte. - * - * Each component will be a byte with no associated interpretation. - * - * Modelled with the {@link PelEntryUndefined} class. - */ - const UNDEFINED = 7; - - /** - * Signed short. - * - * Each component will be a signed 16-bit integer with a value - * between -32768 and 32767. - * - * Modelled with the {@link PelEntrySShort} class. - */ - const SSHORT = 8; - - /** - * Signed long. - * - * Each component will be a signed 32-bit integer with a value - * between -2147483648 and 2147483647. - * - * Modelled with the {@link PelEntrySLong} class. - */ - const SLONG = 9; - - /** - * Signed rational number. - * - * Each component will consist of two signed 32-bit integers - * denoting the enumerator and denominator. Each integer will have - * a value between -2147483648 and 2147483647. - * - * Modelled with the {@link PelEntrySRational} class. - */ - const SRATIONAL = 10; - - /** - * Floating point number. - * - * Entries with this format are not currently implemented. - */ - const FLOAT = 11; - - /** - * Double precision floating point number. - * - * Entries with this format are not currently implemented. - */ - const DOUBLE = 12; - - - /** - * Returns the name of a format. - * - * @param PelFormat the format. - * - * @return string the name of the format, e.g., 'Ascii' for the - * {@link ASCII} format etc. - */ - static function getName($type) { - switch ($type) { - case self::ASCII: return 'Ascii'; - case self::BYTE: return 'Byte'; - case self::SHORT: return 'Short'; - case self::LONG: return 'Long'; - case self::RATIONAL: return 'Rational'; - case self::SBYTE: return 'SByte'; - case self::SSHORT: return 'SShort'; - case self::SLONG: return 'SLong'; - case self::SRATIONAL: return 'SRational'; - case self::FLOAT: return 'Float'; - case self::DOUBLE: return 'Double'; - case self::UNDEFINED: return 'Undefined'; - default: - return Pel::fmt('Unknown format: 0x%X', $type); - } - } - - - /** - * Return the size of components in a given format. - * - * @param PelFormat the format. - * - * @return the size in bytes needed to store one component with the - * given format. - */ - static function getSize($type) { - switch ($type) { - case self::ASCII: return 1; - case self::BYTE: return 1; - case self::SHORT: return 2; - case self::LONG: return 4; - case self::RATIONAL: return 8; - case self::SBYTE: return 1; - case self::SSHORT: return 2; - case self::SLONG: return 4; - case self::SRATIONAL: return 8; - case self::FLOAT: return 4; - case self::DOUBLE: return 8; - case self::UNDEFINED: return 1; - default: - return Pel::fmt('Unknown format: 0x%X', $type); - } - } - -} -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelIfd.php b/3.1/modules/autorotate/lib/pel/PelIfd.php deleted file mode 100644 index 86c7fad1..00000000 --- a/3.1/modules/autorotate/lib/pel/PelIfd.php +++ /dev/null @@ -1,1200 +0,0 @@ - - * @version $Revision: 443 $ - * @date $Date: 2006-09-17 20:32:04 +0200 (Sun, 17 Sep 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelEntryUndefined.php'); -require_once('PelEntryRational.php'); -require_once('PelDataWindow.php'); -require_once('PelEntryAscii.php'); -require_once('PelEntryShort.php'); -require_once('PelEntryByte.php'); -require_once('PelEntryLong.php'); -require_once('PelException.php'); -require_once('PelFormat.php'); -require_once('PelEntry.php'); -require_once('PelTag.php'); -require_once('Pel.php'); -/**#@-*/ - - -/** - * Exception indicating a general problem with the IFD. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelIfdException extends PelException {} - -/** - * Class representing an Image File Directory (IFD). - * - * {@link PelTiff TIFF data} is structured as a number of Image File - * Directories, IFDs for short. Each IFD contains a number of {@link - * PelEntry entries}, some data and finally a link to the next IFD. - * - * @author Martin Geisler - * @package PEL - */ -class PelIfd implements IteratorAggregate, ArrayAccess { - - /** - * Main image IFD. - * - * Pass this to the constructor when creating an IFD which will be - * the IFD of the main image. - */ - const IFD0 = 0; - - /** - * Thumbnail image IFD. - * - * Pass this to the constructor when creating an IFD which will be - * the IFD of the thumbnail image. - */ - const IFD1 = 1; - - /** - * Exif IFD. - * - * Pass this to the constructor when creating an IFD which will be - * the Exif sub-IFD. - */ - const EXIF = 2; - - /** - * GPS IFD. - * - * Pass this to the constructor when creating an IFD which will be - * the GPS sub-IFD. - */ - const GPS = 3; - - /** - * Interoperability IFD. - * - * Pass this to the constructor when creating an IFD which will be - * the interoperability sub-IFD. - */ - const INTEROPERABILITY = 4; - - /** - * The entries held by this directory. - * - * Each tag in the directory is represented by a {@link PelEntry} - * object in this array. - * - * @var array - */ - private $entries = array(); - - /** - * The type of this directory. - * - * Initialized in the constructor. Must be one of {@link IFD0}, - * {@link IFD1}, {@link EXIF}, {@link GPS}, or {@link - * INTEROPERABILITY}. - * - * @var int - */ - private $type; - - /** - * The next directory. - * - * This will be initialized in the constructor, or be left as null - * if this is the last directory. - * - * @var PelIfd - */ - private $next = null; - - /** - * Sub-directories pointed to by this directory. - * - * This will be an array of ({@link PelTag}, {@link PelIfd}) pairs. - * - * @var array - */ - private $sub = array(); - - /** - * The thumbnail data. - * - * This will be initialized in the constructor, or be left as null - * if there are no thumbnail as part of this directory. - * - * @var PelDataWindow - */ - private $thumb_data = null; - // TODO: use this format to choose between the - // JPEG_INTERCHANGE_FORMAT and STRIP_OFFSETS tags. - // private $thumb_format; - - - /** - * Construct a new Image File Directory (IFD). - * - * The IFD will be empty, use the {@link addEntry()} method to add - * an {@link PelEntry}. Use the {@link setNext()} method to link - * this IFD to another. - * - * @param int type the type of this IFD. Must be one of {@link - * IFD0}, {@link IFD1}, {@link EXIF}, {@link GPS}, or {@link - * INTEROPERABILITY}. An {@link PelIfdException} will be thrown - * otherwise. - */ - function __construct($type) { - if ($type != PelIfd::IFD0 && $type != PelIfd::IFD1 && - $type != PelIfd::EXIF && $type != PelIfd::GPS && - $type != PelIfd::INTEROPERABILITY) - throw new PelIfdException('Unknown IFD type: %d', $type); - - $this->type = $type; - } - - - /** - * Load data into a Image File Directory (IFD). - * - * @param PelDataWindow the data window that will provide the data. - * - * @param int the offset within the window where the directory will - * be found. - */ - function load(PelDataWindow $d, $offset) { - $thumb_offset = 0; - $thumb_length = 0; - - Pel::debug('Constructing IFD at offset %d from %d bytes...', - $offset, $d->getSize()); - - /* Read the number of entries */ - $n = $d->getShort($offset); - Pel::debug('Loading %d entries...', $n); - - $offset += 2; - - /* Check if we have enough data. */ - if ($offset + 12 * $n > $d->getSize()) { - $n = floor(($offset - $d->getSize()) / 12); - Pel::maybeThrow(new PelIfdException('Adjusted to: %d.', $n)); - } - - for ($i = 0; $i < $n; $i++) { - // TODO: increment window start instead of using offsets. - $tag = $d->getShort($offset + 12 * $i); - Pel::debug('Loading entry with tag 0x%04X: %s (%d of %d)...', - $tag, PelTag::getName($this->type, $tag), $i + 1, $n); - - switch ($tag) { - case PelTag::EXIF_IFD_POINTER: - case PelTag::GPS_INFO_IFD_POINTER: - case PelTag::INTEROPERABILITY_IFD_POINTER: - $o = $d->getLong($offset + 12 * $i + 8); - Pel::debug('Found sub IFD at offset %d', $o); - - /* Map tag to IFD type. */ - if ($tag == PelTag::EXIF_IFD_POINTER) - $type = PelIfd::EXIF; - elseif ($tag == PelTag::GPS_INFO_IFD_POINTER) - $type = PelIfd::GPS; - elseif ($tag == PelTag::INTEROPERABILITY_IFD_POINTER) - $type = PelIfd::INTEROPERABILITY; - - $this->sub[$type] = new PelIfd($type); - $this->sub[$type]->load($d, $o); - break; - case PelTag::JPEG_INTERCHANGE_FORMAT: - $thumb_offset = $d->getLong($offset + 12 * $i + 8); - $this->safeSetThumbnail($d, $thumb_offset, $thumb_length); - break; - case PelTag::JPEG_INTERCHANGE_FORMAT_LENGTH: - $thumb_length = $d->getLong($offset + 12 * $i + 8); - $this->safeSetThumbnail($d, $thumb_offset, $thumb_length); - break; - default: - $format = $d->getShort($offset + 12 * $i + 2); - $components = $d->getLong($offset + 12 * $i + 4); - - /* The data size. If bigger than 4 bytes, the actual data is - * not in the entry but somewhere else, with the offset stored - * in the entry. - */ - $s = PelFormat::getSize($format) * $components; - if ($s > 0) { - $doff = $offset + 12 * $i + 8; - if ($s > 4) - $doff = $d->getLong($doff); - - $data = $d->getClone($doff, $s); - } else { - $data = new PelDataWindow(); - } - - try { - $entry = $this->newEntryFromData($tag, $format, $components, $data); - - if ($this->isValidTag($tag)) { - $entry->setIfdType($this->type); - $this->entries[$tag] = $entry; - } else { - Pel::maybeThrow(new PelInvalidDataException("IFD %s cannot hold\n%s", - $this->getName(), - $entry->__toString())); - } - } catch (PelException $e) { - /* Throw the exception when running in strict mode, store - * otherwise. */ - Pel::maybeThrow($e); - } - - /* The format of the thumbnail is stored in this tag. */ -// TODO: handle TIFF thumbnail. -// if ($tag == PelTag::COMPRESSION) { -// $this->thumb_format = $data->getShort(); -// } - break; - } - } - - /* Offset to next IFD */ - $o = $d->getLong($offset + 12 * $n); - Pel::debug('Current offset is %d, link at %d points to %d.', - $offset, $offset + 12 * $n, $o); - - if ($o > 0) { - /* Sanity check: we need 6 bytes */ - if ($o > $d->getSize() - 6) { - Pel::maybeThrow(new PelIfdException('Bogus offset to next IFD: ' . - '%d > %d!', - $o, $d->getSize() - 6)); - } else { - if ($this->type == PelIfd::IFD1) // IFD1 shouldn't link further... - Pel::maybeThrow(new PelIfdException('IFD1 links to another IFD!')); - - $this->next = new PelIfd(PelIfd::IFD1); - $this->next->load($d, $o); - } - } else { - Pel::debug('Last IFD.'); - } - } - - - /** - * Make a new entry from a bunch of bytes. - * - * This method will create the proper subclass of {@link PelEntry} - * corresponding to the {@link PelTag} and {@link PelFormat} given. - * The entry will be initialized with the data given. - * - * Please note that the data you pass to this method should come - * from an image, that is, it should be raw bytes. If instead you - * want to create an entry for holding, say, an short integer, then - * create a {@link PelEntryShort} object directly and load the data - * into it. - * - * A {@link PelUnexpectedFormatException} is thrown if a mismatch is - * discovered between the tag and format, and likewise a {@link - * PelWrongComponentCountException} is thrown if the number of - * components does not match the requirements of the tag. The - * requirements for a given tag (if any) can be found in the - * documentation for {@link PelTag}. - * - * @param PelTag the tag of the entry. - * - * @param PelFormat the format of the entry. - * - * @param int the components in the entry. - * - * @param PelDataWindow the data which will be used to construct the - * entry. - * - * @return PelEntry a newly created entry, holding the data given. - */ - function newEntryFromData($tag, $format, $components, PelDataWindow $data) { - - /* First handle tags for which we have a specific PelEntryXXX - * class. */ - - switch ($this->type) { - - case self::IFD0: - case self::IFD1: - case self::EXIF: - case self::INTEROPERABILITY: - - switch ($tag) { - case PelTag::DATE_TIME: - case PelTag::DATE_TIME_ORIGINAL: - case PelTag::DATE_TIME_DIGITIZED: - if ($format != PelFormat::ASCII) - throw new PelUnexpectedFormatException($this->type, $tag, $format, - PelFormat::ASCII); - - if ($components != 20) - throw new PelWrongComponentCountException($this->type, $tag, $components, 20); - - // TODO: handle timezones. - return new PelEntryTime($tag, $data->getBytes(0, -1), PelEntryTime::EXIF_STRING); - - case PelTag::COPYRIGHT: - if ($format != PelFormat::ASCII) - throw new PelUnexpectedFormatException($this->type, $tag, $format, - PelFormat::ASCII); - - $v = explode("\0", trim($data->getBytes(), ' ')); - return new PelEntryCopyright($v[0], $v[1]); - - case PelTag::EXIF_VERSION: - case PelTag::FLASH_PIX_VERSION: - case PelTag::INTEROPERABILITY_VERSION: - if ($format != PelFormat::UNDEFINED) - throw new PelUnexpectedFormatException($this->type, $tag, $format, - PelFormat::UNDEFINED); - - return new PelEntryVersion($tag, $data->getBytes() / 100); - - case PelTag::USER_COMMENT: - if ($format != PelFormat::UNDEFINED) - throw new PelUnexpectedFormatException($this->type, $tag, $format, - PelFormat::UNDEFINED); - if ($data->getSize() < 8) { - return new PelEntryUserComment(); - } else { - return new PelEntryUserComment($data->getBytes(8), - rtrim($data->getBytes(0, 8))); - } - - case PelTag::XP_TITLE: - case PelTag::XP_COMMENT: - case PelTag::XP_AUTHOR: - case PelTag::XP_KEYWORDS: - case PelTag::XP_SUBJECT: - if ($format != PelFormat::BYTE) - throw new PelUnexpectedFormatException($this->type, $tag, $format, - PelFormat::BYTE); - - $v = ''; - for ($i = 0; $i < $components; $i++) { - $b = $data->getByte($i); - /* Convert the byte to a character if it is non-null --- - * information about the character encoding of these entries - * would be very nice to have! So far my tests have shown - * that characters in the Latin-1 character set are stored in - * a single byte followed by a NULL byte. */ - if ($b != 0) - $v .= chr($b); - } - - return new PelEntryWindowsString($tag, $v); - } - - case self::GPS: - - default: - /* Then handle the basic formats. */ - switch ($format) { - case PelFormat::BYTE: - $v = new PelEntryByte($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getByte($i)); - return $v; - - case PelFormat::SBYTE: - $v = new PelEntrySByte($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getSByte($i)); - return $v; - - case PelFormat::ASCII: - return new PelEntryAscii($tag, $data->getBytes(0, -1)); - - case PelFormat::SHORT: - $v = new PelEntryShort($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getShort($i*2)); - return $v; - - case PelFormat::SSHORT: - $v = new PelEntrySShort($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getSShort($i*2)); - return $v; - - case PelFormat::LONG: - $v = new PelEntryLong($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getLong($i*4)); - return $v; - - case PelFormat::SLONG: - $v = new PelEntrySLong($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getSLong($i*4)); - return $v; - - case PelFormat::RATIONAL: - $v = new PelEntryRational($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getRational($i*8)); - return $v; - - case PelFormat::SRATIONAL: - $v = new PelEntrySRational($tag); - for ($i = 0; $i < $components; $i++) - $v->addNumber($data->getSRational($i*8)); - return $v; - - case PelFormat::UNDEFINED: - return new PelEntryUndefined($tag, $data->getBytes()); - - default: - throw new PelException('Unsupported format: %s', - PelFormat::getName($format)); - } - } - } - - - - - /** - * Extract thumbnail data safely. - * - * It is safe to call this method repeatedly with either the offset - * or the length set to zero, since it requires both of these - * arguments to be positive before the thumbnail is extracted. - * - * When both parameters are set it will check the length against the - * available data and adjust as necessary. Only then is the - * thumbnail data loaded. - * - * @param PelDataWindow the data from which the thumbnail will be - * extracted. - * - * @param int the offset into the data. - * - * @param int the length of the thumbnail. - */ - private function safeSetThumbnail(PelDataWindow $d, $offset, $length) { - /* Load the thumbnail if both the offset and the length is - * available. */ - if ($offset > 0 && $length > 0) { - /* Some images have a broken length, so we try to carefully - * check the length before we store the thumbnail. */ - if ($offset + $length > $d->getSize()) { - Pel::maybeThrow(new PelIfdException('Thumbnail length %d bytes ' . - 'adjusted to %d bytes.', - $length, - $d->getSize() - $offset)); - $length = $d->getSize() - $offset; - } - - /* Now set the thumbnail normally. */ - $this->setThumbnail($d->getClone($offset, $length)); - } - } - - - /** - * Set thumbnail data. - * - * Use this to embed an arbitrary JPEG image within this IFD. The - * data will be checked to ensure that it has a proper {@link - * PelJpegMarker::EOI} at the end. If not, then the length is - * adjusted until one if found. An {@link PelIfdException} might be - * thrown (depending on {@link Pel::$strict}) this case. - * - * @param PelDataWindow the thumbnail data. - */ - function setThumbnail(PelDataWindow $d) { - $size = $d->getSize(); - /* Now move backwards until we find the EOI JPEG marker. */ - while ($d->getByte($size - 2) != 0xFF || - $d->getByte($size - 1) != PelJpegMarker::EOI) { - $size--; - } - - if ($size != $d->getSize()) - Pel::maybeThrow(new PelIfdException('Decrementing thumbnail size ' . - 'to %d bytes', $size)); - - $this->thumb_data = $d->getClone(0, $size); - } - - - /** - * Get the type of this directory. - * - * @return int of {@link PelIfd::IFD0}, {@link PelIfd::IFD1}, {@link - * PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link - * PelIfd::INTEROPERABILITY}. - */ - function getType() { - return $this->type; - } - - - /** - * Is a given tag valid for this IFD? - * - * Different types of IFDs can contain different kinds of tags --- - * the {@link IFD0} type, for example, cannot contain a {@link - * PelTag::GPS_LONGITUDE} tag. - * - * A special exception is tags with values above 0xF000. They are - * treated as private tags and will be allowed everywhere (use this - * for testing or for implementing your own types of tags). - * - * @param PelTag the tag. - * - * @return boolean true if the tag is considered valid in this IFD, - * false otherwise. - * - * @see getValidTags() - */ - function isValidTag($tag) { - return $tag > 0xF000 || in_array($tag, $this->getValidTags()); - } - - - /** - * Returns a list of valid tags for this IFD. - * - * @return array an array of {@link PelTag}s which are valid for - * this IFD. - */ - function getValidTags() { - switch ($this->type) { - case PelIfd::IFD0: - case PelIfd::IFD1: - return array(PelTag::IMAGE_WIDTH, - PelTag::IMAGE_LENGTH, - PelTag::BITS_PER_SAMPLE, - PelTag::COMPRESSION, - PelTag::PHOTOMETRIC_INTERPRETATION, - PelTag::IMAGE_DESCRIPTION, - PelTag::MAKE, - PelTag::MODEL, - PelTag::STRIP_OFFSETS, - PelTag::ORIENTATION, - PelTag::SAMPLES_PER_PIXEL, - PelTag::ROWS_PER_STRIP, - PelTag::STRIP_BYTE_COUNTS, - PelTag::X_RESOLUTION, - PelTag::Y_RESOLUTION, - PelTag::PLANAR_CONFIGURATION, - PelTag::RESOLUTION_UNIT, - PelTag::TRANSFER_FUNCTION, - PelTag::SOFTWARE, - PelTag::DATE_TIME, - PelTag::ARTIST, - PelTag::WHITE_POINT, - PelTag::PRIMARY_CHROMATICITIES, - PelTag::JPEG_INTERCHANGE_FORMAT, - PelTag::JPEG_INTERCHANGE_FORMAT_LENGTH, - PelTag::YCBCR_COEFFICIENTS, - PelTag::YCBCR_SUB_SAMPLING, - PelTag::YCBCR_POSITIONING, - PelTag::REFERENCE_BLACK_WHITE, - PelTag::COPYRIGHT, - PelTag::EXIF_IFD_POINTER, - PelTag::GPS_INFO_IFD_POINTER, - PelTag::PRINT_IM); - - case PelIfd::EXIF: - return array(PelTag::EXPOSURE_TIME, - PelTag::FNUMBER, - PelTag::EXPOSURE_PROGRAM, - PelTag::SPECTRAL_SENSITIVITY, - PelTag::ISO_SPEED_RATINGS, - PelTag::OECF, - PelTag::EXIF_VERSION, - PelTag::DATE_TIME_ORIGINAL, - PelTag::DATE_TIME_DIGITIZED, - PelTag::COMPONENTS_CONFIGURATION, - PelTag::COMPRESSED_BITS_PER_PIXEL, - PelTag::SHUTTER_SPEED_VALUE, - PelTag::APERTURE_VALUE, - PelTag::BRIGHTNESS_VALUE, - PelTag::EXPOSURE_BIAS_VALUE, - PelTag::MAX_APERTURE_VALUE, - PelTag::SUBJECT_DISTANCE, - PelTag::METERING_MODE, - PelTag::LIGHT_SOURCE, - PelTag::FLASH, - PelTag::FOCAL_LENGTH, - PelTag::MAKER_NOTE, - PelTag::USER_COMMENT, - PelTag::SUB_SEC_TIME, - PelTag::SUB_SEC_TIME_ORIGINAL, - PelTag::SUB_SEC_TIME_DIGITIZED, - PelTag::XP_TITLE, - PelTag::XP_COMMENT, - PelTag::XP_AUTHOR, - PelTag::XP_KEYWORDS, - PelTag::XP_SUBJECT, - PelTag::FLASH_PIX_VERSION, - PelTag::COLOR_SPACE, - PelTag::PIXEL_X_DIMENSION, - PelTag::PIXEL_Y_DIMENSION, - PelTag::RELATED_SOUND_FILE, - PelTag::FLASH_ENERGY, - PelTag::SPATIAL_FREQUENCY_RESPONSE, - PelTag::FOCAL_PLANE_X_RESOLUTION, - PelTag::FOCAL_PLANE_Y_RESOLUTION, - PelTag::FOCAL_PLANE_RESOLUTION_UNIT, - PelTag::SUBJECT_LOCATION, - PelTag::EXPOSURE_INDEX, - PelTag::SENSING_METHOD, - PelTag::FILE_SOURCE, - PelTag::SCENE_TYPE, - PelTag::CFA_PATTERN, - PelTag::CUSTOM_RENDERED, - PelTag::EXPOSURE_MODE, - PelTag::WHITE_BALANCE, - PelTag::DIGITAL_ZOOM_RATIO, - PelTag::FOCAL_LENGTH_IN_35MM_FILM, - PelTag::SCENE_CAPTURE_TYPE, - PelTag::GAIN_CONTROL, - PelTag::CONTRAST, - PelTag::SATURATION, - PelTag::SHARPNESS, - PelTag::DEVICE_SETTING_DESCRIPTION, - PelTag::SUBJECT_DISTANCE_RANGE, - PelTag::IMAGE_UNIQUE_ID, - PelTag::INTEROPERABILITY_IFD_POINTER, - PelTag::GAMMA); - - case PelIfd::GPS: - return array(PelTag::GPS_VERSION_ID, - PelTag::GPS_LATITUDE_REF, - PelTag::GPS_LATITUDE, - PelTag::GPS_LONGITUDE_REF, - PelTag::GPS_LONGITUDE, - PelTag::GPS_ALTITUDE_REF, - PelTag::GPS_ALTITUDE, - PelTag::GPS_TIME_STAMP, - PelTag::GPS_SATELLITES, - PelTag::GPS_STATUS, - PelTag::GPS_MEASURE_MODE, - PelTag::GPS_DOP, - PelTag::GPS_SPEED_REF, - PelTag::GPS_SPEED, - PelTag::GPS_TRACK_REF, - PelTag::GPS_TRACK, - PelTag::GPS_IMG_DIRECTION_REF, - PelTag::GPS_IMG_DIRECTION, - PelTag::GPS_MAP_DATUM, - PelTag::GPS_DEST_LATITUDE_REF, - PelTag::GPS_DEST_LATITUDE, - PelTag::GPS_DEST_LONGITUDE_REF, - PelTag::GPS_DEST_LONGITUDE, - PelTag::GPS_DEST_BEARING_REF, - PelTag::GPS_DEST_BEARING, - PelTag::GPS_DEST_DISTANCE_REF, - PelTag::GPS_DEST_DISTANCE, - PelTag::GPS_PROCESSING_METHOD, - PelTag::GPS_AREA_INFORMATION, - PelTag::GPS_DATE_STAMP, - PelTag::GPS_DIFFERENTIAL); - - case PelIfd::INTEROPERABILITY: - return array(PelTag::INTEROPERABILITY_INDEX, - PelTag::INTEROPERABILITY_VERSION, - PelTag::RELATED_IMAGE_FILE_FORMAT, - PelTag::RELATED_IMAGE_WIDTH, - PelTag::RELATED_IMAGE_LENGTH); - - /* TODO: Where do these tags belong? -PelTag::FILL_ORDER, -PelTag::DOCUMENT_NAME, -PelTag::TRANSFER_RANGE, -PelTag::JPEG_PROC, -PelTag::BATTERY_LEVEL, -PelTag::IPTC_NAA, -PelTag::INTER_COLOR_PROFILE, -PelTag::CFA_REPEAT_PATTERN_DIM, - */ - } - } - - - /** - * Get the name of an IFD type. - * - * @param int one of {@link PelIfd::IFD0}, {@link PelIfd::IFD1}, - * {@link PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link - * PelIfd::INTEROPERABILITY}. - * - * @return string the name of type. - */ - static function getTypeName($type) { - switch ($type) { - case self::IFD0: - return '0'; - case self::IFD1: - return '1'; - case self::EXIF: - return 'Exif'; - case self::GPS: - return 'GPS'; - case self::INTEROPERABILITY: - return 'Interoperability'; - default: - throw new PelIfdException('Unknown IFD type: %d', $type); - } - } - - - /** - * Get the name of this directory. - * - * @return string the name of this directory. - */ - function getName() { - return $this->getTypeName($this->type); - } - - - /** - * Adds an entry to the directory. - * - * @param PelEntry the entry that will be added. - * - * @todo The entry will be identified with its tag, so each - * directory can only contain one entry with each tag. Is this a - * bug? - */ - function addEntry(PelEntry $e) { - $this->entries[$e->getTag()] = $e; - } - - - /** - * Does a given tag exist in this IFD? - * - * This methods is part of the ArrayAccess SPL interface for - * overriding array access of objects, it allows you to check for - * existance of an entry in the IFD: - * - * - * if (isset($ifd[PelTag::FNUMBER])) - * // ... do something with the F-number. - * - * - * @param PelTag the offset to check. - * - * @return boolean whether the tag exists. - */ - function offsetExists($tag) { - return isset($this->entries[$tag]); - } - - - /** - * Retrieve a given tag from this IFD. - * - * This methods is part of the ArrayAccess SPL interface for - * overriding array access of objects, it allows you to read entries - * from the IFD the same was as for an array: - * - * - * $entry = $ifd[PelTag::FNUMBER]; - * - * - * @param PelTag the tag to return. It is an error to ask for a tag - * which is not in the IFD, just like asking for a non-existant - * array entry. - * - * @return PelEntry the entry. - */ - function offsetGet($tag) { - return $this->entries[$tag]; - } - - - /** - * Set or update a given tag in this IFD. - * - * This methods is part of the ArrayAccess SPL interface for - * overriding array access of objects, it allows you to add new - * entries or replace esisting entries by doing: - * - * - * $ifd[PelTag::EXPOSURE_BIAS_VALUE] = $entry; - * - * - * Note that the actual array index passed is ignored! Instead the - * {@link PelTag} from the entry is used. - * - * @param PelTag the offset to update. - * - * @param PelEntry the new value. - */ - function offsetSet($tag, $e) { - if ($e instanceof PelEntry) { - $tag = $e->getTag(); - $this->entries[$tag] = $e; - } else { - throw new PelInvalidArgumentException('Argument "%s" must be a PelEntry.', $e); - } - } - - - /** - * Unset a given tag in this IFD. - * - * This methods is part of the ArrayAccess SPL interface for - * overriding array access of objects, it allows you to delete - * entries in the IFD by doing: - * - * - * unset($ifd[PelTag::EXPOSURE_BIAS_VALUE]) - * - * - * @param PelTag the offset to delete. - */ - function offsetUnset($tag) { - unset($this->entries[$tag]); - } - - - /** - * Retrieve an entry. - * - * @param PelTag the tag identifying the entry. - * - * @return PelEntry the entry associated with the tag, or null if no - * such entry exists. - */ - function getEntry($tag) { - if (isset($this->entries[$tag])) - return $this->entries[$tag]; - else - return null; - } - - - /** - * Returns all entries contained in this IFD. - * - * @return array an array of {@link PelEntry} objects, or rather - * descendant classes. The array has {@link PelTag}s as keys - * and the entries as values. - * - * @see getEntry - * @see getIterator - */ - function getEntries() { - return $this->entries; - } - - - /** - * Return an iterator for all entries contained in this IFD. - * - * Used with foreach as in - * - * - * foreach ($ifd as $tag => $entry) { - * // $tag is now a PelTag and $entry is a PelEntry object. - * } - * - * - * @return Iterator an iterator using the {@link PelTag tags} as - * keys and the entries as values. - */ - function getIterator() { - return new ArrayIterator($this->entries); - } - - - /** - * Returns available thumbnail data. - * - * @return string the bytes in the thumbnail, if any. If the IFD - * does not contain any thumbnail data, the empty string is - * returned. - * - * @todo Throw an exception instead when no data is available? - * - * @todo Return the $this->thumb_data object instead of the bytes? - */ - function getThumbnailData() { - if ($this->thumb_data != null) - return $this->thumb_data->getBytes(); - else - return ''; - } - - - /** - * Make this directory point to a new directory. - * - * @param PelIfd the IFD that this directory will point to. - */ - function setNextIfd(PelIfd $i) { - $this->next = $i; - } - - - /** - * Return the IFD pointed to by this directory. - * - * @return PelIfd the next IFD, following this IFD. If this is the - * last IFD, null is returned. - */ - function getNextIfd() { - return $this->next; - } - - - /** - * Check if this is the last IFD. - * - * @return boolean true if there are no following IFD, false - * otherwise. - */ - function isLastIfd() { - return $this->next == null; - } - - - /** - * Add a sub-IFD. - * - * Any previous sub-IFD of the same type will be overwritten. - * - * @param PelIfd the sub IFD. The type of must be one of {@link - * PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link - * PelIfd::INTEROPERABILITY}. - */ - function addSubIfd(PelIfd $sub) { - $this->sub[$sub->type] = $sub; - } - - - /** - * Return a sub IFD. - * - * @param int the type of the sub IFD. This must be one of {@link - * PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link - * PelIfd::INTEROPERABILITY}. - * - * @return PelIfd the IFD associated with the type, or null if that - * sub IFD does not exist. - */ - function getSubIfd($type) { - if (isset($this->sub[$type])) - return $this->sub[$type]; - else - return null; - } - - - /** - * Get all sub IFDs. - * - * @return array an associative array with (IFD-type, {@link - * PelIfd}) pairs. - */ - function getSubIfds() { - return $this->sub; - } - - - /** - * Turn this directory into bytes. - * - * This directory will be turned into a byte string, with the - * specified byte order. The offsets will be calculated from the - * offset given. - * - * @param int the offset of the first byte of this directory. - * - * @param PelByteOrder the byte order that should be used when - * turning integers into bytes. This should be one of {@link - * PelConvert::LITTLE_ENDIAN} and {@link PelConvert::BIG_ENDIAN}. - */ - function getBytes($offset, $order) { - $bytes = ''; - $extra_bytes = ''; - - Pel::debug('Bytes from IDF will start at offset %d within Exif data', - $offset); - - $n = count($this->entries) + count($this->sub); - if ($this->thumb_data != null) { - /* We need two extra entries for the thumbnail offset and - * length. */ - $n += 2; - } - - $bytes .= PelConvert::shortToBytes($n, $order); - - /* Initialize offset of extra data. This included the bytes - * preceding this IFD, the bytes needed for the count of entries, - * the entries themselves (and sub entries), the extra data in the - * entries, and the IFD link. - */ - $end = $offset + 2 + 12 * $n + 4; - - foreach ($this->entries as $tag => $entry) { - /* Each entry is 12 bytes long. */ - $bytes .= PelConvert::shortToBytes($entry->getTag(), $order); - $bytes .= PelConvert::shortToBytes($entry->getFormat(), $order); - $bytes .= PelConvert::longToBytes($entry->getComponents(), $order); - - /* - * Size? If bigger than 4 bytes, the actual data is not in - * the entry but somewhere else. - */ - $data = $entry->getBytes($order); - $s = strlen($data); - if ($s > 4) { - Pel::debug('Data size %d too big, storing at offset %d instead.', - $s, $end); - $bytes .= PelConvert::longToBytes($end, $order); - $extra_bytes .= $data; - $end += $s; - } else { - Pel::debug('Data size %d fits.', $s); - /* Copy data directly, pad with NULL bytes as necessary to - * fill out the four bytes available.*/ - $bytes .= $data . str_repeat(chr(0), 4 - $s); - } - } - - if ($this->thumb_data != null) { - Pel::debug('Appending %d bytes of thumbnail data at %d', - $this->thumb_data->getSize(), $end); - // TODO: make PelEntry a class that can be constructed with - // arguments corresponding to the newt four lines. - $bytes .= PelConvert::shortToBytes(PelTag::JPEG_INTERCHANGE_FORMAT_LENGTH, - $order); - $bytes .= PelConvert::shortToBytes(PelFormat::LONG, $order); - $bytes .= PelConvert::longToBytes(1, $order); - $bytes .= PelConvert::longToBytes($this->thumb_data->getSize(), - $order); - - $bytes .= PelConvert::shortToBytes(PelTag::JPEG_INTERCHANGE_FORMAT, - $order); - $bytes .= PelConvert::shortToBytes(PelFormat::LONG, $order); - $bytes .= PelConvert::longToBytes(1, $order); - $bytes .= PelConvert::longToBytes($end, $order); - - $extra_bytes .= $this->thumb_data->getBytes(); - $end += $this->thumb_data->getSize(); - } - - - /* Find bytes from sub IFDs. */ - $sub_bytes = ''; - foreach ($this->sub as $type => $sub) { - if ($type == PelIfd::EXIF) - $tag = PelTag::EXIF_IFD_POINTER; - elseif ($type == PelIfd::GPS) - $tag = PelTag::GPS_INFO_IFD_POINTER; - elseif ($type == PelIfd::INTEROPERABILITY) - $tag = PelTag::INTEROPERABILITY_IFD_POINTER; - - /* Make an aditional entry with the pointer. */ - $bytes .= PelConvert::shortToBytes($tag, $order); - /* Next the format, which is always unsigned long. */ - $bytes .= PelConvert::shortToBytes(PelFormat::LONG, $order); - /* There is only one component. */ - $bytes .= PelConvert::longToBytes(1, $order); - - $data = $sub->getBytes($end, $order); - $s = strlen($data); - $sub_bytes .= $data; - - $bytes .= PelConvert::longToBytes($end, $order); - $end += $s; - } - - /* Make link to next IFD, if any*/ - if ($this->isLastIFD()) { - $link = 0; - } else { - $link = $end; - } - - Pel::debug('Link to next IFD: %d', $link); - - $bytes .= PelConvert::longtoBytes($link, $order); - - $bytes .= $extra_bytes . $sub_bytes; - - if (!$this->isLastIfd()) - $bytes .= $this->next->getBytes($end, $order); - - return $bytes; - } - - - /** - * Turn this directory into text. - * - * @return string information about the directory, mainly for - * debugging. - */ - function __toString() { - $str = Pel::fmt("Dumping IFD %s with %d entries...\n", - $this->getName(), count($this->entries)); - - foreach ($this->entries as $entry) - $str .= $entry->__toString(); - - $str .= Pel::fmt("Dumping %d sub IFDs...\n", count($this->sub)); - - foreach ($this->sub as $type => $ifd) - $str .= $ifd->__toString(); - - if ($this->next != null) - $str .= $this->next->__toString(); - - return $str; - } - - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelJpeg.php b/3.1/modules/autorotate/lib/pel/PelJpeg.php deleted file mode 100644 index f1fb0a7c..00000000 --- a/3.1/modules/autorotate/lib/pel/PelJpeg.php +++ /dev/null @@ -1,599 +0,0 @@ - - * @version $Revision: 473 $ - * @date $Date: 2006-11-24 00:12:21 +0100 (Fri, 24 Nov 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelJpegComment.php'); -require_once('PelJpegContent.php'); -require_once('PelDataWindow.php'); -require_once('PelJpegMarker.php'); -require_once('PelException.php'); -require_once('PelExif.php'); -require_once('Pel.php'); -/**#@-*/ - - -/** - * Exception thrown when an invalid marker is found. - * - * This exception is thrown when PEL expects to find a {@link - * PelJpegMarker} and instead finds a byte that isn't a known marker. - * - * @author Martin Geisler - * @package PEL - * @subpackage Exception - */ -class PelJpegInvalidMarkerException extends PelException { - - /** - * Construct a new invalid marker exception. - * - * The exception will contain a message describing the error, - * including the byte found and the offset of the offending byte. - * - * @param int the byte found. - * - * @param int the offset in the data. - */ - function __construct($marker, $offset) { - parent::__construct('Invalid marker found at offset %d: 0x%2X', - $offset, $marker); - } -} - -/** - * Class for handling JPEG data. - * - * The {@link PelJpeg} class defined here provides an abstraction for - * dealing with a JPEG file. The file will be contain a number of - * sections containing some {@link PelJpegContent content} identified - * by a {@link PelJpegMarker marker}. - * - * The {@link getExif()} method is used get hold of the {@link - * PelJpegMarker::APP1 APP1} section which stores Exif data. So if - * the name of the JPEG file is stored in $filename, then one would - * get hold of the Exif data by saying: - * - * - * $jpeg = new PelJpeg($filename); - * $exif = $jpeg->getExif(); - * $tiff = $exif->getTiff(); - * $ifd0 = $tiff->getIfd(); - * $exif = $ifd0->getSubIfd(PelIfd::EXIF); - * $ifd1 = $ifd0->getNextIfd(); - * - * - * The $idf0 and $ifd1 variables will then be two {@link PelTiff TIFF} - * {@link PelIfd Image File Directories}, in which the data is stored - * under the keys found in {@link PelTag}. - * - * Should one have some image data (in the form of a {@link - * PelDataWindow}) of an unknown type, then the {@link - * PelJpeg::isValid()} function is handy: it will quickly test if the - * data could be valid JPEG data. The {@link PelTiff::isValid()} - * function does the same for TIFF images. - * - * @author Martin Geisler - * @package PEL - */ -class PelJpeg { - - /** - * The sections in the JPEG data. - * - * A JPEG file is built up as a sequence of sections, each section - * is identified with a {@link PelJpegMarker}. Some sections can - * occur more than once in the JPEG stream (the {@link - * PelJpegMarker::DQT DQT} and {@link PelJpegMarker::DHT DTH} - * markers for example) and so this is an array of ({@link - * PelJpegMarker}, {@link PelJpegContent}) pairs. - * - * The content can be either generic {@link PelJpegContent JPEG - * content} or {@link PelExif Exif data}. - * - * @var array - */ - private $sections = array(); - - /** - * The JPEG image data. - * - * @var PelDataWindow - */ - private $jpeg_data = null; - - /** - * Construct a new JPEG object. - * - * The new object will be empty unless an argument is given from - * which it can initialize itself. This can either be the filename - * of a JPEG image, a {@link PelDataWindow} object or a PHP image - * resource handle. - * - * New Exif data (in the form of a {@link PelExif} object) can be - * inserted with the {@link setExif()} method: - * - * - * $jpeg = new PelJpeg($data); - * // Create container for the Exif information: - * $exif = new PelExif(); - * // Now Add a PelTiff object with a PelIfd object with one or more - * // PelEntry objects to $exif... Finally add $exif to $jpeg: - * $jpeg->setExif($exif); - * - */ - function __construct($data = false) { - if ($data === false) - return; - - if (is_string($data)) { - Pel::debug('Initializing PelJpeg object from %s', $data); - $this->loadFile($data); - } elseif ($data instanceof PelDataWindow) { - Pel::debug('Initializing PelJpeg object from PelDataWindow.'); - $this->load($data); - } elseif (is_resource($data) && get_resource_type($data) == 'gd') { - Pel::debug('Initializing PelJpeg object from image resource.'); - /* The ImageJpeg() function insists on printing the bytes - * instead of returning them in a more civil way as a string, so - * we have to buffer the output... */ - ob_start(); - ImageJpeg($data); - $bytes = ob_get_clean(); - $this->load(new PelDataWindow($bytes)); - } else { - throw new PelInvalidArgumentException('Bad type for $data: %s', - gettype($data)); - } - } - - /** - * Load data into a JPEG object. - * - * The data supplied will be parsed and turned into an object - * structure representing the image. This structure can then be - * manipulated and later turned back into an string of bytes. - * - * This methods can be called at any time after a JPEG object has - * been constructed, also after the {@link appendSection()} has been - * called to append custom sections. Loading several JPEG images - * into one object will accumulate the sections, but there will only - * be one {@link PelJpegMarker::SOS} section at any given time. - * - * @param PelDataWindow the data that will be turned into JPEG - * sections. - */ - function load(PelDataWindow $d) { - - Pel::debug('Parsing %d bytes...', $d->getSize()); - - /* JPEG data is stored in big-endian format. */ - $d->setByteOrder(PelConvert::BIG_ENDIAN); - - /* Run through the data to read the sections in the image. After - * each section is read, the start of the data window will be - * moved forward, and after the last section we'll terminate with - * no data left in the window. */ - while ($d->getSize() > 0) { - /* JPEG sections start with 0xFF. The first byte that is not - * 0xFF is a marker (hopefully). - */ - for ($i = 0; $i < 7; $i++) - if ($d->getByte($i) != 0xFF) - break; - - $marker = $d->getByte($i); - - if (!PelJpegMarker::isValid($marker)) - throw new PelJpegInvalidMarkerException($marker, $i); - - /* Move window so first byte becomes first byte in this - * section. */ - $d->setWindowStart($i+1); - - if ($marker == PelJpegMarker::SOI || $marker == PelJpegMarker::EOI) { - $content = new PelJpegContent(new PelDataWindow()); - $this->appendSection($marker, $content); - } else { - /* Read the length of the section. The length includes the - * two bytes used to store the length. */ - $len = $d->getShort(0) - 2; - - Pel::debug('Found %s section of length %d', - PelJpegMarker::getName($marker), $len); - - /* Skip past the length. */ - $d->setWindowStart(2); - - if ($marker == PelJpegMarker::APP1) { - - try { - $content = new PelExif(); - $content->load($d->getClone(0, $len)); - } catch (PelInvalidDataException $e) { - /* We store the data as normal JPEG content if it could - * not be parsed as Exif data. */ - $content = new PelJpegContent($d->getClone(0, $len)); - } - - $this->appendSection($marker, $content); - /* Skip past the data. */ - $d->setWindowStart($len); - - } elseif ($marker == PelJpegMarker::COM) { - - $content = new PelJpegComment(); - $content->load($d->getClone(0, $len)); - $this->appendSection($marker, $content); - $d->setWindowStart($len); - - } else { - - $content = new PelJpegContent($d->getClone(0, $len)); - $this->appendSection($marker, $content); - /* Skip past the data. */ - $d->setWindowStart($len); - - /* In case of SOS, image data will follow. */ - if ($marker == PelJpegMarker::SOS) { - /* Some images have some trailing (garbage?) following the - * EOI marker. To handle this we seek backwards until we - * find the EOI marker. Any trailing content is stored as - * a PelJpegContent object. */ - - $length = $d->getSize(); - while ($d->getByte($length-2) != 0xFF || - $d->getByte($length-1) != PelJpegMarker::EOI) { - $length--; - } - - $this->jpeg_data = $d->getClone(0, $length-2); - Pel::debug('JPEG data: ' . $this->jpeg_data->__toString()); - - /* Append the EOI. */ - $this->appendSection(PelJpegMarker::EOI, - new PelJpegContent(new PelDataWindow())); - - /* Now check to see if there are any trailing data. */ - if ($length != $d->getSize()) { - Pel::maybeThrow(new PelException('Found trailing content ' . - 'after EOI: %d bytes', - $d->getSize() - $length)); - $content = new PelJpegContent($d->getClone($length)); - /* We don't have a proper JPEG marker for trailing - * garbage, so we just use 0x00... */ - $this->appendSection(0x00, $content); - } - - /* Done with the loop. */ - break; - } - } - } - } /* while ($d->getSize() > 0) */ - } - - - /** - * Load data from a file into a JPEG object. - * - * @param string the filename. This must be a readable file. - */ - function loadFile($filename) { - $this->load(new PelDataWindow(file_get_contents($filename))); - } - - - /** - * Set Exif data. - * - * Use this to set the Exif data in the image. This will overwrite - * any old Exif information in the image. - * - * @param PelExif the Exif data. - */ - function setExif(PelExif $exif) { - $app0_offset = 1; - $app1_offset = -1; - - /* Search through all sections looking for APP0 or APP1. */ - for ($i = 0; $i < count($this->sections); $i++) { - if ($this->sections[$i][0] == PelJpegMarker::APP0) { - $app0_offset = $i; - } elseif ($this->sections[$i][0] == PelJpegMarker::APP1) { - $app1_offset = $i; - break; - } - } - - /* Store the Exif data at the appropriate place, either where the - * old Exif data was stored ($app1_offset) or right after APP0 - * ($app0_offset+1). */ - if ($app1_offset > 0) - $this->sections[$app1_offset][1] = $exif; - else - $this->insertSection(PelJpegMarker::APP1, $exif, $app0_offset+1); - } - - - /** - * Get Exif data. - * - * Use this to get the @{link PelExif Exif data} stored. - * - * @return PelExif the Exif data found or null if the image has no - * Exif data. - */ - function getExif() { - $exif = $this->getSection(PelJpegMarker::APP1); - if ($exif instanceof PelExif) - return $exif; - else - return null; - } - - - /** - * Clear any Exif data. - * - * This method will only clear the first @{link PelJpegMarker::APP1} - * section found (there should normally be just one). - */ - function clearExif() { - for ($i = 0; $i < count($this->sections); $i++) { - if ($this->sections[$i][0] == PelJpegMarker::APP1) { - unset($this->sections[$i]); - return; - } - } - } - - - /** - * Append a new section. - * - * Used only when loading an image. If it used again later, then the - * section will end up after the @{link PelJpegMarker::EOI EOI - * marker} and will probably not be useful. - * - * Please use @{link setExif()} instead if you intend to add Exif - * information to an image as that function will know the right - * place to insert the data. - * - * @param PelJpegMarker the marker identifying the new section. - * - * @param PelJpegContent the content of the new section. - */ - function appendSection($marker, PelJpegContent $content) { - $this->sections[] = array($marker, $content); - } - - - /** - * Insert a new section. - * - * Please use @{link setExif()} instead if you intend to add Exif - * information to an image as that function will know the right - * place to insert the data. - * - * @param PelJpegMarker the marker for the new section. - * - * @param PelJpegContent the content of the new section. - * - * @param int the offset where the new section will be inserted --- - * use 0 to insert it at the very beginning, use 1 to insert it - * between sections 1 and 2, etc. - */ - function insertSection($marker, PelJpegContent $content, $offset) { - array_splice($this->sections, $offset, 0, array(array($marker, $content))); - } - - - /** - * Get a section corresponding to a particular marker. - * - * Please use the {@link getExif()} if you just need the Exif data. - * - * This will search through the sections of this JPEG object, - * looking for a section identified with the specified {@link - * PelJpegMarker marker}. The {@link PelJpegContent content} will - * then be returned. The optional argument can be used to skip over - * some of the sections. So if one is looking for the, say, third - * {@link PelJpegMarker::DHT DHT} section one would do: - * - * - * $dht3 = $jpeg->getSection(PelJpegMarker::DHT, 2); - * - * - * @param PelJpegMarker the marker identifying the section. - * - * @param int the number of sections to be skipped. This must be a - * non-negative integer. - * - * @return PelJpegContent the content found, or null if there is no - * content available. - */ - function getSection($marker, $skip = 0) { - foreach ($this->sections as $s) { - if ($s[0] == $marker) - if ($skip > 0) - $skip--; - else - return $s[1]; - } - - return null; - } - - - /** - * Get all sections. - * - * @return array an array of ({@link PelJpegMarker}, {@link - * PelJpegContent}) pairs. Each pair is an array with the {@link - * PelJpegMarker} as the first element and the {@link - * PelJpegContent} as the second element, so the return type is an - * array of arrays. - * - * So to loop through all the sections in a given JPEG image do - * this: - * - * - * foreach ($jpeg->getSections() as $section) { - * $marker = $section[0]; - * $content = $section[1]; - * // Use $marker and $content here. - * } - * - * - * instead of this: - * - * - * foreach ($jpeg->getSections() as $marker => $content) { - * // Does not work the way you would think... - * } - * - * - * The problem is that there could be several sections with the same - * marker, and thus a simple associative array does not suffice. - */ - function getSections() { - return $this->sections; - } - - - /** - * Turn this JPEG object into bytes. - * - * The bytes returned by this method is ready to be stored in a file - * as a valid JPEG image. - * - * @return string bytes representing this JPEG object, including all - * its sections and their associated data. - */ - function getBytes() { - $bytes = ''; - - foreach ($this->sections as $section) { - $m = $section[0]; - $c = $section[1]; - - /* Write the marker */ - $bytes .= "\xFF" . PelJpegMarker::getBytes($m); - /* Skip over empty markers. */ - if ($m == PelJpegMarker::SOI || $m == PelJpegMarker::EOI) - continue; - - $data = $c->getBytes(); - $size = strlen($data) + 2; - - $bytes .= PelConvert::shortToBytes($size, PelConvert::BIG_ENDIAN); - $bytes .= $data; - - /* In case of SOS, we need to write the JPEG data. */ - if ($m == PelJpegMarker::SOS) - $bytes .= $this->jpeg_data->getBytes(); - } - - return $bytes; - - } - - - /** - * Make a string representation of this JPEG object. - * - * This is mainly usefull for debugging. It will show the structure - * of the image, and its sections. - * - * @return string debugging information about this JPEG object. - */ - function __toString() { - $str = Pel::tra("Dumping JPEG data...\n"); - for ($i = 0; $i < count($this->sections); $i++) { - $m = $this->sections[$i][0]; - $c = $this->sections[$i][1]; - $str .= Pel::fmt("Section %d (marker 0x%02X - %s):\n", - $i, $m, PelJpegMarker::getName($m)); - $str .= Pel::fmt(" Description: %s\n", - PelJpegMarker::getDescription($m)); - - if ($m == PelJpegMarker::SOI || - $m == PelJpegMarker::EOI) - continue; - - if ($c instanceof PelExif) { - $str .= Pel::tra(" Content : Exif data\n"); - $str .= $c->__toString() . "\n"; - } elseif ($c instanceof PelJpegComment) { - $str .= Pel::fmt(" Content : %s\n", $c->getValue()); - } else { - $str .= Pel::tra(" Content : Unknown\n"); - } - } - - return $str; - } - - - /** - * Test data to see if it could be a valid JPEG image. - * - * The function will only look at the first few bytes of the data, - * and try to determine if it could be a valid JPEG image based on - * those bytes. This means that the check is more like a heuristic - * than a rigorous check. - * - * @param PelDataWindow the bytes that will be checked. - * - * @return boolean true if the bytes look like the beginning of a - * JPEG image, false otherwise. - * - * @see PelTiff::isValid() - */ - static function isValid(PelDataWindow $d) { - /* JPEG data is stored in big-endian format. */ - $d->setByteOrder(PelConvert::BIG_ENDIAN); - - for ($i = 0; $i < 7; $i++) - if ($d->getByte($i) != 0xFF) - break; - - return $d->getByte($i) == PelJpegMarker::SOI; - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelJpegComment.php b/3.1/modules/autorotate/lib/pel/PelJpegComment.php deleted file mode 100644 index feb62c30..00000000 --- a/3.1/modules/autorotate/lib/pel/PelJpegComment.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @version $Revision: 397 $ - * @date $Date: 2005-10-24 00:40:26 +0200 (Mon, 24 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelJpegContent.php'); -/**#@-*/ - - -/** - * Class representing JPEG comments. - * - * @author Martin Geisler - * @package PEL - */ -class PelJpegComment extends PelJpegContent { - - /** - * The comment. - * - * @var string - */ - private $comment = ''; - - /** - * Construct a new JPEG comment. - * - * The new comment will contain the string given. - */ - function __construct($comment = '') { - $this->comment = $comment; - } - - - /** - * Load and parse data. - * - * This will load the comment from the data window passed. - */ - function load(PelDataWindow $d) { - $this->comment = $d->getBytes(); - } - - - /** - * Update the value with a new comment. - * - * Any old comment will be overwritten. - * - * @param string the new comment. - */ - function setValue($comment) { - $this->comment = $comment; - } - - - /** - * Get the comment. - * - * @return string the comment. - */ - function getValue() { - return $this->comment; - } - - - /** - * Turn this comment into bytes. - * - * @return string bytes representing this comment. - */ - function getBytes() { - $this->comment; - } - - - /** - * Return a string representation of this object. - * - * @return string the same as {@link getValue()}. - */ - function __toString() { - return $this->getValue(); - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelJpegContent.php b/3.1/modules/autorotate/lib/pel/PelJpegContent.php deleted file mode 100644 index 93eea2ae..00000000 --- a/3.1/modules/autorotate/lib/pel/PelJpegContent.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @version $Revision: 380 $ - * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelDataWindow.php'); -/**#@-*/ - - -/** - * Class representing content in a JPEG file. - * - * A JPEG file consists of a sequence of each of which has an - * associated {@link PelJpegMarker marker} and some content. This - * class represents the content, and this basic type is just a simple - * holder of such content, represented by a {@link PelDataWindow} - * object. The {@link PelExif} class is an example of more - * specialized JPEG content. - * - * @author Martin Geisler - * @package PEL - */ -class PelJpegContent { - private $data = null; - - /** - * Make a new piece of JPEG content. - * - * @param PelDataWindow the content. - */ - function __construct(PelDataWindow $data) { - $this->data = $data; - } - - - /** - * Return the bytes of the content. - * - * @return string bytes representing this JPEG content. These bytes - * will match the bytes given to {@link __construct the - * constructor}. - */ - function getBytes() { - return $this->data->getBytes(); - } - -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelJpegMarker.php b/3.1/modules/autorotate/lib/pel/PelJpegMarker.php deleted file mode 100644 index 377b279b..00000000 --- a/3.1/modules/autorotate/lib/pel/PelJpegMarker.php +++ /dev/null @@ -1,435 +0,0 @@ - - * @version $Revision: 432 $ - * @date $Date: 2006-09-06 00:13:00 +0200 (Wed, 06 Sep 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('Pel.php'); -/**#@-*/ - - -/** - * Class with static methods for JPEG markers. - * - * This class defines the constants to be used whenever one refers to - * a JPEG marker. All the methods defined are static, and they all - * operate on one argument which should be one of the class constants. - * They will all be denoted by PelJpegMarker in the documentation. - * - * @author Martin Geisler - * @package PEL - */ -class PelJpegMarker { - - /** Encoding (baseline) */ - const SOF0 = 0xC0; - /** Encoding (extended sequential) */ - const SOF1 = 0xC1; - /** Encoding (progressive) */ - const SOF2 = 0xC2; - /** Encoding (lossless) */ - const SOF3 = 0xC3; - /** Define Huffman table */ - const DHT = 0xC4; - /** Encoding (differential sequential) */ - const SOF5 = 0xC5; - /** Encoding (differential progressive) */ - const SOF6 = 0xC6; - /** Encoding (differential lossless) */ - const SOF7 = 0xC7; - /** Extension */ - const JPG = 0xC8; - /** Encoding (extended sequential, arithmetic) */ - const SOF9 = 0xC9; - /** Encoding (progressive, arithmetic) */ - const SOF10 = 0xCA; - /** Encoding (lossless, arithmetic) */ - const SOF11 = 0xCB; - /** Define arithmetic coding conditioning */ - const DAC = 0xCC; - /** Encoding (differential sequential, arithmetic) */ - const SOF13 = 0xCD; - /** Encoding (differential progressive, arithmetic) */ - const SOF14 = 0xCE; - /** Encoding (differential lossless, arithmetic) */ - const SOF15 = 0xCF; - /** Restart 0 */ - const RST0 = 0xD0; - /** Restart 1 */ - const RST1 = 0xD1; - /** Restart 2 */ - const RST2 = 0xD2; - /** Restart 3 */ - const RST3 = 0xD3; - /** Restart 4 */ - const RST4 = 0xD4; - /** Restart 5 */ - const RST5 = 0xD5; - /** Restart 6 */ - const RST6 = 0xD6; - /** Restart 7 */ - const RST7 = 0xD7; - /** Start of image */ - const SOI = 0xD8; - /** End of image */ - const EOI = 0xD9; - /** Start of scan */ - const SOS = 0xDA; - /** Define quantization table */ - const DQT = 0xDB; - /** Define number of lines */ - const DNL = 0xDC; - /** Define restart interval */ - const DRI = 0xDD; - /** Define hierarchical progression */ - const DHP = 0xDE; - /** Expand reference component */ - const EXP = 0xDF; - /** Application segment 0 */ - const APP0 = 0xE0; - /** - * Application segment 1 - * - * When a JPEG image contains Exif data, the data will normally be - * stored in this section and a call to {@link PelJpeg::getExif()} - * will return a {@link PelExif} object representing it. - */ - const APP1 = 0xE1; - /** Application segment 2 */ - const APP2 = 0xE2; - /** Application segment 3 */ - const APP3 = 0xE3; - /** Application segment 4 */ - const APP4 = 0xE4; - /** Application segment 5 */ - const APP5 = 0xE5; - /** Application segment 6 */ - const APP6 = 0xE6; - /** Application segment 7 */ - const APP7 = 0xE7; - /** Application segment 8 */ - const APP8 = 0xE8; - /** Application segment 9 */ - const APP9 = 0xE9; - /** Application segment 10 */ - const APP10 = 0xEA; - /** Application segment 11 */ - const APP11 = 0xEB; - /** Application segment 12 */ - const APP12 = 0xEC; - /** Application segment 13 */ - const APP13 = 0xED; - /** Application segment 14 */ - const APP14 = 0xEE; - /** Application segment 15 */ - const APP15 = 0xEF; - /** Extension 0 */ - const JPG0 = 0xF0; - /** Extension 1 */ - const JPG1 = 0xF1; - /** Extension 2 */ - const JPG2 = 0xF2; - /** Extension 3 */ - const JPG3 = 0xF3; - /** Extension 4 */ - const JPG4 = 0xF4; - /** Extension 5 */ - const JPG5 = 0xF5; - /** Extension 6 */ - const JPG6 = 0xF6; - /** Extension 7 */ - const JPG7 = 0xF7; - /** Extension 8 */ - const JPG8 = 0xF8; - /** Extension 9 */ - const JPG9 = 0xF9; - /** Extension 10 */ - const JPG10 = 0xFA; - /** Extension 11 */ - const JPG11 = 0xFB; - /** Extension 12 */ - const JPG12 = 0xFC; - /** Extension 13 */ - const JPG13 = 0xFD; - /** Comment */ - const COM = 0xFE; - - /** - * Check if a byte is a valid JPEG marker. - * - * @param PelJpegMarker the byte that will be checked. - * - * @return boolean if the byte is recognized true is returned, - * otherwise false will be returned. - */ - static function isValid($m) { - return ($m >= self::SOF0 && $m <= self::COM); - } - - /** - * Turn a JPEG marker into bytes. - * - * @param PelJpegMarker the marker. - * - * @return string the marker as a string. This will be a string - * with just a single byte since all JPEG markers are simply single - * bytes. - */ - static function getBytes($m) { - return chr($m); - } - - /** - * Return the short name for a marker. - * - * @param PelJpegMarker the marker. - * - * @return string the name of the marker, e.g., 'SOI' for the Start - * of Image marker. - */ - static function getName($m) { - switch ($m) { - case self::SOF0: return 'SOF0'; - case self::SOF1: return 'SOF1'; - case self::SOF2: return 'SOF2'; - case self::SOF3: return 'SOF3'; - case self::SOF5: return 'SOF5'; - case self::SOF6: return 'SOF6'; - case self::SOF7: return 'SOF7'; - case self::SOF9: return 'SOF9'; - case self::SOF10: return 'SOF10'; - case self::SOF11: return 'SOF11'; - case self::SOF13: return 'SOF13'; - case self::SOF14: return 'SOF14'; - case self::SOF15: return 'SOF15'; - case self::SOI: return 'SOI'; - case self::EOI: return 'EOI'; - case self::SOS: return 'SOS'; - case self::COM: return 'COM'; - case self::DHT: return 'DHT'; - case self::JPG: return 'JPG'; - case self::DAC: return 'DAC'; - case self::RST0: return 'RST0'; - case self::RST1: return 'RST1'; - case self::RST2: return 'RST2'; - case self::RST3: return 'RST3'; - case self::RST4: return 'RST4'; - case self::RST5: return 'RST5'; - case self::RST6: return 'RST6'; - case self::RST7: return 'RST7'; - case self::DQT: return 'DQT'; - case self::DNL: return 'DNL'; - case self::DRI: return 'DRI'; - case self::DHP: return 'DHP'; - case self::EXP: return 'EXP'; - case self::APP0: return 'APP0'; - case self::APP1: return 'APP1'; - case self::APP2: return 'APP2'; - case self::APP3: return 'APP3'; - case self::APP4: return 'APP4'; - case self::APP5: return 'APP5'; - case self::APP6: return 'APP6'; - case self::APP7: return 'APP7'; - case self::APP8: return 'APP8'; - case self::APP9: return 'APP9'; - case self::APP10: return 'APP10'; - case self::APP11: return 'APP11'; - case self::APP12: return 'APP12'; - case self::APP13: return 'APP13'; - case self::APP14: return 'APP14'; - case self::APP15: return 'APP15'; - case self::JPG0: return 'JPG0'; - case self::JPG1: return 'JPG1'; - case self::JPG2: return 'JPG2'; - case self::JPG3: return 'JPG3'; - case self::JPG4: return 'JPG4'; - case self::JPG5: return 'JPG5'; - case self::JPG6: return 'JPG6'; - case self::JPG7: return 'JPG7'; - case self::JPG8: return 'JPG8'; - case self::JPG9: return 'JPG9'; - case self::JPG10: return 'JPG10'; - case self::JPG11: return 'JPG11'; - case self::JPG12: return 'JPG12'; - case self::JPG13: return 'JPG13'; - case self::COM: return 'COM'; - default: return Pel::fmt('Unknown marker: 0x%02X', $m); - } - } - - /** - * Returns a description of a JPEG marker. - * - * @param PelJpegMarker the marker. - * - * @return string the description of the marker. - */ - static function getDescription($m) { - switch ($m) { - case self::SOF0: - return Pel::tra('Encoding (baseline)'); - case self::SOF1: - return Pel::tra('Encoding (extended sequential)'); - case self::SOF2: - return Pel::tra('Encoding (progressive)'); - case self::SOF3: - return Pel::tra('Encoding (lossless)'); - case self::SOF5: - return Pel::tra('Encoding (differential sequential)'); - case self::SOF6: - return Pel::tra('Encoding (differential progressive)'); - case self::SOF7: - return Pel::tra('Encoding (differential lossless)'); - case self::SOF9: - return Pel::tra('Encoding (extended sequential, arithmetic)'); - case self::SOF10: - return Pel::tra('Encoding (progressive, arithmetic)'); - case self::SOF11: - return Pel::tra('Encoding (lossless, arithmetic)'); - case self::SOF13: - return Pel::tra('Encoding (differential sequential, arithmetic)'); - case self::SOF14: - return Pel::tra('Encoding (differential progressive, arithmetic)'); - case self::SOF15: - return Pel::tra('Encoding (differential lossless, arithmetic)'); - case self::SOI: - return Pel::tra('Start of image'); - case self::EOI: - return Pel::tra('End of image'); - case self::SOS: - return Pel::tra('Start of scan'); - case self::COM: - return Pel::tra('Comment'); - case self::DHT: - return Pel::tra('Define Huffman table'); - case self::JPG: - return Pel::tra('Extension'); - case self::DAC: - return Pel::tra('Define arithmetic coding conditioning'); - case self::RST0: - return Pel::fmt('Restart %d', 0); - case self::RST1: - return Pel::fmt('Restart %d', 1); - case self::RST2: - return Pel::fmt('Restart %d', 2); - case self::RST3: - return Pel::fmt('Restart %d', 3); - case self::RST4: - return Pel::fmt('Restart %d', 4); - case self::RST5: - return Pel::fmt('Restart %d', 5); - case self::RST6: - return Pel::fmt('Restart %d', 6); - case self::RST7: - return Pel::fmt('Restart %d', 7); - case self::DQT: - return Pel::tra('Define quantization table'); - case self::DNL: - return Pel::tra('Define number of lines'); - case self::DRI: - return Pel::tra('Define restart interval'); - case self::DHP: - return Pel::tra('Define hierarchical progression'); - case self::EXP: - return Pel::tra('Expand reference component'); - case self::APP0: - return Pel::fmt('Application segment %d', 0); - case self::APP1: - return Pel::fmt('Application segment %d', 1); - case self::APP2: - return Pel::fmt('Application segment %d', 2); - case self::APP3: - return Pel::fmt('Application segment %d', 3); - case self::APP4: - return Pel::fmt('Application segment %d', 4); - case self::APP5: - return Pel::fmt('Application segment %d', 5); - case self::APP6: - return Pel::fmt('Application segment %d', 6); - case self::APP7: - return Pel::fmt('Application segment %d', 7); - case self::APP8: - return Pel::fmt('Application segment %d', 8); - case self::APP9: - return Pel::fmt('Application segment %d', 9); - case self::APP10: - return Pel::fmt('Application segment %d', 10); - case self::APP11: - return Pel::fmt('Application segment %d', 11); - case self::APP12: - return Pel::fmt('Application segment %d', 12); - case self::APP13: - return Pel::fmt('Application segment %d', 13); - case self::APP14: - return Pel::fmt('Application segment %d', 14); - case self::APP15: - return Pel::fmt('Application segment %d', 15); - case self::JPG0: - return Pel::fmt('Extension %d', 0); - case self::JPG1: - return Pel::fmt('Extension %d', 1); - case self::JPG2: - return Pel::fmt('Extension %d', 2); - case self::JPG3: - return Pel::fmt('Extension %d', 3); - case self::JPG4: - return Pel::fmt('Extension %d', 4); - case self::JPG5: - return Pel::fmt('Extension %d', 5); - case self::JPG6: - return Pel::fmt('Extension %d', 6); - case self::JPG7: - return Pel::fmt('Extension %d', 7); - case self::JPG8: - return Pel::fmt('Extension %d', 8); - case self::JPG9: - return Pel::fmt('Extension %d', 9); - case self::JPG10: - return Pel::fmt('Extension %d', 10); - case self::JPG11: - return Pel::fmt('Extension %d', 11); - case self::JPG12: - return Pel::fmt('Extension %d', 12); - case self::JPG13: - return Pel::fmt('Extension %d', 13); - case self::COM: - return Pel::tra('Comment'); - default: - return Pel::fmt('Unknown marker: 0x%02X', $m); - } - } -} - -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelTag.php b/3.1/modules/autorotate/lib/pel/PelTag.php deleted file mode 100644 index 5000811e..00000000 --- a/3.1/modules/autorotate/lib/pel/PelTag.php +++ /dev/null @@ -1,1969 +0,0 @@ - - * @version $Revision: 472 $ - * @date $Date: 2006-11-19 21:29:14 +0100 (Sun, 19 Nov 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('Pel.php'); -require_once('PelIfd.php'); -/**#@-*/ - - -/** - * Class with static methods for Exif tags. - * - * This class defines the constants that represents the Exif tags - * known to PEL. They are supposed to be used whenever one needs to - * specify an Exif tag, and they will be denoted by the pseudo-type - * {@link PelTag} throughout the documentation. - * - * Please note that the constrains on the format and number of - * components given here are advisory only. To follow the Exif - * specification one should obey them, but there is nothing that - * prevents you from creating an {@link IMAGE_LENGTH} entry with two - * or more components, even though the standard says that there should - * be exactly one component. - * - * All the methods in this class are static and should be called with - * the Exif tag on which they should operate. - * - * @author Martin Geisler - * @package PEL - */ -class PelTag { - - /** - * Interoperability index. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 4. - */ - const INTEROPERABILITY_INDEX = 0x0001; - - /** - * Interoperability version. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: 4. - */ - const INTEROPERABILITY_VERSION = 0x0002; - - /** - * Image width. - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: 1. - */ - const IMAGE_WIDTH = 0x0100; - - /** - * Image length. - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: 1. - */ - const IMAGE_LENGTH = 0x0101; - - /** - * Number of bits per component. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 3. - */ - const BITS_PER_SAMPLE = 0x0102; - - /** - * Compression scheme. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const COMPRESSION = 0x0103; - - /** - * Pixel composition. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const PHOTOMETRIC_INTERPRETATION = 0x0106; - - /** - * Fill Orde - * - * Format: Unknown. - * - * Components: Unknown. - */ - const FILL_ORDER = 0x010A; - - /** - * Document Name - * - * Format: Unknown. - * - * Components: Unknown. - */ - const DOCUMENT_NAME = 0x010D; - - /** - * Image Description - * - * Format: {@link PelEntryAscii}. - * - * Components: any number. - */ - const IMAGE_DESCRIPTION = 0x010E; - - /** - * Manufacturer - * - * Format: {@link PelEntryAscii}. - * - * Components: any number. - */ - const MAKE = 0x010F; - - /** - * Model - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const MODEL = 0x0110; - - /** - * Strip Offsets - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: any number. - */ - const STRIP_OFFSETS = 0x0111; - - /** - * Orientation of image. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const ORIENTATION = 0x0112; - - /** - * Number of components. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SAMPLES_PER_PIXEL = 0x0115; - - /** - * Rows per Strip - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: 1. - */ - const ROWS_PER_STRIP = 0x0116; - - /** - * Strip Byte Count - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: any number. - */ - const STRIP_BYTE_COUNTS = 0x0117; - - /** - * Image resolution in width direction. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const X_RESOLUTION = 0x011A; - - /** - * Image resolution in height direction. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const Y_RESOLUTION = 0x011B; - - /** - * Image data arrangement. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const PLANAR_CONFIGURATION = 0x011C; - - /** - * Unit of X and Y resolution. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const RESOLUTION_UNIT = 0x0128; - - /** - * Transfer function. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 3. - */ - const TRANSFER_FUNCTION = 0x012D; - - /** - * Software used. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const SOFTWARE = 0x0131; - - /** - * File change date and time. - * - * Format: {@link PelFormat::ASCII}, modelled by the {@link - * PelEntryTime} class. - * - * Components: 20. - */ - const DATE_TIME = 0x0132; - - /** - * Person who created the image. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const ARTIST = 0x013B; - - /** - * White point chromaticity. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 2. - */ - const WHITE_POINT = 0x013E; - - /** - * Chromaticities of primaries. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 6. - */ - const PRIMARY_CHROMATICITIES = 0x013F; - - /** - * Transfer Range - * - * Format: Unknown. - * - * Components: Unknown. - */ - const TRANSFER_RANGE = 0x0156; - - /** - * JPEGProc - * - * Format: Unknown. - * - * Components: Unknown. - */ - const JPEG_PROC = 0x0200; - - /** - * Offset to JPEG SOI. - * - * Format: {@link PelFormat::LONG}. - * - * Components: 1. - */ - const JPEG_INTERCHANGE_FORMAT = 0x0201; - - /** - * Bytes of JPEG data. - * - * Format: {@link PelFormat::LONG}. - * - * Components: 1. - */ - const JPEG_INTERCHANGE_FORMAT_LENGTH = 0x0202; - - /** - * Color space transformation matrix coefficients. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 3. - */ - const YCBCR_COEFFICIENTS = 0x0211; - - /** - * Subsampling ratio of Y to C. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 2. - */ - const YCBCR_SUB_SAMPLING = 0x0212; - - /** - * Y and C positioning. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const YCBCR_POSITIONING = 0x0213; - - /** - * Pair of black and white reference values. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 6. - */ - const REFERENCE_BLACK_WHITE = 0x0214; - - /** - * Related Image File Format - * - * Format: Unknown. - * - * Components: Unknown. - */ - const RELATED_IMAGE_FILE_FORMAT = 0x1000; - - /** - * Related Image Width - * - * Format: Unknown, probably {@link PelFormat::SHORT}? - * - * Components: Unknown, probably 1. - */ - const RELATED_IMAGE_WIDTH = 0x1001; - - /** Related Image Length - * - * Format: Unknown, probably {@link PelFormat::SHORT}? - * - * Components: Unknown, probably 1. - */ - const RELATED_IMAGE_LENGTH = 0x1002; - - /** - * CFA Repeat Pattern Dim. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 2. - */ - const CFA_REPEAT_PATTERN_DIM = 0x828D; - - /** - * Battery level. - * - * Format: Unknown. - * - * Components: Unknown. - */ - const BATTERY_LEVEL = 0x828F; - - /** - * Copyright holder. - * - * Format: {@link PelFormat::ASCII}, modelled by the {@link - * PelEntryCopyright} class. - * - * Components: any number. - */ - const COPYRIGHT = 0x8298; - - /** - * Exposure Time - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const EXPOSURE_TIME = 0x829A; - - /** - * FNumber - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const FNUMBER = 0x829D; - - /** - * IPTC/NAA - * - * Format: {@link PelFormat::LONG}. - * - * Components: any number. - */ - const IPTC_NAA = 0x83BB; - - /** - * Exif IFD Pointer - * - * Format: {@link PelFormat::LONG}. - * - * Components: 1. - */ - const EXIF_IFD_POINTER = 0x8769; - - /** - * Inter Color Profile - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: any number. - */ - const INTER_COLOR_PROFILE = 0x8773; - - /** - * Exposure Program - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const EXPOSURE_PROGRAM = 0x8822; - - /** - * Spectral Sensitivity - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const SPECTRAL_SENSITIVITY = 0x8824; - - /** - * GPS Info IFD Pointer - * - * Format: {@link PelFormat::LONG}. - * - * Components: 1. - */ - const GPS_INFO_IFD_POINTER = 0x8825; - - /** - * ISO Speed Ratings - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 2. - */ - const ISO_SPEED_RATINGS = 0x8827; - - /** - * OECF - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: any number. - */ - const OECF = 0x8828; - - /** - * Exif version. - * - * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link - * PelEntryVersion} class. - * - * Components: 4. - */ - const EXIF_VERSION = 0x9000; - - /** - * Date and time of original data generation. - * - * Format: {@link PelFormat::ASCII}, modelled by the {@link - * PelEntryTime} class. - * - * Components: 20. - */ - const DATE_TIME_ORIGINAL = 0x9003; - - /** - * Date and time of digital data generation. - * - * Format: {@link PelFormat::ASCII}, modelled by the {@link - * PelEntryTime} class. - * - * Components: 20. - */ - const DATE_TIME_DIGITIZED = 0x9004; - - /** - * Meaning of each component. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: 4. - */ - const COMPONENTS_CONFIGURATION = 0x9101; - - /** - * Image compression mode. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const COMPRESSED_BITS_PER_PIXEL = 0x9102; - - /** - * Shutter speed - * - * Format: {@link PelFormat::SRATIONAL}. - * - * Components: 1. - */ - const SHUTTER_SPEED_VALUE = 0x9201; - - /** - * Aperture - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const APERTURE_VALUE = 0x9202; - - /** - * Brightness - * - * Format: {@link PelFormat::SRATIONAL}. - * - * Components: 1. - */ - const BRIGHTNESS_VALUE = 0x9203; - - /** - * Exposure Bias - * - * Format: {@link PelFormat::SRATIONAL}. - * - * Components: 1. - */ - const EXPOSURE_BIAS_VALUE = 0x9204; - - /** - * Max Aperture Value - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const MAX_APERTURE_VALUE = 0x9205; - - /** - * Subject Distance - * - * Format: {@link PelFormat::SRATIONAL}. - * - * Components: 1. - */ - const SUBJECT_DISTANCE = 0x9206; - - /** - * Metering Mode - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const METERING_MODE = 0x9207; - - /** - * Light Source - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const LIGHT_SOURCE = 0x9208; - - /** - * Flash - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const FLASH = 0x9209; - - /** - * Focal Length - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const FOCAL_LENGTH = 0x920A; - - /** - * Subject Area - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 4. - */ - const SUBJECT_AREA = 0x9214; - - /** - * Maker Note - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: any number. - */ - const MAKER_NOTE = 0x927C; - - /** - * User Comment - * - * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link - * PelEntryUserComment} class. - * - * Components: any number. - */ - const USER_COMMENT = 0x9286; - - /** - * SubSec Time - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const SUB_SEC_TIME = 0x9290; - - /** - * SubSec Time Original - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const SUB_SEC_TIME_ORIGINAL = 0x9291; - - /** - * SubSec Time Digitized - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const SUB_SEC_TIME_DIGITIZED = 0x9292; - - /** - * Windows XP Title - * - * Format: {@link PelFormat::BYTE}. - * - * Components: any number. - */ - const XP_TITLE = 0x9C9B; - - - /** - * Windows XP Comment - * - * Format: {@link PelFormat::BYTE}. - * - * Components: any number. - */ - const XP_COMMENT = 0x9C9C; - - - /** - * Windows XP Author - * - * Format: {@link PelFormat::BYTE}. - * - * Components: any number. - */ - const XP_AUTHOR = 0x9C9D; - - - /** - * Windows XP Keywords - * - * Format: {@link PelFormat::BYTE}. - * - * Components: any number. - */ - const XP_KEYWORDS = 0x9C9E; - - - /** - * Windows XP Subject - * - * Format: {@link PelFormat::BYTE}. - * - * Components: any number. - */ - const XP_SUBJECT = 0x9C9F; - - - /** - * Supported Flashpix version - * - * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link - * PelEntryVersion} class. - * - * Components: 4. - */ - const FLASH_PIX_VERSION = 0xA000; - - /** - * Color space information. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const COLOR_SPACE = 0xA001; - - /** - * Valid image width. - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: 1. - */ - const PIXEL_X_DIMENSION = 0xA002; - - /** - * Valid image height. - * - * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. - * - * Components: 1. - */ - const PIXEL_Y_DIMENSION = 0xA003; - - /** - * Related audio file. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: any number. - */ - const RELATED_SOUND_FILE = 0xA004; - - /** - * Interoperability IFD Pointer - * - * Format: {@link PelFormat::LONG}. - * - * Components: 1. - */ - const INTEROPERABILITY_IFD_POINTER = 0xA005; - - /** - * Flash energy. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const FLASH_ENERGY = 0xA20B; - - /** - * Spatial frequency response. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: any number. - */ - const SPATIAL_FREQUENCY_RESPONSE = 0xA20C; - - /** - * Focal plane X resolution. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const FOCAL_PLANE_X_RESOLUTION = 0xA20E; - - /** - * Focal plane Y resolution. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const FOCAL_PLANE_Y_RESOLUTION = 0xA20F; - - /** - * Focal plane resolution unit. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const FOCAL_PLANE_RESOLUTION_UNIT = 0xA210; - - /** - * Subject location. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SUBJECT_LOCATION = 0xA214; - - /** - * Exposure index. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const EXPOSURE_INDEX = 0xA215; - - /** - * Sensing method. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SENSING_METHOD = 0xA217; - - /** - * File source. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: 1. - */ - const FILE_SOURCE = 0xA300; - - /** - * Scene type. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: 1. - */ - const SCENE_TYPE = 0xA301; - - /** - * CFA pattern. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: any number. - */ - const CFA_PATTERN = 0xA302; - - /** - * Custom image processing. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const CUSTOM_RENDERED = 0xA401; - - /** - * Exposure mode. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const EXPOSURE_MODE = 0xA402; - - /** - * White balance. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const WHITE_BALANCE = 0xA403; - - /** - * Digital zoom ratio. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const DIGITAL_ZOOM_RATIO = 0xA404; - - /** - * Focal length in 35mm film. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const FOCAL_LENGTH_IN_35MM_FILM = 0xA405; - - /** - * Scene capture type. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SCENE_CAPTURE_TYPE = 0xA406; - - /** - * Gain control. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const GAIN_CONTROL = 0xA407; - - /** - * Contrast. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const CONTRAST = 0xA408; - - /** - * Saturation. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SATURATION = 0xA409; - - /** - * Sharpness. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SHARPNESS = 0xA40A; - - /** - * Device settings description. - * - * This tag indicates information on the picture-taking conditions - * of a particular camera model. The tag is used only to indicate - * the picture-taking conditions in the reader. - */ - const DEVICE_SETTING_DESCRIPTION = 0xA40B; - - /** - * Subject distance range. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const SUBJECT_DISTANCE_RANGE = 0xA40C; - - /** - * Image unique ID. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 32. - */ - const IMAGE_UNIQUE_ID = 0xA420; - - /** - * Gamma. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GAMMA = 0xA500; - - /** - * PrintIM - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: unknown. - */ - const PRINT_IM = 0xC4A5; - - /** - * GPS tag version. - * - * Format: {@link PelFormat::BYTE}. - * - * Components: 4. - */ - const GPS_VERSION_ID = 0x0000; - - /** - * North or South Latitude. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_LATITUDE_REF = 0x0001; - - /** - * Latitude. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 3. - */ - const GPS_LATITUDE = 0x0002; - - /** - * East or West Longitude. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_LONGITUDE_REF = 0x0003; - - /** - * Longitude. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 3. - */ - const GPS_LONGITUDE = 0x0004; - - /** - * Altitude reference. - * - * Format: {@link PelFormat::BYTE}. - * - * Components: 1. - */ - const GPS_ALTITUDE_REF = 0x0005; - - /** - * Altitude. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_ALTITUDE = 0x0006; - - /** - * GPS time (atomic clock). - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 3. - */ - const GPS_TIME_STAMP = 0x0007; - - /** - * GPS satellites used for measurement. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: Any. - */ - const GPS_SATELLITES = 0x0008; - - /** - * GPS receiver status. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_STATUS = 0x0009; - - /** - * GPS measurement mode. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_MEASURE_MODE = 0x000A; - - /** - * Measurement precision. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_DOP = 0x000B; - - /** - * Speed unit. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_SPEED_REF = 0x000C; - - /** - * Speed of GPS receiver. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_SPEED = 0x000D; - - /** - * Reference for direction of movement. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_TRACK_REF = 0x000E; - - /** - * Direction of movement. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_TRACK = 0x000F; - - /** - * Reference for direction of image. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_IMG_DIRECTION_REF = 0x0010; - - /** - * Direction of image. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_IMG_DIRECTION = 0x0011; - - /** - * Geodetic survey data used. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: Any. - */ - const GPS_MAP_DATUM = 0x0012; - - /** - * Reference for latitude of destination. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_DEST_LATITUDE_REF = 0x0013; - - /** - * Latitude of destination. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 3. - */ - const GPS_DEST_LATITUDE = 0x0014; - - /** - * Reference for longitude of destination. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_DEST_LONGITUDE_REF = 0x0015; - - /** - * Longitude of destination. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 3. - */ - const GPS_DEST_LONGITUDE = 0x0016; - - /** - * Reference for bearing of destination. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_DEST_BEARING_REF = 0x0017; - - /** - * Bearing of destination. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_DEST_BEARING = 0x0018; - - /** - * Reference for distance to destination. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 2. - */ - const GPS_DEST_DISTANCE_REF = 0x0019; - - /** - * Distance to destination. - * - * Format: {@link PelFormat::RATIONAL}. - * - * Components: 1. - */ - const GPS_DEST_DISTANCE = 0x001A; - - /** - * Name of GPS processing method. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: Any. - */ - const GPS_PROCESSING_METHOD = 0x001B; - - /** - * Name of GPS area. - * - * Format: {@link PelFormat::UNDEFINED}. - * - * Components: Any. - */ - const GPS_AREA_INFORMATION = 0x001C; - - /** - * GPS date. - * - * Format: {@link PelFormat::ASCII}. - * - * Components: 11. - */ - const GPS_DATE_STAMP = 0x001D; - - /** - * GPS differential correction. - * - * Format: {@link PelFormat::SHORT}. - * - * Components: 1. - */ - const GPS_DIFFERENTIAL = 0x001E; - - - /** - * Returns a short name for an Exif tag. - * - * @param int the IFD type of the tag, one of {@link PelIfd::IFD0}, - * {@link PelIfd::IFD1}, {@link PelIfd::EXIF}, {@link PelIfd::GPS}, - * or {@link PelIfd::INTEROPERABILITY}. - * - * @param PelTag the tag. - * - * @return string the short name of the tag, e.g., 'ImageWidth' for - * the {@link IMAGE_WIDTH} tag. If the tag is not known, the string - * 'Unknown:0xTTTT' will be returned where 'TTTT' is the hexadecimal - * representation of the tag. - */ - static function getName($type, $tag) { - - switch ($type) { - case PelIfd::IFD0: - case PelIfd::IFD1: - case PelIfd::EXIF: - case PelIfd::INTEROPERABILITY: - - switch ($tag) { - case self::INTEROPERABILITY_INDEX: - return 'InteroperabilityIndex'; - case self::INTEROPERABILITY_VERSION: - return 'InteroperabilityVersion'; - case self::IMAGE_WIDTH: - return 'ImageWidth'; - case self::IMAGE_LENGTH: - return 'ImageLength'; - case self::BITS_PER_SAMPLE: - return 'BitsPerSample'; - case self::COMPRESSION: - return 'Compression'; - case self::PHOTOMETRIC_INTERPRETATION: - return 'PhotometricInterpretation'; - case self::FILL_ORDER: - return 'FillOrder'; - case self::DOCUMENT_NAME: - return 'DocumentName'; - case self::IMAGE_DESCRIPTION: - return 'ImageDescription'; - case self::MAKE: - return 'Make'; - case self::MODEL: - return 'Model'; - case self::STRIP_OFFSETS: - return 'StripOffsets'; - case self::ORIENTATION: - return 'Orientation'; - case self::SAMPLES_PER_PIXEL: - return 'SamplesPerPixel'; - case self::ROWS_PER_STRIP: - return 'RowsPerStrip'; - case self::STRIP_BYTE_COUNTS: - return 'StripByteCounts'; - case self::X_RESOLUTION: - return 'XResolution'; - case self::Y_RESOLUTION: - return 'YResolution'; - case self::PLANAR_CONFIGURATION: - return 'PlanarConfiguration'; - case self::RESOLUTION_UNIT: - return 'ResolutionUnit'; - case self::TRANSFER_FUNCTION: - return 'TransferFunction'; - case self::SOFTWARE: - return 'Software'; - case self::DATE_TIME: - return 'DateTime'; - case self::ARTIST: - return 'Artist'; - case self::WHITE_POINT: - return 'WhitePoint'; - case self::PRIMARY_CHROMATICITIES: - return 'PrimaryChromaticities'; - case self::TRANSFER_RANGE: - return 'TransferRange'; - case self::JPEG_PROC: - return 'JPEGProc'; - case self::JPEG_INTERCHANGE_FORMAT: - return 'JPEGInterchangeFormat'; - case self::JPEG_INTERCHANGE_FORMAT_LENGTH: - return 'JPEGInterchangeFormatLength'; - case self::YCBCR_COEFFICIENTS: - return 'YCbCrCoefficients'; - case self::YCBCR_SUB_SAMPLING: - return 'YCbCrSubSampling'; - case self::YCBCR_POSITIONING: - return 'YCbCrPositioning'; - case self::REFERENCE_BLACK_WHITE: - return 'ReferenceBlackWhite'; - case self::RELATED_IMAGE_FILE_FORMAT: - return 'RelatedImageFileFormat'; - case self::RELATED_IMAGE_WIDTH: - return 'RelatedImageWidth'; - case self::RELATED_IMAGE_LENGTH: - return 'RelatedImageLength'; - case self::CFA_REPEAT_PATTERN_DIM: - return 'CFARepeatPatternDim'; - case self::CFA_PATTERN: - return 'CFAPattern'; - case self::BATTERY_LEVEL: - return 'BatteryLevel'; - case self::COPYRIGHT: - return 'Copyright'; - case self::EXPOSURE_TIME: - return 'ExposureTime'; - case self::FNUMBER: - return 'FNumber'; - case self::IPTC_NAA: - return 'IPTC/NAA'; - case self::EXIF_IFD_POINTER: - return 'ExifIFDPointer'; - case self::INTER_COLOR_PROFILE: - return 'InterColorProfile'; - case self::EXPOSURE_PROGRAM: - return 'ExposureProgram'; - case self::SPECTRAL_SENSITIVITY: - return 'SpectralSensitivity'; - case self::GPS_INFO_IFD_POINTER: - return 'GPSInfoIFDPointer'; - case self::ISO_SPEED_RATINGS: - return 'ISOSpeedRatings'; - case self::OECF: - return 'OECF'; - case self::EXIF_VERSION: - return 'ExifVersion'; - case self::DATE_TIME_ORIGINAL: - return 'DateTimeOriginal'; - case self::DATE_TIME_DIGITIZED: - return 'DateTimeDigitized'; - case self::COMPONENTS_CONFIGURATION: - return 'ComponentsConfiguration'; - case self::COMPRESSED_BITS_PER_PIXEL: - return 'CompressedBitsPerPixel'; - case self::SHUTTER_SPEED_VALUE: - return 'ShutterSpeedValue'; - case self::APERTURE_VALUE: - return 'ApertureValue'; - case self::BRIGHTNESS_VALUE: - return 'BrightnessValue'; - case self::EXPOSURE_BIAS_VALUE: - return 'ExposureBiasValue'; - case self::MAX_APERTURE_VALUE: - return 'MaxApertureValue'; - case self::SUBJECT_DISTANCE: - return 'SubjectDistance'; - case self::METERING_MODE: - return 'MeteringMode'; - case self::LIGHT_SOURCE: - return 'LightSource'; - case self::FLASH: - return 'Flash'; - case self::FOCAL_LENGTH: - return 'FocalLength'; - case self::MAKER_NOTE: - return 'MakerNote'; - case self::USER_COMMENT: - return 'UserComment'; - case self::SUB_SEC_TIME: - return 'SubSecTime'; - case self::SUB_SEC_TIME_ORIGINAL: - return 'SubSecTimeOriginal'; - case self::SUB_SEC_TIME_DIGITIZED: - return 'SubSecTimeDigitized'; - case self::XP_TITLE: - return 'WindowsXPTitle'; - case self::XP_COMMENT: - return 'WindowsXPComment'; - case self::XP_AUTHOR: - return 'WindowsXPAuthor'; - case self::XP_KEYWORDS: - return 'WindowsXPKeywords'; - case self::XP_SUBJECT: - return 'WindowsXPSubject'; - case self::FLASH_PIX_VERSION: - return 'FlashPixVersion'; - case self::COLOR_SPACE: - return 'ColorSpace'; - case self::PIXEL_X_DIMENSION: - return 'PixelXDimension'; - case self::PIXEL_Y_DIMENSION: - return 'PixelYDimension'; - case self::RELATED_SOUND_FILE: - return 'RelatedSoundFile'; - case self::INTEROPERABILITY_IFD_POINTER: - return 'InteroperabilityIFDPointer'; - case self::FLASH_ENERGY: - return 'FlashEnergy'; - case self::SPATIAL_FREQUENCY_RESPONSE: - return 'SpatialFrequencyResponse'; - case self::FOCAL_PLANE_X_RESOLUTION: - return 'FocalPlaneXResolution'; - case self::FOCAL_PLANE_Y_RESOLUTION: - return 'FocalPlaneYResolution'; - case self::FOCAL_PLANE_RESOLUTION_UNIT: - return 'FocalPlaneResolutionUnit'; - case self::SUBJECT_LOCATION: - return 'SubjectLocation'; - case self::EXPOSURE_INDEX: - return 'ExposureIndex'; - case self::SENSING_METHOD: - return 'SensingMethod'; - case self::FILE_SOURCE: - return 'FileSource'; - case self::SCENE_TYPE: - return 'SceneType'; - case self::SUBJECT_AREA: - return 'SubjectArea'; - case self::CUSTOM_RENDERED: - return 'CustomRendered'; - case self::EXPOSURE_MODE: - return 'ExposureMode'; - case self::WHITE_BALANCE: - return 'WhiteBalance'; - case self::DIGITAL_ZOOM_RATIO: - return 'DigitalZoomRatio'; - case self::FOCAL_LENGTH_IN_35MM_FILM: - return 'FocalLengthIn35mmFilm'; - case self::SCENE_CAPTURE_TYPE: - return 'SceneCaptureType'; - case self::GAIN_CONTROL: - return 'GainControl'; - case self::CONTRAST: - return 'Contrast'; - case self::SATURATION: - return 'Saturation'; - case self::SHARPNESS: - return 'Sharpness'; - case self::DEVICE_SETTING_DESCRIPTION: - return 'DeviceSettingDescription'; - case self::SUBJECT_DISTANCE_RANGE: - return 'SubjectDistanceRange'; - case self::IMAGE_UNIQUE_ID: - return 'ImageUniqueID'; - case self::GAMMA: - return 'Gamma'; - case self::PRINT_IM: - return 'PrintIM'; - } - - case PelIfd::GPS: - switch ($tag) { - case self::GPS_VERSION_ID: - return 'GPSVersionID'; - case self::GPS_LATITUDE_REF: - return 'GPSLatitudeRef'; - case self::GPS_LATITUDE: - return 'GPSLatitude'; - case self::GPS_LONGITUDE_REF: - return 'GPSLongitudeRef'; - case self::GPS_LONGITUDE: - return 'GPSLongitude'; - case self::GPS_ALTITUDE_REF: - return 'GPSAltitudeRef'; - case self::GPS_ALTITUDE: - return 'GPSAltitude'; - case self::GPS_TIME_STAMP: - return 'GPSTimeStamp'; - case self::GPS_SATELLITES: - return 'GPSSatellites'; - case self::GPS_STATUS: - return 'GPSStatus'; - case self::GPS_MEASURE_MODE: - return 'GPSMeasureMode'; - case self::GPS_DOP: - return 'GPSDOP'; - case self::GPS_SPEED_REF: - return 'GPSSpeedRef'; - case self::GPS_SPEED: - return 'GPSSpeed'; - case self::GPS_TRACK_REF: - return 'GPSTrackRef'; - case self::GPS_TRACK: - return 'GPSTrack'; - case self::GPS_IMG_DIRECTION_REF: - return 'GPSImgDirectionRef'; - case self::GPS_IMG_DIRECTION: - return 'GPSImgDirection'; - case self::GPS_MAP_DATUM: - return 'GPSMapDatum'; - case self::GPS_DEST_LATITUDE_REF: - return 'GPSDestLatitudeRef'; - case self::GPS_DEST_LATITUDE: - return 'GPSDestLatitude'; - case self::GPS_DEST_LONGITUDE_REF: - return 'GPSDestLongitudeRef'; - case self::GPS_DEST_LONGITUDE: - return 'GPSDestLongitude'; - case self::GPS_DEST_BEARING_REF: - return 'GPSDestBearingRef'; - case self::GPS_DEST_BEARING: - return 'GPSDestBearing'; - case self::GPS_DEST_DISTANCE_REF: - return 'GPSDestDistanceRef'; - case self::GPS_DEST_DISTANCE: - return 'GPSDestDistance'; - case self::GPS_PROCESSING_METHOD: - return 'GPSProcessingMethod'; - case self::GPS_AREA_INFORMATION: - return 'GPSAreaInformation'; - case self::GPS_DATE_STAMP: - return 'GPSDateStamp'; - case self::GPS_DIFFERENTIAL: - return 'GPSDifferential'; - } - - default: - return Pel::fmt('Unknown: 0x%04X', $tag); - } - } - - - /** - * Returns a title for an Exif tag. - * - * @param int the IFD type of the tag, one of {@link PelIfd::IFD0}, - * {@link PelIfd::IFD1}, {@link PelIfd::EXIF}, {@link PelIfd::GPS}, - * or {@link PelIfd::INTEROPERABILITY}. - * - * @param PelTag the tag. - * - * @return string the title of the tag, e.g., 'Image Width' for the - * {@link IMAGE_WIDTH} tag. If the tag isn't known, the string - * 'Unknown Tag: 0xTT' will be returned where 'TT' is the - * hexadecimal representation of the tag. - */ - function getTitle($type, $tag) { - - switch ($type) { - case PelIfd::IFD0: - case PelIfd::IFD1: - case PelIfd::EXIF: - case PelIfd::INTEROPERABILITY: - - switch ($tag) { - case self::INTEROPERABILITY_INDEX: - return Pel::tra('Interoperability Index'); - case self::INTEROPERABILITY_VERSION: - return Pel::tra('Interoperability Version'); - case self::IMAGE_WIDTH: - return Pel::tra('Image Width'); - case self::IMAGE_LENGTH: - return Pel::tra('Image Length'); - case self::BITS_PER_SAMPLE: - return Pel::tra('Bits per Sample'); - case self::COMPRESSION: - return Pel::tra('Compression'); - case self::PHOTOMETRIC_INTERPRETATION: - return Pel::tra('Photometric Interpretation'); - case self::FILL_ORDER: - return Pel::tra('Fill Order'); - case self::DOCUMENT_NAME: - return Pel::tra('Document Name'); - case self::IMAGE_DESCRIPTION: - return Pel::tra('Image Description'); - case self::MAKE: - return Pel::tra('Manufacturer'); - case self::MODEL: - return Pel::tra('Model'); - case self::STRIP_OFFSETS: - return Pel::tra('Strip Offsets'); - case self::ORIENTATION: - return Pel::tra('Orientation'); - case self::SAMPLES_PER_PIXEL: - return Pel::tra('Samples per Pixel'); - case self::ROWS_PER_STRIP: - return Pel::tra('Rows per Strip'); - case self::STRIP_BYTE_COUNTS: - return Pel::tra('Strip Byte Count'); - case self::X_RESOLUTION: - return Pel::tra('x-Resolution'); - case self::Y_RESOLUTION: - return Pel::tra('y-Resolution'); - case self::PLANAR_CONFIGURATION: - return Pel::tra('Planar Configuration'); - case self::RESOLUTION_UNIT: - return Pel::tra('Resolution Unit'); - case self::TRANSFER_FUNCTION: - return Pel::tra('Transfer Function'); - case self::SOFTWARE: - return Pel::tra('Software'); - case self::DATE_TIME: - return Pel::tra('Date and Time'); - case self::ARTIST: - return Pel::tra('Artist'); - case self::WHITE_POINT: - return Pel::tra('White Point'); - case self::PRIMARY_CHROMATICITIES: - return Pel::tra('Primary Chromaticities'); - case self::TRANSFER_RANGE: - return Pel::tra('Transfer Range'); - case self::JPEG_PROC: - return Pel::tra('JPEG Process'); - case self::JPEG_INTERCHANGE_FORMAT: - return Pel::tra('JPEG Interchange Format'); - case self::JPEG_INTERCHANGE_FORMAT_LENGTH: - return Pel::tra('JPEG Interchange Format Length'); - case self::YCBCR_COEFFICIENTS: - return Pel::tra('YCbCr Coefficients'); - case self::YCBCR_SUB_SAMPLING: - return Pel::tra('YCbCr Sub-Sampling'); - case self::YCBCR_POSITIONING: - return Pel::tra('YCbCr Positioning'); - case self::REFERENCE_BLACK_WHITE: - return Pel::tra('Reference Black/White'); - case self::RELATED_IMAGE_FILE_FORMAT: - return Pel::tra('Related Image File Format'); - case self::RELATED_IMAGE_WIDTH: - return Pel::tra('Related Image Width'); - case self::RELATED_IMAGE_LENGTH: - return Pel::tra('Related Image Length'); - case self::CFA_REPEAT_PATTERN_DIM: - return Pel::tra('CFA Repeat Pattern Dim'); - case self::CFA_PATTERN: - return Pel::tra('CFA Pattern'); - case self::BATTERY_LEVEL: - return Pel::tra('Battery Level'); - case self::COPYRIGHT: - return Pel::tra('Copyright'); - case self::EXPOSURE_TIME: - return Pel::tra('Exposure Time'); - case self::FNUMBER: - return Pel::tra('FNumber'); - case self::IPTC_NAA: - return Pel::tra('IPTC/NAA'); - case self::EXIF_IFD_POINTER: - return Pel::tra('Exif IFD Pointer'); - case self::INTER_COLOR_PROFILE: - return Pel::tra('Inter Color Profile'); - case self::EXPOSURE_PROGRAM: - return Pel::tra('Exposure Program'); - case self::SPECTRAL_SENSITIVITY: - return Pel::tra('Spectral Sensitivity'); - case self::GPS_INFO_IFD_POINTER: - return Pel::tra('GPS Info IFD Pointer'); - case self::ISO_SPEED_RATINGS: - return Pel::tra('ISO Speed Ratings'); - case self::OECF: - return Pel::tra('OECF'); - case self::EXIF_VERSION: - return Pel::tra('Exif Version'); - case self::DATE_TIME_ORIGINAL: - return Pel::tra('Date and Time (original)'); - case self::DATE_TIME_DIGITIZED: - return Pel::tra('Date and Time (digitized)'); - case self::COMPONENTS_CONFIGURATION: - return Pel::tra('Components Configuration'); - case self::COMPRESSED_BITS_PER_PIXEL: - return Pel::tra('Compressed Bits per Pixel'); - case self::SHUTTER_SPEED_VALUE: - return Pel::tra('Shutter speed'); - case self::APERTURE_VALUE: - return Pel::tra('Aperture'); - case self::BRIGHTNESS_VALUE: - return Pel::tra('Brightness'); - case self::EXPOSURE_BIAS_VALUE: - return Pel::tra('Exposure Bias'); - case self::MAX_APERTURE_VALUE: - return Pel::tra('Max Aperture Value'); - case self::SUBJECT_DISTANCE: - return Pel::tra('Subject Distance'); - case self::METERING_MODE: - return Pel::tra('Metering Mode'); - case self::LIGHT_SOURCE: - return Pel::tra('Light Source'); - case self::FLASH: - return Pel::tra('Flash'); - case self::FOCAL_LENGTH: - return Pel::tra('Focal Length'); - case self::MAKER_NOTE: - return Pel::tra('Maker Note'); - case self::USER_COMMENT: - return Pel::tra('User Comment'); - case self::SUB_SEC_TIME: - return Pel::tra('SubSec Time'); - case self::SUB_SEC_TIME_ORIGINAL: - return Pel::tra('SubSec Time Original'); - case self::SUB_SEC_TIME_DIGITIZED: - return Pel::tra('SubSec Time Digitized'); - case self::XP_TITLE: - return 'Windows XP Title'; - case self::XP_COMMENT: - return 'Windows XP Comment'; - case self::XP_AUTHOR: - return 'Windows XP Author'; - case self::XP_KEYWORDS: - return 'Windows XP Keywords'; - case self::XP_SUBJECT: - return 'Windows XP Subject'; - case self::FLASH_PIX_VERSION: - return Pel::tra('FlashPix Version'); - case self::COLOR_SPACE: - return Pel::tra('Color Space'); - case self::PIXEL_X_DIMENSION: - return Pel::tra('Pixel x-Dimension'); - case self::PIXEL_Y_DIMENSION: - return Pel::tra('Pixel y-Dimension'); - case self::RELATED_SOUND_FILE: - return Pel::tra('Related Sound File'); - case self::INTEROPERABILITY_IFD_POINTER: - return Pel::tra('Interoperability IFD Pointer'); - case self::FLASH_ENERGY: - return Pel::tra('Flash Energy'); - case self::SPATIAL_FREQUENCY_RESPONSE: - return Pel::tra('Spatial Frequency Response'); - case self::FOCAL_PLANE_X_RESOLUTION: - return Pel::tra('Focal Plane x-Resolution'); - case self::FOCAL_PLANE_Y_RESOLUTION: - return Pel::tra('Focal Plane y-Resolution'); - case self::FOCAL_PLANE_RESOLUTION_UNIT: - return Pel::tra('Focal Plane Resolution Unit'); - case self::SUBJECT_LOCATION: - return Pel::tra('Subject Location'); - case self::EXPOSURE_INDEX: - return Pel::tra('Exposure index'); - case self::SENSING_METHOD: - return Pel::tra('Sensing Method'); - case self::FILE_SOURCE: - return Pel::tra('File Source'); - case self::SCENE_TYPE: - return Pel::tra('Scene Type'); - case self::SUBJECT_AREA: - return Pel::tra('Subject Area'); - case self::CUSTOM_RENDERED: - return Pel::tra('Custom Rendered'); - case self::EXPOSURE_MODE: - return Pel::tra('Exposure Mode'); - case self::WHITE_BALANCE: - return Pel::tra('White Balance'); - case self::DIGITAL_ZOOM_RATIO: - return Pel::tra('Digital Zoom Ratio'); - case self::FOCAL_LENGTH_IN_35MM_FILM: - return Pel::tra('Focal Length In 35mm Film'); - case self::SCENE_CAPTURE_TYPE: - return Pel::tra('Scene Capture Type'); - case self::GAIN_CONTROL: - return Pel::tra('Gain Control'); - case self::CONTRAST: - return Pel::tra('Contrast'); - case self::SATURATION: - return Pel::tra('Saturation'); - case self::SHARPNESS: - return Pel::tra('Sharpness'); - case self::DEVICE_SETTING_DESCRIPTION: - return Pel::tra('Device Setting Description'); - case self::SUBJECT_DISTANCE_RANGE: - return Pel::tra('Subject Distance Range'); - case self::IMAGE_UNIQUE_ID: - return Pel::tra('Image Unique ID'); - case self::GAMMA: - return Pel::tra('Gamma'); - case self::PRINT_IM: - return Pel::tra('Print IM'); - } - - case PelIfd::GPS: - switch ($tag) { - case self::GPS_VERSION_ID: - return 'GPSVersionID'; - case self::GPS_LATITUDE_REF: - return 'GPSLatitudeRef'; - case self::GPS_LATITUDE: - return 'GPSLatitude'; - case self::GPS_LONGITUDE_REF: - return 'GPSLongitudeRef'; - case self::GPS_LONGITUDE: - return 'GPSLongitude'; - case self::GPS_ALTITUDE_REF: - return 'GPSAltitudeRef'; - case self::GPS_ALTITUDE: - return 'GPSAltitude'; - case self::GPS_TIME_STAMP: - return 'GPSTimeStamp'; - case self::GPS_SATELLITES: - return 'GPSSatellites'; - case self::GPS_STATUS: - return 'GPSStatus'; - case self::GPS_MEASURE_MODE: - return 'GPSMeasureMode'; - case self::GPS_DOP: - return 'GPSDOP'; - case self::GPS_SPEED_REF: - return 'GPSSpeedRef'; - case self::GPS_SPEED: - return 'GPSSpeed'; - case self::GPS_TRACK_REF: - return 'GPSTrackRef'; - case self::GPS_TRACK: - return 'GPSTrack'; - case self::GPS_IMG_DIRECTION_REF: - return 'GPSImgDirectionRef'; - case self::GPS_IMG_DIRECTION: - return 'GPSImgDirection'; - case self::GPS_MAP_DATUM: - return 'GPSMapDatum'; - case self::GPS_DEST_LATITUDE_REF: - return 'GPSDestLatitudeRef'; - case self::GPS_DEST_LATITUDE: - return 'GPSDestLatitude'; - case self::GPS_DEST_LONGITUDE_REF: - return 'GPSDestLongitudeRef'; - case self::GPS_DEST_LONGITUDE: - return 'GPSDestLongitude'; - case self::GPS_DEST_BEARING_REF: - return 'GPSDestBearingRef'; - case self::GPS_DEST_BEARING: - return 'GPSDestBearing'; - case self::GPS_DEST_DISTANCE_REF: - return 'GPSDestDistanceRef'; - case self::GPS_DEST_DISTANCE: - return 'GPSDestDistance'; - case self::GPS_PROCESSING_METHOD: - return 'GPSProcessingMethod'; - case self::GPS_AREA_INFORMATION: - return 'GPSAreaInformation'; - case self::GPS_DATE_STAMP: - return 'GPSDateStamp'; - case self::GPS_DIFFERENTIAL: - return 'GPSDifferential'; - } - - default: - return Pel::fmt('Unknown Tag: 0x%04X', $tag); - } - } - -} -?> \ No newline at end of file diff --git a/3.1/modules/autorotate/lib/pel/PelTiff.php b/3.1/modules/autorotate/lib/pel/PelTiff.php deleted file mode 100644 index 0146c9e2..00000000 --- a/3.1/modules/autorotate/lib/pel/PelTiff.php +++ /dev/null @@ -1,296 +0,0 @@ - - * @version $Revision: 458 $ - * @date $Date: 2006-11-18 22:22:58 +0100 (Sat, 18 Nov 2006) $ - * @license http://www.gnu.org/licenses/gpl.html GNU General Public - * License (GPL) - * @package PEL - */ - -/**#@+ Required class definitions. */ -require_once('PelDataWindow.php'); -require_once('PelIfd.php'); -require_once('Pel.php'); -/**#@-*/ - - -/** - * Class for handling TIFF data. - * - * Exif data is actually an extension of the TIFF file format. TIFF - * images consist of a number of {@link PelIfd Image File Directories} - * (IFDs), each containing a number of {@link PelEntry entries}. The - * IFDs are linked to each other --- one can get hold of the first one - * with the {@link getIfd()} method. - * - * To parse a TIFF image for Exif data one would do: - * - * - * $tiff = new PelTiff($data); - * $ifd0 = $tiff->getIfd(); - * $exif = $ifd0->getSubIfd(PelIfd::EXIF); - * $ifd1 = $ifd0->getNextIfd(); - * - * - * Should one have some image data of an unknown type, then the {@link - * PelTiff::isValid()} function is handy: it will quickly test if the - * data could be valid TIFF data. The {@link PelJpeg::isValid()} - * function does the same for JPEG images. - * - * @author Martin Geisler - * @package PEL - */ -class PelTiff { - - /** - * TIFF header. - * - * This must follow after the two bytes indicating the byte order. - */ - const TIFF_HEADER = 0x002A; - - /** - * The first Image File Directory, if any. - * - * If set, then the type of the IFD must be {@link PelIfd::IFD0}. - * - * @var PelIfd - */ - private $ifd = null; - - - /** - * Construct a new object for holding TIFF data. - * - * The new object will be empty (with no {@link PelIfd}) unless an - * argument is given from which it can initialize itself. This can - * either be the filename of a TIFF image or a {@link PelDataWindow} - * object. - * - * Use {@link setIfd()} to explicitly set the IFD. - */ - function __construct($data = false) { - if ($data === false) - return; - - if (is_string($data)) { - Pel::debug('Initializing PelTiff object from %s', $data); - $this->loadFile($data); - } elseif ($data instanceof PelDataWindow) { - Pel::debug('Initializing PelTiff object from PelDataWindow.'); - $this->load($data); - } else { - throw new PelInvalidArgumentException('Bad type for $data: %s', - gettype($data)); - } - } - - - /** - * Load TIFF data. - * - * The data given will be parsed and an internal tree representation - * will be built. If the data cannot be parsed correctly, a {@link - * PelInvalidDataException} is thrown, explaining the problem. - * - * @param PelDataWindow the data from which the object will be - * constructed. This should be valid TIFF data, coming either - * directly from a TIFF image or from the Exif data in a JPEG image. - */ - function load(PelDataWindow $d) { - Pel::debug('Parsing %d bytes of TIFF data...', $d->getSize()); - - /* There must be at least 8 bytes available: 2 bytes for the byte - * order, 2 bytes for the TIFF header, and 4 bytes for the offset - * to the first IFD. */ - if ($d->getSize() < 8) - throw new PelInvalidDataException('Expected at least 8 bytes of TIFF ' . - 'data, found just %d bytes.', - $d->getSize()); - - /* Byte order */ - if ($d->strcmp(0, 'II')) { - Pel::debug('Found Intel byte order'); - $d->setByteOrder(PelConvert::LITTLE_ENDIAN); - } elseif ($d->strcmp(0, 'MM')) { - Pel::debug('Found Motorola byte order'); - $d->setByteOrder(PelConvert::BIG_ENDIAN); - } else { - throw new PelInvalidDataException('Unknown byte order found in TIFF ' . - 'data: 0x%2X%2X', - $d->getByte(0), $d->getByte(1)); - } - - /* Verify the TIFF header */ - if ($d->getShort(2) != self::TIFF_HEADER) - throw new PelInvalidDataException('Missing TIFF magic value.'); - - /* IFD 0 offset */ - $offset = $d->getLong(4); - Pel::debug('First IFD at offset %d.', $offset); - - if ($offset > 0) { - /* Parse the first IFD, this will automatically parse the - * following IFDs and any sub IFDs. */ - $this->ifd = new PelIfd(PelIfd::IFD0); - $this->ifd->load($d, $offset); - } - } - - - /** - * Load data from a file into a TIFF object. - * - * @param string the filename. This must be a readable file. - */ - function loadFile($filename) { - $this->load(new PelDataWindow(file_get_contents($filename))); - } - - - /** - * Set the first IFD. - * - * @param PelIfd the new first IFD, which must be of type {@link - * PelIfd::IFD0}. - */ - function setIfd(PelIfd $ifd) { - if ($ifd->getType() != PelIfd::IFD0) - throw new PelInvalidDataException('Invalid type of IFD: %d, expected %d.', - $ifd->getType(), PelIfd::IFD0); - - $this->ifd = $ifd; - } - - - /** - * Return the first IFD. - * - * @return PelIfd the first IFD contained in the TIFF data, if any. - * If there is no IFD null will be returned. - */ - function getIfd() { - return $this->ifd; - } - - - /** - * Turn this object into bytes. - * - * TIFF images can have {@link PelConvert::LITTLE_ENDIAN - * little-endian} or {@link PelConvert::BIG_ENDIAN big-endian} byte - * order, and so this method takes an argument specifying that. - * - * @param PelByteOrder the desired byte order of the TIFF data. - * This should be one of {@link PelConvert::LITTLE_ENDIAN} or {@link - * PelConvert::BIG_ENDIAN}. - * - * @return string the bytes representing this object. - */ - function getBytes($order = PelConvert::LITTLE_ENDIAN) { - if ($order == PelConvert::LITTLE_ENDIAN) - $bytes = 'II'; - else - $bytes = 'MM'; - - /* TIFF magic number --- fixed value. */ - $bytes .= PelConvert::shortToBytes(self::TIFF_HEADER, $order); - - if ($this->ifd != null) { - /* IFD 0 offset. We will always start IDF 0 at an offset of 8 - * bytes (2 bytes for byte order, another 2 bytes for the TIFF - * header, and 4 bytes for the IFD 0 offset make 8 bytes - * together). - */ - $bytes .= PelConvert::longToBytes(8, $order); - - /* The argument specifies the offset of this IFD. The IFD will - * use this to calculate offsets from the entries to their data, - * all those offsets are absolute offsets counted from the - * beginning of the data. */ - $bytes .= $this->ifd->getBytes(8, $order); - } else { - $bytes .= PelConvert::longToBytes(0, $order); - } - - return $bytes; - } - - - /** - * Return a string representation of this object. - * - * @return string a string describing this object. This is mostly useful - * for debugging. - */ - function __toString() { - $str = Pel::fmt("Dumping TIFF data...\n"); - if ($this->ifd != null) - $str .= $this->ifd->__toString(); - - return $str; - } - - - /** - * Check if data is valid TIFF data. - * - * This will read just enough data from the data window to determine - * if the data could be a valid TIFF data. This means that the - * check is more like a heuristic than a rigorous check. - * - * @param PelDataWindow the bytes that will be examined. - * - * @return boolean true if the data looks like valid TIFF data, - * false otherwise. - * - * @see PelJpeg::isValid() - */ - static function isValid(PelDataWindow $d) { - /* First check that we have enough data. */ - if ($d->getSize() < 8) - return false; - - /* Byte order */ - if ($d->strcmp(0, 'II')) { - $d->setByteOrder(PelConvert::LITTLE_ENDIAN); - } elseif ($d->strcmp(0, 'MM')) { - Pel::debug('Found Motorola byte order'); - $d->setByteOrder(PelConvert::BIG_ENDIAN); - } else { - return false; - } - - /* Verify the TIFF header */ - return $d->getShort(2) == self::TIFF_HEADER; - } - -} \ No newline at end of file diff --git a/3.1/modules/autorotate/module.info b/3.1/modules/autorotate/module.info deleted file mode 100644 index c4087382..00000000 --- a/3.1/modules/autorotate/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Autorotate" -description = "Rotate an image automatically on upload based on EXIF data" -version = 2 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:autorotate" -discuss_url = "http://gallery.menalto.com/forum_module_autorotate" diff --git a/3.1/modules/basket/controllers/admin_configure.php b/3.1/modules/basket/controllers/admin_configure.php deleted file mode 100644 index 7831734d..00000000 --- a/3.1/modules/basket/controllers/admin_configure.php +++ /dev/null @@ -1,163 +0,0 @@ -validate()) { - - basket::extractForm($form); - message::success(t("Basket Module Configured!")); - } - } - else - { - basket::populateForm($form); - } - - $view = new Admin_View("admin.html"); - $view->content = new View("admin_configure.html"); - - $view->content->form = $form; - - print $view; - } - - /** - * the index page of the user homes admin - */ - public function templates() - { - $form = basket::get_template_form(); - if (request::method() == "post") { - access::verify_csrf(); - - if ($form->validate()) { - - basket::extractTemplateForm($form); - message::success(t("Basket Module Configured!")); - } - } - else - { - basket::populateTemplateForm($form); - } - - $view = new Admin_View("admin.html"); - $view->content = new View("admin_templates.html"); - - $view->content->form = $form; - - print $view; - } - - public function paypal_encrypt_wizard_step1() - { - $view = new Admin_View("admin.html"); - $view->content = new View("pew1.html"); - - $view->content->form = self::keyGenerationForm(); - - print $view; - - } - - public function paypal_encrypt_wizard_step2() - { - access::verify_csrf(); - - $form = self::keyGenerationForm(); - - if (!$form->validate()) { - - self::paypal_encrypt_wizard_step1(); - return; - } - - $ssldir = str_replace('\\','/',VARPATH.'certificate'); - $ssldir= rtrim($ssldir, '/').'/'; - - if ( ! is_dir($ssldir)) - { - // Create the upload directory - mkdir($ssldir, 0777, TRUE); - } - - $prkeyfile = $ssldir . "myprvkey.pem"; - $pubcertfile = $ssldir . "mypubcert.pem"; - $certreqfile = $ssldir . "mycertreq.pem"; - - $dn = array("countryName" => $form->encrypt->countryName->value, - "stateOrProvinceName" => $form->encrypt->stateOrProvinceName->value, - "localityName" => $form->encrypt->localityName->value, - "organizationName" => $form->encrypt->organizationName->value, - "organizationalUnitName" => $form->encrypt->organizationalUnitName->value, - "commonName" => $form->encrypt->commonName->value, - "emailAddress" => $form->encrypt->emailAddress->value); - $privkeypass = $form->encrypt->privKeyPass->value; - $numberofdays = 365; - $config = array( - "private_key_bits" => 1024 - ); - - $privkey = openssl_pkey_new($config); - $csr = openssl_csr_new($dn, $privkey); - $sscert = openssl_csr_sign($csr, null, $privkey, $numberofdays); - openssl_x509_export($sscert, $publickey); - openssl_pkey_export($privkey, $privatekey, $privkeypass); - openssl_csr_export($csr, $csrStr); - - openssl_x509_export_to_file($sscert, $pubcertfile); - openssl_pkey_export_to_file ($privkey, $prkeyfile, $privkeypass); - openssl_csr_export_to_file($csr, $certreqfile); - - //echo "Your Public Certificate has been saved to " . $pubcertfile . "

    "; - //echo "Your Private Key has been saved to " . $prkeyfile . "

    "; - //echo "Your Certificate Request has been saved to " . $certreqfile . "

    "; - - //echo $privatekey; // Will hold the exported PriKey - //echo $publickey; // Will hold the exported PubKey - //echo $csrStr; // Will hold the exported Certificate - } - - private function keyGenerationForm() - { - $form = new Forge("admin/configure/paypal_encrypt_wizard_step2", "", "post", array("id" => "generateKeys", "name" =>"generateKeys")); - $group = $form->group("encrypt")->label(t("Key Generation Details")); - $group->input("countryName")->label(t("Country Name"))->id("countryName"); - $group->input("stateOrProvinceName")->label(t("State or Province Name"))->id("stateOrProvinceName"); - $group->input("localityName")->label(t("Locality Name"))->id("localityName"); - $group->input("organizationName")->label(t("Organization Name"))->id("organizationName"); - $group->input("organizationalUnitName")->label(t("Organizational Unit Name"))->id("organizationalUnitName"); - $group->input("commonName")->label(t("Common Name"))->id("commonName"); - $group->input("emailAddress")->label(t("E-Mail Address"))->id("emailAddress"); - $group->input("privKeyPass")->label(t("Private Key Pass"))->id("privkeypass"); - return $form; - } - -} diff --git a/3.1/modules/basket/controllers/admin_postage_bands.php b/3.1/modules/basket/controllers/admin_postage_bands.php deleted file mode 100644 index 914d7537..00000000 --- a/3.1/modules/basket/controllers/admin_postage_bands.php +++ /dev/null @@ -1,147 +0,0 @@ -content = new View("admin_postage_bands.html"); - $view->content->postage_bands = ORM::factory("postage_band")->order_by("name")->find_all(); - - print $view; - } - - public function add_postage_band_form() { - print postage_band::get_add_form_admin(); - } - - - public function add_postage_band() { - access::verify_csrf(); - - $form = postage_band::get_add_form_admin(); - $valid = $form->validate(); - $name = $form->add_postage->inputs["name"]->value; - $postage = ORM::factory("postage_band")->where("name","=", $name)->find(); - if ($postage->loaded()) { - $form->add_postage->inputs["name"]->add_error("in_use", 1); - $valid = false; - } - - if ($valid) { - $postage = postage_band::create( - $name, - $form->add_postage->flat_rate->value, - $form->add_postage->per_item->value - ); - - $postage->save(); - message::success(t("Created postage band %postage_name", array( - "postage_name" => html::clean($postage->name)))); - print json::reply(array("result" => "success")); - } else { - print $form; - } - } - - public function delete_postage_band_form($id) { - $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded()) { - kohana::show_404(); - } - print postage_band::get_delete_form_admin($postage); - } - - public function delete_postage_band($id) { - access::verify_csrf(); - - $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded()) { - kohana::show_404(); - } - - $form = postage_band::get_delete_form_admin($postage); - if($form->validate()) { - $name = $postage->name; - $postage->delete(); - } else { - print $form; - } - - $message = t("Deleted user %postage_band", array("postage_band" => html::clean($name))); - log::success("user", $message); - message::success($message); - print json::reply(array("result" => "success")); - } - - public function edit_postage_band($id) { - access::verify_csrf(); - - $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded()) { - kohana::show_404(); - } - - $form = postage_band::get_edit_form_admin($postage); - $valid = $form->validate(); - if ($valid) { - $new_name = $form->edit_postage->inputs["name"]->value; - if ($new_name != $postage->name && - ORM::factory("postage_band") - ->where("name", "=", $new_name) - ->where("id","!=", $postage->id) - ->find() - ->loaded()) { - $form->edit_postage->inputs["name"]->add_error("in_use", 1); - $valid = false; - } else { - $postage->name = $new_name; - } - } - - if ($valid) { - $postage->flat_rate = $form->edit_postage->flat_rate->value; - $postage->per_item = $form->edit_postage->per_item->value; - $postage->save(); - - message::success(t("Changed postage band %postage_name", - array("postage_name" => html::clean($postage->name)))); - print json::reply(array("result" => "success")); - } else { - print $form; - } - } - - public function edit_postage_band_form($id) { - $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded()) { - kohana::show_404(); - } - - $form = postage_band::get_edit_form_admin($postage); - - print $form; - } - -} \ No newline at end of file diff --git a/3.1/modules/basket/controllers/admin_product_lines.php b/3.1/modules/basket/controllers/admin_product_lines.php deleted file mode 100644 index 752f4e63..00000000 --- a/3.1/modules/basket/controllers/admin_product_lines.php +++ /dev/null @@ -1,149 +0,0 @@ -content = new View("admin_product_lines.html"); - $view->content->products = ORM::factory("product")->order_by("name")->find_all(); - - print $view; - } - - public function add_product_form() { - print product::get_add_form_admin(); - } - - - public function add_product() { - access::verify_csrf(); - - $form = product::get_add_form_admin(); - $valid = $form->validate(); - $name = $form->add_product->inputs["name"]->value; - $product = ORM::factory("product")->where("name", "=", $name)->find(); - if ($product->loaded()) { - $form->add_product->inputs["name"]->add_error("in_use", 1); - $valid = false; - } - - if ($valid) { - $product = product::create( - $name, - $form->add_product->cost->value, - $form->add_product->description->value, - $form->add_product->postage_band->value - ); - - $product->save(); - message::success(t("Created product %product_name", array( - "product_name" => html::clean($product->name)))); - print json::reply(array("result" => "success")); - } else { - print $form; - } - } - - public function delete_product_form($id) { - $product = ORM::factory("product", $id); - if (!$product->loaded()) { - kohana::show_404(); - } - print product::get_delete_form_admin($product); - } - - public function delete_product($id) { - access::verify_csrf(); - - $product = ORM::factory("product", $id); - if (!$product->loaded()) { - kohana::show_404(); - } - - $form = product::get_delete_form_admin($product); - if($form->validate()) { - $name = $product->name; - $product->delete(); - } else { - print $form; - } - - $message = t("Deleted user %product_name", array("product_name" => html::clean($name))); - log::success("user", $message); - message::success($message); - print json::reply(array("result" => "success")); - } - - public function edit_product($id) { - access::verify_csrf(); - - $product = ORM::factory("product", $id); - if (!$product->loaded()) { - kohana::show_404(); - } - - $form = product::get_edit_form_admin($product); - $valid = $form->validate(); - if ($valid) { - $new_name = $form->edit_product->inputs["name"]->value; - if ($new_name != $product->name && - ORM::factory("product") - ->where("name", "=", $new_name) - ->where("id","!=", $product->id) - ->find() - ->loaded()) { - $form->edit_product->inputs["name"]->add_error("in_use", 1); - $valid = false; - } else { - $product->name = $new_name; - } - } - - if ($valid) { - $product->cost = $form->edit_product->cost->value; - $product->description = $form->edit_product->description->value; - $product->postage_band_id = $form->edit_product->postage_band->value; - $product->save(); - - message::success(t("Changed product %product_name", - array("product_name" => html::clean($product->name)))); - print json::reply(array("result" => "success")); - } else { - print $form; - } - } - - public function edit_product_form($id) { - $product = ORM::factory("product", $id); - if (!$product->loaded()) { - kohana::show_404(); - } - - $form = product::get_edit_form_admin($product); - - print $form; - } - -} \ No newline at end of file diff --git a/3.1/modules/basket/controllers/basket.php b/3.1/modules/basket/controllers/basket.php deleted file mode 100644 index a4ecbee3..00000000 --- a/3.1/modules/basket/controllers/basket.php +++ /dev/null @@ -1,443 +0,0 @@ -query("ALTER TABLE {orders} ADD COLUMN `method` int(9) DEFAULT 0;"); - } - public function view_basket($pp="") { - - $template = new Theme_View("page.html", "basket"); - - $basket = Session_Basket::get(); - if (isset($pp)){ - if ($pp=="nopp"){ - $basket->disablepp(); - } - elseif ($pp=="ppon"){ - $basket->enablepp(); - } - } - - $view = new View("view_basket.html"); - $view->basket = $basket; - - - $template->content = $view; - - print $template; - } - - public function preview($id) { - $item = ORM::factory("item", $id); - - print ""; - - } - - public function view_orders() { - self::check_view_orders(); - $template = new Theme_View("page.html", "basket"); - - $incomplete_orders = ORM::factory("order")->where('status',"<",20)->find_all(); - - $view = new View("view_orders.html"); - - $view->orders = $incomplete_orders; - - $template->content = $view; - - print $template; - } - - - public function view_ipn($orderid){ - self::check_view_orders(); - - $template = new Theme_View("page.html", "basket"); - - $order = ORM::factory("order")->where("id","=",$orderid)->find(); - $ipn_messages = ORM::factory("ipn_message")->where("key","=",$orderid)->find_all(); - //$ipn_messages = ORM::factory("ipn_message")->find_all(); - - $view = new View("view_ipn.html"); - - $view->order = $order; - $view->ipn_messages = $ipn_messages; - - $template->content = $view; - - print $template; - - } - - public function check_view_orders() { - if (!basket::can_view_orders()){ - die("Invalid access."); - } - } - - public function print_order($id){ - - access::verify_csrf(); - self::check_view_orders(); - - - $prefix = basket::getOrderPrefix(); - $length = strlen($prefix); - if (strlen($id)>$length ){ - if ($prefix === strtolower(substr($id,0,$length ))){ - $id = substr($id,$length); - } - } - $order = ORM::factory("order", $id); - $view = new View("print_order.html"); - - if ($order->loaded()){ - $view->order = str_replace(array("\r\n", "\n", "\r"),"
    ",$order->text); - }else{ - $view->order = "Order ".$id." not found."; - } - print $view; - } - - public function show_order($id){ - - access::verify_csrf(); - self::check_view_orders(); - $prefix = basket::getOrderPrefix(); - $length = strlen($prefix); - if (strlen($id)>$length ){ - if ($prefix === strtolower(substr($id,0,$length ))){ - $id = substr($id,$length); - } - } - - $order = ORM::factory("order", $id); - - if ($order->loaded()){ - $view = new View("view_order.html"); - $view->order = $order; - print $view; - }else{ - print "Order ".$id." not found."; - } - } - - public function show_ipn($id){ - access::verify_csrf(); - self::check_view_orders(); - $ipn_message = ORM::factory("ipn_message", $id); - - if ($ipn_message->loaded()){ - print $ipn_message->text; - }else{ - print "IPN Message ".$id." not found."; - } - - } - - public function confirm_order_delivery($id){ - access::verify_csrf(); - self::check_view_orders(); - $order = ORM::factory("order", $id); - - if ($order->loaded()){ - if ($order->status == 2) - { - $order->status = 20; - $order->save(); - } - } - url::redirect("basket/view_orders"); - } - - public function confirm_order_payment($id){ - access::verify_csrf(); - self::check_view_orders(); - $order = ORM::factory("order", $id); - - if ($order->loaded()){ - if ($order->status == 1) - { - $order->status = 2; - $order->save(); - } - } - url::redirect("basket/view_orders"); - } - - private function getCheckoutForm(){ - $form = new Forge("basket/confirm", "", "post", array("id" => "checkout", "name" =>"checkout")); - $group = $form->group("contact")->label(t("Contact Details")); - $group->input("fullname")->label(t("Name"))->id("fullname"); - $group->input("house")->label(t("House Number / Name"))->id("house"); - $group->input("street")->label(t("Street"))->id("street"); - $group->input("suburb")->label(t("Suburb"))->id("suburb"); - $group->input("town")->label(t("Town or City"))->id("town"); - $group->input("postcode")->label(t("Postcode"))->id("postcode"); - $group->input("email")->label(t("E-Mail Address"))->id("email"); - $group->input("phone")->label(t("Telephone Number"))->id("phone"); - $group->hidden("paypal")->id("paypal"); - - return $form; - } - - public function checkout () { - - $template = new Theme_View("page.html", "basket"); - - $view = new View("checkout.html"); - - $basket = Session_Basket::get(); - - $form = self::getCheckoutForm(); - $form->contact->fullname->value($basket->name); - $form->contact->house->value($basket->house); - $form->contact->street->value($basket->street); - $form->contact->suburb->value($basket->suburb); - $form->contact->town->value($basket->town); - $form->contact->postcode->value($basket->postcode); - $form->contact->email->value($basket->email); - $form->contact->phone->value($basket->phone); - $view->form = $form; - - $template->content = $view; - - - print $template; - } - - public function confirm () { - access::verify_csrf(); - - $form = $this->getCheckoutForm(); - - $valid = $form->validate(); - - if ($valid){ - $basket = Session_Basket::get(); - - if (!isset($basket->contents ) || count($basket->contents) == 0) { - self::view_basket(); - return; - } - - $basket->name = $form->contact->fullname->value; - $basket->house = $form->contact->house->value; - $basket->street = $form->contact->street->value; - $basket->suburb = $form->contact->suburb->value; - $basket->town = $form->contact->town->value; - $basket->postcode = $form->contact->postcode->value; - $basket->email = $form->contact->email->value; - $basket->phone = $form->contact->phone->value; - - $paypal=$form->contact->paypal->value=="true"; - $template = new Theme_View("page.html", "basket"); - - if ($paypal){ - // create a prelimary order - $order = basket::createOrder($basket, Order_Model::PAYMENT_PAYPAL); - $paypal = new Paypal(); - - // create the order first - $view = new View("paypal_redirect.html"); - $view ->form = $paypal->process($basket, - url::site("basket/paypal_complete/$order->id", "http"), - url::site("basket/paypal_cancel/$order->id", "http"), - url::site("basket/paypal_ipn/$order->id", "http")); - $template->content = $view; - print $template; - - // redirect to paypal - }else - { - $form = new Forge("basket/complete", "", "post", array("id" => "confirm", "name" =>"confirm")); - $view = new View("confirm_order.html"); - $view->basket = $basket; - $template->content = $view; - $view->form = $form; - print $template; - } - } - else - { - die("Invalid confirmation!"); - - } - } - - function paypal_ipn($id){ - $order = ORM::factory("order")->where("id","=",$id)->find(); - if ($order->loaded()){ - - $paypal = new Paypal(); - - if ($paypal->validate_ipn($id)){ - if ($paypal->ipn_data['payment_status'] == "Completed"){ - - $order->status = Order_Model::PAYMENT_CONFIRMED; - - // send e-mails - basket::send_order($order); - basket::send_invoice($order); - - $order->save(); - } - return; - } - print "invalid access. tut tut!"; - } - return; - - } - - public function paypal_complete($id) { - $order = ORM::factory("order")->where("id","=",$id)->find(); - $basket = Session_Basket::get(); - $basket->clear(); - $this->_complete($order); - } - - public function paypal_cancel($id){ - $order = ORM::factory("order")->where("id","=",$id)->find(); - - if ($order->loaded()){ - $order->delete(); - } - - $this->checkout(); - } - - public function complete () { - access::verify_csrf(); - - $basket = Session_Basket::get(); - - if (!isset($basket->contents ) || count($basket->contents) == 0) { - self::view_basket(); - return; - } - - // create order - $order = basket::createOrder($basket, Order_Model::PAYMENT_OFFLINE); - $basket->clear(); - - // send e-mails - basket::send_order($order); - basket::send_invoice($order); - - - $this->_complete($order); - } - - private function _complete($order){ - $template = new Theme_View("page.html", "basket"); - $view = new View("order_complete.html"); - $ordernumber = basket::getOrderPrefix().$order->id; - $view->ordernumber = $ordernumber; - $view->order = $order; - $view->total_cost = $order->cost; - - $template->content = $view; - - print $template; - } - - private function getAddToBasketForm($id){ - - $form = new Forge("basket/add_to_basket", "", "post", array("id" => "gAddToBasketForm")); - $group = $form->group("add_to_basket")->label(t("Add To Basket")); - $group->hidden("id"); - $group->dropdown("product") - ->label(t("Product")) - ->options(product::getProductArray($id)); - $group->input("quantity")->label(t("Quantity"))->id("gQuantity"); - $group->submit("")->value(t("Add")); - //$group->submit("proceedToCheckout")->value(t("Proceed To Checkout")); - - return $form; - } - - public function add_to_basket(){ - - access::verify_csrf(); - - - if (!isset($_POST['id'])) - { - die("no id"); - } - $form = self::getAddToBasketForm($_POST['id']); - $valid = $form->validate(); - - if ($valid){ - $basket = Session_Basket::getOrCreate(); - $basket->add( - $form->add_to_basket->id->value, - $form->add_to_basket->product->value, - $form->add_to_basket->quantity->value); - - $item = ORM::factory("item", $form->add_to_basket->id->value); - - Session::instance()->set("redirect_home", $item->parent_id); - - print json::reply(array("result" => "success")); - } - else - { - log_error("invalid form!"); - - } - - } - - public function add_to_basket_ajax($id) { - - $view = new View("add_to_basket_ajax.html"); - - // get the item to add - $item = ORM::factory("item", $id); - if (!$item->loaded()) - { - //TODO - die("Not loaded id"); - } - - // get the basket to add to - $form = self::getAddToBasketForm($id); - $form->add_to_basket->id->value($id); - $form->add_to_basket->quantity->value(1); - - $view->form = $form; - $view->item = $item; - - print $view; - } - - public function remove_item($key) { - - $basket = Session_Basket::getOrCreate(); - $basket->remove($key); - url::redirect("basket/view_basket"); - } - -} diff --git a/3.1/modules/basket/css/basket.css b/3.1/modules/basket/css/basket.css deleted file mode 100644 index 107b8229..00000000 --- a/3.1/modules/basket/css/basket.css +++ /dev/null @@ -1,17 +0,0 @@ -#basket {float:right;} -#add_to_basket {float:right} -#basketForm {max-width:200px;float:left;} -#basketThumb {float:left; padding:10px;} -#basketThumb img{max-width:100px;} -#payment {float:right; width:50%} -#checkout input, -#checkout select, -#checkout textarea { - display: block; - clear: both; - padding: .2em; - width: 100%; -} -#sidebar-basket {max-height:300px; overflow-y:auto; overflow-x:hidden;} -.order-status-1 a{color:#AA0000 !important} -.order-status-2 a{color:#00AA00 !important} diff --git a/3.1/modules/basket/helpers/basket.php b/3.1/modules/basket/helpers/basket.php deleted file mode 100644 index b9be6726..00000000 --- a/3.1/modules/basket/helpers/basket.php +++ /dev/null @@ -1,393 +0,0 @@ - "Australian Dollars", - "CAD" => "Canadian Dollars", - "EUR" => "Euros", - "GBP" => "Pounds Sterling", - "JPY" => "Yen", - "USD" => "U.S. Dollars", - "NZD" => "New Zealand Dollar", - "CHF" => "Swiss Franc", - "HKD" => "Hong Kong Dollar", - "SGD" => "Singapore Dollar", - "SEK" => "Swedish Krona", - "DKK" => "Danish Krone", - "PLN" => "Polish Zloty", - "NOK" => "Norwegian Krone", - "HUF" => "Hungarian Forint", - "CZK" => "Czech Koruna", - "ILS" => "Israeli Shekel", - "MXN" => "Mexican Peso"); - - static $format= array( - "AUD" => "$", - "CAD" => "$", - "EUR" => "€", - "GBP" => "£", - "JPY" => "¥", - "USD" => "$", - "NZD" => "$", - "CHF" => "", - "HKD" => "$", - "SGD" => "$", - "SEK" => "", - "DKK" => "", - "PLN" => "", - "NOK" => "", - "HUF" => "", - "CZK" => "", - "ILS" => "", - "MXN" => ""); - - static $formatweb= array( - "AUD" => "$", - "CAD" => "$", - "EUR" => "€", - "GBP" => "£", - "JPY" => "¥", - "USD" => "$", - "NZD" => "$", - "CHF" => "", - "HKD" => "$", - "SGD" => "$", - "SEK" => "", - "DKK" => "", - "PLN" => "", - "NOK" => "", - "HUF" => "", - "CZK" => "", - "ILS" => "", - "MXN" => ""); - - - static public function can_view_orders() - { - if (identity::active_user()->admin){ - return true; - } - - print identity::active_user(); - foreach (identity::active_user()->groups() as $group){ - if ($group->name == 'shop'){ - return true; - } - } - - return false; - } - - - static function get_configure_form() { - $form = new Forge("admin/configure", "", "post", array("id" => "g-configure-form")); - $group = $form->group("configure")->label(t("Configure Basket")); - $group->input("email")->label(t("Offline Paying Email Address"))->id("g-order-email-address"); - $group->dropdown("currency") - ->label(t("Currency")) - ->options(self::$currencies); - - $group->checkbox("side_bar")->label(t("Use only side bar"))->id("g-side-bar-only"); - - $group->checkbox("paypal")->label(t("Use Paypal"))->id("g-paypal"); - $group->input("paypal_account")->label(t("Paypal E-Mail Address"))->id("g-paypal-address"); - $group->checkbox("allow_pickup")->label(t("Allow Product Pickup"))->id("g-allow-pickup"); - $group->input("order_prefix")->label(t("Order Number Prefix"))->id("g-order-prefix"); - $group->submit("")->value(t("Save")); - return $form; - } - - static function get_template_form() { - $form = new Forge("admin/configure/templates", "", "post", array("id" => "g-configure-form")); - $group = $form->group("configure")->label(t("Configure Basket")); - $group->textarea("payment_details")->label(t("Payment Details Description"))->id("g-payment-details"); - $group->textarea("order_complete_page")->label(t("Order Complete Page"))->id("g-order-complete_page"); - $group->input("order_complete_email_subject")->label(t("Order Complete Email Subject"))->id("g-order-complete_email_subject"); - $group->textarea("order_complete_email")->label(t("Order Complete Email"))->id("g-order-complete_email"); - $group->submit("")->value(t("Save")); - return $form; - } - - static function populateForm($form){ - $form->configure->email->value(basket::getEmailAddress()); - $form->configure->side_bar->checked(basket::is_side_bar_only()); - $form->configure->paypal->checked(basket::isPaypal()); - $form->configure->paypal_account->value(basket::getPaypalAccount()); - $form->configure->currency->selected(basket::getCurrency()); - $form->configure->allow_pickup->checked(basket::isAllowPickup()); - $form->configure->order_prefix->value(basket::getOrderPrefix()); - } - - static function populateTemplateForm($form){ - $form->configure->payment_details->value(basket::getPaymentDetails()); - $form->configure->order_complete_page->value(basket::getOrderCompletePage()); - $form->configure->order_complete_email_subject->value(basket::getOrderCompleteEmailSubject()); - $form->configure->order_complete_email->value(basket::getOrderCompleteEmail()); - } - - static function extractForm($form){ - $email = $form->configure->email->value; - $is_side_bar = $form->configure->side_bar->value; - $isPaypal = $form->configure->paypal->value; - $paypal_account = $form->configure->paypal_account->value; - $currency = $form->configure->currency->selected; - $allow_pickup = $form->configure->allow_pickup->value; - $order_prefix = $form->configure->order_prefix->value; - basket::setEmailAddress($email); - basket::set_side_bar_only($is_side_bar); - basket::setPaypal($isPaypal); - basket::setPaypalAccount($paypal_account); - basket::setCurrency($currency); - basket::setAllowPickup($allow_pickup); - basket::setOrderPrefix($order_prefix); - } - static function extractTemplateForm($form){ - $payment_details = $form->configure->payment_details->value; - $order_complete_page = $form->configure->order_complete_page->value; - $order_complete_email_subject = $form->configure->order_complete_email_subject->value; - $order_complete_email = $form->configure->order_complete_email->value; - basket::setPaymentDetails($payment_details); - basket::setOrderCompletePage($order_complete_page); - basket::setOrderCompleteEmailSubject($order_complete_email_subject); - basket::setOrderCompleteEmail($order_complete_email); - } - - static public function is_side_bar_only() - { - return module::get_var("basket","is_side_bar_only"); - - } - - static public function set_side_bar_only($value) - { - module::set_var("basket","is_side_bar_only",$value); - - } - - - static function getEmailAddress(){ - return module::get_var("basket","email"); - } - - static function isPaypal(){ - return module::get_var("basket","paypal"); - } - - static function getPaypalAccount(){ - return module::get_var("basket","paypal_account"); - } - - static function getCurrency(){ - $cur = module::get_var("basket","currency"); - if (!isset($cur)) - { - $cur = "USD"; - } - return $cur; - } - - static function getPaymentDetails(){ - return module::get_var("basket","payment_details"); - } - - static function getOrderPrefix(){ - return module::get_var("basket","order_prefix"); - } - - static function isAllowPickup(){ - return module::get_var("basket","allow_pickup"); - } - - static function getOrderCompletePage(){ - return module::get_var("basket","order_complete_page"); - } - - static function getOrderCompleteEmail(){ - return module::get_var("basket","order_complete_email"); - } - - static function getOrderCompleteEmailSubject(){ - return module::get_var("basket","order_complete_email_subject"); - } - - static function formatMoney($money){ - return self::$format[self::getCurrency()].number_format($money,2); - } - - static function formatMoneyForWeb($money){ - return self::$formatweb[self::getCurrency()].number_format($money,2); - } - - static function replaceStrings($string, $key_values) { - // Replace x_y before replacing x. - krsort($key_values, SORT_STRING); - - $keys = array(); - $values = array(); - foreach ($key_values as $key => $value) { - $keys[] = "%$key"; - $values[] = $value; - } - return str_replace($keys, $values, $string); - } - - static function setEmailAddress($email){ - module::set_var("basket","email",$email); - } - - static function setPaypal($paypal){ - module::set_var("basket","paypal",$paypal); - } - - static function setPaypalAccount($paypal_account){ - module::set_var("basket","paypal_account",$paypal_account); - } - - static function setCurrency($currency){ - module::set_var("basket","currency",$currency); - } - - static function setPaymentDetails($details){ - module::set_var("basket","payment_details",$details); - } - - static function setAllowPickup($allow_pickup){ - module::set_var("basket","allow_pickup",$allow_pickup); - } - - static function setOrderPrefix($order_prefix){ - module::set_var("basket","order_prefix",strtolower($order_prefix)); - } - - static function setOrderCompletePage($details){ - module::set_var("basket","order_complete_page",$details); - } - - static function setOrderCompleteEmail($details){ - module::set_var("basket","order_complete_email",$details); - } - - static function setOrderCompleteEmailSubject($details){ - module::set_var("basket","order_complete_email_subject",$details); - } - - static function createOrder($basket, $method){ - - $order = ORM::factory("order"); - $order->text = "processing"; - $order->save(); - - $ordernumber = basket::getOrderPrefix().$order->id; - - //$admin_address = basket::getEmailAddress(); - $postage = $basket->postage_cost(); - $product_cost = $basket->cost(); - $ppon = $basket->ispp(); - - $text = " - Order Number : ".$ordernumber." - - for : -".$basket->name." -".$basket->house." -".$basket->street." -".$basket->suburb." -".$basket->town." -".$basket->postcode." -".$basket->email." -".$basket->phone." -Placed at ".date("d F Y - H:i" ,time())." -Cost of Ordered Products = ".$product_cost; - if ($ppon){ - $text = $text." -Postage and Packaging Costs + ".$postage." -Total Owed ".($product_cost+$postage)." Total in ".basket::getCurrency(); - } - else{ - $text = $text." -Person has chosen to pick up product. -Total Owed ".($product_cost)." Total in ".basket::getCurrency(); - } - $text = $text." - -Items Ordered: - -"; - - // create the order items - foreach ($basket->contents as $basket_item){ - $item = $basket_item->getItem(); - $prod = ORM::factory("product", $basket_item->product); - $text = $text." -".$item->title." - ".$item->url()." -".$prod->name." - ".$prod->description." -".$basket_item->quantity." @ ".$prod->cost." - -"; - } - - if ($ppon){ - $total_cost = ($product_cost+$postage); - } - else{ - $total_cost = $product_cost; - } - - $order->name = $basket->name; - $order->email = $basket->email; - $order->cost = $total_cost; - $order->text = $text; - $order->status = Order_Model::WAITING_PAYMENT; - $order->method = $method; - $order->save(); - - //$basket->clear(); - - return $order; - } - - public function send_order($order){ - - $from = "From: ".basket::getEmailAddress(); - $ordernumber = basket::getOrderPrefix().$order->id; - - mail(basket::getEmailAddress(), "Order ".$ordernumber." from ".$order->name, $order->text, $from); - - } - - public function send_invoice($order) - { - - $from = "From: ".basket::getEmailAddress(); - $ordernumber = basket::getOrderPrefix().$order->id; - $invoice_email = basket::replaceStrings(basket::getOrderCompleteEmail(),Array( - "name"=>$order->name, - "order_number"=> $ordernumber, - "total_cost" =>basket::formatMoney($order->cost), - "order_details"=>$order->text)); - - mail($order->email, - basket::replaceStrings(basket::getOrderCompleteEmailSubject(),Array("order_number"=>$ordernumber)), - $invoice_email, $from); - - } - -} \ No newline at end of file diff --git a/3.1/modules/basket/helpers/basket_block.php b/3.1/modules/basket/helpers/basket_block.php deleted file mode 100644 index 9263a68e..00000000 --- a/3.1/modules/basket/helpers/basket_block.php +++ /dev/null @@ -1,21 +0,0 @@ - t("Basket")); - } - - static function get($block_id, $theme) { - $block = ""; - switch ($block_id) { - case "shopping": - $block = new Block(); - $block->css_id = "g-view-basket"; - $block->title = t("Basket"); - $block->content = new View("basket-side-bar.html"); - $block->content->basket = Session_Basket::get(); - break; - } - return $block; - } -} \ No newline at end of file diff --git a/3.1/modules/basket/helpers/basket_event.php b/3.1/modules/basket/helpers/basket_event.php deleted file mode 100644 index c22a48c6..00000000 --- a/3.1/modules/basket/helpers/basket_event.php +++ /dev/null @@ -1,123 +0,0 @@ -add_after("users_groups", - $basket_menu = Menu::factory("submenu") - ->id("basket_menu") - ->label(t("Basket"))); - $basket_menu->append( - Menu::factory("link") - ->id("configure") - ->label(t("Configure")) - ->url(url::site("admin/configure"))); - $basket_menu->append( - Menu::factory("link") - ->id("templates") - ->label(t("Templates")) - ->url(url::site("admin/configure/templates"))); - $basket_menu->append( - Menu::factory("link") - ->id("product_line") - ->label(t("Product Lines")) - ->url(url::site("admin/product_lines"))); - $basket_menu->append( - Menu::factory("link") - ->id("postage_bands") - ->label(t("Postage Bands")) - ->url(url::site("admin/postage_bands"))); - $basket_menu->append( - Menu::factory("link") - ->id("view_orders") - ->label(t("View Orders")) - ->url(url::site("basket/view_orders"))); - - } - - static function item_edit_form($item, $form){ - $group = $form->group("products")->label(t("Available Products")); - - $product_override = ORM::factory("product_override")->where('item_id', "=", $item->id)->find(); - $group->checkbox("all")->label("No products except.."); - if ($product_override->loaded()){ - $group->all->checked($product_override->none); - } - - $products = ORM::factory("product")->find_all(); - foreach ($products as $product){ - $p_group = $group->group("product_$product->id")->label(t("$product->description")); - - $description = $product->description; - $cost = $product->cost; - $checked = false; - - if ($product_override->loaded()){ - $item_product = ORM::factory("item_product") - ->where('product_override_id', "=", $product_override->id) - ->where('product_id', "=", $product->id)->find(); - if ($item_product->loaded()){ - $checked = $item_product->include; - if ($item_product->cost != -1){ - $cost = $item_product->cost; - } - } - } - - $p_group->checkbox("exclude_$product->id")->label($description)->checked($checked); - $p_group->input("cost_$product->id")->label("Cost")->value($cost); - //$producta[$product->id] = $product->description." (".basket::formatMoney($product->cost).")"; - } - } - - static function item_edit_form_completed($item, $form){ - $product_override = ORM::factory("product_override")->where('item_id', "=", $item->id)->find(); - - if ($form->products->all->checked) - { - $product_override->none = $form->products->all->checked; - $product_override->item_id=$item->id; - $product_override->save(); - $products = ORM::factory("product")->find_all(); - foreach ($products as $product){ - $p_group = $form->products->__get("product_$product->id"); - $item_product = ORM::factory("item_product") - ->where('product_override_id', "=", $product_override->id) - ->where('product_id', "=", $product->id)->find(); - - $item_product->include = $p_group->__get("exclude_$product->id")->checked; - $item_product->cost = $p_group->__get("cost_$product->id")->value; - $item_product->product_id = $product->id; - $item_product->product_override_id = $product_override->id; - $item_product->save(); - } - } - else - { - if ($product_override->loaded()){ - $product_override->delete(); - } - } - } -} \ No newline at end of file diff --git a/3.1/modules/basket/helpers/basket_installer.php b/3.1/modules/basket/helpers/basket_installer.php deleted file mode 100644 index 0ed7f9aa..00000000 --- a/3.1/modules/basket/helpers/basket_installer.php +++ /dev/null @@ -1,224 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {products} ( - `id` int(9) NOT NULL auto_increment, - `name` TEXT NOT NULL, - `cost` DECIMAL(10,2) default 0, - `description` varchar(1024), - `postage_band_id` int(9) default 1, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - $db->query("CREATE TABLE IF NOT EXISTS {product_overrides} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `none` BOOLEAN default false, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - $db->query("CREATE TABLE IF NOT EXISTS {item_products} ( - `id` int(9) NOT NULL auto_increment, - `product_override_id` int(9) NOT NULL, - `product_id` int(9) NOT NULL, - `include` BOOLEAN default false, - `cost` DECIMAL(10,2) default -1, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - $db->query("CREATE TABLE IF NOT EXISTS {postage_bands} ( - `id` int(9) NOT NULL auto_increment, - `name` TEXT NOT NULL, - `flat_rate` DECIMAL(10,2) default 0, - `per_item` DECIMAL(10,2) default 0, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - $db->query("CREATE TABLE IF NOT EXISTS {orders} ( - `id` int(9) NOT NULL auto_increment, - `status` int(9) DEFAULT 0, - `name` varchar(1024), - `email` varchar(1024), - `cost` DECIMAL(10,2) default 0, - `method` int(9) DEFAULT 0, - `text` TEXT NOT NULL, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - $db->query("CREATE TABLE IF NOT EXISTS `ipn_messages` ( - `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `date` int(11) NOT NULL, - `key` varchar(20) NOT NULL, - `txn_id` varchar(20) NOT NULL, - `status` varchar(20) NOT NULL, - `success` bool default false, - `text` text, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - - postage_band::create("No Postage",0,0); - - product::create("4x6",5,"4\"x6\" print",1); - product::create("8x10",25,"8\"x10\" print",1); - product::create("8x12",30,"8\"x12\" print",1); - - basket::setPaymentDetails( -"

    Use the following options to pay for this order.

    -

    Send a chequre to..

    -

    Visit the shop..

    -

    By using internet banking..

    " - ); - basket::setOrderPrefix("ORDER"); - basket::setOrderCompletePage( -"

    Your order number is %order_number. To pay for this order please either:

    -

    - Send a cheque for %total_cost to with reference %order_number..

    -

    - Visit the shop and quote the order %order_number..

    -

    - Transfer %total_cost using internet banking with reference %order_number..

    -

    Order will be processed as soon as payment is received. You should receive an e-mail with your order details shortly.

    " - ); - basket::setOrderCompleteEmail( -"Hi %name, - -Thank you for your order the order details are below. To pay for this order please either: - -- Send a cheque for %total_cost to with reference %order_number.. -- Visit the shop and quote the order %order_number.. -- Transfer %total_cost using internet banking with reference %order_number.. - -Order will be processed as soon as payment is received. For order pick-ups please visit.. - -Order Details -------------- -%order_details - -Thanks"); - basket::setOrderCompleteEmailSubject( -"Photography Order %order_number"); - - module::set_version("basket", 5); - - } - - static function upgrade($version) { - $db = Database::instance(); - if ($version == 1) { - - // fix for allowing decimel place in money - $db->query("ALTER TABLE {products} CHANGE COLUMN `cost` `cost` DECIMAL(10,2) default 0;"); - $db->query("ALTER TABLE {item_products} CHANGE COLUMN `cost` `cost` DECIMAL(10,2) default -1;"); - - // postage bands - $db->query("ALTER TABLE {products} ADD COLUMN `postage_band_id` int(9) default 1"); - $db->query("CREATE TABLE IF NOT EXISTS {postage_bands} ( - `id` int(9) NOT NULL auto_increment, - `name` TEXT NOT NULL, - `flat_rate` DECIMAL(10,2) default 0, - `per_item` DECIMAL(10,2) default 0, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - postage_band::create("No Postage",0,0); - - module::set_version("basket", $version = 2); - } - - if ($version == 2) { - $db->query("CREATE TABLE IF NOT EXISTS {orders} ( - `id` int(9) NOT NULL auto_increment, - `text` TEXT NOT NULL, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - basket::setPaymentDetails( -"

    Use the following options to pay for this order.

    -

    Send a chequre to..

    -

    Visit the shop..

    -

    By using internet banking..

    " - ); - basket::setOrderPrefix("ORDER"); - basket::setOrderCompletePage( -"

    Your order number is %order_number. To pay for this order please either:

    -

    - Send a cheque for %total_cost to with reference %order_number..

    -

    - Visit the shop and quote the order %order_number..

    -

    - Transfer %total_cost using internet banking with reference %order_number..

    -

    Order will be processed as soon as payment is received. You should receive an e-mail with your order details shortly.

    " - ); - basket::setOrderCompleteEmail( -"Hi %name, - -Thank you for your order the order details are below. To pay for this order please either: - -- Send a cheque for %total_cost to with reference %order_number.. -- Visit the shop and quote the order %order_number.. -- Transfer %total_cost using internet banking with reference %order_number.. - -Order will be processed as soon as payment is received. For order pick-ups please visit.. - -Order Details -------------- -%order_details - -Thanks"); - basket::setOrderCompleteEmailSubject( -"Photography Order %order_number"); - - module::set_version("basket", $version = 3); - } - - if ($version ==3 ){ - $db->query("ALTER TABLE {orders} ADD COLUMN `status` int(9) DEFAULT 0;"); - - $db->query("CREATE TABLE IF NOT EXISTS {ipn_messages} ( - `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `date` int(11) NOT NULL, - `key` varchar(20) NOT NULL, - `txn_id` varchar(20) NOT NULL, - `status` varchar(20) NOT NULL, - `success` bool default false, - `text` text, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - module::set_version("basket", $version = 4); - - } - - if ($version==4){ - $db->query("ALTER TABLE {orders} ADD COLUMN `name` varchar(1024);"); - $db->query("ALTER TABLE {orders} ADD COLUMN `email` varchar(1024);"); - $db->query("ALTER TABLE {orders} ADD COLUMN `method` int(9) DEFAULT 0;"); - $db->query("ALTER TABLE {orders} ADD COLUMN `cost` DECIMAL(10,2) default 0"); - module::set_version("basket", $version = 5); - } - } - - static function uninstall(){ - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {products}"); - $db->query("DROP TABLE IF EXISTS {product_overrides}"); - $db->query("DROP TABLE IF EXISTS {item_products}"); - $db->query("DROP TABLE IF EXISTS {postage_bands}"); - $db->query("DROP TABLE IF EXISTS {orders}"); - } -} diff --git a/3.1/modules/basket/helpers/basket_theme.php b/3.1/modules/basket/helpers/basket_theme.php deleted file mode 100644 index 9900a59f..00000000 --- a/3.1/modules/basket/helpers/basket_theme.php +++ /dev/null @@ -1,56 +0,0 @@ -css("basket.css"); - } - - static function header_top($theme) { - - if (!basket::is_side_bar_only()) - { - $view = new View("basket.html"); - - $view->basket = Session_Basket::get(); - return $view->render(); - } - return ""; - } - - static function admin_head($theme) { - if (strpos(Router::$current_uri, "admin/product_lines") !== false) { - return $theme->script("gallery.panel.js"); - } - } - static function photo_top($theme){ - if (!basket::is_side_bar_only()) - { - if ( product::isForSale($theme->item()->id)){ - $view = new View("add_to_basket.html"); - - $view->item = $theme->item(); - - return $view->render(); - } - } - return ""; - } -} diff --git a/3.1/modules/basket/helpers/postage_band.php b/3.1/modules/basket/helpers/postage_band.php deleted file mode 100644 index ca679d53..00000000 --- a/3.1/modules/basket/helpers/postage_band.php +++ /dev/null @@ -1,97 +0,0 @@ - "gAddPostageForm")); - $group = $form->group("add_postage")->label(t("Add Postage Band")); - $group->input("name")->label(t("Name"))->id("gPostageName") - ->error_messages("in_use", t("There is already a postage band with that name")); - $group->input("flat_rate")->label(t("Flat Rate"))->id("gFlatRate"); - $group->input("per_item")->label(t("Per Item"))->id("gPetItem"); - $group->submit("")->value(t("Add Postage Band")); - $postage = ORM::factory("postage_band"); - return $form; - } - - static function get_edit_form_admin($postage) { - $form = new Forge("admin/postage_bands/edit_postage_band/$postage->id", "", "post", - array("id" => "gEditPostageForm")); - $group = $form->group("edit_postage")->label(t("Edit Postage Band")); - $group->input("name")->label(t("Name"))->id("gPostageName")->value($postage->name); - $group->inputs["name"]->error_messages( - "in_use", t("There is already a postage band with that name")); - $group->input("flat_rate")->label(t("Flat Rate"))->id("gFlatRate")->value($postage->flat_rate); - $group->input("per_item")->label(t("Per Item"))->id("gPetItem")-> - value($postage->per_item); - - $group->submit("")->value(t("Modify Postage Band")); - return $form; - } - - - static function get_delete_form_admin($postage) { - $form = new Forge("admin/postage_bands/delete_postage_band/$postage->id", "", "post", - array("id" => "gDeletePostageForm")); - $group = $form->group("delete_postage")->label( - t("Are you sure you want to delete postage band %name?", array("name" => $postage->name))); - $group->submit("")->value(t("Delete postage band %name", array("name" => $postage->name))); - return $form; - } - - /** - * Create a new postage band - * - * @param string $name - * @param string $full_name - * @param string $password - * @return User_Model - */ - static function create($name, $flatrate, $peritemcost) { - $postage = ORM::factory("postage_band")->where("name", "=", $name)->find(); - if ($postage->loaded()) { - throw new Exception("@todo postage already EXISTS $name"); - } - - $postage->name = $name; - $postage->flat_rate = $flatrate; - $postage->per_item = $peritemcost; - - $postage->save(); - return $postage; - } - - /** - * returns the array of postage bands - * @return an array of postage bands - */ - static function getPostageArray(){ - $postagea = array(); - - $postages = ORM::factory("postage_band")->find_all(); - foreach ($postages as $postage){ - $show = true; - $postagea[$postage->id] = $postage->name; - } - - return $postagea; - } - -} \ No newline at end of file diff --git a/3.1/modules/basket/helpers/product.php b/3.1/modules/basket/helpers/product.php deleted file mode 100644 index a4a13c8c..00000000 --- a/3.1/modules/basket/helpers/product.php +++ /dev/null @@ -1,189 +0,0 @@ - "gAddProductForm")); - $group = $form->group("add_product")->label(t("Add Product")); - $group->input("name")->label(t("Name"))->id("gProductName") - ->error_messages("in_use", t("There is already a product with that name")); - $group->input("cost")->label(t("Cost"))->id("gCost"); - $group->input("description")->label(t("Description"))->id("gDescription"); - $group->dropdown("postage_band") - ->label(t("Postage Band")) - ->options(postage_band::getPostageArray()); - $group->submit("")->value(t("Add Product")); - $product = ORM::factory("product"); - return $form; - } - - static function get_edit_form_admin($product) { - - $form = new Forge("admin/product_lines/edit_product/$product->id", "", "post", - array("id" => "gEditProductForm")); - $group = $form->group("edit_product")->label(t("Edit Product")); - $group->input("name")->label(t("Name"))->id("gProductName")->value($product->name); - $group->inputs["name"]->error_messages( - "in_use", t("There is already a product with that name")); - $group->input("cost")->label(t("Cost"))->id("gCost")->value($product->cost); - $group->input("description")->label(t("Description"))->id("gDescription")-> - value($product->description); - $group->dropdown("postage_band") - ->label(t("Postage Band")) - ->options(postage_band::getPostageArray()) - ->selected($product->postage_band_id); - - $group->submit("")->value(t("Modify Product")); - return $form; - } - - - static function get_delete_form_admin($product) { - $form = new Forge("admin/product_lines/delete_product/$product->id", "", "post", - array("id" => "gDeleteProductForm")); - $group = $form->group("delete_product")->label( - t("Are you sure you want to delete product %name?", array("name" => $product->name))); - $group->submit("")->value(t("Delete product %name", array("name" => $product->name))); - return $form; - } - - /** - * Create a new product - * - * @param string $name - * @param string $full_name - * @param string $password - * @return User_Model - */ - static function create($name, $cost, $description, $postage_band) { - $product = ORM::factory("product")->where("name", "=", $name)->find(); - if ($product->loaded()) { - throw new Exception("@todo USER_ALREADY_EXISTS $name"); - } - - $product->name = $name; - $product->cost = $cost; - $product->description = $description; - $product->postage_band_id = $postage_band; - $product->save(); - return $product; - } - - static function getProductArray($id){ - $producta = array(); - // check for product override - $product_override = ORM::factory("product_override")->where('item_id', "=", $id)->find(); - - if (!$product_override->loaded()){ - // no override found so check parents - // check parents for product override - $item = ORM::factory("item",$id); - - $parents = $item->parents(); - foreach ($parents as $parent){ - // check for product override - $temp_override = ORM::factory("product_override")->where('item_id', "=", $parent->id)->find(); - if ($temp_override ->loaded()){ - $product_override = $temp_override; - //break; - } - } - } - - $products = ORM::factory("product")->find_all(); - foreach ($products as $product){ - $show = true; - $cost = $product->cost; - if ($product_override->loaded()){ - $show = !$product_override->none; - $item_product = ORM::factory("item_product") - ->where('product_override_id', "=", $product_override->id) - ->where('product_id', "=", $product->id)->find(); - - if ($item_product->loaded()){ - $cost = $item_product->cost; - if (!$show){ - $show = $item_product->include; - } - } - } - - if ($show) - { - $producta[$product->id] = html::clean($product->description)." (".basket::formatMoneyForWeb($cost).")"; - } - } - - return $producta; - } - - static function isForSale($id){ - - try - { - // check for product override - $product_override = ORM::factory("product_override")->where('item_id', "=", $id)->find(); - - if (!$product_override->loaded()){ - // no override found so check parents - // check parents for product override - $item = ORM::factory("item",$id); - - $parents = $item->parents(); - foreach ($parents as $parent){ - // check for product override - $temp_override = ORM::factory("product_override")->where('item_id', "=", $parent->id)->find(); - if ($temp_override ->loaded()){ - $product_override = $temp_override; - //break; - } - } - } - - $products = ORM::factory("product")->find_all(); - - if ($product_override->loaded() && $product_override->none){ - - foreach ($products as $product){ - - $item_product = ORM::factory("item_product") - ->where('product_override_id', "=", $product_override->id) - ->where('product_id', "=", $product->id)->find(); - - if ($item_product->loaded()){ - - if ($item_product->include){ - return true; - } - } - } - - return false; - - } else { - return count($products) > 0; - } - } - catch (Exception $e) - { - echo $e; - } - } -} \ No newline at end of file diff --git a/3.1/modules/basket/images/basket.png b/3.1/modules/basket/images/basket.png deleted file mode 100644 index 168bef64..00000000 Binary files a/3.1/modules/basket/images/basket.png and /dev/null differ diff --git a/3.1/modules/basket/libraries/Paypal.php b/3.1/modules/basket/libraries/Paypal.php deleted file mode 100644 index c18ee058..00000000 --- a/3.1/modules/basket/libraries/Paypal.php +++ /dev/null @@ -1,330 +0,0 @@ -add_field('business', 'somebody@domain.com'); - * $p->add_field('first_name', $_POST['first_name']); - * ... (add all your fields in the same manor) - * $p->submit_paypal_post(); - * - * To process an IPN, have your IPN processing file contain: - * - * $p = new paypal_class; - * if ($p->validate_ipn()) { - * ... (IPN is verified. Details are in the ipn_data() array) - * } - * - * - * In case you are new to paypal, here is some information to help you: - * - * 1. Download and read the Merchant User Manual and Integration Guide from - * http://www.paypal.com/en_US/pdf/integration_guide.pdf. This gives - * you all the information you need including the fields you can pass to - * paypal (using add_field() with this class) aswell as all the fields - * that are returned in an IPN post (stored in the ipn_data() array in - * this class). It also diagrams the entire transaction process. - * - * 2. Create a "sandbox" account for a buyer and a seller. This is just - * a test account(s) that allow you to test your site from both the - * seller and buyer perspective. The instructions for this is available - * at https://developer.paypal.com/ as well as a great forum where you - * can ask all your paypal integration questions. Make sure you follow - * all the directions in setting up a sandbox test environment, including - * the addition of fake bank accounts and credit cards. - * - ******************************************************************************* - */ - -class Paypal_Core { - - var $last_error; // holds the last error encountered - - var $ipn_response; // holds the IPN response from paypal - public $ipn_data = array(); // array contains the POST values for IPN - - var $fields = array(); // array holds the fields to submit to paypal - - - public function __construct() - { - // initialization constructor. Called when class is created. - - // sandbox paypal - - //$this->paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr"; - //$this->secure_url = "ssl://www.sandbox.paypal.com"; - - // normal paypal - $this->paypal_url = "https://www.paypal.com/cgi-bin/webscr"; - $this->secure_url = "ssl://www.paypal.com"; - - $this->last_error = ''; - - //$this->ipn_log_file = Kohana::log_directory().Kohana::config('paypal.ipn_logfile'); - //$this->ipn_log = true; - $this->ipn_response = ''; - - // populate $fields array with a few default values. See the paypal - // documentation for a list of fields and their data types. These defaul - // values can be overwritten by the calling script. - - - } - - function add_field($field, $value) { - - // adds a key=>value pair to the fields array, which is what will be - // sent to paypal as POST variables. If the value is already in the - // array, it will be overwritten. - - $this->fields["$field"] = $value; - } - - public function process($session_basket, $return_url, $cancel_url, $notify_url){ - - $this->add_field('rm','2'); - $this->add_field('cmd','_cart'); - $this->add_field('upload','1'); - - $this->add_field('currency_code', basket::getCurrency()); - $this->add_field('business', basket::getPaypalAccount()); - - // IPN stuff - $this->add_field('return', $return_url); - $this->add_field('cancel_return', $cancel_url); - $this->add_field('notify_url', $notify_url); - - // postage - if ($session_basket->ispp()){ - $postage = $session_basket->postage_cost(); - if ($postage > 0) { - $this->add_field('shipping_1',$postage); - } - } - - // basket contents - $id = 1; - foreach ($session_basket->contents as $key => $basket_item){ - $this->add_field("item_name_$id", $basket_item->getCode()); - $this->add_field("amount_$id", $basket_item->cost_per); - $this->add_field("quantity_$id",$basket_item->quantity); - $id++; - } - - // shipping address - $this->add_field("payer_email", $session_basket->email); - $this->add_field("address_name", $session_basket->name); - $this->add_field("address_street", $session_basket->house." ".$session_basket->street); - $this->add_field("address_city", $session_basket->town); - $this->add_field("address_zip", $session_basket->postcode); - $this->add_field("contact_phone", $session_basket->phone); - - $string = "
    paypal_url."\">\n"; - - foreach ($this->fields as $name => $value) { - $string = $string."\n"; - } - - $string = $string."
    "; - return $string; - } - - function validate_ipn($key) { - - // parse the paypal URL - $url_parsed=parse_url($this->paypal_url); - - // generate the post string from the _POST vars aswell as load the - // _POST vars into an arry so we can play with them from the calling - // script. - $post_string = 'cmd=_notify-validate'; - foreach ($_POST as $field=>$value) { - $this->ipn_data["$field"] = $value; - $value = urlencode(stripslashes($value)); - $value = preg_replace('/(.*[^%^0^D])(%0A)(.*)/i','${1}%0D%0A${3}',$value); - $post_string .= '&'.$field.'='.$value; - } - - // open the connection to paypal - - $fp = fsockopen($this->secure_url,443,$err_num,$err_str,30); - if(!$fp) { - - // could not open the connection. If loggin is on, the error message - // will be in the log. - $this->last_error = "fsockopen error no. $errnum: $errstr"; - $this->log_ipn_results($key,false); - return false; - - } else { - - // Post the data back to paypal - fputs($fp, "POST ".$url_parsed['path']." HTTP/1.1\r\n"); - fputs($fp, "Host: ".$url_parsed['host']."\r\n"); - fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); - - fputs($fp, "Content-length: ".strlen($post_string)."\r\n\r\n"); - //fputs($fp, "Connection: close\r\n\r\n"); - fputs($fp, $post_string . "\r\n\r\n"); - - // loop through the response from the server and append to variable - while(!feof($fp)) { - $this->ipn_response .= fgets($fp, 1024); - } - - fclose($fp); // close connection - - } - - if (stristr($this->ipn_response,"VERIFIED")===false) - { - // Invalid IPN transaction. Check the log for details. - $this->last_error = 'IPN Validation Failed. '.$url_parsed['host'].'\\'.$url_parsed['path']; - $this->log_ipn_results($key,false); - return false; - } - else{ - - // Valid IPN transaction. - - // check recievers e-mail - $business = basket::getPaypalAccount(); - - if ($this->ipn_data['receiver_email']!=$business) - { - $this->last_error = 'receivers e-mail did not match '.$business; - $this->log_ipn_results($key,false); - return false; - } - - // if confirmed check message has not been received already - if ($this->ipn_data['payment_status'] == "Completed"){ - - $message = ORM::factory("ipn_message") - ->where('key',"=",$key) - ->where('status',"=",'completed') - ->where('txn_id',"=",$this->ipn_data['txn_id'])->find(); - - if ($message->loaded()){ - $this->last_error = 'Message alread received.'; - $this->log_ipn_results($key,false); - return false; - } - } - - $this->log_ipn_results($key,true); - return true; - - } - - } - - function log_ipn_results($key, $success) { - - // Timestamp - $text = '['.date('m/d/Y g:i A').'] - '; - - $message = ORM::factory("ipn_message"); - $message->date = time(); - $message->key = $key; - $message->txn_id = $this->ipn_data['txn_id']; - $message->status = $this->ipn_data['payment_status']; - $message->success = $success; - - // Success or failure being logged? - if ($success) $text .= "SUCCESS!\n"; - else $text .= 'FAIL: '.$this->last_error."\n"; - - // Log the POST variables - $text .= "IPN POST Vars from Paypal:\n"; - foreach ($this->ipn_data as $key=>$value) { - $text .= "$key=$value \n"; - } - - // Log the response from the paypal server - $text .= "\nIPN Response from Paypal Server:\n ".$this->ipn_response; - - $message->text = $text; - $message->save(); - } - - function dump_fields() { - - // Used for debugging, this function will output all the field/value pairs - // that are currently defined in the instance of the class using the - // add_field() function. - - echo "

    paypal_class->dump_fields() Output:

    "; - echo " - - - - "; - - ksort($this->fields); - foreach ($this->fields as $key => $value) { - echo ""; - } - - echo "
    Field NameValue
    $key".urldecode($value)." 

    "; - } -} - - - diff --git a/3.1/modules/basket/libraries/Session_Basket.php b/3.1/modules/basket/libraries/Session_Basket.php deleted file mode 100644 index c73cfe36..00000000 --- a/3.1/modules/basket/libraries/Session_Basket.php +++ /dev/null @@ -1,200 +0,0 @@ -product = $aProduct; - $this->item = $aItem; - $this->quantity = $aQuantity; - $this->calculate_cost(); - } - - private function calculate_cost(){ - $prod = ORM::factory("product", $this->product); - $this->cost = $prod->cost * $this->quantity; - $this->cost_per = $prod->cost; - } - - public function add($quantity){ - $this->quantity += $quantity; - $this->calculate_cost(); - } - - public function size(){ - return $this->quantity; - } - - public function getItem(){ - $photo = ORM::factory("item", $this->item); - return $photo; - } - - public function product_description(){ - $prod = ORM::factory("product", $this->product); - return $prod->description; - } - - public function getProduct(){ - $prod = ORM::factory("product", $this->product); - return $prod; - } - - public function getCode(){ - $photo = ORM::factory("item", $this->item); - $prod = ORM::factory("product", $this->product); - return $photo->id." - ".$photo->title." - ".$prod->name; - } - -} - -class Session_Basket_Core { - - public $contents = array(); - - public $name = ""; - public $house = ""; - public $street = ""; - public $suburb = ""; - public $town = ""; - public $postcode = ""; - public $email = ""; - public $phone = ""; - - public $ppenabled = true; - - public function clear(){ - if (isset($this->contents)){ - foreach ($this->contents as $key => $item){ - unset($this->contents[$key]); - } - } - $this->ppenabled = true; - } - - public function enablepp() - { - $this->ppenabled = true; - } - - public function disablepp() - { - $this->ppenabled = false; - } - - public function ispp(){ - return $this->ppenabled; - } - - - private function create_key($product, $id){ - return "$product _ $id"; - } - - public function size(){ - $size = 0; - if (isset($this->contents)){ - foreach ($this->contents as $product => $basket_item){ - $size += $basket_item->size(); - } - } - return $size; - } - - public function add($id, $product, $quantity){ - - $key = $this->create_key($product, $id); - if (isset($this->contents[$key])){ - $this->contents[$key]->add($quantity); - } - else { - $this->contents[$key] = new basket_item($product, $id, $quantity); - } - } - - public function remove($key){ - unset($this->contents[$key]); - } - - public function postage_cost(){ - $postage_cost = 0; - $postage_bands = array(); - $postage_quantities = array(); - if (isset($this->contents)){ - // create array of postage bands - foreach ($this->contents as $product => $basket_item){ - $postage_band = $basket_item->getProduct()->postage_band; - if (isset($postage_bands[$postage_band->id])) - { - $postage_quantities[$postage_band->id] += $basket_item->quantity; - } - else - { - $postage_quantities[$postage_band->id] = $basket_item->quantity; - $postage_bands[$postage_band->id] = $postage_band; - } - } - - foreach ($postage_bands as $id => $postage_band){ - $postage_cost += $postage_band->flat_rate + ($postage_band->per_item * $postage_quantities[$id]); - } - } - return $postage_cost; - } - - public function cost(){ - $cost = 0; - if (isset($this->contents)){ - foreach ($this->contents as $product => $basket_item){ - $cost += $basket_item->cost; - } - } - return $cost; - } - - public static function get(){ - return Session::instance()->get("basket"); - } - - public static function getOrCreate(){ - $session = Session::instance(); - - $basket = $session->get("basket"); - if (!$basket) - { - $basket = new Session_Basket(); - $session->set("basket", $basket); - } - return $basket; - } - -} \ No newline at end of file diff --git a/3.1/modules/basket/models/ipn_message.php b/3.1/modules/basket/models/ipn_message.php deleted file mode 100644 index c6f75ffa..00000000 --- a/3.1/modules/basket/models/ipn_message.php +++ /dev/null @@ -1,16 +0,0 @@ -date); - } - - public function json_encode(){ - $toReturn = array( - 'id' => $this->id, - 'date' => $this->formatedTime(), - 'text' => text::convertText($this->text)); - return $toReturn; - } -} \ No newline at end of file diff --git a/3.1/modules/basket/models/item_product.php b/3.1/modules/basket/models/item_product.php deleted file mode 100644 index e152ab19..00000000 --- a/3.1/modules/basket/models/item_product.php +++ /dev/null @@ -1,22 +0,0 @@ -id." ".$this->name." ".$this->status(); - } - - public function status(){ - switch ($this->status){ - case 1: - return "Waiting Payment"; - case 2: - return "Payment Confirmed"; - case 20: - return "Complete"; - - default: - return "Unknown"; - } - } - - public function payment_method(){ - switch ($this->method){ - case 1: - return "through Paypal"; - case 2: - return "offline"; - - default: - return "Unknown"; - } - } -} diff --git a/3.1/modules/basket/models/postage_band.php b/3.1/modules/basket/models/postage_band.php deleted file mode 100644 index 83eb6e08..00000000 --- a/3.1/modules/basket/models/postage_band.php +++ /dev/null @@ -1,26 +0,0 @@ - "length[1,32]"); - - protected $has_many=array('products'); - -} diff --git a/3.1/modules/basket/models/product.php b/3.1/modules/basket/models/product.php deleted file mode 100644 index 2bd6a59b..00000000 --- a/3.1/modules/basket/models/product.php +++ /dev/null @@ -1,26 +0,0 @@ - "length[1,32]", - "description" => "length[0,255]"); - protected $belongs_to=array('postage_band'); - -} diff --git a/3.1/modules/basket/models/product_override.php b/3.1/modules/basket/models/product_override.php deleted file mode 100644 index e3e720fd..00000000 --- a/3.1/modules/basket/models/product_override.php +++ /dev/null @@ -1,22 +0,0 @@ - - \ No newline at end of file diff --git a/3.1/modules/basket/views/add_to_basket_ajax.html.php b/3.1/modules/basket/views/add_to_basket_ajax.html.php deleted file mode 100644 index 137ecef2..00000000 --- a/3.1/modules/basket/views/add_to_basket_ajax.html.php +++ /dev/null @@ -1,9 +0,0 @@ - -
    -
    - <?= $item->title?> -
    -
    - -
    -
    \ No newline at end of file diff --git a/3.1/modules/basket/views/admin_configure.html.php b/3.1/modules/basket/views/admin_configure.html.php deleted file mode 100644 index 9960fe01..00000000 --- a/3.1/modules/basket/views/admin_configure.html.php +++ /dev/null @@ -1,7 +0,0 @@ - -
    -

    -

    -

    - -
    \ No newline at end of file diff --git a/3.1/modules/basket/views/admin_postage_bands.html.php b/3.1/modules/basket/views/admin_postage_bands.html.php deleted file mode 100644 index d79fe380..00000000 --- a/3.1/modules/basket/views/admin_postage_bands.html.php +++ /dev/null @@ -1,71 +0,0 @@ - - \ No newline at end of file diff --git a/3.1/modules/basket/views/admin_product_lines.html.php b/3.1/modules/basket/views/admin_product_lines.html.php deleted file mode 100644 index f20f2a37..00000000 --- a/3.1/modules/basket/views/admin_product_lines.html.php +++ /dev/null @@ -1,76 +0,0 @@ - - \ No newline at end of file diff --git a/3.1/modules/basket/views/admin_templates.html.php b/3.1/modules/basket/views/admin_templates.html.php deleted file mode 100644 index 263293c4..00000000 --- a/3.1/modules/basket/views/admin_templates.html.php +++ /dev/null @@ -1,8 +0,0 @@ - -
    -

    -

    - -

    - -
    \ No newline at end of file diff --git a/3.1/modules/basket/views/basket-side-bar.html.php b/3.1/modules/basket/views/basket-side-bar.html.php deleted file mode 100644 index d6ac00d7..00000000 --- a/3.1/modules/basket/views/basket-side-bar.html.php +++ /dev/null @@ -1,42 +0,0 @@ -page_type != 'basket'){ - if (basket::can_view_orders()){ - ?>" title="">item(); - if ($item->is_photo() && product::isForSale($theme->item()->id)){ - ?>

    -id") ?>" -title="">

    -contents) && ($basket->size() > 0)) { - ?>
    -

    " title="">

    - - page_type != 'basket'): ?> - - " - title="">View Orders - - contents) && ($basket->size() > 0)): ?> - - - diff --git a/3.1/modules/basket/views/checkout.html.php b/3.1/modules/basket/views/checkout.html.php deleted file mode 100644 index b9ceaa2d..00000000 --- a/3.1/modules/basket/views/checkout.html.php +++ /dev/null @@ -1,86 +0,0 @@ - - -
    - -
    -

    Payment Details

    - -
    - - - - -
    diff --git a/3.1/modules/basket/views/confirm_order.html.php b/3.1/modules/basket/views/confirm_order.html.php deleted file mode 100644 index 60ff14ac..00000000 --- a/3.1/modules/basket/views/confirm_order.html.php +++ /dev/null @@ -1,89 +0,0 @@ - - - -
    -

    Basket Summary

    -
    - - - - - - - - contents as $key => $prod_details): ?> - "> - - - - - - - - postage_cost();?> - 0):?> - "> - - - - "> - - - -
    - getItem(); ?> -
    - title) ?> -
    -
    - product_description()) ?> - - quantity) ?> - - cost) ?> -
    ispp()?"":"style=\"text-decoration:line-through\""; ?>>Postage and Packagingispp()?"":"style=\"text-decoration:line-through\""; ?>>
    Total Costispp()?basket::formatMoneyForWeb($basket->cost() + $postage):basket::formatMoneyForWeb($basket->cost()); ?>
    -
    - - - -
    -

    Delivery Address

    -name ?>
    -house ?>, -street ?>
    -suburb ?>
    -town ?>
    -postcode ?>
    -
    -

    Contact Details

    -E-mail : email ?>
    -Telephone : phone ?> -
    - -
    diff --git a/3.1/modules/basket/views/order_complete.html.php b/3.1/modules/basket/views/order_complete.html.php deleted file mode 100644 index 5f384732..00000000 --- a/3.1/modules/basket/views/order_complete.html.php +++ /dev/null @@ -1,30 +0,0 @@ - -
    -
    -

    Thankyou for your order

    -method == Order_Model::PAYMENT_PAYPAL){ -?>Your order will be confirmed when Paypal has finished processing your order.$ordernumber, "total_cost"=>basket::formatMoneyForWeb($total_cost)));?>
    -
    \ No newline at end of file diff --git a/3.1/modules/basket/views/paypal_redirect.html.php b/3.1/modules/basket/views/paypal_redirect.html.php deleted file mode 100644 index 26a2438b..00000000 --- a/3.1/modules/basket/views/paypal_redirect.html.php +++ /dev/null @@ -1,4 +0,0 @@ - -

    Processing

    If you are not automatically redirected to - paypal within 5 seconds Click Here.

    - diff --git a/3.1/modules/basket/views/pew1.html.php b/3.1/modules/basket/views/pew1.html.php deleted file mode 100644 index c751f7cb..00000000 --- a/3.1/modules/basket/views/pew1.html.php +++ /dev/null @@ -1,16 +0,0 @@ - - \ No newline at end of file diff --git a/3.1/modules/basket/views/pew2.html.php b/3.1/modules/basket/views/pew2.html.php deleted file mode 100644 index 41324d2d..00000000 --- a/3.1/modules/basket/views/pew2.html.php +++ /dev/null @@ -1,17 +0,0 @@ - - \ No newline at end of file diff --git a/3.1/modules/basket/views/print_order.html.php b/3.1/modules/basket/views/print_order.html.php deleted file mode 100644 index 63598131..00000000 --- a/3.1/modules/basket/views/print_order.html.php +++ /dev/null @@ -1,20 +0,0 @@ - - - -Print Order - - - - - - - - - - - \ No newline at end of file diff --git a/3.1/modules/basket/views/view_basket.html.php b/3.1/modules/basket/views/view_basket.html.php deleted file mode 100644 index 891d2647..00000000 --- a/3.1/modules/basket/views/view_basket.html.php +++ /dev/null @@ -1,137 +0,0 @@ - - -
    -
    - contents ) && count($basket->contents) > 0): ?> - - - - " - class="right g-button ui-state-default ui-corner-all ui-icon-right"> - - -
    -
    - contents ) && count($basket->contents) > 0): ?> - - - - - - - - - - - - - contents as $key => $prod_details): ?> - "> - - - - - - - - - postage_cost();?> - 0):?> - "> - - - - "> - - - "> - - - -
    - getItem(); ?> -
    - - <?= $item->title?> - -
    -
    - product_description()) ?> - - quantity) ?> - - cost?> - cost); ?> - - - " - class="g-button ui-state-default ui-corner-all ui-icon-left"> - -
    ispp()?"":"style=\"text-decoration:line-through\""; ?>>Postage and Packagingispp()?"":"style=\"text-decoration:line-through\""; ?>> -
    ispp()?"":"checked"; ?>/> Select if you wish to pick up the photos.
    Total Costispp()?basket::formatMoneyForWeb($total + $postage):basket::formatMoneyForWeb($total)?>
    - - - Shopping Basket is Empty - - -
    - -
    - contents ) && count($basket->contents) > 0): ?> - - " - class="right g-button ui-state-default ui-corner-all ui-icon-right"> - - -
    -
    \ No newline at end of file diff --git a/3.1/modules/basket/views/view_ipn.html.php b/3.1/modules/basket/views/view_ipn.html.php deleted file mode 100644 index 6c19e27f..00000000 --- a/3.1/modules/basket/views/view_ipn.html.php +++ /dev/null @@ -1,46 +0,0 @@ - -

    IPN Messages for title()?>

    -">Back to orders -
    - - -
    -
    
    -
    - diff --git a/3.1/modules/basket/views/view_order.html.php b/3.1/modules/basket/views/view_order.html.php deleted file mode 100644 index d735e26f..00000000 --- a/3.1/modules/basket/views/view_order.html.php +++ /dev/null @@ -1,18 +0,0 @@ - -

    title()?>

    -Payment is payment_method()?>status==Order_Model::WAITING_PAYMENT){ - ?>
    id)."?csrf=$csrf";?>">Confirm Order Payment status==Order_Model::PAYMENT_CONFIRMED){ - ?>
    id)."?csrf=$csrf";?>">Confirm Order Delivery method==Order_Model::PAYMENT_PAYPAL){ - ?>
    id);?>">View Paypal IPN Messages
    -",$order->text);?> \ No newline at end of file diff --git a/3.1/modules/basket/views/view_orders.html.php b/3.1/modules/basket/views/view_orders.html.php deleted file mode 100644 index a5c90e1c..00000000 --- a/3.1/modules/basket/views/view_orders.html.php +++ /dev/null @@ -1,67 +0,0 @@ - -
    -
    - - - - - - -
    -
    -
    - -
    -
    
    -
    - diff --git a/3.1/modules/batchtag/controllers/batchtag.php b/3.1/modules/batchtag/controllers/batchtag.php deleted file mode 100644 index 01f2e7ff..00000000 --- a/3.1/modules/batchtag/controllers/batchtag.php +++ /dev/null @@ -1,117 +0,0 @@ -post('name')}&item_id={$input->post('item_id')}&tag_subitems={$input->post('tag_subitems')}&csrf={$input->post('csrf')}")); - - } - - public function tagitems2() { - // Tag all non-album items in the current album with the specified tags. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - $input = Input::instance(); - - // Variables - if (($input->get("batchtag_max") == false) || ($input->get("batchtag_max") == "0")) { - $batchtag_max = "50"; - } else { - $batchtag_max = $input->get("batchtag_max"); - } - if ($input->get("batchtag_items_processed") == false) { - $batchtag_items_processed = "0"; - } else { - $batchtag_items_processed = $input->get("batchtag_items_processed"); - } - - // Figure out if the contents of sub-albums should also be tagged - $str_tag_subitems = $input->get("tag_subitems"); - - $children = ""; - if ($str_tag_subitems == false) { - // Generate an array of all non-album items in the current album. - $children = ORM::factory("item") - ->where("parent_id", "=", $input->get("item_id")) - ->where("type", "!=", "album") - ->find_all(); - } else { - // Generate an array of all non-album items in the current album - // and any sub albums. - $item = ORM::factory("item", $input->get("item_id")); - $children = $item->descendants(); - } - - // Loop through each item in the album and make sure the user has - // access to view and edit it. - $children_count = "0"; - $tag_count = "0"; - - //echo Kohana::debug($children); - - echo ''; - - foreach ($children as $child) { - - if ($tag_count < $batchtag_max) { - - if ($children_count >= $batchtag_items_processed) { - if (access::can("view", $child) && access::can("edit", $child) && !$child->is_album()) { - - // Assuming the user can view/edit the current item, loop - // through each tag that was submitted and apply it to - // the current item. - foreach (explode(",", $input->get("name")) as $tag_name) { - $tag_name = trim($tag_name); - if ($tag_name) { - tag::add($child, $tag_name); - } - // $tag_count should be inside the foreach loop as it is depending on the number of time tag:add is run - $tag_count++; - } - } - echo '' . "\n"; - $children_count++; - $batchtag_max_new = $tag_count; - echo ''; - } else { $children_count++; } - - } else { break; } - - } - - if ($tag_count < $batchtag_max) { - // Redirect back to the album. - $item = ORM::factory("item", $input->get("item_id")); - url::redirect(url::abs_site("{$item->type}s/{$item->id}")); - //echo url::abs_site("{$item->type}s/{$item->id}"); - } else { - url::redirect(url::abs_site("batchtag/tagitems2?name={$input->get('name')}&item_id={$input->get('item_id')}&tag_subitems={$input->get('tag_subitems')}&batchtag_items_processed=$children_count&batchtag_max=$batchtag_max&csrf={$input->get('csrf')}")); - //echo url::abs_site("batchtag/tagitems2?name={$input->get('name')}&item_id={$input->get('item_id')}&tag_subitems={$input->get('tag_subitems')}&batchtag_items_processed=$children_count&batchtag_max=$batchtag_max&csrf={$input->get('csrf')}"); - } - } -} diff --git a/3.1/modules/batchtag/helpers/batchtag_block.php b/3.1/modules/batchtag/helpers/batchtag_block.php deleted file mode 100644 index 01fe1216..00000000 --- a/3.1/modules/batchtag/helpers/batchtag_block.php +++ /dev/null @@ -1,61 +0,0 @@ - t("Batch Tag")); - } - - static function get($block_id, $theme) { - $block = ""; - - // Only display on album pages that the user can edit. - $item = $theme->item(); - if (!$item || !$item->is_album() || !access::can("edit", $item)) { - return; - } - - switch ($block_id) { - case "batch_tag": - // Make a new sidebar block. - $block = new Block(); - $block->css_id = "g-batch-tag"; - $block->title = t("Batch Tag"); - $block->content = new View("batchtag_block.html"); - - // Make a new form to place in the sidebar block. - $form = new Forge("batchtag/tagitems", "", "post", - array("id" => "g-batch-tag-form")); - $label = t("Tag everything in this album:"); - $group = $form->group("add_tag")->label("Add Tag"); - $group->input("name")->label($label)->rules("required|length[1,64]"); - $group->checkbox("tag_subitems") - ->label(t("Include sub-albums?")) - ->value(true) - ->checked(false); - - $group->hidden("item_id")->value($item->id); - $group->submit("")->value(t("Add Tag")); - $block->content->batch_tag_form = $form; - - break; - } - return $block; - } -} diff --git a/3.1/modules/batchtag/helpers/batchtag_event.php b/3.1/modules/batchtag/helpers/batchtag_event.php deleted file mode 100644 index aedceacd..00000000 --- a/3.1/modules/batchtag/helpers/batchtag_event.php +++ /dev/null @@ -1,40 +0,0 @@ -module == "tag") { - $data->messages["warn"][] = t("The BatchTag module requires the Tags module."); - } - } - - static function module_change($changes) { - // See if the Tags module is installed, - // tell the user to install it if it isn't. - if (!module::is_active("tag") || in_array("tag", $changes->deactivate)) { - site_status::warning( - t("The BatchTag module requires the Tags module. " . - "Activate the Tags module now", - array("url" => url::site("admin/modules"))), - "batchtag_needs_tag"); - } else { - site_status::clear("batchtag_needs_tag"); - } - } -} diff --git a/3.1/modules/batchtag/helpers/batchtag_installer.php b/3.1/modules/batchtag/helpers/batchtag_installer.php deleted file mode 100644 index d0c03163..00000000 --- a/3.1/modules/batchtag/helpers/batchtag_installer.php +++ /dev/null @@ -1,41 +0,0 @@ - - - diff --git a/3.1/modules/bitly/README b/3.1/modules/bitly/README deleted file mode 100644 index 3c385366..00000000 --- a/3.1/modules/bitly/README +++ /dev/null @@ -1,12 +0,0 @@ -ABOUT: -Shorten Gallery's album and item links using bit.ly's URL shortening service. - -INSTALLATION AND CONFIGURATION: -http://codex.gallery2.org/Gallery3:Modules:bitly - -SUPPORT/BUG REPORTS: -http://gallery.menalto.com/node/100816 - -ROADMAP: -* Provide multi-user support. -* Display shortened link statistics (clicks, etc.) diff --git a/3.1/modules/bitly/controllers/admin_bitly.php b/3.1/modules/bitly/controllers/admin_bitly.php deleted file mode 100644 index 535a375d..00000000 --- a/3.1/modules/bitly/controllers/admin_bitly.php +++ /dev/null @@ -1,95 +0,0 @@ -validate()) { - $new_login = $form->configure_bitly->login->value; - $new_key = $form->configure_bitly->api_key->value; - $new_domain = $form->configure_bitly->domain->value; - - module::set_var("bitly", "login", $new_login); - module::set_var("bitly", "api_key", $new_key); - module::set_var("bitly", "domain", $new_domain); - - if (!bitly::check_config()) { - url::redirect("admin/bitly"); - } else { - if ($login && !$new_login) { - message::success(t("Your bit.ly login has been cleared.")); - } else if ($login && $new_login && $login != $new_login) { - message::success(t("Your bit.ly login has been changed.")); - } else if (!$login && $new_login) { - message::success(t("Your bit.ly login has been saved.")); - } - if ($api_key && !$new_key) { - message::success(t("Your bit.ly API key has been cleared.")); - } else if ($api_key && $new_key && $api_key != $new_key) { - message::success(t("Your bit.ly API key has been changed.")); - } else if (!$api_key && $new_key) { - message::success(t("Your bit.ly API key has been saved.")); - } - if ($domain && $new_domain && $domain != $new_domain) { - message::success(t("Your preferrend bit.ly domain has been changed.")); - } else if (!$domain && $new_domain) { - message::success(t("Your preferred bit.ly domain has been saved.")); - } - log::success("bitly", t("bit.ly login changed to %new_login", - array("new_login" => $new_login))); - log::success("bitly", t("bit.ly API key changed to %new_key", - array("new_key" => $new_key))); - - (!$new_login || !$new_key) ? $valid_config = false : $valid_config = true; - } - } - } - - $view = new Admin_View("admin.html"); - $view->page_title = t("bit.ly url shortner"); - $view->content = new View("admin_bitly.html"); - $view->content->login = $form->configure_bitly->login->value; - $view->content->api_key = $form->configure_bitly->api_key->value; - $view->content->domain = $form->configure_bitly->domain->value; - $view->content->form = $form; - - $link = ORM::factory("bitly_link")->where("item_id", "=", 1)->find(); - - if ($link->loaded()) { - $view->content->g3_url = bitly::url($link->hash); - } else if ($valid_config && !empty($login) && !empty($api_key) && !empty($domain)) { - $view->content->g3_url = bitly::shorten_url(1); - } - - print $view; - } - -} \ No newline at end of file diff --git a/3.1/modules/bitly/controllers/bitly.php b/3.1/modules/bitly/controllers/bitly.php deleted file mode 100644 index 7a0b53c0..00000000 --- a/3.1/modules/bitly/controllers/bitly.php +++ /dev/null @@ -1,49 +0,0 @@ -relative_url_cache)); - } - - // Redirect back to the item - url::redirect(url::abs_site($item->relative_url_cache)); - } - -} \ No newline at end of file diff --git a/3.1/modules/bitly/helpers/bitly.php b/3.1/modules/bitly/helpers/bitly.php deleted file mode 100644 index f006362e..00000000 --- a/3.1/modules/bitly/helpers/bitly.php +++ /dev/null @@ -1,217 +0,0 @@ - 'expand', - 'shorten' => 'shorten', - 'validate' => 'validate', - 'clicks' => 'clicks', - 'referrers' => 'referrers', - 'countries' => 'countries', - 'clicks_by_minute' => 'clicks_by_minute', - 'clicks_by_day' => 'clicks_by_day', - 'lookup' => 'lookup', - 'info' => 'info', - ); - - static function get_configure_form() { - $form = new Forge("admin/bitly", "", "post", array("id" => "g-configure-bitly-form")); - $group = $form->group("configure_bitly")->label(t("Configure bit.ly")); - $group->input("login") - ->label(t("Login")) - ->value(module::get_var("bitly", "login")) - ->rules("required") - ->error_messages("required", t("You must enter a login")); - $group->input("api_key") - ->label(t("API Key")) - ->value(module::get_var("bitly", "api_key")) - ->rules("required") - ->error_messages("required", t("You must enter an API key")); - $group->dropdown("domain") - ->label(t("Preferred Domain")) - ->options(array("bit.ly" => "bit.ly", "j.mp" => "j.mp")) - ->selected(module::get_var("bitly", "domain")); - $group->submit("")->value(t("Save")); - return $form; - } - - /** - * Check a login and an API Key against bit.ly to make sure they're valid - * @param string $login bit.ly login - * @param string $api_key bit.ly API key - * @return boolean - */ - static function validate_config($login, $api_key) { - if (!empty($login) && !empty($api_key)) { - $parameters = array( - 'login' => $login, - 'apiKey' => $api_key, - 'x_login' => $login, - 'x_apiKey' => $api_key - ); - $request = self::_build_http_request('validate', $parameters); - $response = self::_http_post($request, "api.bit.ly"); - $json_decoded = json_decode($response->body[0]); - if (!$json_decoded->data->valid) { - if ("INVALID_LOGIN" == $json_decoded->status_txt) { - message::error(t("Your bit.ly login is incorrect")); - } else if ("INVALID_APIKEY" == $json_decoded->status_txt) { - message::error(t("Your bit.ly API Key is incorrect.")); - } - return false; - } else { - return true; - } - } - } - - /** - * Check whether the module's configured correctly - * @return boolean - */ - static function check_config() { - $login = module::get_var("bitly", "login"); - $api_key = module::get_var("bitly", "api_key"); - if (empty($login) || empty($api_key)) { - site_status::warning( - t("bit.ly is not quite ready! Please provide a login and API Key", - array("url" => html::mark_clean(url::site("admin/bitly")))), - "bitly_config"); - - } else if (!self::validate_config($login, $api_key)) { - site_status::warning( - t("bit.ly is not properly configured! URLs will not be shortened until its configuration is updated.", - array("url" => html::mark_clean(url::site("admin/bitly")))), - "bitly_config"); - } else { - site_status::clear("bitly_config"); - return true; - } - return false; - } - - /** - * Assemble a bitly API request - * @param string $type Type of API request, ex. shorten - * @param array $params Query string key/value pairs - * @return string - */ - private static function _build_http_request($type, $params) { - $http_request = ''; - if (!empty($type) && count($params)) { - foreach($params as $k => $v) { - $query_string[] = "$k=" . urlencode($v); - } - $path = "/" . self::$api_version . "/$type?" . implode('&', $query_string); - $module_version = module::get_version("bitly"); - - $http_request = "GET $path HTTP/1.0\r\n"; - $http_request .= "Host: " . self::$api_host . "\r\n"; - $http_request .= "User-Agent: Gallery/3 | bitly/" . module::get_version("bitly") . "\r\n"; - $http_request .= "\r\n"; - $http_request .= $path; - } - return $http_request; - } - - /** - * Send an http POST request - * @param string $http_request - * @param string $host - * @return object - */ - private static function _http_post($http_request) { - $response = ''; - if (false !== ($fs = @fsockopen(self::$api_host, 80, $errno, $errstr, 5))) { - fwrite($fs, $http_request); - while ( !feof($fs) ) { - $response .= fgets($fs, 1160); // One TCP-IP packet - } - fclose($fs); - list($headers, $body) = explode("\r\n\r\n", $response); - $headers = explode("\r\n", $headers); - $body = explode("\r\n", $body); - $response = new ArrayObject( - array("headers" => $headers, "body" => $body), ArrayObject::ARRAY_AS_PROPS); - } else { - throw new Exception("@todo CONNECTION TO URL SHORTENING SERVICE FAILED"); - } - Kohana_Log::add("debug", "Received response\n" . print_r($response, 1)); - - return $response; - } - - /** - * Shorten a Gallery URL - * @param int $item_id - * @param string $format - * @return mixed string|false - */ - static function shorten_url($item_id, $format='json') { - $item = ORM::factory("item", $item_id); - $short_url = ''; - $long_url = url::abs_site($item->relative_url_cache); - $parameters = array( - "login" => module::get_var("bitly", "login"), - 'apiKey' => module::get_var("bitly", "api_key"), - 'longUrl' => $long_url, - 'domain' => module::get_var("bitly", "domain"), - 'format' => $format, - ); - $request = self::_build_http_request('shorten', $parameters); - $response = self::_http_post($request, self::$api_host); - $json_response = json_decode($response->body[0]); - $status_txt = $json_response->status_txt; - - if ('OK' == $status_txt) { - $short_url = $json_response->data->url; - // Save the link hash to the database - $link = ORM::factory("bitly_link"); - $link->item_id = $item_id; - $link->hash = $json_response->data->hash; - $link->global_hash = $json_response->data->global_hash; - $link->save(); - return $json_response->data->url; - } else { - $status_code = $json_response->status_code; - log::error("content", "Shortened URL", "Error: $status_code $status_txt item"); - return false; - } - } - - /** - * Build a bit.ly link for a specified hash - * @param string $hash - * @return string - */ - static function url($hash) { - if (!empty($hash)) { - return "http://" . module::get_var("bitly", "domain") . "/$hash"; - } - } - -} diff --git a/3.1/modules/bitly/helpers/bitly_event.php b/3.1/modules/bitly/helpers/bitly_event.php deleted file mode 100644 index 1efeb264..00000000 --- a/3.1/modules/bitly/helpers/bitly_event.php +++ /dev/null @@ -1,67 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("bitly_menu") - ->label(t("bit.ly")) - ->url(url::site("admin/bitly"))); - } - - static function site_menu($menu, $theme) { - $link = ORM::factory("bitly_link")->where("item_id", "=", $theme->item->id)->find(); - if (!$link->loaded() && $theme->item->owner->id == identity::active_user()->id) { - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("bitly") - ->label(t("Shorten link with bit.ly")) - ->url(url::site("bitly/shorten/{$theme->item->id}?csrf={$theme->csrf}")) - ->css_id("g-bitly-shorten") - ->css_class("g-bitly-shorten")); - } - } - - static function context_menu($menu, $theme, $item) { - $link = ORM::factory("bitly_link")->where("item_id", "=", $item->id)->find(); - if (!$link->loaded() && $theme->item->owner->id == identity::active_user()->id) { - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("bitly") - ->label(t("Shorten link with bit.ly")) - ->url(url::site("bitly/shorten/{$item->id}?csrf={$theme->csrf}")) - ->css_class("g-bitly-shorten ui-icon-link")); - } - } - - static function info_block_get_metadata($block, $item) { - $link = ORM::factory("bitly_link")->where("item_id", "=", $item->id)->find(); - if ($link->loaded()) { - $info = $block->content->metadata; - $info["bitly_url"] = array( - "label" => t("bit.ly url:"), - "value" => bitly::url($link->hash) - ); - $block->content->metadata = $info; - } - } - -} diff --git a/3.1/modules/bitly/helpers/bitly_installer.php b/3.1/modules/bitly/helpers/bitly_installer.php deleted file mode 100644 index 18d2ab73..00000000 --- a/3.1/modules/bitly/helpers/bitly_installer.php +++ /dev/null @@ -1,38 +0,0 @@ -query("CREATE TABLE {bitly_links} ( - `id` int(9) NOT NULL AUTO_INCREMENT, - `item_id` int(9) NOT NULL, - `hash` char(6) NOT NULL, - `global_hash` char(6) NOT NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); - module::set_version("bitly", 1); - bitly::check_config(); - } - - static function deactivate() { - site_status::clear("bitly_config"); - } -} diff --git a/3.1/modules/bitly/js/bitly.js b/3.1/modules/bitly/js/bitly.js deleted file mode 100644 index 96dcb427..00000000 --- a/3.1/modules/bitly/js/bitly.js +++ /dev/null @@ -1,6 +0,0 @@ -$(document).ready(function() { - $(".g-bitly-shorten").click(function(e) { - e.preventDefault(); - return window.location = ($(this).attr("href")); - }); -}); diff --git a/3.1/modules/bitly/models/bitly_link.php b/3.1/modules/bitly/models/bitly_link.php deleted file mode 100644 index cfbb795b..00000000 --- a/3.1/modules/bitly/models/bitly_link.php +++ /dev/null @@ -1,21 +0,0 @@ - -
    -

    -

    - bit.ly account which will provide an API Key, which is also free.", - array("api_key_url" => "http://bit.ly/a/your_api_key", - "bitly_url" => "http://bit.ly")) ?> -

    -
    - -
    - %g3_url", array('g3_url' => $g3_url)) ?> -
    - - - -
    -
    diff --git a/3.1/modules/calendarview/controllers/calendarview.php b/3.1/modules/calendarview/controllers/calendarview.php deleted file mode 100644 index c1302ba5..00000000 --- a/3.1/modules/calendarview/controllers/calendarview.php +++ /dev/null @@ -1,269 +0,0 @@ -set_global("calendar_user", $display_user); - $template->page_title = t("Gallery :: Calendar"); - $template->content = new View("calendarview_year.html"); - $template->content->calendar_year = $display_year; - $template->content->calendar_user = $display_user; - $template->content->calendar_user_year_form = $this->_get_calenderprefs_form($display_year, $display_user); - $template->content->title = t("Calendar") . ": " . $display_year; - // Set up breadcrumbs - $calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url()); - $calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, ""); - $template->set_global("breadcrumbs", $calendar_breadcrumbs); - print $template; - } - - public function day($display_year, $display_user, $display_month, $display_day) { - // Display all images for the specified day. - - // Figure out the total number of photos to display. - $day_count = 0; - if ($display_user == "-1") { - $day_count = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, $display_day, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month, ($display_day + 1), $display_year)) - ->find_all() - ->count(); - } else { - $day_count = ORM::factory("item") - ->viewable() - ->where("owner_id", "=", $display_user) - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, $display_day, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month, ($display_day + 1), $display_year)) - ->find_all() - ->count(); - } - - // Figure out paging stuff. - $page_size = module::get_var("gallery", "page_size", 9); - $page = (int) Input::instance()->get("page", "1"); - $offset = ($page-1) * $page_size; - $max_pages = max(ceil($day_count / $page_size), 1); - - // Make sure that the page references a valid offset - if (($page < 1) || ($page > $max_pages)) { - throw new Kohana_404_Exception(); - } - - // Set up the page. - $template = new Theme_View("calpage.html", "collection", "CalendarDayView"); - $template->set_global("page", $page); - $template->set_global("max_pages", $max_pages); - $template->set_global("page_size", $page_size); - $template->page_title = t("Gallery :: Calendar"); - - // Figure out which photos go on this page. - if ($display_user == "-1") { - $template->set_global("children", ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, $display_day, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month, ($display_day + 1), $display_year)) - ->order_by("captured", "ASC") - ->find_all($page_size, $offset)); - } else { - $template->set_global("children", ORM::factory("item") - ->viewable() - ->where("owner_id", "=", $display_user) - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, $display_day, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month, ($display_day + 1), $display_year)) - ->order_by("captured", "ASC") - ->find_all($page_size, $offset)); - } - - // Set up breadcrumbs - $calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url()); - $calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)); - $calendar_breadcrumbs[2] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month)); - $calendar_breadcrumbs[3] = new Calendar_Breadcrumb($display_day, ""); - $template->set_global("breadcrumbs", $calendar_breadcrumbs); - - // Finish setting up and then display the page. - $template->set_global("children_count", $day_count); - $template->content = new View("dynamic.html"); - $template->content->title = t("Photos From ") . date("d", mktime(0, 0, 0, $display_month, $display_day, $display_year)) . " " . t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))) . " " . date("Y", mktime(0, 0, 0, $display_month, $display_day, $display_year)); - print $template; - } - - public function month($display_year, $display_user, $display_month) { - // Display all images for the specified month. - - // Figure out the total number of photos to display. - $day_count = 0; - if ($display_user == "-1") { - $day_count = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, 1, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month+1, 1, $display_year)) - ->find_all() - ->count(); - } else { - $day_count = ORM::factory("item") - ->viewable() - ->where("owner_id", "=", $display_user) - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, 1, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month+1, 1, $display_year)) - ->find_all() - ->count(); - } - - // Figure out paging stuff. - $page_size = module::get_var("gallery", "page_size", 9); - $page = (int) Input::instance()->get("page", "1"); - $offset = ($page-1) * $page_size; - $max_pages = max(ceil($day_count / $page_size), 1); - - // Make sure that the page references a valid offset - if (($page < 1) || ($page > $max_pages)) { - throw new Kohana_404_Exception(); - } - - // Set up the page. - $template = new Theme_View("calpage.html", "collection", "CalendarMonthView"); - $template->set_global("page", $page); - $template->set_global("max_pages", $max_pages); - $template->set_global("page_size", $page_size); - $template->page_title = t("Gallery :: Calendar"); - - // Figure out which photos go on this page. - if ($display_user == "-1") { - $template->set_global("children", ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, 1, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month+1, 1, $display_year)) - ->order_by("captured", "ASC") - ->find_all($page_size, $offset)); - } else { - $template->set_global("children", ORM::factory("item") - ->viewable() - ->where("owner_id", "=", $display_user) - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, $display_month, 1, $display_year)) - ->where("captured", "<", mktime(0, 0, 0, $display_month+1, 1, $display_year)) - ->order_by("captured", "ASC") - ->find_all($page_size, $offset)); - } - - // Set up breadcrumbs - $calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url()); - $calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)); - $calendar_breadcrumbs[2] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), ""); - $template->set_global("breadcrumbs", $calendar_breadcrumbs); - - // Finish setting up and then display the page. - $template->set_global("children_count", $day_count); - $template->content = new View("dynamic.html"); - $template->content->title = t("Photos From ") . t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))) . " " . date("Y", mktime(0, 0, 0, $display_month, 1, $display_year)); - print $template; - } - - private function _get_calenderprefs_form($display_year, $display_user) { - // Generate a form to allow the visitor to select a year and a gallery photo owner. - $calendar_group = new Forge("calendarview/setprefs", "", "post", - array("id" => "g-view-calendar-form")); - - // Generate a list of all Gallery users who have uploaded photos. - $valid_users[-1] = "(All Users)"; - $gallery_users = ORM::factory("user")->find_all(); - foreach ($gallery_users as $one_user) { - $count = ORM::factory("item") - ->viewable() - ->where("owner_id", "=", $one_user->id) - ->where("type", "!=", "album") - ->where("captured", "!=", "") - ->find_all() - ->count(); - if ($count > 0) { - $valid_users[$one_user->id] = $one_user->full_name; - } - } - - // Generate a list of years, starting with the year the earliest photo was - // taken, and ending with the year of the most recent photo. - $valid_years = Array(); - $all_photos = ORM::factory("item") - ->viewable() - //->where("owner_id", "=", $one_user->id) - ->where("type", "!=", "album") - ->where("captured", "!=", "") - ->order_by("captured", "DESC") - ->find_all(); - $counter = date('Y', $all_photos[count($all_photos)-1]->captured); - while ($counter <= date('Y', $all_photos[0]->captured)) { - $valid_years[$counter] = $counter; - $counter++; - } - - // Create the form. - $calendar_group->dropdown('cal_user') - ->label(t("Display Photos From User: ")) - ->id('cal_user') - ->options($valid_users) - ->selected($display_user); - $calendar_group->dropdown('cal_year') - ->label(t("For Year: ")) - ->id('cal_year') - ->options($valid_years) - ->selected($display_year); - - // Add a save button to the form. - $calendar_group->submit("SaveSettings")->value(t("Go"))->id('cal_go'); - - // Return the newly generated form. - return $calendar_group; - } - - public function setprefs() { - // Change the calendar year and / or user. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Get user specified settings. - $str_user_id = Input::instance()->post("cal_user"); - $str_year_id = Input::instance()->post("cal_year"); - - // redirect to the currect page. - url::redirect(url::site("calendarview/calendar/" . $str_year_id . "/" . $str_user_id, request::protocol())); - } -} \ No newline at end of file diff --git a/3.1/modules/calendarview/css/calendarview_calendar.css b/3.1/modules/calendarview/css/calendarview_calendar.css deleted file mode 100644 index 53807042..00000000 --- a/3.1/modules/calendarview/css/calendarview_calendar.css +++ /dev/null @@ -1,50 +0,0 @@ -/* Grid view ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-calendar-grid { - position: relative; - align: center; - float: left; - width: 200px; - height: 220px; - margin: 10px 10px 10px 10px; -} - -/* Search form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#cal_user { - top: 0px; - left: 60px; - display: inline; -} -#cal_year { - top: 0px; - left: 240px; - display: inline; -} -#cal_go { - top: 0px; - left: 328px; - display: inline; -} - -/* Content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -table.calendar { - text-align: center; -} - -table.calendar caption { - font-size: 1.5em; - padding: 0.2em; -} - -table.calendar th, table.calendar td { - padding: 0.2em; - border: 0px; -} - -table.calendar td:hover { - background: #ddf; -} - -/* For RTL Languages ~~~~~~~~~~~~~~~~~~~~~~~ */ -.rtl #g-calendar-grid { - float: right; -} diff --git a/3.1/modules/calendarview/css/calendarview_menu.css b/3.1/modules/calendarview/css/calendarview_menu.css deleted file mode 100644 index 600cc151..00000000 --- a/3.1/modules/calendarview/css/calendarview_menu.css +++ /dev/null @@ -1,3 +0,0 @@ -#g-view-menu #g-calendarview-link { - background-image: url('../images/ico-view-calendarview.png'); -} diff --git a/3.1/modules/calendarview/helpers/calendarview_block.php b/3.1/modules/calendarview/helpers/calendarview_block.php deleted file mode 100644 index 1037ecaa..00000000 --- a/3.1/modules/calendarview/helpers/calendarview_block.php +++ /dev/null @@ -1,72 +0,0 @@ - t("More Photos From This Date")); - } - - static function get($block_id, $theme) { - $block = ""; - - // Make sure the current page belongs to an item. - if (!$theme->item()) { - return; - } - $item = $theme->item; - - $display_date = ""; - if (isset($item->captured)) { - $display_date = $item->captured; - }elseif (isset($item->created)) { - $display_date = $item->created; - } - - // Make sure there are photo's to display. - $day_count = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, date("n", $display_date), date("j", $display_date), date("Y", $display_date))) - ->where("captured", "<", mktime(0, 0, 0, date("n", $display_date), date("j", $display_date)+1, date("Y", $display_date))) - ->find_all() - ->count(); - $month_count = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, date("n", $display_date), 1, date("Y", $display_date))) - ->where("captured", "<", mktime(0, 0, 0, date("n", $display_date)+1, 1, date("Y", $display_date))) - ->find_all() - ->count(); - - switch ($block_id) { - case "calendarview_photo": - if ( ($display_date != "") && (($day_count > 0) || ($month_count > 0)) ) { - $block = new Block(); - $block->css_id = "g-calendarview-sidebar"; - $block->title = t("Calendar"); - $block->content = new View("calendarview_sidebar.html"); - $block->content->date = $display_date; - $block->content->day_count = $day_count; - $block->content->month_count = $month_count; - } - break; - } - return $block; - } -} diff --git a/3.1/modules/calendarview/helpers/calendarview_event.php b/3.1/modules/calendarview/helpers/calendarview_event.php deleted file mode 100644 index 731a662a..00000000 --- a/3.1/modules/calendarview/helpers/calendarview_event.php +++ /dev/null @@ -1,72 +0,0 @@ -append(Menu::factory("link") - ->id("calendarview") - ->label(t("View Calendar")) - ->url(url::site("calendarview/calendar/")) - ->css_id("g-calendarview-link")); - } - - static function movie_menu($menu, $theme) { - $menu->append(Menu::factory("link") - ->id("calendarview") - ->label(t("View Calendar")) - ->url(url::site("calendarview/calendar/")) - ->css_id("g-calendarview-link")); - } - - static function album_menu($menu, $theme) { - $menu->append(Menu::factory("link") - ->id("calendarview") - ->label(t("View Calendar")) - ->url(url::site("calendarview/calendar/")) - ->css_id("g-calendarview-link")); - } - - static function tag_menu($menu, $theme) { - $menu->append(Menu::factory("link") - ->id("calendarview") - ->label(t("View Calendar")) - ->url(url::site("calendarview/calendar/")) - ->css_id("g-calendarview-link")); - } - - static function pre_deactivate($data) { - // If the admin is about to deactivate EXIF, warn them that this module requires it. - if ($data->module == "exif") { - $data->messages["warn"][] = t("The CalendarView module requires the EXIF module."); - } - } - - static function module_change($changes) { - // If EXIF is deactivated, display a warning that it is required for this module to function properly. - if (!module::is_active("exif") || in_array("exif", $changes->deactivate)) { - site_status::warning( - t("The CalendarView module requires the EXIF module. " . - "Activate the EXIF module now", - array("url" => html::mark_clean(url::site("admin/modules")))), - "calendarview_needs_exif"); - } else { - site_status::clear("calendarview_needs_exif"); - } - } -} \ No newline at end of file diff --git a/3.1/modules/calendarview/helpers/calendarview_installer.php b/3.1/modules/calendarview/helpers/calendarview_installer.php deleted file mode 100644 index b7d5828d..00000000 --- a/3.1/modules/calendarview/helpers/calendarview_installer.php +++ /dev/null @@ -1,40 +0,0 @@ -css("calendarview_menu.css"); - return $theme->css("calendarview_calendar.css"); - } -} diff --git a/3.1/modules/calendarview/images/ico-view-calendarview.png b/3.1/modules/calendarview/images/ico-view-calendarview.png deleted file mode 100644 index 5e564b8d..00000000 Binary files a/3.1/modules/calendarview/images/ico-view-calendarview.png and /dev/null differ diff --git a/3.1/modules/calendarview/libraries/Calendar_Breadcrumb.php b/3.1/modules/calendarview/libraries/Calendar_Breadcrumb.php deleted file mode 100644 index 751af272..00000000 --- a/3.1/modules/calendarview/libraries/Calendar_Breadcrumb.php +++ /dev/null @@ -1,31 +0,0 @@ -title = $new_title; - $this->url = $new_url; - } -} diff --git a/3.1/modules/calendarview/libraries/PHPCalendar.php b/3.1/modules/calendarview/libraries/PHPCalendar.php deleted file mode 100644 index 2d1df2b4..00000000 --- a/3.1/modules/calendarview/libraries/PHPCalendar.php +++ /dev/null @@ -1,87 +0,0 @@ -month = (int) $month; - $this->year = (int) $year; - $this->month_url = $url; - } - - public function event($day_of_the_week, $event_url = NULL, $css_id = NULL, $custom_text = NULL) - { - $this->event_data += Array($day_of_the_week => Array($event_url, $css_id, $custom_text)); - } - - public function render() - { - return $this->generate_calendar($this->year, $this->month, $this->event_data, 2, $this->month_url, $this->week_start, NULL); - } - - # PHP Calendar (version 2.3), written by Keith Devens - # http://keithdevens.com/software/php_calendar - # see example at http://keithdevens.com/weblog - # License: http://keithdevens.com/software/license - function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()) - { - $first_of_month = gmmktime(0,0,0,$month,1,$year); - #remember that mktime will automatically correct if invalid dates are entered - # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998 - # this provides a built in "rounding" feature to generate_calendar() - - if ($first_day == 0) $day_names = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); - if ($first_day == 1) $day_names = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); - - list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); - $weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day - $title = t(date("F", mktime(0, 0, 0, $month, 1, $year))) . ' ' . $year; - - #Begin calendar. Uses a real . See http://diveintomark.org/archives/2002/07/03 - @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable - if($p) $p = ''.($pl ? ''.$p.'' : $p).' '; - if($n) $n = ' '.($nl ? ''.$n.'' : $n).''; - $calendar = ''."\n". - '\n"; - - if($day_name_length){ #if the day names should be shown ($day_name_length > 0) - #if day_name_length is >3, the full name of the day will be printed - foreach($day_names as $d) - $calendar .= ''; - $calendar .= "\n"; - } - - if($weekday > 0) $calendar .= ''; #initial 'empty' days - for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ - if($weekday == 7){ - $weekday = 0; #start a new week - $calendar .= "\n"; - } - if(isset($days[$day]) and is_array($days[$day])){ - @list($link, $classes, $content) = $days[$day]; - if(is_null($content)) $content = $day; - $calendar .= '' : '>'). - ($link ? ''.$content.'' : $content).''; - } - else $calendar .= ""; - } - if($weekday != 7) $calendar .= ''; #remaining "empty" days - - return $calendar."\n
    '.$p.($month_href ? ''.$title.'' : $title).$n."
    '.t($day_name_length < 4 ? substr($d,0,$day_name_length) : $d) . '
     
    $day 
    \n"; - } -} -?> \ No newline at end of file diff --git a/3.1/modules/calendarview/module.info b/3.1/modules/calendarview/module.info deleted file mode 100644 index f51f1625..00000000 --- a/3.1/modules/calendarview/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "CalendarView" -description = "View your photos by the date they were taken." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:calendarview" -discuss_url = "http://gallery.menalto.com/node/92405" diff --git a/3.1/modules/calendarview/views/calendarview_sidebar.html.php b/3.1/modules/calendarview/views/calendarview_sidebar.html.php deleted file mode 100644 index b4f1f6fe..00000000 --- a/3.1/modules/calendarview/views/calendarview_sidebar.html.php +++ /dev/null @@ -1,9 +0,0 @@ - -
      - 0): ?> -
    • ">
    • - - 0): ?> -
    • ">
    • - -
    \ No newline at end of file diff --git a/3.1/modules/calendarview/views/calendarview_year.html.php b/3.1/modules/calendarview/views/calendarview_year.html.php deleted file mode 100644 index b40d7d58..00000000 --- a/3.1/modules/calendarview/views/calendarview_year.html.php +++ /dev/null @@ -1,95 +0,0 @@ - -
    -
    - dynamic_top() ?> -
    -

    -
    - -


    - -viewable() - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, 1, 1, $calendar_year)) - ->where("captured", "<", mktime(0, 0, 0, 1, 1, ($calendar_year + 1))) - ->order_by("captured") - ->find_all(); - } else { - $items_for_year = ORM::factory("item") - ->viewable() - ->where("owner_id", "=", $calendar_user) - ->where("type", "!=", "album") - ->where("captured", ">=", mktime(0, 0, 0, 1, 1, $calendar_year)) - ->where("captured", "<", mktime(0, 0, 0, 1, 1, ($calendar_year + 1))) - ->order_by("captured") - ->find_all(); - } - - // Set up some initial variables. - $counter_months = 1; - $counter_days = 0; - $counter = 0; - - // Set up the January Calendar. - // Check and see if any photos were taken in January, - // If so, make the month title into a clickable link. - print "
    "; - if ((count($items_for_year) > 0) && (date("n", $items_for_year[$counter]->captured) == 1)) { - $month_url = url::site("calendarview/month/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/"); - } else { - $month_url = ""; - } - $calendar = new PHPCalendar($counter_months, $calendar_year, $month_url); - - // Loop through each photo taken during this year, and see what month and day they were taken on. - // Make the corresponding dates on the calendars into clickable links. - while ($counter < (count($items_for_year))) { - - // Check and see if we've switched to a new month. - // If so, render the current calendar and set up a new one. - while (date("n", $items_for_year[$counter]->captured) > $counter_months) { - echo $calendar->render(); - print "
    "; - $counter_months++; - $counter_days = 0; - print "
    "; - if (date("n", $items_for_year[$counter]->captured) == $counter_months) { - $month_url = url::site("calendarview/month/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/"); - } else { - $month_url = ""; - } - $calendar = new PHPCalendar($counter_months, $calendar_year, $month_url); - } - - // If the day of the current photo is different then the day of the previous photo, - // then add a link to the calendar for this date and set the current day to this day. - if (date("j", $items_for_year[$counter]->captured) > $counter_days) { - $counter_days = date("j", $items_for_year[$counter]->captured); - $calendar->event($counter_days, url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $counter_days)); - } - - // Move onto the next photo. - $counter++; - } - - // Print out the last calendar to be generated. - echo $calendar->render(); - print "
    "; - $counter_months++; - - // If the calendar that was previously rendered was not December, - // then print out a few empty months for the rest of the year. - while ($counter_months < 13) { - print "
    "; - $month_url = ""; - $calendar = new PHPCalendar($counter_months, $calendar_year, $month_url); - echo $calendar->render(); - print "
    "; - $counter_months++; - } -?> -dynamic_bottom() ?> diff --git a/3.1/modules/calendarview/views/calpage.html.php b/3.1/modules/calendarview/views/calpage.html.php deleted file mode 100644 index 3dab5fc0..00000000 --- a/3.1/modules/calendarview/views/calpage.html.php +++ /dev/null @@ -1,164 +0,0 @@ - - -html_attributes() ?> xml:lang="en" lang="en"> - - - start_combining("script,css") ?> - - <? 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 ?> - - " - type="image/x-icon" /> - - page_type == "collection"): ?> - - - - - - - - script("json2-min.js") ?> - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - - - page_subtype == "photo"): ?> - script("jquery.scrollTo.js") ?> - script("gallery.show_full_size.js") ?> - page_subtype == "movie"): ?> - script("flowplayer.js") ?> - - - head() ?> - - - script("ui.init.js") ?> - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("screen.css") ?> - - - - get_combined("script") ?> - - - get_combined("css") ?> - - - body_attributes() ?>> - page_top() ?> -
    - site_status() ?> -
    -
    - - - - - - user_menu() ?> - header_top() ?> - - - - - - header_bottom() ?> -
    - - - - -
      - - - > - - url) : ?> - title) ?> - - title) ?> - - - - -
    - - - - - -
    -
    -
    -
    -
    - messages() ?> - -
    -
    -
    -
    - page_subtype != "login"): ?> - - -
    -
    - -
    - page_bottom() ?> - - \ No newline at end of file diff --git a/3.1/modules/captionator/controllers/captionator.php b/3.1/modules/captionator/controllers/captionator.php deleted file mode 100644 index 8b380f66..00000000 --- a/3.1/modules/captionator/controllers/captionator.php +++ /dev/null @@ -1,84 +0,0 @@ -abs_url()); - } - - $v = new Theme_View("page.html", "collection", "captionator"); - $v->content = new View("captionator_dialog.html"); - $v->content->album = $album; - $v->content->enable_tags = module::is_active("tag"); - if ($v->content->enable_tags) { - $v->content->tags = array(); - foreach ($album->viewable()->children() as $child) { - $item = ORM::factory("item", $child->id); - $tag_names = array(); - foreach (tag::item_tags($item) as $tag) { - $tag_names[] = $tag->name; - } - $v->content->tags[$child->id] = implode(", ", $tag_names); - } - } - print $v; - } - - function save($album_id) { - access::verify_csrf(); - - $album = ORM::factory("item", $album_id); - access::required("edit", $album); - - if (Input::instance()->post("save")) { - $titles = Input::instance()->post("title"); - $descriptions = Input::instance()->post("description"); - $filenames = Input::instance()->post("filename"); - $internetaddresses = Input::instance()->post("internetaddress"); - $tags = Input::instance()->post("tags"); - $enable_tags = module::is_active("tag"); - foreach (array_keys($titles) as $id) { - $item = ORM::factory("item", $id); - if ($item->loaded() && access::can("edit", $item)) { - $item->title = $titles[$id]; - $item->description = $descriptions[$id]; - $item->name = $filenames[$id]; - $item->slug = $internetaddresses[$id]; - $item->save(); - if ($enable_tags) { - tag::clear_all($item); - foreach (explode(",", $tags[$id]) as $tag_name) { - if ($tag_name) { - tag::add($item, trim($tag_name)); - } - } - tag::compact(); - } - } - } - message::success(t("Captions saved")); - } - url::redirect($album->abs_url()); - } -} diff --git a/3.1/modules/captionator/helpers/captionator_event.php b/3.1/modules/captionator/helpers/captionator_event.php deleted file mode 100644 index 43e501f8..00000000 --- a/3.1/modules/captionator/helpers/captionator_event.php +++ /dev/null @@ -1,33 +0,0 @@ -item(); - - if ($item && $item->is_album() && access::can("edit", $item)) { - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("captionator") - ->label(t("Caption album")) - ->css_id("g-menu-captionator-link") - ->url(url::site("captionator/dialog/{$item->id}"))); - } - } -} diff --git a/3.1/modules/captionator/module.info b/3.1/modules/captionator/module.info deleted file mode 100644 index 5edf301c..00000000 --- a/3.1/modules/captionator/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Captionator" -description = "Caption all photos, movies and albums in an album at once." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:captionator" -discuss_url = "http://gallery.menalto.com/forum_module_captionator" diff --git a/3.1/modules/captionator/views/captionator_dialog.html.php b/3.1/modules/captionator/views/captionator_dialog.html.php deleted file mode 100644 index fe77c2ab..00000000 --- a/3.1/modules/captionator/views/captionator_dialog.html.php +++ /dev/null @@ -1,57 +0,0 @@ - -
    - -
    id}") ?>" method="post" id="g-captionator-form"> - -
    - - %album_title", array("album_title" => $album->title)) ?> - - - viewable()->children() as $child): ?> - - - - - -
    - thumb_img(array(), 140, true) ?> - -
      -
    • - - -
    • -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • -
    • - - -
    • -
    -
    - -
    -
    - "/> - "/> -
    -
    -
    diff --git a/3.1/modules/contactowner/controllers/admin_contactowner.php b/3.1/modules/contactowner/controllers/admin_contactowner.php deleted file mode 100644 index 26b684ab..00000000 --- a/3.1/modules/contactowner/controllers/admin_contactowner.php +++ /dev/null @@ -1,101 +0,0 @@ -content = new View("admin_contactowner.html"); - $view->content->contactowner_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Figure out which boxes where checked - $linkOptions_array = Input::instance()->post("ContactOwnerLinkTypes"); - $ownerLink = false; - $userLink = false; - for ($i = 0; $i < count($linkOptions_array); $i++) { - if ($linkOptions_array[$i] == "ContactOwner") { - $ownerLink = true; - } - if ($linkOptions_array[$i] == "ContactUser") { - $userLink = true; - } - } - - // Figure out the values of the text boxes - $str_contactbutton = Input::instance()->post("owner_button_text"); - $str_contactemail = Input::instance()->post("owner_email"); - $str_contactname = Input::instance()->post("owner_name"); - $str_messageheader = Input::instance()->post("message_header"); - - // Save Settings. - module::set_var("contactowner", "contact_owner_link", $ownerLink); - module::set_var("contactowner", "contact_user_link", $userLink); - module::set_var("contactowner", "contact_button_text", $str_contactbutton); - module::set_var("contactowner", "contact_owner_email", $str_contactemail); - module::set_var("contactowner", "contact_owner_name", $str_contactname); - module::set_var("contactowner", "contact_owner_header", $str_messageheader); - message::success(t("Your Settings Have Been Saved.")); - - // Load Admin page. - $view = new Admin_View("admin.html"); - $view->content = new View("admin_contactowner.html"); - $view->content->contactowner_form = $this->_get_admin_form(); - print $view; - } - - private function _get_admin_form() { - // Make a new Form. - $form = new Forge("admin/contactowner/saveprefs", "", "post", - array("id" => "g-contact-owner-adminForm")); - - // Make an array for the different types of link codes. - $add_contactlinks = $form->group("contactOwnerLinks"); - $linkOptions["ContactOwner"] = array("Display Contact Site Owner Link", - module::get_var("contactowner", "contact_owner_link")); - $linkOptions["ContactUser"] = array("Display Contact Item Owner Link", - module::get_var("contactowner", "contact_user_link")); - - // Turn the array into a series of checkboxes. - $add_contactlinks->checklist("ContactOwnerLinkTypes") - ->options($linkOptions); - - // Set up some text boxes for the site owners Name, email and the - // text for the contact link. - $add_contacts = $form->group("contactOwner"); - $add_contacts->input("owner_button_text")->label(t("Contact Owner Link Text"))->value(module::get_var("contactowner", "contact_button_text")); - $add_contacts->input("owner_email")->label(t("Owner Email Address"))->value(module::get_var("contactowner", "contact_owner_email")); - $add_contacts->input("owner_name")->label(t("Owner Name"))->value(module::get_var("contactowner", "contact_owner_name")); - - $message_prefs = $form->group("messagePrefs"); - $message_prefs->input("message_header")->label(t("Email Message Header"))->value(module::get_var("contactowner", "contact_owner_header")); - - // Add a save button to the form. - $form->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} \ No newline at end of file diff --git a/3.1/modules/contactowner/controllers/contactowner.php b/3.1/modules/contactowner/controllers/contactowner.php deleted file mode 100644 index 0a302c91..00000000 --- a/3.1/modules/contactowner/controllers/contactowner.php +++ /dev/null @@ -1,171 +0,0 @@ -where("id", "=", $user_id) - ->find_all(); - $str_to_name = $userDetails[0]->name; - } - - // If item_id is set, include a link to the item. - $email_body = ""; - if ($item_id <> "") { - $item = ORM::factory("item", $item_id); - $email_body = "This message refers to type}s/{$item->id}") . "\">this page."; - } - - // Make a new form with a couple of text boxes. - $form = new Forge("contactowner/sendemail/{$user_id}", "", "post", - array("id" => "g-contact-owner-send-form")); - $sendmail_fields = $form->group("contactOwner"); - $sendmail_fields->input("email_to") - ->label(t("To:"))->value($str_to_name) - ->id("g-contactowner-to-name"); - $sendmail_fields->input("email_from") - ->label(t("From:"))->value(identity::active_user()->email) - ->id("g-contactowner-from-email") - ->rules('required|valid_email') - ->error_messages("required", t("You must enter a valid email address")) - ->error_messages("valid_email", t("You must enter a valid email address")) - ->error_messages("invalid", t("You must enter a valid email address")); - $sendmail_fields->input("email_subject") - ->label(t("Subject:"))->value("") - ->id("g-contactowner-subject") - ->rules('required') - ->error_messages("required", t("You must enter a subject")); - $sendmail_fields->textarea("email_body") - ->label(t("Message:")) - ->value($email_body) - ->id("g-contactowner-email-body") - ->rules('required') - ->error_messages("required", t("You must enter a message")); - - // Add a captcha, if there's an active captcha module. - module::event("captcha_protect_form", $form); - - // Add a save button to the form. - $sendmail_fields->submit("SendMessage")->value(t("Send")); - - return $form; - } - - public function emailowner($item_id) { - // Display a form that a vistor can use to contact the site owner. - - // If this page is disabled, show a 404 error. - if (module::get_var("contactowner", "contact_owner_link") != true) { - throw new Kohana_404_Exception(); - } - - // Set up and display the actual page. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = $this->get_email_form("-1", $item_id); - print $template; - } - - public function emailid($user_id, $item_id) { - // Display a form that a vistor can use to contact a registered user. - - // If this page is disabled, show a 404 error. - if (module::get_var("contactowner", "contact_user_link") != true) { - throw new Kohana_404_Exception(); - } - - // Set up and display the actual page. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = $this->get_email_form($user_id, $item_id); - print $template; - } - - public function sendemail($user_id) { - // Validate the form, then send the actual email. - - // If this page is disabled, show a 404 error. - if (($user_id == "-1") && (module::get_var("contactowner", "contact_owner_link") != true)) { - throw new Kohana_404_Exception(); - } elseif (($user_id >= 0) && (module::get_var("contactowner", "contact_user_link") != true)) { - throw new Kohana_404_Exception(); - } - - // Make sure the form submission was valid. - $form = $this->get_email_form($user_id); - $valid = $form->validate(); - if ($valid) { - // Copy the data from the email form into a couple of variables. - $str_emailsubject = Input::instance()->post("email_subject"); - $str_emailfrom = Input::instance()->post("email_from"); - $str_emailbody = Input::instance()->post("email_body"); - - // Add in some
    tags to the message body where ever there are line breaks. - $str_emailbody = str_replace("\n", "\n
    ", $str_emailbody); - - // Gallery's Sendmail library doesn't allow for custom from addresses, - // so add the from email to the beginning of the message body instead. - // Also add in the admin-defined message header. - $str_emailbody = module::get_var("contactowner", "contact_owner_header") . "
    \r\n" . "Message Sent From " . $str_emailfrom . "
    \r\n
    \r\n" . $str_emailbody; - - // Figure out where the email is going to. - $str_emailto = ""; - if ($user_id == -1) { - // If the email id is "-1" send the message to a pre-determined - // owner email address. - $str_emailto = module::get_var("contactowner", "contact_owner_email"); - } else { - // or else grab the email from the user table. - $userDetails = ORM::factory("user") - ->where("id", "=", $user_id) - ->find_all(); - $str_emailto = $userDetails[0]->email; - } - - // Send the email message. - Sendmail::factory() - ->to($str_emailto) - ->subject($str_emailsubject) - ->header("Mime-Version", "1.0") - ->header("Content-type", "text/html; charset=utf-8") - ->message($str_emailbody) - ->send(); - - // Display a message telling the visitor that their email has been sent. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = t("Your Message Has Been Sent."); - print $template; - - } else { - // Set up and display the actual page. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = $form; - print $template; - } - } -} diff --git a/3.1/modules/contactowner/helpers/contactowner_block.php b/3.1/modules/contactowner/helpers/contactowner_block.php deleted file mode 100644 index b2c31500..00000000 --- a/3.1/modules/contactowner/helpers/contactowner_block.php +++ /dev/null @@ -1,83 +0,0 @@ - t("Contact Owner")); - } - - static function get($block_id, $theme) { - $block = ""; - - switch ($block_id) { - case "contact_owner": - - // Create a new block to display the links in. - $block = new Block(); - $block->css_id = "g-contact-owner"; - $block->title = t("Contact"); - $block->content = new View("contactowner_block.html"); - - // if $displayBlock is true, this block will be displayed, - // if there aren't any links to put in the block for whatever reason - // then $displayBlock will rename set to false and the - // block will not be displayed. - $displayBlock = false; - - if ($theme->item()) { - // Locate the record for the user that created the current item. - // Their name will be displayed as part of the contact link. - $userDetails = ORM::factory("user") - ->where("id", "=", $theme->item->owner_id) - ->find_all(); - - // Figure out if the contact item owner email link should be displayed. - // only display it if the current owner has an email address and - // the option for allowing item owners to be contacted is set to true. - if ((count($userDetails) > 0) && ($userDetails[0]->email != "") && - (module::get_var("contactowner", "contact_user_link") == true)) { - $block->content->userLink = "item->owner_id) . "/" . $theme->item->id . "\">" . t("Contact") . " " . - $userDetails[0]->name . ""; - $displayBlock = true; - } - } - - // Figure out if the contact site owner link should be displayed. - if (module::get_var("contactowner", "contact_owner_link")) { - if ($theme->item()) { - $block->content->ownerLink = "item->id . - "\">" . t(module::get_var("contactowner", "contact_button_text")) . ""; - } else { - $block->content->ownerLink = "" . t(module::get_var("contactowner", "contact_button_text")) . ""; - } - $displayBlock = true; - } - - break; - } - - if ($displayBlock) { - return $block; - } else { - return ""; - } - } -} diff --git a/3.1/modules/contactowner/helpers/contactowner_event.php b/3.1/modules/contactowner/helpers/contactowner_event.php deleted file mode 100644 index 7c527155..00000000 --- a/3.1/modules/contactowner/helpers/contactowner_event.php +++ /dev/null @@ -1,28 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("contactowner") - ->label(t("ContactOwner Settings")) - ->url(url::site("admin/contactowner"))); - } -} diff --git a/3.1/modules/contactowner/helpers/contactowner_installer.php b/3.1/modules/contactowner/helpers/contactowner_installer.php deleted file mode 100644 index 99e3371d..00000000 --- a/3.1/modules/contactowner/helpers/contactowner_installer.php +++ /dev/null @@ -1,35 +0,0 @@ - -
    -

    - -
    diff --git a/3.1/modules/contactowner/views/contactowner_block.html.php b/3.1/modules/contactowner/views/contactowner_block.html.php deleted file mode 100644 index f593af5b..00000000 --- a/3.1/modules/contactowner/views/contactowner_block.html.php +++ /dev/null @@ -1,15 +0,0 @@ - -
      - -
    • - -
    • - - - -
    • - -
    • - -
    - diff --git a/3.1/modules/contactowner/views/contactowner_emailform.html.php b/3.1/modules/contactowner/views/contactowner_emailform.html.php deleted file mode 100644 index 61873e91..00000000 --- a/3.1/modules/contactowner/views/contactowner_emailform.html.php +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/3.1/modules/custom_menus/controllers/admin_custom_menus.php b/3.1/modules/custom_menus/controllers/admin_custom_menus.php deleted file mode 100644 index 68b43f71..00000000 --- a/3.1/modules/custom_menus/controllers/admin_custom_menus.php +++ /dev/null @@ -1,254 +0,0 @@ -page_title = t("Manage menus"); - $view->content = new View("admin_custom_menus.html"); - $view->content->menu_list = $this->get_html_list(0); - print $view; - } - - public function form_create($id) { - // Display the create new menu form. - print $this->get_new_menu_form($id); - } - - public function form_edit($id) { - // Display the edit menu form. - print $this->get_edit_menu_form($id); - } - - static function get_new_menu_form($id) { - // Generate the create new menu form. - $form = new Forge("admin/custom_menus/create/$id", "", "post", array("id" => "g-create-menu-form")); - $group = $form->group("create_menu") - ->label(t("Add new menu")); - $group->input("menu_title") - ->label(t("Title")); - $group->input("menu_url") - ->label(t("URL (Leave blank if this menu will have sub-menus)")); - $group->submit("")->value(t("Create menu")); - return $form; - } - - static function get_edit_menu_form($id) { - // Generate the edit menu form. - $existing_menu = ORM::factory("custom_menu", $id); - $form = new Forge("admin/custom_menus/edit/$id", "", "post", array("id" => "g-edit-menu-form")); - $group = $form->group("edit_menu") - ->label(t("Edit menu")); - $group->input("menu_title") - ->label(t("Title")) - ->value($existing_menu->title); - $group->input("menu_url") - ->label(t("URL (Leave blank if this menu will have sub-menus)")) - ->value($existing_menu->url); - $group->submit("")->value(t("Save changes")); - return $form; - } - - public function create($id) { - // Save a new menu to the database. - - access::verify_csrf(); - - // Save form variables to the database. - $new_menu = ORM::factory("custom_menu"); - $new_menu->title = Input::instance()->post("menu_title"); - $new_menu->url = Input::instance()->post("menu_url"); - $new_menu->parent_id = $id; - - // Set menu's location to the last position. - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", $id) - ->order_by("order_by", "DESC") - ->find_all(1); - if (count($existing_menu) > 0) { - $int_position = $existing_menu[0]->order_by; - $int_position++; - $new_menu->order_by = $int_position; - } else { - $new_menu->order_by = 0; - } - - // Save new menu to the database. - $new_menu->save(); - message::success(t("Menu %menu_name created", array("menu_name" => $new_menu->title))); - log::success("custom_menus", t("Menu %menu_name created", array("menu_name" => $new_menu->title))); - json::reply(array("result" => "success")); - } - - public function edit($id) { - // Save a new menu to the database. - - access::verify_csrf(); - - // Load the existing menu and save changes. - $existing_menu = ORM::factory("custom_menu", $id); - if ($existing_menu->loaded()) { - $existing_menu->title = Input::instance()->post("menu_title"); - $existing_menu->url = Input::instance()->post("menu_url"); - $existing_menu->save(); - message::success(t("Menu %menu_name saved", array("menu_name" => $existing_menu->title))); - log::success("custom_menus", t("Menu %menu_name saved", array("menu_name" => $existing_menu->title))); - json::reply(array("result" => "success")); - } else { - message::error(t("Unable to load menu %menu_id", array("menu_id" => $id))); - log::success("custom_menus", t("Unable to load menu %menu_id", array("menu_id" => $id))); - json::reply(array("result" => "success")); - } - } - - function get_html_list($parent_id) { - // Generate an HTML list of existing menu items. - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", $parent_id) - ->order_by("order_by", "ASC") - ->find_all(); - $str_html = ""; - if (count($existing_menu) > 0) { - $str_html = "\n"; - } - return $str_html; - } - - public function form_delete($id) { - // Display a form asking the user if they want to delete a menu. - $one_menu = ORM::factory("custom_menu", $id); - if ($one_menu->loaded()) { - print $this->get_delete_form($one_menu); - } - } - - public function delete($id) { - // Delete the specified menu. - - access::verify_csrf(); - - // Make sure $id belongs to an actual menu. - $one_menu = ORM::factory("custom_menu", $id); - if (!$one_menu->loaded()) { - throw new Kohana_404_Exception(); - } - - // If the form validates, delete the specified menu. - $form = $this->get_delete_form($one_menu); - if ($form->validate()) { - $name = $one_menu->title; - $this->delete_sub_menus($one_menu->id); - $one_menu->delete(); - message::success(t("Deleted menu %menu_name", array("menu_name" => $name))); - log::success("custom_menus", t("Deleted menu %menu_name", array("menu_name" => $name))); - json::reply(array("result" => "success", "location" => url::site("admin/custom_menus"))); - } else { - print $form; - } - } - - function delete_sub_menus($parent_id) { - // Delete all sub menus associated with $parent_id. - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", $parent_id) - ->order_by("title", "ASC") - ->find_all(); - foreach ($existing_menu as $one_menu) { - $this->delete_sub_menus($one_menu->id); - $one_menu->delete(); - } - } - - static function get_delete_form($one_menu) { - // Generate a new form asking the user if they want to delete a menu. - $form = new Forge("admin/custom_menus/delete/$one_menu->id", "", "post", array("id" => "g-delete-menu-form")); - $group = $form->group("delete_menu") - ->label(t("Really delete menu %menu_name & sub-menus?", array("menu_name" => $one_menu->title))); - $group->submit("")->value(t("Delete Menu")); - return $form; - } - - public function move_menu_up($id) { - // Move the specified menu item up one position. - $one_menu = ORM::factory("custom_menu", $id); - if ($one_menu->loaded()) { - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", $one_menu->parent_id) - ->where("order_by", "<", $one_menu->order_by) - ->order_by("order_by", "DESC") - ->find_all(1); - if (count($existing_menu) > 0) { - $second_menu = ORM::factory("custom_menu", $existing_menu[0]->id); - $temp_position = $one_menu->order_by; - $one_menu->order_by = $second_menu->order_by; - $second_menu->order_by = $temp_position; - $one_menu->save(); - $second_menu->save(); - message::success(t("Menu %menu_title moved up", array("menu_title" => $one_menu->title))); - log::success("custom_menus", t("Menu %menu_title moved up", array("menu_title" => $one_menu->title))); - } - } - url::redirect("admin/custom_menus"); - } - - public function move_menu_down($id) { - // Move the specified menu item down one position. - $one_menu = ORM::factory("custom_menu", $id); - if ($one_menu->loaded()) { - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", $one_menu->parent_id) - ->where("order_by", ">", $one_menu->order_by) - ->order_by("order_by", "ASC") - ->find_all(1); - if (count($existing_menu) > 0) { - $second_menu = ORM::factory("custom_menu", $existing_menu[0]->id); - $temp_position = $one_menu->order_by; - $one_menu->order_by = $second_menu->order_by; - $second_menu->order_by = $temp_position; - $one_menu->save(); - $second_menu->save(); - message::success(t("Menu %menu_title moved down", array("menu_title" => $one_menu->title))); - log::success("custom_menus", t("Menu %menu_title moved down", array("menu_title" => $one_menu->title))); - } - } - url::redirect("admin/custom_menus"); - } -} diff --git a/3.1/modules/custom_menus/helpers/custom_menus_event.php b/3.1/modules/custom_menus/helpers/custom_menus_event.php deleted file mode 100644 index 28d8632b..00000000 --- a/3.1/modules/custom_menus/helpers/custom_menus_event.php +++ /dev/null @@ -1,75 +0,0 @@ -get("content_menu") - ->append(Menu::factory("link") - ->id("custom_menus") - ->label(t("Custom Menus Manager")) - ->url(url::site("admin/custom_menus"))); - } - - static function site_menu($menu, $theme) { - // Add user definied menu and sub-menu items to the site menu. - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", "0") - ->order_by("order_by", "DESC") - ->find_all(); - if (count($existing_menu) > 0) { - foreach ($existing_menu as $one_menu) { - if ($one_menu->url == "") { - $menu->add_after("home", $new_menu = Menu::factory("submenu") - ->id("custom_menus-" . $one_menu->id) - ->label(t($one_menu->title))); - custom_menus_event::add_sub_menus($one_menu->id, $new_menu); - } else { - $menu->add_after("home", Menu::factory("link") - ->id("custom_menus-" . $one_menu->id) - ->label(t($one_menu->title)) - ->url($one_menu->url)); - } - } - } - } - - function add_sub_menus($parent_id, $parent_menu) { - // Populate the menu bar with any sub-menu items on the current menu ($parent_menu). - $existing_menu = ORM::factory("custom_menu") - ->where("parent_id", "=", $parent_id) - ->order_by("order_by", "ASC") - ->find_all(); - if (count($existing_menu) > 0) { - foreach ($existing_menu as $one_menu) { - if ($one_menu->url == "") { - $parent_menu->append($new_menu = Menu::factory("submenu") - ->id("custom_menus-" . $one_menu->id) - ->label(t($one_menu->title))); - custom_menus_event::add_sub_menus($one_menu->id, $new_menu); - } else { - $parent_menu->append(Menu::factory("link") - ->id("custom_menus-" . $one_menu->id) - ->label(t($one_menu->title)) - ->url($one_menu->url)); - } - } - } - } -} diff --git a/3.1/modules/custom_menus/helpers/custom_menus_installer.php b/3.1/modules/custom_menus/helpers/custom_menus_installer.php deleted file mode 100644 index 39021efb..00000000 --- a/3.1/modules/custom_menus/helpers/custom_menus_installer.php +++ /dev/null @@ -1,37 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {custom_menus} ( - `id` int(9) NOT NULL auto_increment, - `title` varchar(255) default NULL, - `url` text default NULL, - `parent_id` int(9) NOT NULL default 0, - `order_by` int(9) NOT NULL default 0, - PRIMARY KEY (`id`), - UNIQUE KEY(`id`)) - DEFAULT CHARSET=utf8;"); - - // Set the module version number. - module::set_version("custom_menus", 1); - } -} diff --git a/3.1/modules/custom_menus/module.info b/3.1/modules/custom_menus/module.info deleted file mode 100644 index 9f3f9e1c..00000000 --- a/3.1/modules/custom_menus/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Custom Menus" -description = "Allows Gallery admins to create additional menu and sub-menu items." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:custom_menus" -discuss_url = "http://gallery.menalto.com/node/102814" diff --git a/3.1/modules/custom_menus/views/admin_custom_menus.html.php b/3.1/modules/custom_menus/views/admin_custom_menus.html.php deleted file mode 100644 index bc5eaaba..00000000 --- a/3.1/modules/custom_menus/views/admin_custom_menus.html.php +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/3.1/modules/database_info/helpers/database_info_block.php b/3.1/modules/database_info/helpers/database_info_block.php deleted file mode 100644 index af224421..00000000 --- a/3.1/modules/database_info/helpers/database_info_block.php +++ /dev/null @@ -1,36 +0,0 @@ - t("Database info")); - } - - static function get($block_id) { - $block = new Block(); - switch ($block_id) { - case "database_info": - $block->css_id = "g-database-info"; - $block->title = t("Database information"); - $block->content = new View("admin_block_db.html"); - break; - } - return $block; - } -} diff --git a/3.1/modules/database_info/module.info b/3.1/modules/database_info/module.info deleted file mode 100644 index 8cc35d27..00000000 --- a/3.1/modules/database_info/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Database Info" -description = "View information about your Gallery 3 database on the admin dashboard." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:database_info" -discuss_url = "http://gallery.menalto.com/node/95320" diff --git a/3.1/modules/database_info/views/admin_block_db.html.php b/3.1/modules/database_info/views/admin_block_db.html.php deleted file mode 100644 index cf13d535..00000000 --- a/3.1/modules/database_info/views/admin_block_db.html.php +++ /dev/null @@ -1,18 +0,0 @@ - -query("SHOW TABLE STATUS"); - $database_size = 0; - foreach($tables as $table) { - $database_size += ($table->Data_length + $table->Index_length); - } - $database_size = $database_size / 1024 / 1024; -?> -
      -
    • - number_format($database_size, 2))) ?> -
    • -
    • - count($tables))) ?> -
    • -
    diff --git a/3.1/modules/developer/config/developer.php b/3.1/modules/developer/config/developer.php deleted file mode 100644 index e13f0167..00000000 --- a/3.1/modules/developer/config/developer.php +++ /dev/null @@ -1,54 +0,0 @@ - array("album_blocks" => t("Album block"), - "album_bottom" => t("Bottom of album content"), - "album_top" => t("Top of Album content"), - "admin_credits" => t("Administration page credits"), - "admin_footer" => t("Adminsitration page footer"), - "admin_header_top" => t("Top of administration page header"), - "admin_header_bottom" => t("Bottom of administration page header"), - "admin_page_bottom" => t("Bottom of administration page"), - "admin_page_top" => t("Top of administration page"), - "admin_head" => t("Adminstration page head"), - "body_attributes" => t("Body Attributes"), - "credits" => t("Album or photo page credits"), - "dynamic_bottom" => t("Bottom of dynamic page content"), - "dynamic_top" => t("Top of dynamic page content"), - "footer" => t("Album or photo page footer"), - "head" => t("Album or photo page head"), - "header_bottom" => t("Album or photo header bottom"), - "header_top" => t("Album or photo header top"), - "page_bottom" => t("Album or photo bottom"), - "page_top" => t("Album or photo top"), - "photo_blocks" => t("Photo block"), - "photo_bottom" => t("Bottom of photo content"), - "photo_top" => t("Top of photo content"), - "resize_bottom" => t("Bottom of the resize view"), - "resize_top" => t("Top of the resize view"), - "sidebar_bottom" => t("Bottom of sidebar"), - "sidebar_top" => t("Top of sidebar"), - "thumb_bottom" => t("Bottom of thumbnail"), - "thumb_info" => t("Thumbnail information"), - "thumb_top" => t("Top of thumbnail display"))); diff --git a/3.1/modules/developer/controllers/admin_developer.php b/3.1/modules/developer/controllers/admin_developer.php deleted file mode 100644 index 2d150697..00000000 --- a/3.1/modules/developer/controllers/admin_developer.php +++ /dev/null @@ -1,306 +0,0 @@ -content = new View("admin_developer.html"); - $view->content->title = t("Generate module"); - - if (!is_writable(MODPATH)) { - message::warning( - t("The module directory is not writable. Please ensure that it is writable by the web server")); - } - list ($form, $errors) = $this->_get_module_form(); - $view->content->developer_content = $this->_get_module_create_content($form, $errors); - print $view; - } - - public function test_data() { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_developer.html"); - $v->content->title = t("Generate Test Data"); - - list ($form, $errors) = $this->_get_module_form(); - $v->content->developer_content = $this->_get_test_data_view($form, $errors); - print $v; - } - - public function module_create() { - access::verify_csrf(); - - list ($form, $errors) = $this->_get_module_form(); - - $post = new Validation($_POST); - $post->add_rules("name", "required"); - $post->add_rules("display_name", "required"); - $post->add_rules("description", "required"); - $post->add_callbacks("theme", array($this, "_noop_validation")); - $post->add_callbacks("event", array($this, "_noop_validation")); - $post->add_callbacks("name", array($this, "_is_module_defined")); - - if ($post->validate()) { - $task_def = Task_Definition::factory() - ->callback("developer_task::create_module") - ->description(t("Create a new module")) - ->name(t("Create Module")); - $success_msg = t("Generation of %module completed successfully", - array("module" => $post->name)); - $error_msg = t("Generation of %module failed.", array("module" => $post->name)); - $task_context = array("step" => 0, "success_msg" => $success_msg, "error_msg" => $error_msg); - $task = task::create($task_def, array_merge($task_context, $post->as_array())); - - json::reply(array("result" => "started", - "max_iterations" => 15, - "url" => url::site("admin/developer/run_task/{$task->id}?csrf=" . - access::csrf_token()), - "task" => $task->as_array())); - } else { - $v = $this->_get_module_create_content(arr::overwrite($form, $post->as_array()), - arr::overwrite($errors, $post->errors())); - json::reply(array("result" => "error", "html" => (string)$v)); - } - } - - public function _noop_validation(Validation $array, $field) { - } - - public function session($key) { - access::verify_csrf(); - $input = Input::instance(); - Session::instance()->set($key, $input->get("value")); - url::redirect($input->server("HTTP_REFERER")); - } - - public function test_data_create() { - list ($form, $errors) = $this->_get_test_data_form(); - - $post = new Validation($_POST); - $post->add_rules("albums", "numeric"); - $post->add_rules("photos", "numeric"); - $post->add_rules("comments", "numeric"); - $post->add_rules("tags", "numeric"); - $post->add_callbacks("albums", array($this, "_set_default")); - $post->add_callbacks("photos", array($this, "_set_default")); - $post->add_callbacks("comments", array($this, "_set_default")); - $post->add_callbacks("tags", array($this, "_set_default")); - - if ($post->validate()) { - $task_def = Task_Definition::factory() - ->callback("developer_task::create_content") - ->description(t("Create test content")) - ->name(t("Create Test Data")); - $total = $post->albums + $post->photos + $post->comments + $post->tags; - $success_msg = t("Successfully generated test data"); - $error_msg = t("Problems with test data generation was encountered"); - $task = task::create($task_def, array("total" => $total, "batch" => (int)ceil($total / 10), - "success_msg" => $success_msg, - "current" => 0, "error_msg" => $error_msg, - "albums" => $post->albums, "photos" => $post->photos, - "comments" => $post->comments, "tags" => $post->tags)); - batch::start(); - - json::reply(array("result" => "started", - "max_iterations" => $total + 5, - "url" => url::site("admin/developer/run_task/{$task->id}?csrf=" . - access::csrf_token()), - "task" => $task->as_array())); - } else { - $v = $this->_get_test_data_view(arr::overwrite($form, $post->as_array()), - arr::overwrite($errors, $post->errors())); - json::reply(array("result" => "error", "html" => (string)$v)); - } - } - - public function run_task($task_id) { - try { - $task = task::run($task_id); - } catch (Exception $e) { - $error_msg = $e->getMessage(); - $task->done = true; - } - - if ($task->done) { - batch::stop(); - $context = unserialize($task->context); - switch ($task->state) { - case "success": - message::success($context["success_msg"]); - break; - - case "error": - message::success(empty($error_msg) ? $context["error_msg"] : $error_msg); - break; - } - json::reply(array("result" => "success", "task" => $task->as_array())); - - } else { - json::reply(array("result" => "in_progress", "task" => $task->as_array())); - } - } - - function mptt() { - $v = new Admin_View("admin.html"); - $v->content = new View("mptt_tree.html"); - - $v->content->tree = $this->_build_tree(); - - if (exec("which /usr/bin/dot")) { - $v->content->url = url::site("admin/developer/mptt_graph"); - } else { - $v->content->url = null; - message::warning(t("The package 'graphviz' is not installed, degrading to text view")); - } - print $v; - } - - function mptt_graph() { - $items = ORM::factory("item")->order_by("id")->find_all(); - $data = $this->_build_tree(); - - $proc = proc_open("/usr/bin/dot -Tsvg", - array(array("pipe", "r"), - array("pipe", "w")), - $pipes, - VARPATH . "tmp"); - fwrite($pipes[0], $data); - fclose($pipes[0]); - - header("Content-Type: image/svg+xml"); - print(stream_get_contents($pipes[1])); - fclose($pipes[1]); - proc_close($proc); - } - - private function _build_tree() { - $items = ORM::factory("item")->order_by("id")->find_all(); - $data = "digraph G {\n"; - foreach ($items as $item) { - $data .= " $item->parent_id -> $item->id\n"; - $data .= - " $item->id [label=\"$item->id [$item->level] <$item->left_ptr, $item->right_ptr>\"]\n"; - } - $data .= "}\n"; - return $data; - } - - public function _is_module_defined(Validation $post, $field) { - $module_name = strtolower(strtr($post[$field], " ", "_")); - if (file_exists(MODPATH . "$module_name/module.info")) { - $post->add_error($field, "module_exists"); - } - } - - public function _set_default(Validation $post, $field) { - if (empty($post->$field)) { - $post->$field = 0; - } - } - - private function _get_module_form() { - $form = array("name" => "", "display_name" => "", "description" => "", "theme[]" => array(), - "event[]" => array()); - $errors = array_fill_keys(array_keys($form), ""); - - return array($form, $errors); - } - - private function _get_module_create_content($form, $errors) { - $config = Kohana::config("developer.methods"); - - $v = new View("developer_module.html"); - $v->action = "admin/developer/module_create"; - $v->theme = $config["theme"]; - $v->event = $this->_get_events(); - $v->form = $form; - $v->errors = $errors; - $submit_attributes = array( - "id" => "g-generate-module", - "name" => "generate", - "class" => "ui-state-default ui-corner-all", - "style" => "clear:both!important"); - - if (!is_writable(MODPATH)) { - $submit_attributes["class"] .= " ui-state-disabled"; - $submit_attributes["disabled"] = "disabled"; - } - $v->submit_attributes = $submit_attributes; - return $v; - } - - private function _get_events() { - if (empty(self::$event_list)) { - $dir = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator(MODPATH)); - foreach ($dir as $file) { - $file_as_string = file_get_contents($file); - if (preg_match_all('#module::event\("(.*?)"(.*)\);#mU', $file_as_string, $matches, PREG_SET_ORDER) > 0) { - foreach ($matches as $match) { - $event_name = $match[1]; - $display_name = ucwords(str_replace("_", " ", $event_name)); - if (!in_array($display_name, self::$event_list)) { - $parameters = array(); - if (!empty($match[2]) && - preg_match_all('#\$[a-zA-Z_]*#', $match[2], $param_names)) { - - foreach ($param_names[0] as $name) { - $parameters[] = $name != '$this' ? $name : '$' . $event_name; - } - } - self::$event_list["static function $event_name(" . implode(", ", $parameters) . ")"] = $display_name; - } - } - ksort(self::$event_list); - } - } - } - return self::$event_list; - } - - private function _get_test_data_form() { - $form = array("albums" => "10", "photos" => "10", "comments" => "10", "tags" => "10", - "generate_albums" => ""); - $errors = array_fill_keys(array_keys($form), ""); - - return array($form, $errors); - } - - private function _get_test_data_view($form, $errors) { - $v = new View("admin_developer_test_data.html"); - $v->action = "admin/developer/test_data_create"; - $album_count = ORM::factory("item")->where("type", "=", "album")->count_all(); - $photo_count = ORM::factory("item")->where("type", "=", "photo")->count_all(); - - $v->comment_installed = module::is_active("comment"); - $comment_count = empty($v->comment_installed) ? 0 : ORM::factory("comment")->count_all(); - - $v->tag_installed = module::is_active("tag"); - $tag_count = empty($v->tag_installed) ? 0 : ORM::factory("tag")->count_all(); - - $v->album_count = t2("%count album", "%count albums", $album_count); - $v->photo_count = t2("%count photo", "%count photos", $photo_count); - $v->comment_count = t2("%count comment", "%count comments", $comment_count); - $v->tag_count = t2("%count tag", "%count tags", $tag_count); - $v->form = $form; - $v->errors = $errors; - return $v; - } -} diff --git a/3.1/modules/developer/data/DSC_0003.jpg b/3.1/modules/developer/data/DSC_0003.jpg deleted file mode 100644 index 5780d9d8..00000000 Binary files a/3.1/modules/developer/data/DSC_0003.jpg and /dev/null differ diff --git a/3.1/modules/developer/data/DSC_0005.jpg b/3.1/modules/developer/data/DSC_0005.jpg deleted file mode 100644 index 4d2b53a9..00000000 Binary files a/3.1/modules/developer/data/DSC_0005.jpg and /dev/null differ diff --git a/3.1/modules/developer/data/DSC_0017.jpg b/3.1/modules/developer/data/DSC_0017.jpg deleted file mode 100644 index b7f7bb90..00000000 Binary files a/3.1/modules/developer/data/DSC_0017.jpg and /dev/null differ diff --git a/3.1/modules/developer/data/DSC_0019.jpg b/3.1/modules/developer/data/DSC_0019.jpg deleted file mode 100644 index 0ce25aa4..00000000 Binary files a/3.1/modules/developer/data/DSC_0019.jpg and /dev/null differ diff --git a/3.1/modules/developer/data/DSC_0067.jpg b/3.1/modules/developer/data/DSC_0067.jpg deleted file mode 100644 index 84f134cb..00000000 Binary files a/3.1/modules/developer/data/DSC_0067.jpg and /dev/null differ diff --git a/3.1/modules/developer/data/DSC_0072.jpg b/3.1/modules/developer/data/DSC_0072.jpg deleted file mode 100644 index dfad82b0..00000000 Binary files a/3.1/modules/developer/data/DSC_0072.jpg and /dev/null differ diff --git a/3.1/modules/developer/data/P4050088.jpg b/3.1/modules/developer/data/P4050088.jpg deleted file mode 100644 index 62f4749d..00000000 Binary files a/3.1/modules/developer/data/P4050088.jpg and /dev/null differ diff --git a/3.1/modules/developer/helpers/developer_event.php b/3.1/modules/developer/helpers/developer_event.php deleted file mode 100644 index 441fcd77..00000000 --- a/3.1/modules/developer/helpers/developer_event.php +++ /dev/null @@ -1,70 +0,0 @@ -id("developer_menu") - ->label(t("Developer tools")); - $menu->append($developer_menu); - - $developer_menu - ->append(Menu::factory("link") - ->id("generate_menu") - ->label(t("Generate module")) - ->url(url::site("admin/developer/module"))) - ->append(Menu::factory("link") - ->id("generate_data") - ->label(t("Generate test data")) - ->url(url::site("admin/developer/test_data"))) - ->append(Menu::factory("link") - ->id("mptt_tree_menu") - ->label(t("MPTT tree")) - ->url(url::site("admin/developer/mptt"))); - - $csrf = access::csrf_token(); - if (Session::instance()->get("profiler", false)) { - $developer_menu->append( - Menu::factory("link") - ->id("scaffold_profiler") - ->label(t("Profiling off")) - ->url(url::site("admin/developer/session/profiler?value=0&csrf=$csrf"))); - } else { - $developer_menu->append( - Menu::factory("link") - ->id("scaffold_profiler") - ->label(t("Profiling on")) - ->url(url::site("admin/developer/session/profiler?value=1&csrf=$csrf"))); - } - - if (Session::instance()->get("debug", false)) { - $developer_menu->append( - Menu::factory("link") - ->id("scaffold_debugger") - ->label(t("Debugging off")) - ->url(url::site("admin/developer/session/debug?value=0&csrf=$csrf"))); - } else { - $developer_menu->append( - Menu::factory("link") - ->id("scaffold_debugger") - ->label(t("Debugging on")) - ->url(url::site("admin/developer/session/debug?value=1&csrf=$csrf"))); - } - } -} diff --git a/3.1/modules/developer/helpers/developer_task.php b/3.1/modules/developer/helpers/developer_task.php deleted file mode 100644 index 2df2e526..00000000 --- a/3.1/modules/developer/helpers/developer_task.php +++ /dev/null @@ -1,335 +0,0 @@ -context); - - if (empty($context["module"])) { - $context["class_name"] = strtr($context["name"], " ", "_"); - $context["module"] = strtolower($context["class_name"]); - $context["module_path"] = (MODPATH . $context["module"]); - } - - switch ($context["step"]) { - case 0: // Create directory tree - foreach (array("", "controllers", "helpers", "views") as $dir) { - $path = "{$context['module_path']}/$dir"; - if (!file_exists($path)) { - mkdir($path); - chmod($path, 0755); - } - } - break; - case 1: // Generate installer - $context["installer"] = array(); - self::_render_helper_file($context, "installer"); - break; - case 2: // Generate theme helper - $context["theme"] = !isset($context["theme"]) ? array() : $context["theme"]; - self::_render_helper_file($context, "theme"); - break; - case 3: // Generate block helper - $context["block"] = array(); - self::_render_helper_file($context, "block"); - break; - case 4: // Generate event helper - self::_render_helper_file($context, "event"); - break; - case 5: // Generate admin controller - $file = "{$context['module_path']}/controllers/admin_{$context['module']}.php"; - ob_start(); - $v = new View("admin_controller.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 6: // Generate admin form - $file = "{$context['module_path']}/views/admin_{$context['module']}.html.php"; - ob_start(); - $v = new View("admin_html.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 7: // Generate controller - $file = "{$context['module_path']}/controllers/{$context['module']}.php"; - ob_start(); - $v = new View("controller.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 8: // Generate sidebar block view - $file = "{$context['module_path']}/views/{$context['module']}_block.html.php"; - ob_start(); - $v = new View("block_html.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 9: // Generate dashboard block view - $file = "{$context['module_path']}/views/admin_{$context['module']}_block.html.php"; - ob_start(); - $v = new View("dashboard_block_html.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 10: // Generate module.info (do last) - $file = "{$context["module_path"]}/module.info"; - ob_start(); - $v = new View("module_info.txt"); - $v->module_name = $context["display_name"]; - $v->module_description = $context["description"]; - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - } - if (isset($file)) { - chmod($file, 0765); - } - $task->done = (++$context["step"]) >= 11; - $task->context = serialize($context); - $task->state = "success"; - $task->percent_complete = ($context["step"] / 11.0) * 100; - } - - private static function _render_helper_file($context, $helper) { - if (isset($context[$helper])) { - $config = Kohana::config("developer.methods"); - $file = "{$context["module_path"]}/helpers/{$context["module"]}_{$helper}.php"; - touch($file); - ob_start(); - $v = new View("$helper.txt"); - $v->helper = $helper; - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->module_name = $context["name"]; - $v->css_id = strtr($context["name"], " ", ""); - $v->css_id = preg_replace("#\s#", "", $context["name"]); - $v->callbacks = empty($context[$helper]) ? array() : array_fill_keys($context[$helper], 1); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - } - } - - static function create_content($task) { - $context = unserialize($task->context); - $batch_cnt = $context["batch"]; - while ($context["albums"] > 0 && $batch_cnt > 0) { - set_time_limit(30); - self::_add_album_or_photo("album"); - - $context["current"]++; - $context["albums"]--; - $batch_cnt--; - } - while ($context["photos"] > 0 && $batch_cnt > 0) { - set_time_limit(30); - self::_add_album_or_photo(); - - $context["current"]++; - $context["photos"]--; - $batch_cnt--; - } - while ($context["comments"] > 0 && $batch_cnt > 0) { - self::_add_comment(); - $context["current"]++; - $context["comments"]--; - $batch_cnt--; - } - while ($context["tags"] > 0 && $batch_cnt > 0) { - self::_add_tag(); - $context["current"]++; - $context["tags"]--; - $batch_cnt--; - } - $task->done = $context["current"] >= $context["total"]; - $task->context = serialize($context); - $task->state = "success"; - $task->percent_complete = $context["current"] / $context["total"] * 100; - } - - private static function _add_album_or_photo($desired_type=null) { - srand(time()); - $parents = ORM::factory("item")->where("type", "=", "album")->find_all()->as_array(); - $owner_id = identity::active_user()->id; - - $test_images = glob(dirname(dirname(__FILE__)) . "/data/*.[Jj][Pp][Gg]"); - - $parent = $parents[array_rand($parents)]; - $parent->reload(); - $type = $desired_type; - if (!$type) { - $type = rand(0, 10) ? "photo" : "album"; - } - if ($type == "album") { - $thumb_size = module::get_var("core", "thumb_size"); - $rand = rand(); - $item = ORM::factory("item"); - $item->type = "album"; - $item->parent_id = $parent->id; - $item->name = "rnd_$rand"; - $item->title = "Rnd $rand"; - $item->description = "random album $rand"; - $item->owner_id = $owner_id; - $parents[] = $item->save(); - } else { - $photo_index = rand(0, count($test_images) - 1); - $item = ORM::factory("item"); - $item->type = "photo"; - $item->parent_id = $parent->id; - $item->set_data_file($test_images[$photo_index]); - $item->name = basename($test_images[$photo_index]); - $item->title = "rnd_" . rand(); - $item->description = "sample thumb"; - $item->owner_id = $owner_id; - $item->save(); - } - } - - private static function _add_comment() { - srand(time()); - $photos = ORM::factory("item")->where("type", "=", "photo")->find_all()->as_array(); - $users = ORM::factory("user")->find_all()->as_array(); - - if (empty($photos)) { - return; - } - - if (module::is_active("akismet")) { - akismet::$test_mode = 1; - } - - $photo = $photos[array_rand($photos)]; - $author = $users[array_rand($users)]; - $guest_name = ucfirst(self::_random_phrase(rand(1, 3))); - $guest_email = sprintf("%s@%s.com", self::_random_phrase(1), self::_random_phrase(1)); - $guest_url = sprintf("http://www.%s.com", self::_random_phrase(1)); - - $comment = ORM::factory("comment"); - $comment->author_id = $author->id; - $comment->item_id = $photo->id; - $comment->text = self::_random_phrase(rand(8, 500)); - $comment->guest_name = $guest_name; - $comment->guest_email = $guest_email; - $comment->guest_url = $guest_url; - $comment->save(); - } - - private static function _add_tag() { - $items = ORM::factory("item")->find_all()->as_array(); - - if (!empty($items)) { - $tags = self::_generateTags(); - - $tag_name = $tags[array_rand($tags)]; - $item = $items[array_rand($items)]; - - tag::add($item, $tag_name); - } - } - - private static function _random_phrase($count) { - static $words; - if (empty($words)) { - $sample_text = "Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium - laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi - architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas - sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione - voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, - amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut - labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis - nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi - consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam - nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla - pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis - praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi - sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt - mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et - expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque - nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas - assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis - debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et - molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut - reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores - repellat."; - $words = preg_split('/\s+/', $sample_text); - } - - $chosen = array(); - for ($i = 0; $i < $count; $i++) { - $chosen[] = $words[array_rand($words)]; - } - - return implode(' ', $chosen); - } - - private static function _generateTags($number=10){ - // Words from lorem2.com - $words = explode( - " ", - "Lorem ipsum dolor sit amet consectetuer adipiscing elit Donec odio Quisque volutpat " . - "mattis eros Nullam malesuada erat ut turpis Suspendisse urna nibh viverra non " . - "semper suscipit posuere a pede Donec nec justo eget felis facilisis " . - "fermentum Aliquam porttitor mauris sit amet orci Aenean dignissim pellentesque " . - "felis Morbi in sem quis dui placerat ornare Pellentesque odio nisi euismod in " . - "pharetra a ultricies in diam Sed arcu Cras consequat Praesent dapibus neque " . - "id cursus faucibus tortor neque egestas augue eu vulputate magna eros eu " . - "erat Aliquam erat volutpat Nam dui mi tincidunt quis accumsan porttitor " . - "facilisis luctus metus Phasellus ultrices nulla quis nibh Quisque a " . - "lectus Donec consectetuer ligula vulputate sem tristique cursus Nam nulla quam " . - "gravida non commodo a sodales sit amet nisi Pellentesque fermentum " . - "dolor Aliquam quam lectus facilisis auctor ultrices ut elementum vulputate " . - "nunc Sed adipiscing ornare risus Morbi est est blandit sit amet sagittis vel " . - "euismod vel velit Pellentesque egestas sem Suspendisse commodo ullamcorper " . - "magna"); - - while ($number--) { - $results[] = $words[array_rand($words, 1)]; - } - return $results; - } -} \ No newline at end of file diff --git a/3.1/modules/developer/js/developer.js b/3.1/modules/developer/js/developer.js deleted file mode 100644 index 065a7316..00000000 --- a/3.1/modules/developer/js/developer.js +++ /dev/null @@ -1,42 +0,0 @@ -var module_success = function(data) { - $("#g-developer-admin").append('
    '); - $("#g-module-progress").progressbar(); - - var task = data.task; - var url = data.url; - var done = false; - var counter = 0; - var max_iterations = data.max_iterations; - while (!done) { - $.ajax({async: false, - success: function(data, textStatus) { - $("#g-module-progress").progressbar("value", data.task.percent_complete); - done = data.task.done; - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - done = true; - }, - dataType: "json", - type: "POST", - url: url - }); - // Leave this in as insurance that we never run away - done = done || ++counter > max_iterations; - } - document.location.reload(); -}; - -function ajaxify_developer_form(selector, success) { - $(selector).ajaxForm({ - dataType: "json", - success: function(data) { - if (data.form && data.result != "started") { - $(selector).replaceWith(data.form); - ajaxify_developer_form(selector, success); - } - if (data.result == "started") { - success(data); - } - } - }); -} diff --git a/3.1/modules/developer/module.info b/3.1/modules/developer/module.info deleted file mode 100644 index b62a6b60..00000000 --- a/3.1/modules/developer/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = Developer -description = "Tools to assist module and theme developers" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:developer" -discuss_url = "http://gallery.menalto.com/forum_module_developer" diff --git a/3.1/modules/developer/views/admin_controller.txt.php b/3.1/modules/developer/views/admin_controller.txt.php deleted file mode 100644 index a7e8fc58..00000000 --- a/3.1/modules/developer/views/admin_controller.txt.php +++ /dev/null @@ -1,57 +0,0 @@ - - -/** - * 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__Controller extends Admin_Controller { - public function index() { - print $this->_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - // @todo process the admin form - - message::success(t(" Adminstration Complete Successfully")); - - url::redirect("admin/"); - } - - print $this->_get_view($form); - } - - private function _get_view($form=null) { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - $form = new Forge("admin//handler", "", "post", - array("id" => "g-adminForm")); - $group = $form->group("group"); - $group->input("text")->label(t("Text"))->rules("required"); - $group->submit("submit")->value(t("Submit")); - - return $form; - } -} \ No newline at end of file diff --git a/3.1/modules/developer/views/admin_developer.html.php b/3.1/modules/developer/views/admin_developer.html.php deleted file mode 100644 index 4831f9ba..00000000 --- a/3.1/modules/developer/views/admin_developer.html.php +++ /dev/null @@ -1,13 +0,0 @@ - - - -
    -

    -
    - -
    -
    diff --git a/3.1/modules/developer/views/admin_developer_test_data.html.php b/3.1/modules/developer/views/admin_developer_test_data.html.php deleted file mode 100644 index a29027ba..00000000 --- a/3.1/modules/developer/views/admin_developer_test_data.html.php +++ /dev/null @@ -1,93 +0,0 @@ - - - "post", "id" => "g-generate-test-data")) ?> - -


    - - (, , , ) -

    - - -
    -
      -
    • -
    • class="g-error"> -
      - - "g-generate-albums", "name" => "generate_albums", "class" => "g-generate-checkbox", "style" => "display:inline", "checked" => !empty($form["generate_albums"])), ".g-radio-album") ?> - - - "album_$number", "name" => "albums", "style" => "display:inline", "checked" => $number == 10, "disabled" => true, "class" => "g-radio-album"), $number) ?> - -
      - -

      - -
    • -
    • class="g-error"> -
      - - "g-generate-photos", "name" => "generate_photos", "class" => "g-generate-checkbox", "style" => "display:inline", "checked" => !empty($form["generate_photos"])), ".g-radio-photo") ?> - - - "photo_$number", "name" => "photos", "style" => "display:inline", "checked" => $number == 10, "disabled" => true, "class" => "g-radio-photo"), $number) ?> - -
      - -

      - -
    • - -
    • class="g-error"> -
      - - "g-generate-comments", "name" => "generate_comments", "class" => "g-generate-checkbox", "style" => "display:inline", "checked" => !empty($form["generate_comments"])), ".g-radio-comment") ?> - - - "comment_$number", "name" => "comments", "style" => "display:inline", "checked" => $number == 10, "disabled" => true, "class" => "g-radio-comment"), $number) ?> - -
      - -

      - -
    • - - -
    • class="g-error"> -
      - - "g-generate-tags", "name" => "generate_tags", "class" => "g-generate-checkbox", "style" => "display:inline", "checked" => !empty($form["generate_tags"])), ".g-radio-tag") ?> - - - "tag_$number", "name" => "tags", "style" => "display:inline", "checked" => $number == 10, "disabled" => true, "class" => "g-radio-tag"), $number) ?> - -
      - -

      - -
    • - -
    • - "g-generate-data", "name" => "generate", "class" => "submit", "style" => "clear:both!important"), t("Generate")) ?> -
    • -
    -
    diff --git a/3.1/modules/developer/views/admin_html.txt.php b/3.1/modules/developer/views/admin_html.txt.php deleted file mode 100644 index 3d230d1c..00000000 --- a/3.1/modules/developer/views/admin_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ - -" ?> - -
    -

    - " ?> -

    - " ?> - -
    diff --git a/3.1/modules/developer/views/block.txt.php b/3.1/modules/developer/views/block.txt.php deleted file mode 100644 index 28a8d9db..00000000 --- a/3.1/modules/developer/views/block.txt.php +++ /dev/null @@ -1,53 +0,0 @@ - - - -/** - * 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 _block { - static function get_site_list() { - return array( - "" => t(" Sidebar Block")); - } - - static function get_admin_list() { - return array( - "" => t(" Dashboard Block")); - } - - static function get($block_id, $theme) { - $block = new Block(); - switch ($block_id) { - case "": - $block->css_id = "g--admin"; - $block->title = t(" Dashboard Block"); - $block->content = new View("admin__block.html"); - - $block->content->item = ORM::factory("item", 1); - break; - case "": - $block->css_id = "g--site"; - $block->title = t(" Sidebar Block"); - $block->content = new View("_block.html"); - - $block->content->item = ORM::factory("item", 1); - break; - } - return $block; - } -} diff --git a/3.1/modules/developer/views/block_html.txt.php b/3.1/modules/developer/views/block_html.txt.php deleted file mode 100644 index 9942259d..00000000 --- a/3.1/modules/developer/views/block_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ - -" ?> - -
    - url() ?>\">" ?> - - thumb_tag(array(\"class\" => \"g-thumbnail\")) ?>" ?> - - -
    diff --git a/3.1/modules/developer/views/controller.txt.php b/3.1/modules/developer/views/controller.txt.php deleted file mode 100644 index 664ff987..00000000 --- a/3.1/modules/developer/views/controller.txt.php +++ /dev/null @@ -1,50 +0,0 @@ - - -/** - * 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 _Controller extends Controller { - public function index() { - print $this->_get_form(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - // @todo process the admin form - - message::success(t(" Processing Successfully")); - - json::reply(array("result" => "success")); - } else { - json::reply(array("result" => "error", "html" => (string)$form)); - } - } - - private function _get_form() { - $form = new Forge("/handler", "", "post", - array("id" => "g--form")); - $group = $form->group("group")->label(t(" Handler")); - $group->input("text")->label(t("Text"))->rules("required"); - $group->submit("submit")->value(t("Submit")); - - return $form; - } -} diff --git a/3.1/modules/developer/views/dashboard_block_html.txt.php b/3.1/modules/developer/views/dashboard_block_html.txt.php deleted file mode 100644 index 8b1c8f5c..00000000 --- a/3.1/modules/developer/views/dashboard_block_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ - -" ?> - -
    - url() ?>\">" ?> - - thumb_tag(array(\"class\" => \"g-thumbnail\")) ?>" ?> - - -
    diff --git a/3.1/modules/developer/views/developer_module.html.php b/3.1/modules/developer/views/developer_module.html.php deleted file mode 100644 index 8552942a..00000000 --- a/3.1/modules/developer/views/developer_module.html.php +++ /dev/null @@ -1,49 +0,0 @@ - - - "post")) ?> -
    -
      -
    • -
    • class="g-error"> - - - -

      - - -

      - -
    • -
    • class="g-error"> - - - -

      - -
    • -
    • class="g-error"> - - - -

      - -
    • -
    • -
        -
      • - - "theme[]", "multiple" => true, "size" => 6), $theme, $form["theme[]"]) ?> -
      • -
      • - - "event[]", "multiple" => true, "size" => 6), $event, $form["event[]"]) ?> -
      • -
      -
    • -
    • - -
    • -
    -
    - - diff --git a/3.1/modules/developer/views/event.txt.php b/3.1/modules/developer/views/event.txt.php deleted file mode 100644 index 32a48520..00000000 --- a/3.1/modules/developer/views/event.txt.php +++ /dev/null @@ -1,27 +0,0 @@ - - -/** - * 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 _event { - $unused): ?> - { - } - - -} diff --git a/3.1/modules/developer/views/installer.txt.php b/3.1/modules/developer/views/installer.txt.php deleted file mode 100644 index cf6662d5..00000000 --- a/3.1/modules/developer/views/installer.txt.php +++ /dev/null @@ -1,37 +0,0 @@ - - -/** - * 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 _installer { - static function install() { - $version = module::get_version(""); - if ($version == 0) { - /* @todo Put database creation here */ - module::set_version("", 1); - } - } - - static function upgrade($version) { - } - - static function uninstall() { - /* @todo Put database table drops here */ - module::delete(""); - } -} diff --git a/3.1/modules/developer/views/module_info.txt.php b/3.1/modules/developer/views/module_info.txt.php deleted file mode 100644 index 0ea06e7c..00000000 --- a/3.1/modules/developer/views/module_info.txt.php +++ /dev/null @@ -1,6 +0,0 @@ - -name = - -description = "" - -version = 1 diff --git a/3.1/modules/developer/views/mptt_tree.html.php b/3.1/modules/developer/views/mptt_tree.html.php deleted file mode 100644 index db6d4ffd..00000000 --- a/3.1/modules/developer/views/mptt_tree.html.php +++ /dev/null @@ -1,15 +0,0 @@ - -
    -

    - -

    -
    - -
    - - -
    -
    - -
    -
    diff --git a/3.1/modules/developer/views/theme.txt.php b/3.1/modules/developer/views/theme.txt.php deleted file mode 100644 index e4467f43..00000000 --- a/3.1/modules/developer/views/theme.txt.php +++ /dev/null @@ -1,157 +0,0 @@ - - -/** - * 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 _theme { - - static function album_blocks($theme) { - } - - - - static function album_bottom($theme) { - } - - - - static function album_top($theme) { - } - - - - static function admin_credits($theme) { - } - - - - static function admin_footer($theme) { - } - - - - static function admin_header_top($theme) { - } - - - - static function admin_header_bottom($theme) { - } - - - - static function admin_page_bottom($theme) { - } - - - - static function admin_page_top($theme) { - } - - - - static function admin_head($theme) { - } - - - - static function credits($theme) { - } - - - - static function dynamic_bottom($theme) { - } - - - - static function dynamic_top($theme) { - } - - - - static function footer($theme) { - } - - - - static function head($theme) { - } - - - - static function header_bottom($theme) { - } - - - - static function header_top($theme) { - } - - - - static function page_bottom($theme) { - } - - - - static function page_top($theme) { - } - - - - static function photo_blocks($theme) { - } - - - - static function photo_bottom($theme) { - } - - - - static function photo_top($theme) { - } - - - - static function sidebar_bottom($theme) { - } - - - - static function sidebar_top($theme) { - } - - - - static function thumb_bottom($theme, $child) { - } - - - - static function thumb_info($theme, $child) { - } - - - - static function thumb_top($theme, $child) { - } - - -} diff --git a/3.1/modules/displaytags/helpers/displaytags_block.php b/3.1/modules/displaytags/helpers/displaytags_block.php deleted file mode 100644 index 8fc530f1..00000000 --- a/3.1/modules/displaytags/helpers/displaytags_block.php +++ /dev/null @@ -1,54 +0,0 @@ - t("Display Tags")); - } - - static function get($block_id, $theme) { - $block = ""; - - // Make sure the current page belongs to an item. - if (!$theme->item()) { - return; - } - - switch ($block_id) { - case "display_tags": - // Create an array of all the tags for the current item. - $tagsItem = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $theme->item->id) - ->find_all(); - - // If the current item has at least one tag, display it/them. - if (count($tagsItem) > 0) { - $block = new Block(); - $block->css_id = "g-display-tags"; - $block->title = t("Tags"); - $block->content = new View("displaytags_block.html"); - $block->content->tags = $tagsItem; - } - - break; - } - return $block; - } -} diff --git a/3.1/modules/displaytags/helpers/displaytags_event.php b/3.1/modules/displaytags/helpers/displaytags_event.php deleted file mode 100644 index 7b92685e..00000000 --- a/3.1/modules/displaytags/helpers/displaytags_event.php +++ /dev/null @@ -1,37 +0,0 @@ -module == "tag") { - $data->messages["warn"][] = t("The DisplayTags module requires the Tags module."); - } - } - - static function module_change($changes) { - if (!module::is_active("tag") || in_array("tag", $changes->deactivate)) { - site_status::warning( - t("The DisplayTags module requires the Tags module. Activate the Tags module now", - array("url" => html::mark_clean(url::site("admin/modules")))), - "displaytags_needs_tag"); - } else { - site_status::clear("displaytags_needs_tag"); - } - } -} diff --git a/3.1/modules/displaytags/helpers/displaytags_installer.php b/3.1/modules/displaytags/helpers/displaytags_installer.php deleted file mode 100644 index 808def8a..00000000 --- a/3.1/modules/displaytags/helpers/displaytags_installer.php +++ /dev/null @@ -1,36 +0,0 @@ - -
    - - - - name) ?> - -
    diff --git a/3.1/modules/downloadalbum/controllers/downloadalbum.php b/3.1/modules/downloadalbum/controllers/downloadalbum.php deleted file mode 100644 index d11adcff..00000000 --- a/3.1/modules/downloadalbum/controllers/downloadalbum.php +++ /dev/null @@ -1,300 +0,0 @@ -is_album()) { - throw new Kohana_Exception('container is not an album: '.$container->relative_path()); - } - - $zipname = (empty($container->name)) - ? 'Gallery.zip' // @todo purified_version_of($container->title).'.zip' - : $container->name.'.zip'; - break; - - case "tag": - // @todo: if the module is not installed, it crash - $container = ORM::factory("tag", $id); - if (is_null($container->name)) { - throw new Kohana_Exception('container is not a tag: '.$id); - } - - $zipname = $container->name.'.zip'; - break; - - default: - throw new Kohana_Exception('unhandled container type: '.$container_type); - } - - $files = $this->getFilesList($container); - - // Calculate ZIP size (look behind for details) - $zipsize = 22; - foreach($files as $f_name => $f_path) { - $zipsize += 76 + 2*strlen($f_name) + filesize($f_path); - } - - // Send headers - $this->prepareOutput(); - $this->sendHeaders($zipname, $zipsize); - - // Generate and send ZIP file - // http://www.pkware.com/documents/casestudies/APPNOTE.TXT (v6.3.2) - $lfh_offset = 0; - $cds = ''; - $cds_offset = 0; - foreach($files as $f_name => $f_path) { - $f_namelen = strlen($f_name); - $f_size = filesize($f_path); - $f_mtime = $this->unix2dostime(filemtime($f_path)); - $f_crc32 = $this->fixBug45028(hexdec(hash_file('crc32b', $f_path, false))); - - // Local file header - echo pack('VvvvVVVVvva' . $f_namelen, - 0x04034b50, // local file header signature (4 bytes) - 0x0a, // version needed to extract (2 bytes) => 1.0 - 0x0800, // general purpose bit flag (2 bytes) => UTF-8 - 0x00, // compression method (2 bytes) => store - $f_mtime, // last mod file time and date (4 bytes) - $f_crc32, // crc-32 (4 bytes) - $f_size, // compressed size (4 bytes) - $f_size, // uncompressed size (4 bytes) - $f_namelen, // file name length (2 bytes) - 0, // extra field length (2 bytes) - - $f_name // file name (variable size) - // extra field (variable size) => n/a - ); - - // File data - readfile($f_path); - - // Data descriptor (n/a) - - // Central directory structure: File header - $cds .= pack('VvvvvVVVVvvvvvVVa' . $f_namelen, - 0x02014b50, // central file header signature (4 bytes) - 0x031e, // version made by (2 bytes) => v3 / Unix - 0x0a, // version needed to extract (2 bytes) => 1.0 - 0x0800, // general purpose bit flag (2 bytes) => UTF-8 - 0x00, // compression method (2 bytes) => store - $f_mtime, // last mod file time and date (4 bytes) - $f_crc32, // crc-32 (4 bytes) - $f_size, // compressed size (4 bytes) - $f_size, // uncompressed size (4 bytes) - $f_namelen, // file name length (2 bytes) - 0, // extra field length (2 bytes) - 0, // file comment length (2 bytes) - 0, // disk number start (2 bytes) - 0, // internal file attributes (2 bytes) - 0x81b40000, // external file attributes (4 bytes) => chmod 664 - $lfh_offset, // relative offset of local header (4 bytes) - - $f_name // file name (variable size) - // extra field (variable size) => n/a - // file comment (variable size) => n/a - ); - - // Update local file header/central directory structure offset - $cds_offset = $lfh_offset += 30 + $f_namelen + $f_size; - } - - // Archive decryption header (n/a) - // Archive extra data record (n/a) - - // Central directory structure: Digital signature (n/a) - echo $cds; // send Central directory structure - - // Zip64 end of central directory record (n/a) - // Zip64 end of central directory locator (n/a) - - // End of central directory record - $numfile = count($files); - $cds_len = strlen($cds); - echo pack('VvvvvVVv', - 0x06054b50, // end of central dir signature (4 bytes) - 0, // number of this disk (2 bytes) - 0, // number of the disk with the start of - // the central directory (2 bytes) - $numfile, // total number of entries in the - // central directory on this disk (2 bytes) - $numfile, // total number of entries in the - // central directory (2 bytes) - $cds_len, // size of the central directory (4 bytes) - $cds_offset, // offset of start of central directory - // with respect to the - // starting disk number (4 bytes) - 0 // .ZIP file comment length (2 bytes) - // .ZIP file comment (variable size) - ); - } - - - /** - * Return the files that must be included in the archive. - */ - private function getFilesList($container) { - $files = array(); - - if( $container instanceof Item_Model && $container->is_album() ) { - $container_realpath = realpath($container->file_path().'/../'); - - $items = $container->viewable() - ->descendants(null, null, array(array("type", "<>", "album"))); - foreach($items as $i) { - if (!access::can('view_full', $i)) { - continue; - } - - $i_realpath = realpath($i->file_path()); - if (!is_readable($i_realpath)) { - continue; - } - - $i_relative_path = str_replace($container_realpath.DIRECTORY_SEPARATOR, '', $i_realpath); - $i_relative_path = str_replace(DIRECTORY_SEPARATOR, '/', $i_relative_path); - $files[$i_relative_path] = $i_realpath; - } - - } else if( $container instanceof Tag_Model ) { - $items = $container->items(); - foreach($items as $i) { - if (!access::can('view_full', $i)) { - continue; - } - - if( $i->is_album() ) { - foreach($this->getFilesList($i) as $f_name => $f_path) { - $files[$container->name.'/'.$f_name] = $f_path; - } - - } else { - $i_realpath = realpath($i->file_path()); - if (!is_readable($i_realpath)) { - continue; - } - - $i_relative_path = $container->name.'/'.$i->name; - $files[$i_relative_path] = $i_realpath; - } - } - } - - if (count($files) === 0) { - throw new Kohana_Exception('no zippable files in ['.$container->name.']'); - } - - return $files; - } - - - /** - * See system/helpers/download.php - */ - private function prepareOutput() { - // Close output buffers - Kohana::close_buffers(FALSE); - // Clear any output - Event::add('system.display', create_function('', 'Kohana::$output = "";')); - } - - /** - * See system/helpers/download.php - */ - private function sendHeaders($filename, $filesize = null) { - if (!is_null($filesize)) { - header('Content-Length: '.$filesize); - } - - // Retrieve MIME type by extension - $mime = Kohana::config('mimes.'.strtolower(substr(strrchr($filename, '.'), 1))); - $mime = empty($mime) ? 'application/octet-stream' : $mime[0]; - header("Content-Type: $mime"); - header('Content-Transfer-Encoding: binary'); - - // Send headers necessary to invoke a "Save As" dialog - header('Content-Disposition: attachment; filename="'.$filename.'"'); - - // Prevent caching - header('Expires: Thu, 01 Jan 1970 00:00:00 GMT'); - - $pragma = 'no-cache'; - $cachecontrol = 'no-cache, max-age=0'; - - // request::user_agent('browser') seems bugged - if (request::user_agent('browser') === 'Internet Explorer' - || stripos(request::user_agent(), 'msie') !== false - || stripos(request::user_agent(), 'internet explorer') !== false) - { - if (request::protocol() === 'https') { - // See http://support.microsoft.com/kb/323308/en-us - $pragma = 'cache'; - $cachecontrol = 'private'; - - } else if (request::user_agent('version') <= '6.0') { - $pragma = ''; - $cachecontrol = 'must-revalidate, post-check=0, pre-check=0'; - } - } - - header('Pragma: '.$pragma); - header('Cache-Control: '.$cachecontrol); - } - - /** - * @return integer DOS date and time - * @param integer _timestamp Unix timestamp - * @desc returns DOS date and time of the timestamp - */ - private function unix2dostime($timestamp) - { - $timebit = getdate($timestamp); - - if ($timebit['year'] < 1980) { - return (1 << 21 | 1 << 16); - } - - $timebit['year'] -= 1980; - - return ($timebit['year'] << 25 | $timebit['mon'] << 21 | - $timebit['mday'] << 16 | $timebit['hours'] << 11 | - $timebit['minutes'] << 5 | $timebit['seconds'] >> 1); - } - - /** - * See http://bugs.php.net/bug.php?id=45028 - */ - private function fixBug45028($hash) { - $output = $hash; - - if( version_compare(PHP_VERSION, '5.2.7', '<') ) { - $str = str_pad(dechex($hash), 8, '0', STR_PAD_LEFT); - $output = hexdec($str{6}.$str{7}.$str{4}.$str{5}.$str{2}.$str{3}.$str{0}.$str{1}); - } - - return $output; - } -} diff --git a/3.1/modules/downloadalbum/css/downloadalbum_menu.css b/3.1/modules/downloadalbum/css/downloadalbum_menu.css deleted file mode 100644 index e3c4c67e..00000000 --- a/3.1/modules/downloadalbum/css/downloadalbum_menu.css +++ /dev/null @@ -1,3 +0,0 @@ -#g-view-menu #g-download-album-link { - background-image: url('../images/ico-view-downloadalbum.png'); -} diff --git a/3.1/modules/downloadalbum/helpers/downloadalbum_event.php b/3.1/modules/downloadalbum/helpers/downloadalbum_event.php deleted file mode 100644 index e8159003..00000000 --- a/3.1/modules/downloadalbum/helpers/downloadalbum_event.php +++ /dev/null @@ -1,40 +0,0 @@ -item->id}"); - $menu - ->append(Menu::factory("link") - ->id("downloadalbum") - ->label(t("Download Album")) - ->url($downloadLink) - ->css_id("g-download-album-link")); - } - - static function tag_menu($menu, $theme) { - $downloadLink = url::site("downloadalbum/zip/tag/{$theme->tag()->id}"); - $menu - ->append(Menu::factory("link") - ->id("downloadalbum") - ->label(t("Download Album")) - ->url($downloadLink) - ->css_id("g-download-album-link")); - } -} diff --git a/3.1/modules/downloadalbum/helpers/downloadalbum_theme.php b/3.1/modules/downloadalbum/helpers/downloadalbum_theme.php deleted file mode 100644 index 8cda59fc..00000000 --- a/3.1/modules/downloadalbum/helpers/downloadalbum_theme.php +++ /dev/null @@ -1,24 +0,0 @@ -css("downloadalbum_menu.css"); - } -} diff --git a/3.1/modules/downloadalbum/images/ico-view-downloadalbum.png b/3.1/modules/downloadalbum/images/ico-view-downloadalbum.png deleted file mode 100644 index ce7804d2..00000000 Binary files a/3.1/modules/downloadalbum/images/ico-view-downloadalbum.png and /dev/null differ diff --git a/3.1/modules/downloadalbum/module.info b/3.1/modules/downloadalbum/module.info deleted file mode 100644 index f547fd4a..00000000 --- a/3.1/modules/downloadalbum/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "DownloadAlbum" -description = "Displays a link to download a ZIP archive of the current album." -version = 2 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:downloadalbum" -discuss_url = "http://gallery.menalto.com/forum_module_downloadalbum" diff --git a/3.1/modules/downloadfullsize/controllers/admin_downloadfullsize.php b/3.1/modules/downloadfullsize/controllers/admin_downloadfullsize.php deleted file mode 100644 index 6836c9c8..00000000 --- a/3.1/modules/downloadfullsize/controllers/admin_downloadfullsize.php +++ /dev/null @@ -1,93 +0,0 @@ -content = new View("admin_downloadfullsize.html"); - $view->content->downloadlinks_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Figure out which boxes where checked - $dlLinks_array = Input::instance()->post("DownloadLinkOptions"); - $fButton = false; - $download_original_button = false; - for ($i = 0; $i < count($dlLinks_array); $i++) { - if ($dlLinks_array[$i] == "fButton") { - $fButton = true; - } - } - - if (module::is_active("keeporiginal")) { - $keeporiginal_array = Input::instance()->post("DownloadOriginalOptions"); - for ($i = 0; $i < count($keeporiginal_array); $i++) { - if ($keeporiginal_array[$i] == "DownloadOriginalImage") { - $download_original_button = true; - } - } - module::set_var("downloadfullsize", "DownloadOriginalImage", $download_original_button); - } - - // Save Settings. - module::set_var("downloadfullsize", "fButton", $fButton); - message::success(t("Your Selection Has Been Saved.")); - - // Load Admin page. - $view = new Admin_View("admin.html"); - $view->content = new View("admin_downloadfullsize.html"); - $view->content->downloadlinks_form = $this->_get_admin_form(); - print $view; - - } - - private function _get_admin_form() { - // Make a new Form. - $form = new Forge("admin/downloadfullsize/saveprefs", "", "post", - array("id" => "g-download-fullsize-adminForm")); - - // Make an array for the different types of download links. - $linkOptions["fButton"] = array(t("Show Floppy Disk Picture Link"), module::get_var("downloadfullsize", "fButton")); - - // Setup a few checkboxes on the form. - $add_links = $form->group("DownloadLinks"); - $add_links->checklist("DownloadLinkOptions") - ->options($linkOptions); - - if (module::is_active("keeporiginal")) { - $KeepOriginalOptions["DownloadOriginalImage"] = array(t("Allow visitors to download the original image when available?"), module::get_var("downloadfullsize", "DownloadOriginalImage")); - $keeporiginal_group = $form->group("KeepOriginalPrefs") - ->label(t("KeepOriginal Preferences")); - $keeporiginal_group->checklist("DownloadOriginalOptions") - ->options($KeepOriginalOptions); - } - - // Add a save button to the form. - $form->submit("SaveLinks")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} \ No newline at end of file diff --git a/3.1/modules/downloadfullsize/controllers/downloadfullsize.php b/3.1/modules/downloadfullsize/controllers/downloadfullsize.php deleted file mode 100644 index b678a1a8..00000000 --- a/3.1/modules/downloadfullsize/controllers/downloadfullsize.php +++ /dev/null @@ -1,37 +0,0 @@ -is_photo() && module::get_var("downloadfullsize", "DownloadOriginalImage")) { - $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - if (file_exists($original_image)) { - download::force($original_image); - } else { - download::force($item->file_path()); - } - } else { - download::force($item->file_path()); - } - } -} diff --git a/3.1/modules/downloadfullsize/css/downloadfullsize_menu.css b/3.1/modules/downloadfullsize/css/downloadfullsize_menu.css deleted file mode 100644 index a608a66a..00000000 --- a/3.1/modules/downloadfullsize/css/downloadfullsize_menu.css +++ /dev/null @@ -1,3 +0,0 @@ -#g-view-menu #g-download-fullsize-link { - background-image: url('../images/ico-view-downloadfullsize.png'); -} diff --git a/3.1/modules/downloadfullsize/helpers/downloadfullsize_block.php b/3.1/modules/downloadfullsize/helpers/downloadfullsize_block.php deleted file mode 100644 index 50e9558d..00000000 --- a/3.1/modules/downloadfullsize/helpers/downloadfullsize_block.php +++ /dev/null @@ -1,51 +0,0 @@ - t("Download Item")); - } - - static function get($block_id, $theme) { - $item = $theme->item; - switch ($block_id) { - case "downloadfullsize": - - // If Item is movie then... - if ($item && $item->is_movie() && access::can("view_full", $item)) { - $block = new Block(); - $block->css_id = "g-download-fullsize"; - $block->title = t("Download Movie"); - $block->content = new View("downloadfullsize_block.html"); - return $block; - } - - // If Item is photo then... - if ($item && $item->is_photo() && access::can("view_full", $item)) { - $block = new Block(); - $block->css_id = "g-download-fullsize"; - $block->title = t("Download Photo"); - $block->content = new View("downloadfullsize_block.html"); - return $block; - } - } - return ""; - } - -} diff --git a/3.1/modules/downloadfullsize/helpers/downloadfullsize_event.php b/3.1/modules/downloadfullsize/helpers/downloadfullsize_event.php deleted file mode 100644 index a9aa86e2..00000000 --- a/3.1/modules/downloadfullsize/helpers/downloadfullsize_event.php +++ /dev/null @@ -1,57 +0,0 @@ -item)) { - if (module::get_var("downloadfullsize", "fButton")) { - $downloadLink = url::site("downloadfullsize/send/{$theme->item->id}"); - $menu - ->append(Menu::factory("link") - ->id("downloadfullsize") - ->label(t("Download Fullsize Image")) - ->url($downloadLink) - ->css_id("g-download-fullsize-link")); - } - } - } - - static function movie_menu($menu, $theme) { - if (access::can("view_full", $theme->item)) { - if (module::get_var("downloadfullsize", "fButton")) { - $downloadLink = url::site("downloadfullsize/send/{$theme->item->id}"); - $menu - ->append(Menu::factory("link") - ->id("downloadfullsize") - ->label(t("Download Video")) - ->url($downloadLink) - ->css_id("g-download-fullsize-link")); - } - } - } - - static function admin_menu($menu, $theme) { - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("downloadfullsize") - ->label(t("Download Photo Links")) - ->url(url::site("admin/downloadfullsize"))); - } - -} diff --git a/3.1/modules/downloadfullsize/helpers/downloadfullsize_theme.php b/3.1/modules/downloadfullsize/helpers/downloadfullsize_theme.php deleted file mode 100644 index 547d3549..00000000 --- a/3.1/modules/downloadfullsize/helpers/downloadfullsize_theme.php +++ /dev/null @@ -1,26 +0,0 @@ -item && access::can("view_full", $theme->item)) { - return $theme->css("downloadfullsize_menu.css"); - } - } -} diff --git a/3.1/modules/downloadfullsize/images/ico-view-downloadfullsize.png b/3.1/modules/downloadfullsize/images/ico-view-downloadfullsize.png deleted file mode 100644 index ce7804d2..00000000 Binary files a/3.1/modules/downloadfullsize/images/ico-view-downloadfullsize.png and /dev/null differ diff --git a/3.1/modules/downloadfullsize/module.info b/3.1/modules/downloadfullsize/module.info deleted file mode 100644 index b2cc3915..00000000 --- a/3.1/modules/downloadfullsize/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "DownloadFullsize" -description = "Displays a link to download the fullsize version of the current photo." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:downloadfullsize" -discuss_url = "http://gallery.menalto.com/node/103278" diff --git a/3.1/modules/downloadfullsize/views/admin_downloadfullsize.html.php b/3.1/modules/downloadfullsize/views/admin_downloadfullsize.html.php deleted file mode 100644 index 5dc5cef6..00000000 --- a/3.1/modules/downloadfullsize/views/admin_downloadfullsize.html.php +++ /dev/null @@ -1,5 +0,0 @@ - -
    -

    - -
    diff --git a/3.1/modules/downloadfullsize/views/downloadfullsize_block.html.php b/3.1/modules/downloadfullsize/views/downloadfullsize_block.html.php deleted file mode 100644 index a9ccc2a6..00000000 --- a/3.1/modules/downloadfullsize/views/downloadfullsize_block.html.php +++ /dev/null @@ -1,18 +0,0 @@ - - -item->is_photo()) { ?> - - - -item->is_movie()) { ?> - - - diff --git a/3.1/modules/dynamic/controllers/admin_dynamic.php b/3.1/modules/dynamic/controllers/admin_dynamic.php deleted file mode 100644 index 0f87329f..00000000 --- a/3.1/modules/dynamic/controllers/admin_dynamic.php +++ /dev/null @@ -1,81 +0,0 @@ -_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - foreach (array("updates", "popular") as $album) { - $album_defn = unserialize(module::get_var("dynamic", $album)); - $group = $form->inputs[$album]; - $album_defn->enabled = $group->inputs["{$album}_enabled"]->value; - $album_defn->description = $group->inputs["{$album}_description"]->value; - $album_defn->limit = $group->inputs["{$album}_limit"] === "" ? null : - $group->inputs["{$album}_limit"]->value; - module::set_var("dynamic", $album, serialize($album_defn)); - } - - message::success(t("Dynamic Albums Configured")); - - url::redirect("admin/dynamic"); - } - - print $this->_get_view($form); - } - - private function _get_view($form=null) { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_dynamic.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - - $form = new Forge("admin/dynamic/handler", "", "post", - array("id" => "g-admin-form")); - - foreach (array("updates", "popular") as $album) { - $album_defn = unserialize(module::get_var("dynamic", $album)); - - $group = $form->group($album)->label(t($album_defn->title)); - $group->checkbox("{$album}_enabled") - ->label(t("Enable")) - ->value(1) - ->checked($album_defn->enabled); - $group->input("{$album}_limit") - ->label(t("Limit (leave empty for unlimited)")) - ->value(empty($album_defn->limit) ? "" : $album_defn->limit) - ->rules("valid_numeric"); - $group->textarea("{$album}_description") - ->label(t("Description")) - ->rules("length[0,2048]") - ->value($album_defn->description); - } - - $form->submit("submit")->value(t("Submit")); - - return $form; - } -} \ No newline at end of file diff --git a/3.1/modules/dynamic/controllers/dynamic.php b/3.1/modules/dynamic/controllers/dynamic.php deleted file mode 100644 index 10a7a6f5..00000000 --- a/3.1/modules/dynamic/controllers/dynamic.php +++ /dev/null @@ -1,66 +0,0 @@ -_show("updates", t("Recent changes")); - } - - public function popular() { - print $this->_show("popular", t("Most viewed")); - } - - private function _show($album) { - $page_size = module::get_var("gallery", "page_size", 9); - $page = Input::instance()->get("page", "1"); - - $album_defn = unserialize(module::get_var("dynamic", $album)); - $display_limit = $album_defn->limit; - $children_count = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->count_all(); - if (!empty($display_limit)) { - $children_count = min($children_count, $display_limit); - } - - $offset = ($page - 1) * $page_size; - $max_pages = max(ceil($children_count / $page_size), 1); - - // Make sure that the page references a valid offset - if ($page < 1 || ($children_count && $page > ceil($children_count / $page_size))) { - throw new Kohana_404_Exception(); - } - - $template = new Theme_View("page.html", "collection", "dynamic"); - $template->set_global("page", $page); - $template->set_global("page_size", $page_size); - $template->set_global("max_pages", $max_pages); - $template->set_global("children", ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->order_by($album_defn->key_field, "DESC") - ->find_all($page_size, $offset)); - $template->set_global("children_count", $children_count); - $template->content = new View("dynamic.html"); - $template->content->title = t($album_defn->title); - - print $template; - } - -} \ No newline at end of file diff --git a/3.1/modules/dynamic/helpers/dynamic_block.php b/3.1/modules/dynamic/helpers/dynamic_block.php deleted file mode 100644 index bf7dcd8f..00000000 --- a/3.1/modules/dynamic/helpers/dynamic_block.php +++ /dev/null @@ -1,47 +0,0 @@ - t("Dynamic Albums")); - } - - static function get($block_id) { - switch ($block_id) { - case "dynamic": - $albums = array(); - foreach (array("updates", "popular") as $album) { - $album_defn = unserialize(module::get_var("dynamic", $album)); - if ($album_defn->enabled) { - $albums[$album] = $album_defn->title; - } - } - - if (!empty($albums)) { - $block = new Block(); - $block->css_id = "g-dynamic"; - $block->title = t("Dynamic Albums"); - $block->content = new View("dynamic_block.html"); - $block->content->albums = $albums; - return $block; - } - } - return ""; - } - -} diff --git a/3.1/modules/dynamic/helpers/dynamic_event.php b/3.1/modules/dynamic/helpers/dynamic_event.php deleted file mode 100644 index ab4c6c9a..00000000 --- a/3.1/modules/dynamic/helpers/dynamic_event.php +++ /dev/null @@ -1,27 +0,0 @@ -get("content_menu") - ->append(Menu::factory("link") - ->id("dynamic_menu") - ->label(t("Dynamic Albums")) - ->url(url::site("admin/dynamic"))); - } -} diff --git a/3.1/modules/dynamic/helpers/dynamic_installer.php b/3.1/modules/dynamic/helpers/dynamic_installer.php deleted file mode 100644 index c83479bb..00000000 --- a/3.1/modules/dynamic/helpers/dynamic_installer.php +++ /dev/null @@ -1,40 +0,0 @@ - false, - "limit" => null, - "description" => "", - "key_field" => "view_count", - "title" => t("Most viewed")))); - module::set_var( - "dynamic", "updates", - serialize((object)array("enabled" => false, - "limit" => null, - "description" => "", - "key_field" => "created", - "title" => t("Recent changes")))); - module::set_version("dynamic", 1); - } - } -} diff --git a/3.1/modules/dynamic/module.info b/3.1/modules/dynamic/module.info deleted file mode 100644 index 3e2bae30..00000000 --- a/3.1/modules/dynamic/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Dynamic" -description = "Adds the Recent Changes and Most Viewed dynamic albums" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:dynamic" -discuss_url = "http://gallery.menalto.com/forum_module_dynamic" diff --git a/3.1/modules/dynamic/views/admin_dynamic.html.php b/3.1/modules/dynamic/views/admin_dynamic.html.php deleted file mode 100644 index b810de01..00000000 --- a/3.1/modules/dynamic/views/admin_dynamic.html.php +++ /dev/null @@ -1,8 +0,0 @@ - -
    -

    - -
    - -
    -
    diff --git a/3.1/modules/dynamic/views/dynamic_block.html.php b/3.1/modules/dynamic/views/dynamic_block.html.php deleted file mode 100644 index febf5d3f..00000000 --- a/3.1/modules/dynamic/views/dynamic_block.html.php +++ /dev/null @@ -1,10 +0,0 @@ - -
    -
      - $text): ?> -
    • - "> -
    • - -
    -
    diff --git a/3.1/modules/ecard/controllers/admin_ecard.php b/3.1/modules/ecard/controllers/admin_ecard.php deleted file mode 100644 index 1608b0e1..00000000 --- a/3.1/modules/ecard/controllers/admin_ecard.php +++ /dev/null @@ -1,84 +0,0 @@ -page_title = t("eCard settings"); - $view->content = new View("admin_ecard.html"); - $view->content->form = $this->_get_admin_form(); - print $view; - } - - public function save() { - access::verify_csrf(); - $form = $this->_get_admin_form(); - if ($form->validate()) { - module::set_var("ecard","send_plain",$form->ecard->send_plain->value); - module::set_var("ecard", "sender", $form->ecard->sender->value); - module::set_var("ecard", "bcc", $form->ecard->bcc->value); - module::set_var("ecard", "subject", $form->ecard->subject->value); - module::set_var("ecard", "message", $form->ecard->message->value); - module::set_var("ecard", "max_length", $form->ecard->max_length->value); - module::set_var("ecard", "access_permissions", $form->ecard->access_permissions->value); - module::set_var("ecard", "location", $form->ecard->location->value); - message::success(t("eCard settings updated")); - url::redirect("admin/ecard"); - } else { - print $form; - } - } - - private function _get_admin_form() { - $form = new Forge("admin/ecard/save", "", "post", array("id" => "g-ecard-admin-form")); - $ecard_settings = $form->group("ecard")->label(t("eCard settings")); - $ecard_settings->input("sender") - ->label(t("E-mail sender (leave blank for a user-defined address)")) - ->value(module::get_var("ecard", "sender", "")); - $ecard_settings->input("bcc") - ->label(t("BCC (optional)")) - ->value(module::get_var("ecard", "bcc", "")); - $ecard_settings->input("subject")->label(t("E-mail subject")) - ->value(module::get_var("ecard", "subject")); - $ecard_settings->textarea("message")->label(t("E-mail message. Valid keywords are \"%fromname\" (sender's name))")) - ->value(module::get_var("ecard", "message")); - $ecard_settings->input("max_length") - ->label(t("Maximum message length")) - ->value(module::get_var("ecard","max_length")); - if(module::is_active("watermark")) { - $ecard_settings->checkbox("send_plain") - ->label(t("Allow users to send non-watermarked versions")) - ->value(true) - ->checked(module::get_var("ecard","send_plain")); - } - $ecard_settings->dropdown("access_permissions") - ->label(t("Who can send eCards?")) - ->options(array("everybody" => t("Everybody"), - "registered_users" => t("Only registered users"))) - ->selected(module::get_var("ecard", "access_permissions")); - $ecard_settings->dropdown("location") - ->label(t("Where should the eCard link be displayed?")) - ->options(array("top" => t("At the top of the sidebar as an icon"), - "sidebar" => t("In the sidebar as a button"))) - ->selected(module::get_var("ecard", "location")); - $ecard_settings->submit("save")->value(t("Save")); - return $form; - } -} - diff --git a/3.1/modules/ecard/controllers/ecard.php b/3.1/modules/ecard/controllers/ecard.php deleted file mode 100644 index 8e1a389b..00000000 --- a/3.1/modules/ecard/controllers/ecard.php +++ /dev/null @@ -1,124 +0,0 @@ -validate(); - } catch (ORM_Validation_Exception $e) { - // Translate ORM validation errors into form error messages - foreach ($e->validation->errors() as $key => $error) { - $form->edit_item->inputs[$key]->add_error($error, 1); - } - $valid = false; - } - - if ($valid) { - $v = new View("ecard_email.html"); - $v->item = $item; - $v->subject = module::get_var("ecard", "subject"); - $from_name = $form->send_ecard->from_name->value; - $bcc = module::get_var("ecard", "bcc"); - if($form->send_ecard->send_to_self->checked == true) { - $cc = $form->send_ecard->inputs["from_email"]->value; - } - $v->message = t(module::get_var("ecard", "message"), array("fromname" => $from_name)); - $v->custom_message = $form->send_ecard->text->value; - $v->image = $item->name; - $from = $form->send_ecard->inputs["from_email"]->value; - - require_once(MODPATH. "ecard/lib/mime.php"); - $mime = new Mail_mime("\n"); - $mime->setHTMLBody($v->render()); - if($form->send_ecard->send_fresh->checked == true) { - $tmpfile = tempnam(TMPPATH, "clean"); - if($form->send_ecard->send_thumbnail->checked == true) { - $options = array("width" => module::get_var("gallery", "thumb_size"), "height" => module::get_var("gallery", "thumb_size"), "master" => Image::AUTO); - gallery_graphics::resize($item->file_path(), $tmpfile, $options, $item); - $mime->addHTMLImage($tmpfile,$item->mime_type,$item->name); - } else { - $options = array("width" => module::get_var("gallery", "resize_size"), "height" => module::get_var("gallery", "resize_size"), "master" => Image::AUTO); - gallery_graphics::resize($item->file_path(), $tmpfile, $options, $item); - $mime->addHTMLImage($tmpfile,$item->mime_type,$item->name); - } - } else { - if($form->send_ecard->send_thumbnail->checked == true) { - $mime->addHTMLImage($item->thumb_path(),$item->mime_type,$item->name); - } else { - $mime->addHTMLImage($item->resize_path(),$item->mime_type,$item->name); - } - } - $body = $mime->get(array('html_charset' => 'UTF-8', 'text_charset' => 'UTF-8','text_encoding' => '8bit','head_charset' => 'UTF-8')); - - $to_array = explode(",",$form->send_ecard->inputs["to_email"]->value); - foreach($to_array as $to) { - $headers = array("from" => $from_name."<".$from.">", "to" => trim($to), "subject" => module::get_var("ecard", "subject")); - self::_notify($headers['to'], $headers['from'], $headers['subject'], $item, $body, $mime->headers(), $bcc, $cc); - } - unlink($tmpfile); - message::success("eCard successfully sent to ".$form->send_ecard->inputs["to_email"]->value); - json::reply(array("result" => "success")); - } else { - json::reply(array("result" => "error", "html" => (string) $form)); - } - } - /** - * Present a form for sending a new ecard. - */ - public function form_send($item_id) { - $item = ORM::factory("item", $item_id); - access::required("view", $item); - if (!ecard::can_send_ecard()) { - access::forbidden(); - } - $v_form = new View("ecard_form.html"); - $v_form->item_id = $item_id; - print $v_form->render(); - } - private static function _notify($to, $from, $subject, $item, $text, $headers, $bcc, $cc) { - $sendmail = Sendmail::factory(); - $sendmail - ->to($to) - ->from($from) - ->subject($subject); - if(isset($bcc)) { - $sendmail->header("bcc",$bcc); - } - if(isset($cc)) { - $sendmail->header("cc",$cc); - } - foreach($headers as $key => $value) { - $sendmail->header($key,$value); - } - $sendmail - ->message($text) - ->send(); - return; - } -} diff --git a/3.1/modules/ecard/css/ecard.css b/3.1/modules/ecard/css/ecard.css deleted file mode 100644 index 89a86669..00000000 --- a/3.1/modules/ecard/css/ecard.css +++ /dev/null @@ -1,7 +0,0 @@ -#g-send-ecard { - width: 16px; - height: 16px; - float: left; - margin-right: .2em; - background-image: url(../images/email_go.png); -} diff --git a/3.1/modules/ecard/helpers/ecard.php b/3.1/modules/ecard/helpers/ecard.php deleted file mode 100644 index a786521b..00000000 --- a/3.1/modules/ecard/helpers/ecard.php +++ /dev/null @@ -1,89 +0,0 @@ - "g-ecard-form")); - $group = $form->group("send_ecard")->label(t("Send eCard")); - $group->input("from_name") - ->label(t("Your name")) - ->id("g-author") - ->rules("required") - ->error_messages("required", t("You must enter a name for yourself")); - $group->input("from_email") - ->label(t("Your e-mail")) - ->id("g-email") - ->rules("required|valid_email") - ->error_messages("required", t("You must enter a valid email address")) - ->error_messages("invalid", t("You must enter a valid email address")); - $group->input("to_email") - ->label(t("Recipient's e-mail. Separate multiple recipients with a comma.")) - ->id("g-recip-email") - ->rules("required") - ->error_messages("required", t("You must enter a valid email address")); - $group->textarea("text") - ->label(t("Message (".module::get_var("ecard","max_length")." chars max)")) - ->id("g-text") - ->maxlength(module::get_var("ecard","max_length")) - ->rules("required") - ->error_messages("required", t("You must enter a message")); - $group->checkbox("send_to_self") - ->label(t("Send yourself a copy")) - ->value(true) - ->checked(false); - $group->checkbox("send_thumbnail") - ->label(t("Send thumbnail image, instead of resized image.")) - ->value(true) - ->checked(false); - if(module::get_var("ecard","send_plain") == true && module::is_active("watermark")) { - $group->checkbox("send_fresh") - ->label(t("Send non-watermarked image.")) - ->value(true) - ->checked(false); - } - $group->hidden("item_id")->value($item_id); - module::event("ecard_send_form", $form); - module::event("captcha_protect_form", $form); - $group->submit("")->value(t("Send"))->class("ui-state-default ui-corner-all"); - - return $form; - } - - static function prefill_send_form($form) { - $active = identity::active_user(); - if (!$active->guest) { - $group = $form->send_ecard; - $group->inputs["from_name"]->value($active->full_name); - $group->from_email->value($active->email); - } - return $form; - } - - static function can_send_ecard() { - return !identity::active_user()->guest || - module::get_var("ecard", "access_permissions") == "everybody"; - } -} - diff --git a/3.1/modules/ecard/helpers/ecard_block.php b/3.1/modules/ecard/helpers/ecard_block.php deleted file mode 100644 index d90755ab..00000000 --- a/3.1/modules/ecard/helpers/ecard_block.php +++ /dev/null @@ -1,39 +0,0 @@ - t("eCard")); - } - - static function get($block_id, $theme) { - $block = ""; - switch ($block_id) { - case "ecard": - if ($theme->item() && $theme->item()->is_photo() && module::get_var("ecard", "location") == "sidebar") { - $block = new Block(); - $block->css_id = "g-sendecard"; - $block->title = t("eCard"); - $block->content = new View("ecard_block.html"); - } - break; - } - return $block; - } -} \ No newline at end of file diff --git a/3.1/modules/ecard/helpers/ecard_event.php b/3.1/modules/ecard/helpers/ecard_event.php deleted file mode 100644 index ebbd5442..00000000 --- a/3.1/modules/ecard/helpers/ecard_event.php +++ /dev/null @@ -1,40 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("ecard") - ->label(t("eCard settings")) - ->url(url::site("admin/ecard"))); - } - - static function photo_menu($menu, $theme) { - if (module::get_var("ecard", "location") == "top") { - $item = $theme->item(); - $menu->append(Menu::factory("link") - ->id("ecard") - ->label(t("Send as eCard")) - ->url(url::site("ecard/form_send/{$item->id}")) - ->css_class("g-dialog-link ui-icon-ecard") - ->css_id("g-send-ecard")); - } - } -} diff --git a/3.1/modules/ecard/helpers/ecard_installer.php b/3.1/modules/ecard/helpers/ecard_installer.php deleted file mode 100644 index 8464be49..00000000 --- a/3.1/modules/ecard/helpers/ecard_installer.php +++ /dev/null @@ -1,52 +0,0 @@ -css("ecard.css"); - } -} \ No newline at end of file diff --git a/3.1/modules/ecard/images/email_go.png b/3.1/modules/ecard/images/email_go.png deleted file mode 100644 index 4a6c5d39..00000000 Binary files a/3.1/modules/ecard/images/email_go.png and /dev/null differ diff --git a/3.1/modules/ecard/lib/mime.php b/3.1/modules/ecard/lib/mime.php deleted file mode 100644 index 50616189..00000000 --- a/3.1/modules/ecard/lib/mime.php +++ /dev/null @@ -1,912 +0,0 @@ - | -// | Tomas V.V.Cox (port to PEAR) | -// +-----------------------------------------------------------------------+ -// - -if (!class_exists('Mail_mimePart')) { - require_once(MODPATH . "ecard/lib/mimePart.php"); -} -if (class_exists('Mail_mime')) return; - -/** - * Mime mail composer class. Can handle: text and html bodies, embedded html - * images and attachments. - * Documentation and examples of this class are avaible here: - * http://pear.php.net/manual/ - * - * @notes This class is based on HTML Mime Mail class from - * Richard Heyes which was based also - * in the mime_mail.class by Tobias Ratschiller and - * Sascha Schumann - * - * @author Richard Heyes - * @author Tomas V.V.Cox - * @package Mail - * @access public - */ -class Mail_mime -{ - /** - * Contains the plain text part of the email - * @var string - */ - var $_txtbody; - /** - * Contains the html part of the email - * @var string - */ - var $_htmlbody; - /** - * contains the mime encoded text - * @var string - */ - var $_mime; - /** - * contains the multipart content - * @var string - */ - var $_multipart; - /** - * list of the attached images - * @var array - */ - var $_html_images = array(); - /** - * list of the attachements - * @var array - */ - var $_parts = array(); - /** - * Build parameters - * @var array - */ - var $_build_params = array(); - /** - * Headers for the mail - * @var array - */ - var $_headers = array(); - /** - * End Of Line sequence (for serialize) - * @var string - */ - var $_eol; - - - /** - * Constructor function - * - * @access public - */ - function Mail_mime($crlf = "\r\n") - { - $this->_setEOL($crlf); - $this->_build_params = array( - 'head_encoding' => 'quoted-printable', - 'text_encoding' => '7bit', - 'html_encoding' => 'quoted-printable', - '7bit_wrap' => 998, - 'html_charset' => 'ISO-8859-1', - 'text_charset' => 'ISO-8859-1', - 'head_charset' => 'ISO-8859-1' - ); - } - - /** - * Wakeup (unserialize) - re-sets EOL constant - * - * @access private - */ - function __wakeup() - { - $this->_setEOL($this->_eol); - } - - /** - * Accessor function to set the body text. Body text is used if - * it's not an html mail being sent or else is used to fill the - * text/plain part that emails clients who don't support - * html should show. - * - * @param string $data Either a string or - * the file name with the contents - * @param bool $isfile If true the first param should be treated - * as a file name, else as a string (default) - * @param bool $append If true the text or file is appended to - * the existing body, else the old body is - * overwritten - * @return mixed true on success or PEAR_Error object - * @access public - */ - function setTXTBody($data, $isfile = false, $append = false) - { - if (!$isfile) { - if (!$append) { - $this->_txtbody = $data; - } else { - $this->_txtbody .= $data; - } - } else { - $cont = $this->_file2str($data); - if (!isset($cont) /*PEAR::isError($cont)*/) { - return $cont; - } - if (!$append) { - $this->_txtbody = $cont; - } else { - $this->_txtbody .= $cont; - } - } - return true; - } - - /** - * Adds a html part to the mail - * - * @param string $data Either a string or the file name with the - * contents - * @param bool $isfile If true the first param should be treated - * as a file name, else as a string (default) - * @return mixed true on success or PEAR_Error object - * @access public - */ - function setHTMLBody($data, $isfile = false) - { - if (!$isfile) { - $this->_htmlbody = $data; - } else { - $cont = $this->_file2str($data); - if (!isset($cont) /*PEAR::isError($cont)*/) { - return $cont; - } - $this->_htmlbody = $cont; - } - - return true; - } - - /** - * Adds an image to the list of embedded images. - * - * @param string $file The image file name OR image data itself - * @param string $c_type The content type - * @param string $name The filename of the image. - * Only use if $file is the image data - * @param bool $isfilename Whether $file is a filename or not - * Defaults to true - * @return mixed true on success or PEAR_Error object - * @access public - */ - function addHTMLImage($file, $c_type='application/octet-stream', - $name = '', $isfilename = true) - { - $filedata = ($isfilename === true) ? $this->_file2str($file) - : $file; - if ($isfilename === true) { - $filename = ($name == '' ? $file : $name); - } else { - $filename = $name; - } - if (!isset($filedata) /*PEAR::isError($filedata)*/) { - return $filedata; - } - $this->_html_images[] = array( - 'body' => $filedata, - 'name' => $filename, - 'c_type' => $c_type, - 'cid' => md5(uniqid(time())) - ); - return true; - } - - /** - * Adds a file to the list of attachments. - * - * @param string $file The file name of the file to attach - * OR the file contents itself - * @param string $c_type The content type - * @param string $name The filename of the attachment - * Only use if $file is the contents - * @param bool $isFilename Whether $file is a filename or not - * Defaults to true - * @param string $encoding The type of encoding to use. - * Defaults to base64. - * Possible values: 7bit, 8bit, base64, - * or quoted-printable. - * @param string $disposition The content-disposition of this file - * Defaults to attachment. - * Possible values: attachment, inline. - * @param string $charset The character set used in the filename - * of this attachment. - * @return mixed true on success or PEAR_Error object - * @access public - */ - function addAttachment($file, $c_type = 'application/octet-stream', - $name = '', $isfilename = true, - $encoding = 'base64', - $disposition = 'attachment', $charset = '') - { - $filedata = ($isfilename === true) ? $this->_file2str($file) - : $file; - if ($isfilename === true) { - // Force the name the user supplied, otherwise use $file - $filename = (!empty($name)) ? $name : $file; - } else { - $filename = $name; - } - if (empty($filename)) { - $err = null; /*PEAR::raiseError( - "The supplied filename for the attachment can't be empty" - );*/ - return $err; - } - $filename = basename($filename); - if (!isset($filedata) /*PEAR::isError($filedata)*/) { - return $filedata; - } - - $this->_parts[] = array( - 'body' => $filedata, - 'name' => $filename, - 'c_type' => $c_type, - 'encoding' => $encoding, - 'charset' => $charset, - 'disposition' => $disposition - ); - return true; - } - - /** - * Get the contents of the given file name as string - * - * @param string $file_name path of file to process - * @return string contents of $file_name - * @access private - */ - function &_file2str($file_name) - { - if (!is_readable($file_name)) { - $err = null; //PEAR::raiseError('File is not readable ' . $file_name); - return $err; - } - if (!$fd = fopen($file_name, 'rb')) { - $err = null; //PEAR::raiseError('Could not open ' . $file_name); - return $err; - } - $filesize = filesize($file_name); - if ($filesize == 0){ - $cont = ""; - }else{ - if ($magic_quote_setting = get_magic_quotes_runtime()){ - @set_magic_quotes_runtime(0); - } - $cont = fread($fd, $filesize); - if ($magic_quote_setting){ - @set_magic_quotes_runtime($magic_quote_setting); - } - } - fclose($fd); - return $cont; - } - - /** - * Adds a text subpart to the mimePart object and - * returns it during the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created. - * @param string The text to add. - * @return object The text mimePart object - * @access private - */ - function &_addTextPart(&$obj, $text) - { - $params['content_type'] = 'text/plain'; - $params['encoding'] = $this->_build_params['text_encoding']; - $params['charset'] = $this->_build_params['text_charset']; - if (is_object($obj)) { - $ret = $obj->addSubpart($text, $params); - return $ret; - } else { - $ret = new Mail_mimePart($text, $params); - return $ret; - } - } - - /** - * Adds a html subpart to the mimePart object and - * returns it during the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created. - * @return object The html mimePart object - * @access private - */ - function &_addHtmlPart(&$obj) - { - $params['content_type'] = 'text/html'; - $params['encoding'] = $this->_build_params['html_encoding']; - $params['charset'] = $this->_build_params['html_charset']; - if (is_object($obj)) { - $ret = $obj->addSubpart($this->_htmlbody, $params); - return $ret; - } else { - $ret = new Mail_mimePart($this->_htmlbody, $params); - return $ret; - } - } - - /** - * Creates a new mimePart object, using multipart/mixed as - * the initial content-type and returns it during the - * build process. - * - * @return object The multipart/mixed mimePart object - * @access private - */ - function &_addMixedPart() - { - $params['content_type'] = 'multipart/mixed'; - $ret = new Mail_mimePart('', $params); - return $ret; - } - - /** - * Adds a multipart/alternative part to a mimePart - * object (or creates one), and returns it during - * the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created. - * @return object The multipart/mixed mimePart object - * @access private - */ - function &_addAlternativePart(&$obj) - { - $params['content_type'] = 'multipart/alternative'; - if (is_object($obj)) { - return $obj->addSubpart('', $params); - } else { - $ret = new Mail_mimePart('', $params); - return $ret; - } - } - - /** - * Adds a multipart/related part to a mimePart - * object (or creates one), and returns it during - * the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created - * @return object The multipart/mixed mimePart object - * @access private - */ - function &_addRelatedPart(&$obj) - { - $params['content_type'] = 'multipart/related'; - if (is_object($obj)) { - return $obj->addSubpart('', $params); - } else { - $ret = new Mail_mimePart('', $params); - return $ret; - } - } - - /** - * Adds an html image subpart to a mimePart object - * and returns it during the build process. - * - * @param object The mimePart to add the image to - * @param array The image information - * @return object The image mimePart object - * @access private - */ - function &_addHtmlImagePart(&$obj, $value) - { - $params['content_type'] = $value['c_type'] . '; ' . - 'name="' . $value['name'] . '"'; - $params['encoding'] = 'base64'; - $params['disposition'] = 'inline'; - $params['dfilename'] = $value['name']; - $params['cid'] = $value['cid']; - $ret = $obj->addSubpart($value['body'], $params); - return $ret; - - } - - /** - * Adds an attachment subpart to a mimePart object - * and returns it during the build process. - * - * @param object The mimePart to add the image to - * @param array The attachment information - * @return object The image mimePart object - * @access private - */ - function &_addAttachmentPart(&$obj, $value) - { - $params['dfilename'] = $value['name']; - $params['encoding'] = $value['encoding']; - if ($value['disposition'] != "inline") { - $fname = array("fname" => $value['name']); - $fname_enc = $this->_encodeHeaders($fname); - $params['dfilename'] = $fname_enc['fname']; - } - if ($value['charset']) { - $params['charset'] = $value['charset']; - } - $params['content_type'] = $value['c_type'] . '; ' . - 'name="' . $params['dfilename'] . '"'; - $params['disposition'] = isset($value['disposition']) ? - $value['disposition'] : 'attachment'; - $ret = $obj->addSubpart($value['body'], $params); - return $ret; - } - - /** - * Returns the complete e-mail, ready to send using an alternative - * mail delivery method. Note that only the mailpart that is made - * with Mail_Mime is created. This means that, - * YOU WILL HAVE NO TO: HEADERS UNLESS YOU SET IT YOURSELF - * using the $xtra_headers parameter! - * - * @param string $separation The separation etween these two parts. - * @param array $build_params The Build parameters passed to the - * &get() function. See &get for more info. - * @param array $xtra_headers The extra headers that should be passed - * to the &headers() function. - * See that function for more info. - * @param bool $overwrite Overwrite the existing headers with new. - * @return string The complete e-mail. - * @access public - */ - function getMessage($separation = null, $build_params = null, $xtra_headers = null, $overwrite = false) - { - if ($separation === null) - { - $separation = MAIL_MIME_CRLF; - } - $body = $this->get($build_params); - $head = $this->txtHeaders($xtra_headers, $overwrite); - $mail = $head . $separation . $body; - return $mail; - } - - - /** - * Builds the multipart message from the list ($this->_parts) and - * returns the mime content. - * - * @param array Build parameters that change the way the email - * is built. Should be associative. Can contain: - * head_encoding - What encoding to use for the headers. - * Options: quoted-printable or base64 - * Default is quoted-printable - * text_encoding - What encoding to use for plain text - * Options: 7bit, 8bit, base64, or quoted-printable - * Default is 7bit - * html_encoding - What encoding to use for html - * Options: 7bit, 8bit, base64, or quoted-printable - * Default is quoted-printable - * 7bit_wrap - Number of characters before text is - * wrapped in 7bit encoding - * Default is 998 - * html_charset - The character set to use for html. - * Default is iso-8859-1 - * text_charset - The character set to use for text. - * Default is iso-8859-1 - * head_charset - The character set to use for headers. - * Default is iso-8859-1 - * @return string The mime content - * @access public - */ - function &get($build_params = null) - { - if (isset($build_params)) { - while (list($key, $value) = each($build_params)) { - $this->_build_params[$key] = $value; - } - } - - if (!empty($this->_html_images) AND isset($this->_htmlbody)) { - foreach ($this->_html_images as $key => $value) { - $regex = array(); - $regex[] = '#(\s)((?i)src|background|href(?-i))\s*=\s*(["\']?)' . - preg_quote($value['name'], '#') . '\3#'; - $regex[] = '#(?i)url(?-i)\(\s*(["\']?)' . - preg_quote($value['name'], '#') . '\1\s*\)#'; - $rep = array(); - $rep[] = '\1\2=\3cid:' . $value['cid'] .'\3'; - $rep[] = 'url(\1cid:' . $value['cid'] . '\2)'; - $this->_htmlbody = preg_replace($regex, $rep, - $this->_htmlbody - ); - $this->_html_images[$key]['name'] = basename($this->_html_images[$key]['name']); - } - } - - $null = null; - $attachments = !empty($this->_parts) ? true : false; - $html_images = !empty($this->_html_images) ? true : false; - $html = !empty($this->_htmlbody) ? true : false; - $text = (!$html AND !empty($this->_txtbody)) ? true : false; - - switch (true) { - case $text AND !$attachments: - $message =& $this->_addTextPart($null, $this->_txtbody); - break; - - case !$text AND !$html AND $attachments: - $message =& $this->_addMixedPart(); - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - case $text AND $attachments: - $message =& $this->_addMixedPart(); - $this->_addTextPart($message, $this->_txtbody); - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - case $html AND !$attachments AND !$html_images: - if (isset($this->_txtbody)) { - $message =& $this->_addAlternativePart($null); - $this->_addTextPart($message, $this->_txtbody); - $this->_addHtmlPart($message); - } else { - $message =& $this->_addHtmlPart($null); - } - break; - - case $html AND !$attachments AND $html_images: - if (isset($this->_txtbody)) { - $message =& $this->_addAlternativePart($null); - $this->_addTextPart($message, $this->_txtbody); - $related =& $this->_addRelatedPart($message); - } else { - $message =& $this->_addRelatedPart($null); - $related =& $message; - } - $this->_addHtmlPart($related); - for ($i = 0; $i < count($this->_html_images); $i++) { - $this->_addHtmlImagePart($related, $this->_html_images[$i]); - } - break; - - case $html AND $attachments AND !$html_images: - $message =& $this->_addMixedPart(); - if (isset($this->_txtbody)) { - $alt =& $this->_addAlternativePart($message); - $this->_addTextPart($alt, $this->_txtbody); - $this->_addHtmlPart($alt); - } else { - $this->_addHtmlPart($message); - } - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - case $html AND $attachments AND $html_images: - $message =& $this->_addMixedPart(); - if (isset($this->_txtbody)) { - $alt =& $this->_addAlternativePart($message); - $this->_addTextPart($alt, $this->_txtbody); - $rel =& $this->_addRelatedPart($alt); - } else { - $rel =& $this->_addRelatedPart($message); - } - $this->_addHtmlPart($rel); - for ($i = 0; $i < count($this->_html_images); $i++) { - $this->_addHtmlImagePart($rel, $this->_html_images[$i]); - } - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - } - - if (isset($message)) { - $output = $message->encode(); - $this->_headers = array_merge($this->_headers, - $output['headers']); - $body = $output['body']; - return $body; - - } else { - $ret = false; - return $ret; - } - } - - /** - * Returns an array with the headers needed to prepend to the email - * (MIME-Version and Content-Type). Format of argument is: - * $array['header-name'] = 'header-value'; - * - * @param array $xtra_headers Assoc array with any extra headers. - * Optional. - * @param bool $overwrite Overwrite already existing headers. - * @return array Assoc array with the mime headers - * @access public - */ - function &headers($xtra_headers = null, $overwrite = false) - { - // Content-Type header should already be present, - // So just add mime version header - $headers['MIME-Version'] = '1.0'; - if (isset($xtra_headers)) { - $headers = array_merge($headers, $xtra_headers); - } - if ($overwrite){ - $this->_headers = array_merge($this->_headers, $headers); - }else{ - $this->_headers = array_merge($headers, $this->_headers); - } - - $encodedHeaders = $this->_encodeHeaders($this->_headers); - return $encodedHeaders; - } - - /** - * Get the text version of the headers - * (usefull if you want to use the PHP mail() function) - * - * @param array $xtra_headers Assoc array with any extra headers. - * Optional. - * @param bool $overwrite Overwrite the existing heaers with new. - * @return string Plain text headers - * @access public - */ - function txtHeaders($xtra_headers = null, $overwrite = false) - { - $headers = $this->headers($xtra_headers, $overwrite); - $ret = ''; - foreach ($headers as $key => $val) { - $ret .= "$key: $val" . MAIL_MIME_CRLF; - } - return $ret; - } - - /** - * Sets the Subject header - * - * @param string $subject String to set the subject to - * access public - */ - function setSubject($subject) - { - $this->_headers['Subject'] = $subject; - } - - /** - * Set an email to the From (the sender) header - * - * @param string $email The email direction to add - * @access public - */ - function setFrom($email) - { - $this->_headers['From'] = $email; - } - - /** - * Add an email to the Cc (carbon copy) header - * (multiple calls to this method are allowed) - * - * @param string $email The email direction to add - * @access public - */ - function addCc($email) - { - if (isset($this->_headers['Cc'])) { - $this->_headers['Cc'] .= ", $email"; - } else { - $this->_headers['Cc'] = $email; - } - } - - /** - * Add an email to the Bcc (blank carbon copy) header - * (multiple calls to this method are allowed) - * - * @param string $email The email direction to add - * @access public - */ - function addBcc($email) - { - if (isset($this->_headers['Bcc'])) { - $this->_headers['Bcc'] .= ", $email"; - } else { - $this->_headers['Bcc'] = $email; - } - } - - /** - * Since the PHP send function requires you to specifiy - * recipients (To: header) separately from the other - * headers, the To: header is not properly encoded. - * To fix this, you can use this public method to - * encode your recipients before sending to the send - * function - * - * @param string $recipients A comma-delimited list of recipients - * @return string Encoded data - * @access public - */ - function encodeRecipients($recipients) - { - $input = array("To" => $recipients); - $retval = $this->_encodeHeaders($input); - return $retval["To"] ; - } - - /** - * Encodes a header as per RFC2047 - * - * @param array $input The header data to encode - * @return array Encoded data - * @access private - */ - function _encodeHeaders($input) - { - foreach ($input as $hdr_name => $hdr_value) { - if (function_exists('iconv_mime_encode') && preg_match('#[\x80-\xFF]{1}#', $hdr_value)){ - $imePref = array(); - if ($this->_build_params['head_encoding'] == 'base64'){ - $imePrefs['scheme'] = 'B'; - }else{ - $imePrefs['scheme'] = 'Q'; - } - $imePrefs['input-charset'] = $this->_build_params['head_charset']; - $imePrefs['output-charset'] = $this->_build_params['head_charset']; - $hdr_value = iconv_mime_encode($hdr_name, $hdr_value, $imePrefs); - $hdr_value = preg_replace("#^{$hdr_name}\:\ #", "", $hdr_value); - }elseif (preg_match('#[\x80-\xFF]{1}#', $hdr_value)){ - //This header contains non ASCII chars and should be encoded. - switch ($this->_build_params['head_encoding']) { - case 'base64': - //Base64 encoding has been selected. - - //Generate the header using the specified params and dynamicly - //determine the maximum length of such strings. - //75 is the value specified in the RFC. The -2 is there so - //the later regexp doesn't break any of the translated chars. - $prefix = '=?' . $this->_build_params['head_charset'] . '?B?'; - $suffix = '?='; - $maxLength = 75 - strlen($prefix . $suffix) - 2; - $maxLength1stLine = $maxLength - strlen($hdr_name); - - //Base64 encode the entire string - $hdr_value = base64_encode($hdr_value); - - //This regexp will break base64-encoded text at every - //$maxLength but will not break any encoded letters. - $reg1st = "|.{0,$maxLength1stLine}[^\=][^\=]|"; - $reg2nd = "|.{0,$maxLength}[^\=][^\=]|"; - break; - case 'quoted-printable': - default: - //quoted-printable encoding has been selected - - //Generate the header using the specified params and dynamicly - //determine the maximum length of such strings. - //75 is the value specified in the RFC. The -2 is there so - //the later regexp doesn't break any of the translated chars. - $prefix = '=?' . $this->_build_params['head_charset'] . '?Q?'; - $suffix = '?='; - $maxLength = 75 - strlen($prefix . $suffix) - 2; - $maxLength1stLine = $maxLength - strlen($hdr_name); - - //Replace all special characters used by the encoder. - $search = array("=", "_", "?", " "); - $replace = array("=3D", "=5F", "=3F", "_"); - $hdr_value = str_replace($search, $replace, $hdr_value); - - //Replace all extended characters (\x80-xFF) with their - //ASCII values. - $hdr_value = preg_replace( - '#([\x80-\xFF])#e', - '"=" . strtoupper(dechex(ord("\1")))', - $hdr_value - ); - //This regexp will break QP-encoded text at every $maxLength - //but will not break any encoded letters. - $reg1st = "|(.{0,$maxLength})[^\=]|"; - $reg2nd = "|(.{0,$maxLength})[^\=]|"; - break; - } - //Begin with the regexp for the first line. - $reg = $reg1st; - $output = ""; - while ($hdr_value) { - //Split translated string at every $maxLength - //But make sure not to break any translated chars. - $found = preg_match($reg, $hdr_value, $matches); - - //After this first line, we need to use a different - //regexp for the first line. - $reg = $reg2nd; - - //Save the found part and encapsulate it in the - //prefix & suffix. Then remove the part from the - //$hdr_value variable. - if ($found){ - $part = $matches[0]; - $hdr_value = substr($hdr_value, strlen($matches[0])); - }else{ - $part = $hdr_value; - $hdr_value = ""; - } - - //RFC 2047 specifies that any split header should be seperated - //by a CRLF SPACE. - if ($output){ - $output .= "\r\n "; - } - $output .= $prefix . $part . $suffix; - } - $hdr_value = $output; - } - $input[$hdr_name] = $hdr_value; - } - - return $input; - } - - /** - * Set the object's end-of-line and define the constant if applicable - * - * @param string $eol End Of Line sequence - * @access private - */ - function _setEOL($eol) - { - $this->_eol = $eol; - if (!defined('MAIL_MIME_CRLF')) { - define('MAIL_MIME_CRLF', $this->_eol, true); - } - } - - - -} // End of class -?> diff --git a/3.1/modules/ecard/lib/mimePart.php b/3.1/modules/ecard/lib/mimePart.php deleted file mode 100644 index c0050d41..00000000 --- a/3.1/modules/ecard/lib/mimePart.php +++ /dev/null @@ -1,351 +0,0 @@ - | -// +-----------------------------------------------------------------------+ - -/** -* -* Raw mime encoding class -* -* What is it? -* This class enables you to manipulate and build -* a mime email from the ground up. -* -* Why use this instead of mime.php? -* mime.php is a userfriendly api to this class for -* people who aren't interested in the internals of -* mime mail. This class however allows full control -* over the email. -* -* Eg. -* -* // Since multipart/mixed has no real body, (the body is -* // the subpart), we set the body argument to blank. -* -* $params['content_type'] = 'multipart/mixed'; -* $email = new Mail_mimePart('', $params); -* -* // Here we add a text part to the multipart we have -* // already. Assume $body contains plain text. -* -* $params['content_type'] = 'text/plain'; -* $params['encoding'] = '7bit'; -* $text = $email->addSubPart($body, $params); -* -* // Now add an attachment. Assume $attach is -* the contents of the attachment -* -* $params['content_type'] = 'application/zip'; -* $params['encoding'] = 'base64'; -* $params['disposition'] = 'attachment'; -* $params['dfilename'] = 'example.zip'; -* $attach =& $email->addSubPart($body, $params); -* -* // Now build the email. Note that the encode -* // function returns an associative array containing two -* // elements, body and headers. You will need to add extra -* // headers, (eg. Mime-Version) before sending. -* -* $email = $message->encode(); -* $email['headers'][] = 'Mime-Version: 1.0'; -* -* -* Further examples are available at http://www.phpguru.org -* -* TODO: -* - Set encode() to return the $obj->encoded if encode() -* has already been run. Unless a flag is passed to specifically -* re-build the message. -* -* @author Richard Heyes -* @version $Revision: 1.13 $ -* @package Mail -*/ - -class Mail_mimePart { - - /** - * The encoding type of this part - * @var string - */ - var $_encoding; - - /** - * An array of subparts - * @var array - */ - var $_subparts; - - /** - * The output of this part after being built - * @var string - */ - var $_encoded; - - /** - * Headers for this part - * @var array - */ - var $_headers; - - /** - * The body of this part (not encoded) - * @var string - */ - var $_body; - - /** - * Constructor. - * - * Sets up the object. - * - * @param $body - The body of the mime part if any. - * @param $params - An associative array of parameters: - * content_type - The content type for this part eg multipart/mixed - * encoding - The encoding to use, 7bit, 8bit, base64, or quoted-printable - * cid - Content ID to apply - * disposition - Content disposition, inline or attachment - * dfilename - Optional filename parameter for content disposition - * description - Content description - * charset - Character set to use - * @access public - */ - function Mail_mimePart($body = '', $params = array()) - { - if (!defined('MAIL_MIMEPART_CRLF')) { - define('MAIL_MIMEPART_CRLF', defined('MAIL_MIME_CRLF') ? MAIL_MIME_CRLF : "\r\n", TRUE); - } - - foreach ($params as $key => $value) { - switch ($key) { - case 'content_type': - $headers['Content-Type'] = $value . (isset($charset) ? '; charset="' . $charset . '"' : ''); - break; - - case 'encoding': - $this->_encoding = $value; - $headers['Content-Transfer-Encoding'] = $value; - break; - - case 'cid': - $headers['Content-ID'] = '<' . $value . '>'; - break; - - case 'disposition': - $headers['Content-Disposition'] = $value . (isset($dfilename) ? '; filename="' . $dfilename . '"' : ''); - break; - - case 'dfilename': - if (isset($headers['Content-Disposition'])) { - $headers['Content-Disposition'] .= '; filename="' . $value . '"'; - } else { - $dfilename = $value; - } - break; - - case 'description': - $headers['Content-Description'] = $value; - break; - - case 'charset': - if (isset($headers['Content-Type'])) { - $headers['Content-Type'] .= '; charset="' . $value . '"'; - } else { - $charset = $value; - } - break; - } - } - - // Default content-type - if (!isset($headers['Content-Type'])) { - $headers['Content-Type'] = 'text/plain'; - } - - //Default encoding - if (!isset($this->_encoding)) { - $this->_encoding = '7bit'; - } - - // Assign stuff to member variables - $this->_encoded = array(); - $this->_headers = $headers; - $this->_body = $body; - } - - /** - * encode() - * - * Encodes and returns the email. Also stores - * it in the encoded member variable - * - * @return An associative array containing two elements, - * body and headers. The headers element is itself - * an indexed array. - * @access public - */ - function encode() - { - $encoded =& $this->_encoded; - - if (!empty($this->_subparts)) { - srand((double)microtime()*1000000); - $boundary = '=_' . md5(rand() . microtime()); - $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"'; - - // Add body parts to $subparts - for ($i = 0; $i < count($this->_subparts); $i++) { - $headers = array(); - $tmp = $this->_subparts[$i]->encode(); - foreach ($tmp['headers'] as $key => $value) { - $headers[] = $key . ': ' . $value; - } - $subparts[] = implode(MAIL_MIMEPART_CRLF, $headers) . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF . $tmp['body']; - } - - $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF . - implode('--' . $boundary . MAIL_MIMEPART_CRLF, $subparts) . - '--' . $boundary.'--' . MAIL_MIMEPART_CRLF; - - } else { - $encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding) . MAIL_MIMEPART_CRLF; - } - - // Add headers to $encoded - $encoded['headers'] =& $this->_headers; - - return $encoded; - } - - /** - * &addSubPart() - * - * Adds a subpart to current mime part and returns - * a reference to it - * - * @param $body The body of the subpart, if any. - * @param $params The parameters for the subpart, same - * as the $params argument for constructor. - * @return A reference to the part you just added. It is - * crucial if using multipart/* in your subparts that - * you use =& in your script when calling this function, - * otherwise you will not be able to add further subparts. - * @access public - */ - function &addSubPart($body, $params) - { - $this->_subparts[] = new Mail_mimePart($body, $params); - return $this->_subparts[count($this->_subparts) - 1]; - } - - /** - * _getEncodedData() - * - * Returns encoded data based upon encoding passed to it - * - * @param $data The data to encode. - * @param $encoding The encoding type to use, 7bit, base64, - * or quoted-printable. - * @access private - */ - function _getEncodedData($data, $encoding) - { - switch ($encoding) { - case '8bit': - case '7bit': - return $data; - break; - - case 'quoted-printable': - return $this->_quotedPrintableEncode($data); - break; - - case 'base64': - return rtrim(chunk_split(base64_encode($data), 76, MAIL_MIMEPART_CRLF)); - break; - - default: - return $data; - } - } - - /** - * quoteadPrintableEncode() - * - * Encodes data to quoted-printable standard. - * - * @param $input The data to encode - * @param $line_max Optional max line length. Should - * not be more than 76 chars - * - * @access private - */ - function _quotedPrintableEncode($input , $line_max = 76) - { - $lines = preg_split("/\r?\n/", $input); - $eol = MAIL_MIMEPART_CRLF; - $escape = '='; - $output = ''; - - while(list(, $line) = each($lines)){ - - $linlen = strlen($line); - $newline = ''; - - for ($i = 0; $i < $linlen; $i++) { - $char = substr($line, $i, 1); - $dec = ord($char); - - if (($dec == 32) AND ($i == ($linlen - 1))){ // convert space at eol only - $char = '=20'; - - } elseif(($dec == 9) AND ($i == ($linlen - 1))) { // convert tab at eol only - $char = '=09'; - } elseif($dec == 9) { - ; // Do nothing if a tab. - } elseif(($dec == 61) OR ($dec < 32 ) OR ($dec > 126)) { - $char = $escape . strtoupper(sprintf('%02s', dechex($dec))); - } - - if ((strlen($newline) + strlen($char)) >= $line_max) { // MAIL_MIMEPART_CRLF is not counted - $output .= $newline . $escape . $eol; // soft line break; " =\r\n" is okay - $newline = ''; - } - $newline .= $char; - } // end of for - $output .= $newline . $eol; - } - $output = substr($output, 0, -1 * strlen($eol)); // Don't want last crlf - return $output; - } -} // End of class -?> diff --git a/3.1/modules/ecard/module.info b/3.1/modules/ecard/module.info deleted file mode 100644 index 2300f1ad..00000000 --- a/3.1/modules/ecard/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "E-Card" -description = "Send a photo as a postcard" -version = 11 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:ecard" -discuss_url = "http://gallery.menalto.com/forum_module_ecard" diff --git a/3.1/modules/ecard/views/admin_ecard.html.php b/3.1/modules/ecard/views/admin_ecard.html.php deleted file mode 100644 index 0dd6b926..00000000 --- a/3.1/modules/ecard/views/admin_ecard.html.php +++ /dev/null @@ -1,7 +0,0 @@ - -
    -

    -
    - -
    -
    diff --git a/3.1/modules/ecard/views/ecard_block.html.php b/3.1/modules/ecard/views/ecard_block.html.php deleted file mode 100644 index d8aa4e4e..00000000 --- a/3.1/modules/ecard/views/ecard_block.html.php +++ /dev/null @@ -1,6 +0,0 @@ - -id}") ?>" - class="g-dialog-link g-button ui-state-default ui-corner-all"> - - - diff --git a/3.1/modules/ecard/views/ecard_email.html.php b/3.1/modules/ecard/views/ecard_email.html.php deleted file mode 100644 index 0d676cf5..00000000 --- a/3.1/modules/ecard/views/ecard_email.html.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - description): ?> - - - - - -
    title) ?>
    - - abs_url() ?> - -
    description)) ?>
    - - diff --git a/3.1/modules/ecard/views/ecard_form.html.php b/3.1/modules/ecard/views/ecard_form.html.php deleted file mode 100644 index fc22e95b..00000000 --- a/3.1/modules/ecard/views/ecard_form.html.php +++ /dev/null @@ -1 +0,0 @@ - Send eCard \ No newline at end of file diff --git a/3.1/modules/editcreation/css/editcreation.css b/3.1/modules/editcreation/css/editcreation.css deleted file mode 100755 index 084dfd8d..00000000 --- a/3.1/modules/editcreation/css/editcreation.css +++ /dev/null @@ -1,8 +0,0 @@ -form#g-edit-album-form fieldset ul li input, -form#g-edit-album-form fieldset ul li select, -form#g-edit-album-form fieldset ul li textarea, -form#g-edit-photo-form fieldset ul li input, -form#g-edit-photo-form fieldset ul li select, -form#g-edit-photo-form fieldset ul li textarea { - display: inline; -} diff --git a/3.1/modules/editcreation/helpers/editcreation_event.php b/3.1/modules/editcreation/helpers/editcreation_event.php deleted file mode 100644 index 8820d8fa..00000000 --- a/3.1/modules/editcreation/helpers/editcreation_event.php +++ /dev/null @@ -1,38 +0,0 @@ -edit_item->dateselect("datecreated") - ->label(t("Created")) - ->minutes(1) - ->years(1970, date('Y')+1) - ->value($item->created); - } - - static function item_edit_form_completed($item, $form) { - // Change the item's created field to the specified value. - $item->created = $form->edit_item->datecreated->value; - $item->save(); - } -} diff --git a/3.1/modules/editcreation/helpers/editcreation_theme.php b/3.1/modules/editcreation/helpers/editcreation_theme.php deleted file mode 100644 index af0ffe21..00000000 --- a/3.1/modules/editcreation/helpers/editcreation_theme.php +++ /dev/null @@ -1,31 +0,0 @@ -item()) { - return; - } - $item = $theme->item(); - if ( $item && access::can("edit", $item) ) { - return $theme->css("editcreation.css"); - } - } -} diff --git a/3.1/modules/editcreation/module.info b/3.1/modules/editcreation/module.info deleted file mode 100755 index 926f9485..00000000 --- a/3.1/modules/editcreation/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Edit Creation" -description = "Manually edit the creation date of an item in Gallery." -version = 2 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:editcreation" -discuss_url = "http://gallery.menalto.com/node/90667" diff --git a/3.1/modules/embed_videos/controllers/embedded_videos.php b/3.1/modules/embed_videos/controllers/embedded_videos.php deleted file mode 100644 index f49d4220..00000000 --- a/3.1/modules/embed_videos/controllers/embedded_videos.php +++ /dev/null @@ -1,166 +0,0 @@ -validate(); - if ($form->add_embedded_video->inputs['video_url']->value != "") { - $title = $form->add_embedded_video->inputs['title']->value; - $description = $form->add_embedded_video->inputs['description']->value; - $valid_url=false; - $embedded_video = ORM::factory("embedded_video"); - $item = ORM::factory("item"); - $item->type = "photo"; - $url = $form->add_embedded_video->inputs['video_url']->value; - if(preg_match("/$youtubeUrlPattern/",$url)) { - $video_id = 0; - if (preg_match("/watch\?v=(.*?)(&\S+=\S+)/",$url,$matches)) { - $video_id = $matches[1]; - } else if (preg_match("/watch\?v=(.*)/",$url,$matches)) { - $video_id = $matches[1]; - } else if (preg_match("/v\/(.*)/",$url,$matches)) { - $video_id = $matches[1]; - } - if ($video_id) { - $video_id = $matches[1]; - $embedded_video->embed_code = ''; - $embedded_video->source = "YouTube"; - $content = file_get_contents("http://img.youtube.com/vi/" . $video_id . "/0.jpg"); - $itemname = "youtube_" . $video_id . ".jpg"; - $temp_filename = VARPATH . "tmp/$itemname"; - if ($content) { - $valid_url = true; - $sxml = simplexml_load_file("http://gdata.youtube.com/feeds/api/videos/$video_id"); - if ($sxml) { - if ($title == '') { - $title = (string)$sxml->title; - } - if ($description == '') { - $description = (string)$sxml->content; - } - } - } - } - } else if(preg_match("/$vimeoUrlPattern/",$url)) { - if(preg_match("/$vimeoUrlPattern\/(.*)/",$url,$matches)) { - $video_id = $matches[1]; - if ($video_id) { - $sxml = simplexml_load_file("http://vimeo.com/api/v2/video/$video_id.xml"); - if ($sxml) { - if ($title == '') { - $title = (string)$sxml->video->title; - } - if ($description == '') { - $description = strip_tags((string)$sxml->video->description); - } - $embedded_video->source = "Vimeo"; - $content = file_get_contents((string)$sxml->video->thumbnail_large); - $itemname = "vimeo_" . $video_id . ".jpg"; - $temp_filename = VARPATH . "tmp/$itemname"; - $width = min((int)$sxml->video->width, $maxwidth); - $height = min((int)$sxml->video->height, $maxheight); - $embedded_video->embed_code = ''; - $valid_url = true; - } - } - } - } - //$item->validate(); - //$content = file_get_contents("http://img.youtube.com/vi/" . $form->add_embedded_video->inputs['name']->value . "/0.jpg"); - if ($valid_url) { - $file = fopen($temp_filename, "wb"); - fwrite($file, $content); - fclose($file); - gallery_graphics::composite($temp_filename, $temp_filename, array("file" => "modules/embed_videos/images/embed_video_icon.png", "position" => "center", "transparency" => 95), $item); - $item->set_data_file($temp_filename); - $item->name = basename($itemname); - $item->title = $title; - $item->parent_id = $album->id; - $item->description = $description; - $item->slug = $form->add_embedded_video->inputs['slug']->value; - $path_info = @pathinfo($temp_filename); - $item->save(); - $embedded_video->item_id = $item->id; - $embedded_video->validate(); - $embedded_video->save(); - log::success("content", t("Added a embedded video"), html::anchor("embeds/$item->id", t("view video"))); - module::event("add_event_form_completed", $item, $form); - } else { - $form->add_embedded_video->inputs['video_url']->add_error('invalid_id', 1); - $valid = false; - } - } else { - $form->add_embedded_video->inputs['video_url']->add_error('invalid_id', 1); - $valid = false; - } - } - catch(Exception $e) { - // Lame error handling for now. Just record the exception and move on - Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); - // Ugh. I hate to use instanceof, But this beats catching the exception separately since - // we mostly want to treat it the same way as all other exceptions - if ($e instanceof ORM_Validation_Exception) { - Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); - foreach($e->validation->errors() as $key => $error) { - $form->add_embed->inputs[$key]->add_error($error, 1); - } - $valid = false; - } - if (file_exists($temp_filename)) { - unlink($temp_filename); - } - } - if (file_exists($temp_filename)) { - unlink($temp_filename); - } - batch::stop(); - if ($valid) { - //print json_encode(array("result" => "success")); - json::reply(array("result" => "success", "location" => $item->url())); - } else { - //json::reply(array("result" => "error", "form" => (string)$form)); - print $form; - } - } - public function form_add($album_id) { - $album = ORM::factory("item", $album_id); - access::required("view", $album); - access::required("add", $album); - print embed_videos::get_add_form($album); - } -} diff --git a/3.1/modules/embed_videos/helpers/embed_videos.php b/3.1/modules/embed_videos/helpers/embed_videos.php deleted file mode 100644 index 64e0f403..00000000 --- a/3.1/modules/embed_videos/helpers/embed_videos.php +++ /dev/null @@ -1,57 +0,0 @@ -id}", "", "post", array("id" => "g-add-embed-form")); - $group = $form->group("add_embedded_video") - ->label(t("Add embedded video to %album_title", array("album_title" => $album->title))); - $group->input("title")->label(t("Title")) - ->error_messages("required", t("You must provide a title")) - ->error_messages("length", t("Your title is too long")); - $group->input("video_url")->label(t("Video URL")) - ->error_messages( - "conflict", t("There is already a movie with this ID")) - ->error_messages("required", t("You must provide a URL")) - ->error_messages("invalid_id", t("Invalid URL")); - $group->textarea("description")->label(t("Description")); - $group->input("slug")->label(t("Internet Address")) - ->error_messages( - "conflict", t("There is already a movie, photo or album with this internet address")) - ->error_messages( - "not_url_safe", - t("The internet address should contain only letters, numbers, hyphens and underscores")) - ->error_messages("required", t("You must provide an internet address")) - ->error_messages("length", t("Your internet address is too long")); - - module::event("item_add_form", $album, $form); - - $group = $form->group("buttons")->label(""); - $group->submit("")->value(t("Add")); - - return $form; - } -} \ No newline at end of file diff --git a/3.1/modules/embed_videos/helpers/embed_videos_event.php b/3.1/modules/embed_videos/helpers/embed_videos_event.php deleted file mode 100644 index 506d123a..00000000 --- a/3.1/modules/embed_videos/helpers/embed_videos_event.php +++ /dev/null @@ -1,38 +0,0 @@ -where("item_id", "=", $item->id) - ->find() - ->delete(); - } - static function site_menu($menu, $theme) { - $item = $theme->item(); - if ($can_add = $item && access::can("add", $item)) { - $menu->get("add_menu") - ->append(Menu::factory("dialog") - ->id("embed_add") - ->label(t("Embed Video")) - ->url(url::site("form/add/embedded_videos/$item->id"))); - } - } -} diff --git a/3.1/modules/embed_videos/helpers/embed_videos_installer.php b/3.1/modules/embed_videos/helpers/embed_videos_installer.php deleted file mode 100644 index 4db441cf..00000000 --- a/3.1/modules/embed_videos/helpers/embed_videos_installer.php +++ /dev/null @@ -1,44 +0,0 @@ -query("CREATE TABLE {embedded_videos} ( - `id` int(9) NOT NULL auto_increment, - `embed_code` varchar(2048) DEFAULT NULL, - `source` varchar(64) DEFAULT NULL, - `item_id` int(9) NOT NULL, - PRIMARY KEY (`id`), - KEY (`item_id`, `id`)) - DEFAULT CHARSET=utf8;"); - module::set_version("embed_videos", 2); - //exec("cd modules/gallery/controllers/; ln -s ../../embed/controllers/embeds.php embeds.php"); - } - - static function deactivate() { - - } - static function uninstall() { - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {embedded_videos};"); - module::delete("embed_videos"); - } -} diff --git a/3.1/modules/embed_videos/helpers/embed_videos_theme.php b/3.1/modules/embed_videos/helpers/embed_videos_theme.php deleted file mode 100644 index 61b7000a..00000000 --- a/3.1/modules/embed_videos/helpers/embed_videos_theme.php +++ /dev/null @@ -1,34 +0,0 @@ -item(); - if ($item && $item->is_photo()) { - $embedded_video = ORM::factory("embedded_video") - ->where("item_id", "=", $item->id) - ->find(); - if ($embedded_video->loaded()) { - $view = new View("embed_video_js.html"); - $view->embed_code = addslashes($embedded_video->embed_code); - return $view; - } - } - } -} \ No newline at end of file diff --git a/3.1/modules/embed_videos/images/embed_video_icon.png b/3.1/modules/embed_videos/images/embed_video_icon.png deleted file mode 100644 index 81e5a9d4..00000000 Binary files a/3.1/modules/embed_videos/images/embed_video_icon.png and /dev/null differ diff --git a/3.1/modules/embed_videos/models/embedded_video.php b/3.1/modules/embed_videos/models/embedded_video.php deleted file mode 100644 index 7f0ae949..00000000 --- a/3.1/modules/embed_videos/models/embedded_video.php +++ /dev/null @@ -1,25 +0,0 @@ - - - - \ No newline at end of file diff --git a/3.1/modules/embedlinks/controllers/admin_embedlinks.php b/3.1/modules/embedlinks/controllers/admin_embedlinks.php deleted file mode 100644 index 89d98dcd..00000000 --- a/3.1/modules/embedlinks/controllers/admin_embedlinks.php +++ /dev/null @@ -1,109 +0,0 @@ -content = new View("admin_embedlinks.html"); - $view->content->embedlinks_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Figure out which boxes where checked - $linkOpts_array = Input::instance()->post("LinkCodeTypeOptions"); - $displayType_array = Input::instance()->post("LinkDisplayType"); - - $HTMLButton = false; - $BBCodeButton = false; - $FullURLButton = false; - $InPageLinks = false; - $ToolbarLinks = false; - - for ($i = 0; $i < count($linkOpts_array); $i++) { - if ($linkOpts_array[$i] == "HTMLCode") { - $HTMLButton = true; - } - if ($linkOpts_array[$i] == "BBCode") { - $BBCodeButton = true; - } - if ($linkOpts_array[$i] == "FullURL") { - $FullURLButton = true; - } - } - for ($i = 0; $i < count($displayType_array); $i++) { - if ($displayType_array[$i] == "InPageLinks") { - $InPageLinks = true; - } - if ($displayType_array[$i] == "ToolbarLinks") { - $ToolbarLinks = true; - } - } - - // Save Settings. - module::set_var("embedlinks", "HTMLCode", $HTMLButton); - module::set_var("embedlinks", "BBCode", $BBCodeButton); - module::set_var("embedlinks", "FullURL", $FullURLButton); - module::set_var("embedlinks", "InPageLinks", $InPageLinks); - module::set_var("embedlinks", "ToolbarLinks", $ToolbarLinks); - message::success(t("Your Selection Has Been Saved.")); - - // Load Admin page. - $view = new Admin_View("admin.html"); - $view->content = new View("admin_embedlinks.html"); - $view->content->embedlinks_form = $this->_get_admin_form(); - print $view; - } - - private function _get_admin_form() { - // Make a new Form. - $form = new Forge("admin/embedlinks/saveprefs", "", "post", - array("id" => "g-embed-links-adminForm")); - - // Make an array for the different types of link codes. - $linkCodes["HTMLCode"] = array(t("Show HTML Links"), module::get_var("embedlinks", "HTMLCode")); - $linkCodes["BBCode"] = array(t("Show BBCode Links"), module::get_var("embedlinks", "BBCode")); - $linkCodes["FullURL"] = array(t("Show the full URL"), module::get_var("embedlinks", "FullURL")); - - // Make an array for the different methods of displaying the links. - $linkDisplays["InPageLinks"] = array(t("Show Links In The Actual Page"), module::get_var("embedlinks", "InPageLinks")); - - // Make an array for the different methods of displaying the links. - $linkDisplays["InPageLinks"] = array(t("Show Links In The Actual Page"), module::get_var("embedlinks", "InPageLinks")); - $linkDisplays["ToolbarLinks"] = array(t("Display toolbar image for HTML/BBCode/URLs links"), module::get_var("embedlinks", "ToolbarLinks")); - - // Setup a few checkboxes on the form. - $add_links = $form->group("EmbedLinks"); - $add_links->checklist("LinkCodeTypeOptions") - ->options($linkCodes); - $add_links->checklist("LinkDisplayType") - ->options($linkDisplays); - - // Add a save button to the form. - $add_links->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} diff --git a/3.1/modules/embedlinks/controllers/embedlinks.php b/3.1/modules/embedlinks/controllers/embedlinks.php deleted file mode 100644 index 5a7b70cb..00000000 --- a/3.1/modules/embedlinks/controllers/embedlinks.php +++ /dev/null @@ -1,216 +0,0 @@ -item_id = $item_id; - print $view; - } - - public function showhtml($item_id) { - // Generate the Dialog Box for HTML links. - $item = ORM::factory("item", $item_id); - access::required("view", $item); - - // If the current page is an album, only display two links. - if ($item->is_album()) { - $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); - $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); - $linkTitles[0] = array("Link To This Album:", 2); - - // If the item is a movie, don't display resize links, do display an embed link. - } elseif ($item->is_movie()) { - // Link to the current page. - $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); - $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); - $linkTitles[0] = array("Link To This Page:", 2); - - // If the visitor has suficient privlidges to see the fullsized - // version of the current image, then display links to it. - if (access::can("view_full", $item)) { - $linkArray[2] = array("Text:", "file_url(true) . "">Click Here"); - $linkArray[3] = array("Thumbnail:", "file_url(true) . "">thumb_url(true) . "">"); - - // Figure out what the path of the .flv file is. - $str_movie_path = $item->file_url(true); - if (module::is_active("videos")) { - $items_video = ORM::factory("items_video") - ->where("item_id", "=", $item->id) - ->find(); - if ($items_video->loaded()) { - if (file_exists($item->resize_path() . ".flv")) { - $str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true)); - } else { - $str_movie_path = ""; - } - } - } - - if ($str_movie_path != "") { - $linkArray[4] = array("Embed:", "width . "" height="" . $item->height . "">width . - "" height="" . $item->height . "" src="" . url::abs_file("lib/flowplayer.swf") . "" flashvars=" . - "'config={"clip":"" . $str_movie_path . ""}'/>"); - $linkTitles[1] = array("Link To The Video File:", 3); - } else { - $linkTitles[1] = array("Link To The Video File:", 2); - } - } - - // Or else assume the item is a photo. - } else { - // Link to the current page. - $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); - $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); - $linkArray[2] = array("Resized:", "type}s/{$item->id}") . "">resize_url(true) . "">"); - $linkTitles[0] = array("Link To This Page:", 3); - - // Link to the "resized" version of the current image. - $linkArray[3] = array("Text:", "resize_url(true) . "">Click Here"); - $linkArray[4] = array("Thumbnail:", "resize_url(true) . "">thumb_url(true) . "">"); - $linkArray[5] = array("Image:", "resize_url(true) . "">"); - $linkTitles[1] = array("Link To The Resized Image:", 3); - - // If the visitor has suficient privlidges to see the fullsized - // version of the current image, then display links to it. - if (access::can("view_full", $item)) { - $linkArray[6] = array("Text:", "file_url(true) . "">Click Here"); - $linkArray[7] = array("Thumbnail:", "file_url(true) . "">thumb_url(true) . "">"); - $linkArray[8] = array("Resized:", "file_url(true) . "">resize_url(true) . "">"); - $linkTitles[2] = array("Link To The Full Size Image:", 3); - } - } - - $view = new View("embedlinks_htmldialog.html"); - $view->titles = $linkTitles; - $view->details = $linkArray; - print $view; - } - - public function showbbcode($item_id) { - // Generate the Dialog Box for BBCode links. - $item = ORM::factory("item", $item_id); - access::required("view", $item); - - // If the current page is an album, only display two links. - if ($item->is_album()) { - $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); - $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); - $linkTitles[0] = array("Link To This Album:", 2); - - // If the item is a movie, don't display resize links. - } elseif ($item->is_movie()) { - // Link to the current page. - $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); - $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); - $linkTitles[0] = array("Link To This Page:", 2); - - // If the visitor has suficient privlidges to see the fullsized - // version of the current image, then display links to it. - if (access::can("view_full", $item)) { - $linkArray[2] = array("Text:", "[url=" . $item->file_url(true) . "]Click Here[/url]"); - $linkArray[3] = array("Thumbnail:", "[url=" . $item->file_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); - $linkTitles[1] = array("Link To The Video File:", 2); - } - - // Or else assume the item is a photo. - } else { - // Link to the current page. - $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); - $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); - $linkArray[2] = array("Resized:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->resize_url(true) . "[/img][/url]"); - $linkTitles[0] = array("Link To This Page:", 3); - - // Link to the "resized" version of the current image. - $linkArray[3] = array("Text:", "[url=" . $item->resize_url(true) . "]Click Here[/url]"); - $linkArray[4] = array("Thumbnail:", "[url=" . $item->resize_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); - $linkArray[5] = array("Image:", "[img]" . $item->resize_url(true) . "[/img]"); - $linkTitles[1] = array("Link To The Resized Image:", 3); - - // If the visitor has suficient privlidges to see the fullsized - // version of the current image, then display links to it. - if (access::can("view_full", $item)) { - $linkArray[6] = array("Text:", "[url=" . $item->file_url(true) . "]Click Here[/url]"); - $linkArray[7] = array("Thumbnail:", "[url=" . $item->file_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); - $linkArray[8] = array("Resized:", "[url=" . $item->file_url(true) . "][img]" . $item->resize_url(true) . "[/img][/url]"); - $linkTitles[2] = array("Link To The Full Size Image:", 3); - } - } - - $view = new View("embedlinks_bbcodedialog.html"); - $view->titles = $linkTitles; - $view->details = $linkArray; - print $view; - } - - public function showfullurl($item_id) { - // Generate the Dialog Box for the URLs to the items thumb, resize and fullsize image. - $item = ORM::factory("item", $item_id); - access::required("view", $item); - - // If the current page is an album, only display a URL and thumnail fields. - if ($item->is_album()) { - $linkArray[0] = array("Album URL:", url::abs_site("{$item->type}s/{$item->id}")); - $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); - $linkTitles[0] = array("URLs:", 2); - - // If the item is a movie, do not display the resize url. - } elseif ($item->is_movie()) { - // Link to the current page. - $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); - $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); - - // If the visitor has suficient privlidges to see the fullsized - // version of the current image, then display its URL. - if (access::can("view_full", $item)) { - $linkArray[2] = array("Video File:", $item->file_url(true)); - $linkTitles[0] = array("URLs:", 3); - } else { - $linkTitles[0] = array("URLs:", 2); - } - - // Or else assume the item is a photo. - } else { - // Link to the current page. - $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); - $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); - $linkArray[2] = array("Resized:", $item->resize_url(true)); - - // If the visitor has suficient privlidges to see the fullsized - // version of the current image, then display its URL. - if (access::can("view_full", $item)) { - $linkArray[3] = array("Full Size:", $item->file_url(true)); - $linkTitles[0] = array("URLs:", 4); - } else { - $linkTitles[0] = array("URLs:", 3); - } - } - - $view = new View("embedlinks_fullurldialog.html"); - $view->titles = $linkTitles; - $view->details = $linkArray; - print $view; - } -} diff --git a/3.1/modules/embedlinks/css/embedlinks_menu.css b/3.1/modules/embedlinks/css/embedlinks_menu.css deleted file mode 100644 index 6a4af408..00000000 --- a/3.1/modules/embedlinks/css/embedlinks_menu.css +++ /dev/null @@ -1,3 +0,0 @@ -#g-view-menu #g-embedlinks-link { - background-image: url('../images/ico-view-embedlinks.png'); -} diff --git a/3.1/modules/embedlinks/helpers/embedlinks_block.php b/3.1/modules/embedlinks/helpers/embedlinks_block.php deleted file mode 100644 index 4f35280d..00000000 --- a/3.1/modules/embedlinks/helpers/embedlinks_block.php +++ /dev/null @@ -1,55 +0,0 @@ - t("Embed Links Dialog"), "embed_links_album" => t("Embed Links Album")); - } - - static function get($block_id, $theme) { - $block = ""; - - if (!$theme->item()) { - return; - } - - switch ($block_id) { - case "embed_links_dialog": - // Display dialog buttons in the sidebar. - $block = new Block(); - $block->css_id = "g-embed-links-sidebar"; - $block->title = t("Link To This Page"); - $block->content = new View("embedlinks_sidebar.html"); - break; - - case "embed_links_album": - // If the current item is an album and if "In Page" links are enabled then - // display links to the current album in the theme sidebar. - if ($theme->item()->is_album() && module::get_var("embedlinks", "InPageLinks")) { - $block = new Block(); - $block->css_id = "g-embed-links-album-sidebar"; - $block->title = t("Links"); - $block->content = new View("embedlinks_album_block.html"); - } - break; - } - - return $block; - } -} diff --git a/3.1/modules/embedlinks/helpers/embedlinks_event.php b/3.1/modules/embedlinks/helpers/embedlinks_event.php deleted file mode 100644 index bafe383d..00000000 --- a/3.1/modules/embedlinks/helpers/embedlinks_event.php +++ /dev/null @@ -1,67 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("embedlinks") - ->label(t("EmbedLinks")) - ->url(url::site("admin/embedlinks"))); - } - - static function album_menu($menu, $theme) { - // Display embedlinks toolbar icon, if the corresponding setting is enabled. - if (module::get_var("embedlinks", "ToolbarLinks") == true) { - $menu - ->append(Menu::factory("link") - ->id("embedlinks") - ->label(t("Link to this page")) - ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) - ->css_class("g-dialog-link") - ->css_id("g-embedlinks-link")); - } - } - - static function photo_menu($menu, $theme) { - // Display embedlinks toolbar icon, if the corresponding setting is enabled. - if (module::get_var("embedlinks", "ToolbarLinks") == true) { - $menu - ->append(Menu::factory("link") - ->id("embedlinks") - ->label(t("Link to this page")) - ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) - ->css_class("g-dialog-link") - ->css_id("g-embedlinks-link")); - } - } - - static function movie_menu($menu, $theme) { - // Display embedlinks toolbar icon, if the corresponding setting is enabled. - if (module::get_var("embedlinks", "ToolbarLinks") == true) { - $menu - ->append(Menu::factory("link") - ->id("embedlinks") - ->label(t("Link to this page")) - ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) - ->css_class("g-dialog-link") - ->css_id("g-embedlinks-link")); - } - } -} diff --git a/3.1/modules/embedlinks/helpers/embedlinks_installer.php b/3.1/modules/embedlinks/helpers/embedlinks_installer.php deleted file mode 100644 index 3e98d59a..00000000 --- a/3.1/modules/embedlinks/helpers/embedlinks_installer.php +++ /dev/null @@ -1,42 +0,0 @@ -css("embedlinks_menu.css"); - } - - static function photo_bottom($theme) { - // If the current item is a photo and displaying "In Page" links - // is enabled, then insert HTML/BBCode links into the bottom - // of the page. - if (module::get_var("embedlinks", "InPageLinks")) { - $block = new Block(); - $block->css_id = "g-metadata"; - $block->title = t("Links"); - $block->content = new View("embedlinks_photo_block.html"); - return $block; - } - } -} diff --git a/3.1/modules/embedlinks/images/ico-view-embedlinks.png b/3.1/modules/embedlinks/images/ico-view-embedlinks.png deleted file mode 100644 index c5a66dd8..00000000 Binary files a/3.1/modules/embedlinks/images/ico-view-embedlinks.png and /dev/null differ diff --git a/3.1/modules/embedlinks/module.info b/3.1/modules/embedlinks/module.info deleted file mode 100644 index e6b7f8bf..00000000 --- a/3.1/modules/embedlinks/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "EmbedLinks" -description = "Display BBCode and HTML code to embed links to albums/images into other web pages." -version = 2 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:embedlinks" -discuss_url = "http://gallery.menalto.com/node/88322" diff --git a/3.1/modules/embedlinks/views/admin_embedlinks.html.php b/3.1/modules/embedlinks/views/admin_embedlinks.html.php deleted file mode 100644 index 9aa272c3..00000000 --- a/3.1/modules/embedlinks/views/admin_embedlinks.html.php +++ /dev/null @@ -1,5 +0,0 @@ - - diff --git a/3.1/modules/embedlinks/views/embedlinks_album_block.html.php b/3.1/modules/embedlinks/views/embedlinks_album_block.html.php deleted file mode 100644 index 220bf74d..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_album_block.html.php +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3.1/modules/embedlinks/views/embedlinks_alllinksdialog.html.php b/3.1/modules/embedlinks/views/embedlinks_alllinksdialog.html.php deleted file mode 100644 index a1cd4035..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_alllinksdialog.html.php +++ /dev/null @@ -1,14 +0,0 @@ - - -

    - diff --git a/3.1/modules/embedlinks/views/embedlinks_bbcodedialog.html.php b/3.1/modules/embedlinks/views/embedlinks_bbcodedialog.html.php deleted file mode 100644 index 3b7cace1..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_bbcodedialog.html.php +++ /dev/null @@ -1,24 +0,0 @@ - - -

    - diff --git a/3.1/modules/embedlinks/views/embedlinks_fullurldialog.html.php b/3.1/modules/embedlinks/views/embedlinks_fullurldialog.html.php deleted file mode 100644 index 2b40c8a1..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_fullurldialog.html.php +++ /dev/null @@ -1,24 +0,0 @@ - - -

    - diff --git a/3.1/modules/embedlinks/views/embedlinks_htmldialog.html.php b/3.1/modules/embedlinks/views/embedlinks_htmldialog.html.php deleted file mode 100644 index 46537754..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_htmldialog.html.php +++ /dev/null @@ -1,24 +0,0 @@ - - -

    - diff --git a/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php b/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php deleted file mode 100644 index 19d67596..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php +++ /dev/null @@ -1,218 +0,0 @@ - - - - -

    - - - - - - - - - - - - - - - - -is_photo()) { ?> - - - - - - - - - is_movie()) { ?> - - - - - - - - - - - - - - - - - is_photo()) { ?> - - - - - - - is_movie()) { ?> - file_url(true); - if (module::is_active("videos")) { - $items_video = ORM::factory("items_video") - ->where("item_id", "=", $item->id) - ->find(); - if ($items_video->loaded()) { - if (file_exists($item->resize_path() . ".flv")) { - $str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true)); - } else { - $str_movie_path = ""; - } - } - } - ?> - - - - - - - - - -is_photo()) { ?> - - - - - - - - - - - - - - - - - - - - - - - - -

    - - - - - - - - - - - - - - - - - is_photo()) { ?> - - - - - - - - - is_movie()) { ?> - - - - - - - - - - - - - - - - - is_photo()) { ?> - - - - - - - - is_photo()) { ?> - - - - - - - - - - - - - - - - - - - - - - - - -

    - - - - - - - - - - - - - is_photo()) { ?> - - - - - - - - - is_movie()) { ?> - - - - - - - - - - - diff --git a/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php b/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php deleted file mode 100644 index 0991382a..00000000 --- a/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php +++ /dev/null @@ -1,24 +0,0 @@ - - -id}") ?>" title="" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - - -
    - - - -id}") ?>" title="" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - - - - - - -id}") ?>" title="" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - - - - diff --git a/3.1/modules/exif_gps/controllers/admin_exif_gps.php b/3.1/modules/exif_gps/controllers/admin_exif_gps.php deleted file mode 100644 index 0abc5f25..00000000 --- a/3.1/modules/exif_gps/controllers/admin_exif_gps.php +++ /dev/null @@ -1,129 +0,0 @@ -content = new View("admin_exif_gps.html"); - $view->content->exifgps_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Save user preferences to the database. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Make sure the user filled out the form properly. - $form = $this->_get_admin_form(); - if ($form->validate()) { - Kohana_Log::add("error",print_r($form,1)); - - // Save settings to Gallery's database. - module::set_var("exif_gps", "googlemap_api_key", $form->Global->google_api_key->value); - module::set_var("exif_gps", "googlemap_max_autozoom", $form->Global->max_auto_zoom_level->value); - module::set_var("exif_gps", "sidebar_zoom", $form->Sidebar->sidebar_default_zoom->value); - module::set_var("exif_gps", "sidebar_mapformat", $form->Sidebar->sidebar_mapformat->value); - module::set_var("exif_gps", "sidebar_maptype", $form->Sidebar->sidebar_maptype->value); - module::set_var("exif_gps", "largemap_maptype", $form->LargeMap->largemap_maptype->value); - $checkbox_album = false; - $checkbox_user = false; - for ($i = 0; $i < count($form->Global->toolbar_map_album); $i++) { - if ($form->Global->toolbar_map_album->value[$i] == "checkbox_album") { - $checkbox_album = true; - } - } - for ($i = 0; $i < count($form->Global->toolbar_map_user); $i++) { - if ($form->Global->toolbar_map_user->value[$i] == "checkbox_user") { - $checkbox_user = true; - } - } - module::set_var("exif_gps", "toolbar_map_album", $checkbox_album); - module::set_var("exif_gps", "toolbar_map_user", $checkbox_user); - - // Display a success message and redirect back to the TagsMap admin page. - message::success(t("Your settings have been saved.")); - url::redirect("admin/exif_gps"); - } - - // Else show the page with errors - $view = new Admin_View("admin.html"); - $view->content = new View("admin_exif_gps.html"); - $view->content->exifgps_form = $form; - print $view; - } - - private function _get_admin_form() { - // Make a new Form. - $form = new Forge("admin/exif_gps/saveprefs", "", "post", - array("id" => "g-exif-gps-adminForm")); - - // Create group for global settings, like the Maps API Key - $gps_global_group = $form->group("Global") - ->label(t("Global Settings")); - $gps_global_group->input("google_api_key") - ->label(t("Google Maps API Key")) - ->value(module::get_var("exif_gps", "googlemap_api_key")) - ->rules("required"); - $gps_global_group->input("max_auto_zoom_level") - ->label(t("Maximum Auto-Zoom Level:")) - ->value(module::get_var("exif_gps", "googlemap_max_autozoom")); - $checkbox_user["checkbox_user"] = array(t("Show \"Map this user\" icon?"), module::get_var("exif_gps", "toolbar_map_user")); - $checkbox_album["checkbox_album"] = array(t("Show \"Map this album\" icon?"), module::get_var("exif_gps", "toolbar_map_album")); - $gps_global_group->checklist("toolbar_map_album") - ->options($checkbox_album); - $gps_global_group->checklist("toolbar_map_user") - ->options($checkbox_user); - - // Create a group for sidebar settings - $gps_sidebar = $form->group("Sidebar") - ->label(t("Sidebar Settings")); - $gps_sidebar->input("sidebar_default_zoom") - ->label(t("Default Zoom Level")) - ->value(module::get_var("exif_gps", "sidebar_zoom")) - ->rules("required"); - $gps_sidebar->dropdown("sidebar_mapformat") - ->label(t("Map Interface")) - ->options(array(t("Static"), t("Interactive"))) - ->selected(module::get_var("exif_gps", "sidebar_mapformat")); - $gps_sidebar->dropdown("sidebar_maptype") - ->label(t("Default Map Type")) - ->options(array(t("Map"), t("Satellite"), - t("Hybrid"), t("Terrain"))) - ->selected(module::get_var("exif_gps", "sidebar_maptype")); - - // Create a group for map album/user settings - $gps_large_map_group = $form->group("LargeMap") - ->label(t("Map Album/User Settings")); - $gps_large_map_group->dropdown("largemap_maptype") - ->label(t("Default Map Type")) - ->options(array(t("Map"), t("Satellite"), - t("Hybrid"), t("Terrain"))) - ->selected(module::get_var("exif_gps", "largemap_maptype")); - - // Add a save button to the form. - $form->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} diff --git a/3.1/modules/exif_gps/controllers/exif_gps.php b/3.1/modules/exif_gps/controllers/exif_gps.php deleted file mode 100644 index 52b94b9d..00000000 --- a/3.1/modules/exif_gps/controllers/exif_gps.php +++ /dev/null @@ -1,78 +0,0 @@ -join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->descendants(); - $curr_album = ORM::factory("item")->where("id", "=", $type_id)->find_all(); - $map_title = $curr_album[0]->title; - } elseif ($map_type == "user") { - // Generate an array of all items uploaded by the current user that - // have exif gps coordinates and order by latitude (to group items - // w/ the same coordinates together). - $items = ORM::factory("item") - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->where("items.owner_id", "=", $type_id) - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->find_all(); - $curr_user = ORM::factory("user")->where("id", "=", $type_id)->find_all(); - $map_title = $curr_user[0]->full_name . "'s " . t("Photos"); - } - - // Make a new page. - $template = new Theme_View("page.html", "other", "EXIFMap"); - $template->page_title = t("Gallery :: Map"); - $template->content = new View("exif_gps_map.html"); - if ($map_title == "") { - $template->content->title = t("Map"); - } else { - $template->content->title = t("Map of") . " " . $map_title; - } - - // Figure out default map type. - $int_map_type = module::get_var("exif_gps", "largemap_maptype"); - if ($int_map_type == 0) $map_type = "ROADMAP"; - if ($int_map_type == 1) $map_type = "SATELLITE"; - if ($int_map_type == 2) $map_type = "HYBRID"; - if ($int_map_type == 3) $map_type = "TERRAIN"; - $template->content->map_type = $map_type; - - // When mapping an album, generate a "return to album" link. - if (isset($curr_album)) $template->content->return_url = url::abs_site("{$curr_album[0]->type}s/{$curr_album[0]->id}"); - - // Load in module preferences. - $template->content->items = $items; - $template->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); - - // Display the page. - print $template; - } -} diff --git a/3.1/modules/exif_gps/css/exif_gps_menu.css b/3.1/modules/exif_gps/css/exif_gps_menu.css deleted file mode 100644 index 3f8afa28..00000000 --- a/3.1/modules/exif_gps/css/exif_gps_menu.css +++ /dev/null @@ -1,6 +0,0 @@ -#g-view-menu #g-exif-gps-album-link { - background-image: url('../images/ico-view-exif_gps_album.png'); -} -#g-view-menu #g-exif-gps-user-link { - background-image: url('../images/ico-view-exif_gps_user.png'); -} diff --git a/3.1/modules/exif_gps/helpers/exif_gps.php b/3.1/modules/exif_gps/helpers/exif_gps.php deleted file mode 100644 index 823b4b29..00000000 --- a/3.1/modules/exif_gps/helpers/exif_gps.php +++ /dev/null @@ -1,72 +0,0 @@ -is_photo() && $item->mime_type == "image/jpeg") { - $data = array(); - require_once(MODPATH . "exif/lib/exif.php"); - $exif_raw = read_exif_data_raw($item->file_path(), false); - if (isset($exif_raw['ValidEXIFData'])) { - foreach(self::_keys() as $field => $exifvar) { - if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) { - $value = $exif_raw[$exifvar[0]][$exifvar[1]]; - if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { - $value = utf8_encode($value); - } - $keys[$field] = Input::clean($value); - } - } - } - } - - // If coordinates were extracted, save them to the database. - if (isset($keys["Latitude"]) && isset($keys["Longitude"])) { - $record = ORM::factory("exif_coordinate"); - $record->item_id = $item->id; - $record->latitude = str_replace(",", ".", $keys["Latitude"]); - $record->longitude = str_replace(",", ".", $keys["Longitude"]); - // Represent N/S/E/W as postive and negative numbers - if (substr(strtoupper($keys["Latitude Reference"]), 0, 1) == "S") { - $record->latitude = "-" . $record->latitude; - } - if (substr(strtoupper($keys["Longitude Reference"]), 0, 1) == "W") { - $record->longitude = "-" . $record->longitude; - } - $record->save(); - } - } - - private static function _keys() { - // EXIF fields to extract. - if (!isset(self::$exif_keys)) { - self::$exif_keys = array( - "Latitude Reference" => array("GPS", "Latitude Reference", t("GPS: Latitude Reference"), ), - "Longitude Reference" => array("GPS", "Longitude Reference", t("GPS: Longitude Reference"),), - "Latitude" => array("GPS", "Latitude", t("GPS: Latitude"), ), - "Longitude" => array("GPS", "Longitude", t("GPS: Longitude"), ) - ); - } - return self::$exif_keys; - } -} diff --git a/3.1/modules/exif_gps/helpers/exif_gps_block.php b/3.1/modules/exif_gps/helpers/exif_gps_block.php deleted file mode 100644 index 5b2796fc..00000000 --- a/3.1/modules/exif_gps/helpers/exif_gps_block.php +++ /dev/null @@ -1,151 +0,0 @@ - t("EXIF GPS Location"), - "exif_gps_maps" => t("EXIF GPS Maps")); - } - - static function get($block_id, $theme) { - $block = ""; - - switch ($block_id) { - case "exif_gps_maps": - // Display links to a map of the current album and - // a map of the current user. - if ($theme->item()) { - $album_id = ""; - $item = $theme->item; - if ($item->is_album()) { - $album_id = $item->id; - } else { - $album_id = $item->parent_id; - } - $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); - $user_name = $curr_user[0]->full_name; - - // Make sure there are actually map-able items to display. - $album_items_count = ORM::factory("item", $album_id) - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->descendants_count(); - $user_items_count = ORM::factory("item") - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->where("items.owner_id", "=", $item->owner_id) - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->count_all(); - - if (($album_items_count > 0) || ($user_items_count > 0)) { - $block = new Block(); - $block->css_id = "g-exif-gps-maps"; - $block->title = t("Maps"); - $block->content = new View("exif_gps_maps_sidebar.html"); - $block->content->album_id = $album_id; - $block->content->user_id = $item->owner_id; - $block->content->user_name = $user_name; - $block->content->album_items = $album_items_count; - $block->content->user_items = $user_items_count; - } - } - break; - - case "exif_gps_location": - // Look for coordinates to display. - $latitude = ""; - $longitude = ""; - if ($theme->item()) { - // Check and see if the item has exif coordinates associated with it. - $record = ORM::factory("exif_coordinate")->where("item_id", "=", $theme->item->id)->find(); - if ($record->loaded()) { - $latitude = $record->latitude; - $longitude = $record->longitude; - } elseif (module::is_active("tagsmap") && module::is_active("tag")) { - // If there are no exif coordinates, check for tagsmap coordinates instead. - $tagsItem = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $theme->item->id) - ->find_all(); - if (count($tagsItem) > 0) { - foreach ($tagsItem as $oneTag) { - $tagsGPS = ORM::factory("tags_gps")->where("tag_id", "=", $oneTag->id)->find(); - if ($tagsGPS->loaded()) { - $latitude = $tagsGPS->latitude; - $longitude = $tagsGPS->longitude; - break; - } - } - } - } - } elseif ( ($theme->tag()) && (module::is_active("tagsmap") && module::is_active("tag")) ) { - // If the current page belongs to a tag, check and see if the tag has GPS coordinates. - $tagsGPS = ORM::factory("tags_gps")->where("tag_id", "=", $theme->tag()->id)->find(); - if ($tagsGPS->loaded()) { - $latitude = $tagsGPS->latitude; - $longitude = $tagsGPS->longitude; - } - } - - // If coordinates were found, create the block. - if ($latitude != "" && $longitude != "") { - $block = new Block(); - $block->css_id = "g-exif-gps-location"; - $block->title = t("Location"); - if (module::get_var("exif_gps", "sidebar_mapformat") == 1) { - $block->content = new View("exif_gps_dynamic_sidebar.html"); - if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "ROADMAP"; - if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "SATELLITE"; - if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "HYBRID"; - if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "TERRAIN"; - } else { - $block->content = new View("exif_gps_static_sidebar.html"); - if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "roadmap"; - if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "satellite"; - if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "hybrid"; - if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "terrain"; - } - $block->content->latitude = $latitude; - $block->content->longitude = $longitude; - } elseif (($theme->item()) && ($theme->item->is_album() && (module::get_var("exif_gps", "sidebar_mapformat") == 1))) { - // If coordinates were NOT found, and this is an album with a dynamic map, then map the contents of the album. - $items = ORM::factory("item", $theme->item->id) - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->descendants(); - if (count($items) > 0) { - $block = new Block(); - $block->css_id = "g-exif-gps-location"; - $block->title = t("Location"); - $block->content = new View("exif_gps_dynamic2_sidebar.html"); - if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "ROADMAP"; - if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "SATELLITE"; - if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "HYBRID"; - if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "TERRAIN"; - $block->content->items = $items; - $block->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); - } - } - break; - } - return $block; - } -} diff --git a/3.1/modules/exif_gps/helpers/exif_gps_event.php b/3.1/modules/exif_gps/helpers/exif_gps_event.php deleted file mode 100644 index 9ee59df9..00000000 --- a/3.1/modules/exif_gps/helpers/exif_gps_event.php +++ /dev/null @@ -1,220 +0,0 @@ -module == "exif") { - $data->messages["warn"][] = t("The EXIF_GPS module requires the EXIF module."); - } - } - - static function module_change($changes) { - // If EXIF is deactivated, display a warning that it is required for this module to function properly. - if (!module::is_active("exif") || in_array("exif", $changes->deactivate)) { - site_status::warning( - t("The EXIF_GPS module requires the EXIF module. " . - "Activate the EXIF module now", - array("url" => html::mark_clean(url::site("admin/modules")))), - "exif_gps_needs_exif"); - } else { - site_status::clear("exif_gps_needs_exif"); - } - } - - static function item_created($item) { - // Whenever a new non-album item is created, check it for GPS coordinates. - if (!$item->is_album()) { - exif_gps::extract($item); - } - } - - static function item_deleted($item) { - // Whenever an item is deleted, delete any corresponding GPS coordinates. - db::build() - ->delete("exif_coordinates") - ->where("item_id", "=", $item->id) - ->execute(); - } - - static function item_edit_form($item, $form) { - // Allow users to set / edit the GPS coordinates associated with the current item. - $record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); - $gpsdata = $form->edit_item->group("gps_data")->label("GPS Data"); - if ($record->loaded()) { - $gpsdata->input("latitude")->label(t("Latitude")) - ->value($record->latitude); - $gpsdata->input("longitude")->label(t("Longitude")) - ->value($record->longitude); - } else { - $gpsdata->input("latitude")->label(t("Latitude")); - $gpsdata->input("longitude")->label(t("Longitude")); - } - } - - static function item_edit_form_completed($item, $form) { - // Update the db records with the user-specified coordinates. - - // Require a set of coordinates (both latitude and longitude). - // If one or both fields are blank, completely delete any coordinates associated with this item. - if (($form->edit_item->gps_data->latitude->value == "") || ($form->edit_item->gps_data->longitude->value == "")) { - db::build() - ->delete("exif_coordinates") - ->where("item_id", "=", $item->id) - ->execute(); - } else { - $record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); - if (!$record->loaded()) { - $record->item_id = $item->id; - } - $record->latitude = $form->edit_item->gps_data->latitude->value; - $record->longitude = $form->edit_item->gps_data->longitude->value; - $record->save(); - } - } - - static function admin_menu($menu, $theme) { - // Add a link to the EXIF_GPS admin page to the Settings menu. - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("exif_gps") - ->label(t("EXIF_GPS Settings")) - ->url(url::site("admin/exif_gps"))); - } - - static function photo_menu($menu, $theme) { - $album_id = ""; - $item = $theme->item; - if ($item->is_album()) { - $album_id = $item->id; - } else { - $album_id = $item->parent_id; - } - $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); - $user_name = $curr_user[0]->full_name; - - // Make sure there are actually map-able items to display. - $album_items_count = ORM::factory("item", $album_id) - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->descendants_count(); - $user_items_count = ORM::factory("item") - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->where("items.owner_id", "=", $item->owner_id) - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->count_all(); - - if (($album_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_album") == true)) { - $menu->append(Menu::factory("link") - ->id("exif_gps_album") - ->label(t("Map this album")) - ->url(url::site("exif_gps/map/album/" . $album_id)) - ->css_id("g-exif-gps-album-link")); - } - if (($user_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_user") == true)) { - $menu->append(Menu::factory("link") - ->id("exif_gps_user") - ->label(t("Map ") . $user_name . t("'s photos")) - ->url(url::site("exif_gps/map/user/" . $item->owner_id)) - ->css_id("g-exif-gps-user-link")); - } - } - - static function movie_menu($menu, $theme) { - $album_id = ""; - $item = $theme->item; - if ($item->is_album()) { - $album_id = $item->id; - } else { - $album_id = $item->parent_id; - } - $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); - $user_name = $curr_user[0]->full_name; - - // Make sure there are actually map-able items to display. - $album_items_count = ORM::factory("item", $album_id) - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->descendants_count(); - $user_items_count = ORM::factory("item") - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->where("items.owner_id", "=", $item->owner_id) - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->count_all(); - - if (($album_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_album") == true)) { - $menu->append(Menu::factory("link") - ->id("exif_gps_album") - ->label(t("Map this album")) - ->url(url::site("exif_gps/map/album/" . $album_id)) - ->css_id("g-exif-gps-album-link")); - } - if (($user_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_user") == true)) { - $menu->append(Menu::factory("link") - ->id("exif_gps_user") - ->label(t("Map ") . $user_name . t("'s photos")) - ->url(url::site("exif_gps/map/user/" . $item->owner_id)) - ->css_id("g-exif-gps-user-link")); - } - } - - static function album_menu($menu, $theme) { - $album_id = ""; - $item = $theme->item; - if ($item->is_album()) { - $album_id = $item->id; - } else { - $album_id = $item->parent_id; - } - $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); - $user_name = $curr_user[0]->full_name; - - // Make sure there are actually map-able items to display. - $album_items_count = ORM::factory("item", $album_id) - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->descendants_count(); - $user_items_count = ORM::factory("item") - ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") - ->where("items.owner_id", "=", $item->owner_id) - ->viewable() - ->order_by("exif_coordinates.latitude", "ASC") - ->count_all(); - - if (($album_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_album") == true)) { - $menu->append(Menu::factory("link") - ->id("exif_gps_album") - ->label(t("Map this album")) - ->url(url::site("exif_gps/map/album/" . $album_id)) - ->css_id("g-exif-gps-album-link")); - } - if (($user_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_user") == true)) { - $menu->append(Menu::factory("link") - ->id("exif_gps_user") - ->label(t("Map ") . $user_name . t("'s photos")) - ->url(url::site("exif_gps/map/user/" . $item->owner_id)) - ->css_id("g-exif-gps-user-link")); - } - } -} diff --git a/3.1/modules/exif_gps/helpers/exif_gps_installer.php b/3.1/modules/exif_gps/helpers/exif_gps_installer.php deleted file mode 100644 index 9dc77968..00000000 --- a/3.1/modules/exif_gps/helpers/exif_gps_installer.php +++ /dev/null @@ -1,82 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {exif_coordinates} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `latitude` varchar(128) NOT NULL, - `longitude` varchar(128) NOT NULL, - PRIMARY KEY (`id`), - KEY(`item_id`, `id`)) - DEFAULT CHARSET=utf8;"); - - // If tagsmap is installed, copy the API key over. - if (module::is_active("tagsmap")) { - module::set_var("exif_gps", "googlemap_api_key", module::get_var("tagsmap", "googlemap_api_key")); - } - - // Set some default values. - module::set_var("exif_gps", "sidebar_zoom", "14"); - module::set_var("exif_gps", "sidebar_mapformat", "1"); - module::set_var("exif_gps", "sidebar_maptype", "1"); - module::set_var("exif_gps", "largemap_maptype", "2"); - - // Set the module version number. - module::set_version("exif_gps", 2); - } - - static function upgrade($version) { - if ($version == 1) { - // If tagsmap is installed, copy the API key over. - if (module::is_active("tagsmap")) { - module::set_var("exif_gps", "googlemap_api_key", module::get_var("tagsmap", "googlemap_api_key")); - } - - // Set some default values. - module::set_var("exif_gps", "sidebar_zoom", "14"); - module::set_var("exif_gps", "sidebar_mapformat", "1"); - module::set_var("exif_gps", "sidebar_maptype", "1"); - module::set_var("exif_gps", "largemap_maptype", "2"); - module::set_version("exif_gps", 2); - } - } - - static function deactivate() { - site_status::clear("exif_gps_needs_exif"); - } - - static function can_activate() { - $messages = array(); - if (!module::is_active("exif")) { - $messages["warn"][] = t("The EXIF_GPS module requires the EXIF module."); - } - return $messages; - } - - static function uninstall() { - // Delete the GPS table before uninstalling. - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {exif_coordinates};"); - module::delete("exif_gps"); - } -} diff --git a/3.1/modules/exif_gps/helpers/exif_gps_task.php b/3.1/modules/exif_gps/helpers/exif_gps_task.php deleted file mode 100644 index b07646ad..00000000 --- a/3.1/modules/exif_gps/helpers/exif_gps_task.php +++ /dev/null @@ -1,92 +0,0 @@ -delete("exif_coordinates") - ->where("item_id", "NOT IN", - db::build()->select("id")->from("items")) - ->execute(); - - // Display an option on the maintance screen for scanning existing photos - // for GPS data (in case photos were uploaded before the module was active). - return array(Task_Definition::factory() - ->callback("exif_gps_task::update_gps_index") - ->name(t("Extract Exif GPS data")) - ->description(t("Scan all photos for missing GPS data")) - ->severity(log::SUCCESS)); - } - - static function update_gps_index($task) { - $start = microtime(true); - - // Figure out the total number of photos in the database. - // If this is the first run, also set last_id and completed to 0. - $total = $task->get("total"); - if (empty($total)) { - $task->set("total", $total = count(ORM::factory("item")->where("type", "=", "photo")->find_all())); - $task->set("last_id", 0); - $task->set("completed", 0); - } - $last_id = $task->get("last_id"); - $completed = $task->get("completed"); - - // Generate an array of the next 100 photos to check. - //$all_photos = ORM::factory("item") - // ->where("id", ">", $last_id) - // ->where("type", "=", "photo") - // ->order_by("id") - // ->find_all(100); - - // Check each photo in the array to see if it already has exif gps data associated with it. - // If it doesn't, attempt to extract gps coordinates. - foreach (ORM::factory("item") - ->where("id", ">", $last_id) - ->where("type", "=", "photo") - ->order_by("id") - ->find_all(100) as $item) { - - $record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); - if (!$record->loaded()) { - exif_gps::extract($item); - } - $last_id = $item->id; - $completed++; - - if ($completed == $total || microtime(true) - $start > 1.5) { - break; - } - } - - $task->set("completed", $completed); - $task->set("last_id", $last_id); - - if ($total == $completed) { - $task->done = true; - $task->state = "success"; - $task->percent_complete = 100; - } else { - $task->percent_complete = round(100 * $completed / $total); - } - $task->status = t2("One photo scanned", "%count / %total photos scanned", $completed, - array("total" => $total)); - } -} diff --git a/3.1/modules/exif_gps/helpers/exif_gps_theme.php b/3.1/modules/exif_gps/helpers/exif_gps_theme.php deleted file mode 100644 index 90431195..00000000 --- a/3.1/modules/exif_gps/helpers/exif_gps_theme.php +++ /dev/null @@ -1,24 +0,0 @@ -css("exif_gps_menu.css"); - } -} diff --git a/3.1/modules/exif_gps/images/ico-view-exif_gps_album.png b/3.1/modules/exif_gps/images/ico-view-exif_gps_album.png deleted file mode 100644 index 255d6496..00000000 Binary files a/3.1/modules/exif_gps/images/ico-view-exif_gps_album.png and /dev/null differ diff --git a/3.1/modules/exif_gps/images/ico-view-exif_gps_user.png b/3.1/modules/exif_gps/images/ico-view-exif_gps_user.png deleted file mode 100644 index e9f72b3b..00000000 Binary files a/3.1/modules/exif_gps/images/ico-view-exif_gps_user.png and /dev/null differ diff --git a/3.1/modules/exif_gps/models/exif_coordinate.php b/3.1/modules/exif_gps/models/exif_coordinate.php deleted file mode 100644 index e3286d93..00000000 --- a/3.1/modules/exif_gps/models/exif_coordinate.php +++ /dev/null @@ -1,21 +0,0 @@ - - diff --git a/3.1/modules/exif_gps/views/exif_gps_dynamic2_sidebar.html.php b/3.1/modules/exif_gps/views/exif_gps_dynamic2_sidebar.html.php deleted file mode 100644 index f4f95799..00000000 --- a/3.1/modules/exif_gps/views/exif_gps_dynamic2_sidebar.html.php +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - diff --git a/3.1/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php b/3.1/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php deleted file mode 100644 index ff28e101..00000000 --- a/3.1/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php +++ /dev/null @@ -1,22 +0,0 @@ - - - - diff --git a/3.1/modules/exif_gps/views/exif_gps_map.html.php b/3.1/modules/exif_gps/views/exif_gps_map.html.php deleted file mode 100644 index 95f6221c..00000000 --- a/3.1/modules/exif_gps/views/exif_gps_map.html.php +++ /dev/null @@ -1,96 +0,0 @@ - - - - -
    -
    - dynamic_top() ?> -
    -

    -
    -
    -
    - -
    - -dynamic_bottom() ?> diff --git a/3.1/modules/exif_gps/views/exif_gps_maps_sidebar.html.php b/3.1/modules/exif_gps/views/exif_gps_maps_sidebar.html.php deleted file mode 100644 index 495554ac..00000000 --- a/3.1/modules/exif_gps/views/exif_gps_maps_sidebar.html.php +++ /dev/null @@ -1,9 +0,0 @@ - -
      - 0): ?> -
    • ">
    • - - 0): ?> -
    • ">
    • - -
    diff --git a/3.1/modules/exif_gps/views/exif_gps_static_sidebar.html.php b/3.1/modules/exif_gps/views/exif_gps_static_sidebar.html.php deleted file mode 100644 index 11d80c74..00000000 --- a/3.1/modules/exif_gps/views/exif_gps_static_sidebar.html.php +++ /dev/null @@ -1,2 +0,0 @@ - -&size=205x214&maptype=&markers=color:red|color:red|,&sensor=false"> diff --git a/3.1/modules/export_facebook/controllers/export_facebook.php b/3.1/modules/export_facebook/controllers/export_facebook.php deleted file mode 100644 index e40f9a40..00000000 --- a/3.1/modules/export_facebook/controllers/export_facebook.php +++ /dev/null @@ -1,70 +0,0 @@ -where("type", "=", "album") - ->where("id", "!=", "1") - ->viewable() - ->find_all(); - - // Loop through each album and output the necessary information. - foreach ($albums as $album) { - $album_contents = ORM::factory("item") - ->where("parent_id", "=", $album->id) - ->where("type", "=", "photo") - ->viewable() - ->find_all(); - - print ($album->level-2) . "\t" . $album->id . "\t" . $album->name . "\t" . count($album_contents) . "\n"; - } - - } else if ($_GET['a'] == "photos") { - // Generate an array of photo's in the specified album. - $photos = ORM::factory("item") - ->where("type", "=", "photo") - ->where("parent_id", "=", $_GET['id']) - ->viewable() - ->find_all(); - - // Loop through each photo, generate a list of tags (if available) and then output the necessary information. - foreach ($photos as $photo) { - $photo_keywords = ""; - if (module::is_active("tag")) { - $photo_tags = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $photo->id) - ->find_all(); - foreach ($photo_tags as $tag) { - $photo_keywords = $photo_keywords . $tag->name . ", "; - } - // Cut off the ", " from the end of the string. - if ($photo_keywords != "") { - $photo_keywords = substr($photo_keywords, 0, -2); - } - } - print $photo->id . "\t" . $photo->title . "\t" . stristr($photo->resize_url(false),"/var/") . "\t" . stristr($photo->thumb_url(false), "/var/") . "\t\t" . $photo->description . "\t" . $photo_keywords . "\n"; - } - } - } -} \ No newline at end of file diff --git a/3.1/modules/export_facebook/module.info b/3.1/modules/export_facebook/module.info deleted file mode 100644 index f7388b95..00000000 --- a/3.1/modules/export_facebook/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "export_facebook" -description = "Export Photos from Gallery 3 to Facebook." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:export_facebook" -discuss_url = "http://gallery.menalto.com/forum_module_export_facebook" diff --git a/3.1/modules/favourites/controllers/admin_favourites_configure.php b/3.1/modules/favourites/controllers/admin_favourites_configure.php deleted file mode 100644 index ad6af6f6..00000000 --- a/3.1/modules/favourites/controllers/admin_favourites_configure.php +++ /dev/null @@ -1,50 +0,0 @@ -validate()) { - - favourites_configuration::extractForm($form); - message::success(t("Favourites Module Configured!")); - } - } - else - { - favourites_configuration::populateForm($form); - } - - $view = new Admin_View("admin.html"); - $view->content = new View("admin_favourites_configure.html"); - - $view->content->form = $form; - - print $view; - } -} diff --git a/3.1/modules/favourites/controllers/favourites.php b/3.1/modules/favourites/controllers/favourites.php deleted file mode 100644 index d7989682..00000000 --- a/3.1/modules/favourites/controllers/favourites.php +++ /dev/null @@ -1,206 +0,0 @@ -name =="guest"){ - //login required. - url::redirect("login/html"); - return; - } - - $album = Favourites::getOrCreate()->get_as_album(); - - $page_size = module::get_var("gallery", "page_size", 9); - $input = Input::instance(); - $show = $input->get("show"); - - if ($show) { - $child = ORM::factory("item", $show); - $index = $album->get_position($child); - if ($index) { - $page = ceil($index / $page_size); - if ($page == 1) { - //url::redirect("favourites"); - } else { - //url::redirect("favourites?page=$page"); - } - } - } - - - $page = $input->get("page", "1"); - $children_count = $album->viewable()->children_count(); - $offset = ($page - 1) * $page_size; - $max_pages = max(ceil($children_count / $page_size), 1); - - - // Make sure that the page references a valid offset - if ($page < 1) { - //url::redirect($album->abs_url()); - } else if ($page > $max_pages) { - //url::redirect($album->abs_url("page=$max_pages")); - } - - - - $template = new Theme_View("page.html", "collection", "favourites"); - $template->set_global("page", $page); - $template->set_global("page_title", null); - $template->set_global("max_pages", $max_pages); - $template->set_global("page_size", $page_size); - $template->set_global("children", $album->viewable()->children($page_size, $offset)); - $template->set_global("children_count", $children_count); - $template->content = new View("dynamic.html"); - - print $template; - } - - public function view(){ - if (favourites_configuration::isUsersOnly() && identity::active_user()->name =="guest"){ - //login required. - Session::instance()->set("continue_url", url::current(true)); - $template = new Theme_View("page.html", "collection", "album"); - $template->content = new View("login_required.html"); - $template->content->login_form = new View("login_ajax.html"); - $template->content->login_form->form = auth::get_login_form("login/auth_html"); - print $template; - return; - } - - // extract details from url - $favourites = Favourites::getOrCreate(); - $favourites->clear(); - $array = func_get_args(); - foreach($array as $i=>$item){ - $favourites->toggle($item); - } - url::redirect("favourites"); - } - - private function getSaveForm(){ - - $form = new Forge("favourites/save_favourites", "", "post", array("id" => "gAddToBasketForm")); - $group = $form->group("save")->label(t("Save Favourites")); - $group->hidden("id"); - $group->input("fullname")->label(t("Name"))->id("gname") - ->error_messages("required", t("You must provide your name")) - ->error_messages("not_logged_in", t("You must be logged in to send favourites.")) - ->rules("required"); - $group->input("email")->label(t("Email Address"))->id("gemail") - ->error_messages("required", t("You must provide an email address")) - ->error_messages("valid_email", t("You must provide a valid email address")) - ->rules("valid_email") - ->rules("required"); - $group->textarea("details")->label(t("Comments"))->id("gdetails"); - - $group->submit("")->value(t("save")); - return $form; - } - public function save(){ - $view = new View("save_dialog.html"); - - // get the basket to add to - $form = self::getSaveForm(); - $view->form = $form; - - print $view; - - } - - public function save_favourites($id){ - - access::verify_csrf(); - - $form = self::getSaveForm(); - $valid = $form->validate(); - $name = $form->save->fullname->value; - $email_address = $form->save->email->value; - $comments = $form->save->details->value; - - - if (!isset($email_address ) || strlen($email_address) == 0) { - $valid=false; - $form->save->email->add_error("required", 1); - } - - if (!isset($name ) || strlen($name) == 0) { - $valid=false; - $form->save->fullname->add_error("required", 1); - } - - if (favourites_configuration::isUsersOnly() && identity::active_user()->name =="guest"){ - $valid=false; - $form->save->fullname->add_error("not_logged_in", 1); - } - - if ($valid){ - - $favourites = Favourites::getOrCreate(); - - $from = "From: ".favourites_configuration::getFromEmailAddress(); - - if (favourites_configuration::isEmailAdmin()) - { - $admin_email = $name." has chosen following photo as his or her favourites.\n"; - - // create the order items - $items = ORM::factory("item")->where("id","in", $favourites->contents)->find_all(); - foreach ($items->contents as $id=>$item){ - $admin_email = $admin_email." - ".$item->title." - ".$item->url().""; - } - $admin_email = $admin_email."\n you can view this favourite list at \n".$favourites->getUrl() - ."\n\n He or she has included the additional comments. \n".$comments - ."\n You can e-mail him or her with the following e-mail address ".$email_address; - - mail(favourites_configuration::getEmailAddress(), $name."'s favourites.", $admin_email, $from); - } - - $email = favourites_configuration::replaceStrings( - favourites_configuration::getEmailTemplate(), - Array( - "name"=>$name, - "comments"=>$comments, - "url"=>$favourites->getUrl(), - "owner"=>favourites_configuration::getOwner())); - - mail($email_address,$name."'s Favourites",$email, $from); - - json::reply(array("result" => "success", "location" => url::site("favourites"))); - return; - } - json::reply(array("result" => "error", "html" => (string)$form)); - } - - public function toggle_favourites($id){ - $favourites = Favourites::getOrCreate(); - $infavour = $favourites ->toggle($id); - $title = $infavour?t("Remove from favourites"):t("Add to favourites"); - json::reply(array("result" => "success", - "favourite" => $infavour, - "hasfavourites" => $favourites->hasFavourites(), - "title" => (string)$title)); - } - - public function clear_favourites(){ - Favourites::getOrCreate()->clear(); - } -} diff --git a/3.1/modules/favourites/css/favourites.css b/3.1/modules/favourites/css/favourites.css deleted file mode 100644 index 2f025504..00000000 --- a/3.1/modules/favourites/css/favourites.css +++ /dev/null @@ -1,15 +0,0 @@ -.icon-f{width:32px; height:32px; display:inline-block; background-image: url(../images/faves.png); position:absolute; top:20px; left:0; z-index:20} -.icon-f:hover{background-position: 0 -64px ;} -.icon-f.f-selected{background-position: 0 -32px ;} -.icon-f.f-working{background-position: 0 -96px ;} -#f-view-link {float:right;position:relative; width:50px; height:50px;} -#f-view-link a{width:64px; height:64px; display:inline-block;background-position: -96px 0px;background-image: url(../images/faves.png); position:absolute; top:15px; right:0;} -#f-view-link a:hover{background-position: -96px -64px ;} -#f-save-link {float:right;position:relative; width:64px; height:64px;} -#f-save-link a{width:64px; height:64px; display:inline-block;background-position: -32px 0px;background-image: url(../images/faves.png); position:absolute; top:15px; right:0;} -#f-save-link a:hover{background-position: -32px -64px ;} -.rtl .icon-f{right:0;left:auto;} -.rtl #f-view-link{float:left;} -.rtl #f-view-link a{left:0;right:auto;} -.rtl #f-save-link{float:left;} -.rtl #f-save-link a{left:0;right:auto;} \ No newline at end of file diff --git a/3.1/modules/favourites/helpers/favourites_configuration.php b/3.1/modules/favourites/helpers/favourites_configuration.php deleted file mode 100644 index cae987f4..00000000 --- a/3.1/modules/favourites/helpers/favourites_configuration.php +++ /dev/null @@ -1,144 +0,0 @@ - "g-configure-form")); - - $group = $form->group("configure")->label(t("Configure Favourites")); - $group->dropdown("select_allow") - ->label(t("Please choose what a user can select as a favourite")) - ->options(Array(1=>t("Items only"), 2=>"albums only", 3=>"Both")); - $group->input("fromemail")->label(t("From Email address for site emails"))->id("g-from-email-address"); - $group->checkbox("email_admin")->label(t("Email site owner every saved favourites list"))->id("g-email-admin"); - $group->input("email")->label(t("Email address of Site Owner"))->id("g-owner-email-address"); - $group->input("owner")->label(t("Site Owners name"))->id("g-owner-name"); - $group->checkbox("users_only")->label(t("Only Registered users can create favourites"))->id("g-users-only"); - $group->textarea("email_template")->label(t("Email Template"))->id("g-email-template"); - $group->submit("")->value(t("Save")); - return $form; - } - - static function populateForm($form){ - $form->configure->email->value(favourites_configuration::getEmailAddress()); - $form->configure->fromemail->value(favourites_configuration::getFromEmailAddress()); - $form->configure->email_admin->checked(favourites_configuration::isEmailAdmin()); - $form->configure->users_only->checked(favourites_configuration::isUsersOnly()); - $form->configure->owner->value(favourites_configuration::getOwner()); - $form->configure->email_template->value(favourites_configuration::getEmailTemplate()); - $form->configure->select_allow->selected(favourites_configuration::getSelectAllow()); - } - - static function extractForm($form){ - $email = $form->configure->email->value; - $emailfrom = $form->configure->fromemail->value; - $owner = $form->configure->owner->value; - $is_email_admin = $form->configure->email_admin->value; - $is_users_only = $form->configure->users_only->value; - $email_template = $form->configure->email_template->value; - $select_from = $form->configure->select_allow->selected; - favourites_configuration::setEmailAddress($email); - favourites_configuration::setEmailAdmin($is_email_admin); - favourites_configuration::setFromEmailAddress($emailfrom); - favourites_configuration::setOwner($owner); - favourites_configuration::setUsersOnly($is_users_only); - favourites_configuration::setEmailTemplate($email_template); - favourites_configuration::setSelectAllow($select_from); - } - - static function replaceStrings($string, $key_values) { - // Replace x_y before replacing x. - krsort($key_values, SORT_STRING); - - $keys = array(); - $values = array(); - foreach ($key_values as $key => $value) { - $keys[] = "%$key"; - $values[] = $value; - } - return str_replace($keys, $values, $string); - } - - static function getEmailAddress(){ - return module::get_var("favourites","email"); - } - - static function setEmailAddress($email){ - module::set_var("favourites","email",$email); - } - - static function getOwner(){ - return module::get_var("favourites","owner"); - } - - static function setOwner($owner){ - module::set_var("favourites","owner",$owner); - } - - static function getFromEmailAddress(){ - return module::get_var("favourites","from_email"); - } - - static function setFromEmailAddress($fromemail){ - module::set_var("favourites","from_email",$fromemail); - } - - static function isEmailAdmin(){ - return module::get_var("favourites","email_admin"); - } - - static function setEmailAdmin($email_admin){ - module::set_var("favourites","email_admin",$email_admin); - } - - static function isUsersOnly(){ - return module::get_var("favourites","users_only"); - } - - static function setUsersOnly($users_only){ - module::set_var("favourites","users_only",$users_only); - } - - static function getSelectAllow(){ - return module::get_var("favourites","select_from",1); - } - - static function setSelectAllow($select_from){ - module::set_var("favourites","select_from",$select_from); - } - - static function getEmailTemplate(){ - return module::get_var("favourites","email_template"); - } - - static function setEmailTemplate($email_template){ - module::set_var("favourites","email_template",$email_template); - } - - static function canSelectAlbums(){ - return self::getSelectAllow()!=1; - } - - static function canSelectItems(){ - return self::getSelectAllow()!=2; - } - -} \ No newline at end of file diff --git a/3.1/modules/favourites/helpers/favourites_event.php b/3.1/modules/favourites/helpers/favourites_event.php deleted file mode 100644 index a96ada02..00000000 --- a/3.1/modules/favourites/helpers/favourites_event.php +++ /dev/null @@ -1,34 +0,0 @@ -add_after("users_groups", - Menu::factory("link") - ->id("configure_favourites") - ->label(t("Favourites")) - ->url(url::site("admin/favourites_configure"))); - } - -} \ No newline at end of file diff --git a/3.1/modules/favourites/helpers/favourites_installer.php b/3.1/modules/favourites/helpers/favourites_installer.php deleted file mode 100644 index 91250521..00000000 --- a/3.1/modules/favourites/helpers/favourites_installer.php +++ /dev/null @@ -1,37 +0,0 @@ -css("favourites.css") - . $theme->script("favourites.js"); - } - - static function header_top($theme) { - - if (favourites_configuration::isUsersOnly() && identity::active_user()->name =="guest"){ - return; - } - - if ($theme->page_subtype=="favourites"){ - $view = new View("save_favourites.html"); - $view->favourites = Favourites::getOrCreate(); - return $view->render(); - } - else{ - $view = new View("view_favourites.html"); - $view->favourites = Favourites::getOrCreate(); - return $view->render(); - } - } - - static function photo_top($theme){ - if (!favourites_configuration::canSelectItems() || - (favourites_configuration::isUsersOnly() && identity::active_user()->name =="guest")){ - return; - } - - $view = new View("add_to_favourites.html"); - $view->item = $theme->item(); - $view->favourites = Favourites::getOrCreate(); - return $view->render(); - } - - static function thumb_top($theme, $item){ - if (favourites_configuration::isUsersOnly() && identity::active_user()->name =="guest"){ - return; - } - - if (($item->type=="album" && favourites_configuration::canSelectAlbums()) || - ($item->type!="album" && favourites_configuration::canSelectItems())){ - $view = new View("add_to_favourites.html"); - $view->item = $item; - $view->favourites = Favourites::getOrCreate(); - return $view->render(); - } - } - -} \ No newline at end of file diff --git a/3.1/modules/favourites/images/faves.png b/3.1/modules/favourites/images/faves.png deleted file mode 100644 index ebcccad0..00000000 Binary files a/3.1/modules/favourites/images/faves.png and /dev/null differ diff --git a/3.1/modules/favourites/js/favourites.js b/3.1/modules/favourites/js/favourites.js deleted file mode 100644 index 1eac91a8..00000000 --- a/3.1/modules/favourites/js/favourites.js +++ /dev/null @@ -1,30 +0,0 @@ -$(window).load(function() { - var favlink = $("#f-view-link"); - - $(".icon-f").each(function(){ - var elem = $(this); - var href = elem.attr("href"); - function clickFavourite(e){ - elem.addClass("f-working"); - $.getJSON(href,function (data){ - elem.removeClass("f-working"); - if (data.favourite){ - elem.addClass("f-selected"); - elem.attr("title",data.title); - } - else{ - elem.removeClass("f-selected"); - elem.attr("title",data.title); - } - if (data.hasfavourites){ - favlink.css('display','block'); - }else{ - favlink.css('display','none'); - } - - }); - return false; - } - elem.bind("click",clickFavourite); - }); -}); \ No newline at end of file diff --git a/3.1/modules/favourites/libraries/Favourites.php b/3.1/modules/favourites/libraries/Favourites.php deleted file mode 100644 index 93af434c..00000000 --- a/3.1/modules/favourites/libraries/Favourites.php +++ /dev/null @@ -1,63 +0,0 @@ -contents as $i => $value) { - if ($value==$id){ - unset($this->contents[$i]); - return false; - } - } - $this->contents[]=$id; - return true; - } - - public function contains($id){ - foreach ($this->contents as $i => $value){ - if ($value==$id) return true; - } - return false; - } - - public function hasFavourites(){ - return !empty($this->contents); - } - - public function get_as_album(){ - return Pseudo_album::create($this); - } - - public function clear(){ - $this->contents = array(); - } - - public function getUrl(){ - - $toReturn = url::site("favourites/view","http"); - - foreach ($this->contents as $i => $value){ - $toReturn = $toReturn."/".$value; - } - return $toReturn; - } - - public static function get(){ - return Session::instance()->get("favourites"); - } - - - public static function getOrCreate(){ - $session = Session::instance(); - - $favourites = $session->get("favourites"); - if (!$favourites) - { - $favourites = new Favourites(); - $session->set("favourites", $favourites); - } - return $favourites; - } -} diff --git a/3.1/modules/favourites/libraries/Pseudo_album.php b/3.1/modules/favourites/libraries/Pseudo_album.php deleted file mode 100644 index b4372121..00000000 --- a/3.1/modules/favourites/libraries/Pseudo_album.php +++ /dev/null @@ -1,396 +0,0 @@ -favourites = $favourites; - // Set reasonable defaults - $this->created = time(); - $this->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); - $this->thumb_dirty = 1; - $this->resize_dirty = 1; - $this->sort_column = "created"; - $this->sort_order = "ASC"; - $this->owner_id = identity::active_user()->id; - $this->parent_id = 1; - - $this->id = 1; - $this->type="album"; - $this->title=t("Favourites"); - $this->description=t("Currently selected favourites"); - } - - public function parent(){ - return ORM::factory("item")->where("id","=",1)->find(); - } - - public static function create($favourites) - { - return new Pseudo_album($favourites); - } - - public function loaded(){ - return true; - } - - public function children_count(){ - return count($this->favourites->contents); - } - - public function parents(){ - return ORM::factory("item")->where("id","=", 1)->find_all(); - } - - /** - * Add a set of restrictions to any following queries to restrict access only to items - * viewable by the active user. - * @chainable - */ - public function viewable() { - return $this; - } - - /** - * Is this item an album? - * @return true if it's an album - */ - public function is_album() { - return true; - } - - /** - * Is this item a photo? - * @return true if it's a photo - */ - public function is_photo() { - return false; - } - - /** - * Is this item a movie? - * @return true if it's a movie - */ - public function is_movie() { - return false; - } - - public function delete($ignored_id=null) { - } - - /** - * Specify the path to the data file associated with this item. To actually associate it, - * you still have to call save(). - * @chainable - */ - public function set_data_file($data_file) { - } - - /** - * Return the server-relative url to this item, eg: - * /gallery3/index.php/BobsWedding?page=2 - * /gallery3/index.php/BobsWedding/Eating-Cake.jpg - * - * @param string $query the query string (eg "show=3") - */ - public function url($query=null) { - $url = url::site("favourites"); - if ($query) { - $url .= "?$query"; - } - return $url; - } - - /** - * Return the full url to this item, eg: - * http://example.com/gallery3/index.php/BobsWedding?page=2 - * http://example.com/gallery3/index.php/BobsWedding/Eating-Cake.jpg - * - * @param string $query the query string (eg "show=3") - */ - public function abs_url($query=null) { - $url = url::abs_site("favourites"); - if ($query) { - $url .= "?$query"; - } - return $url; - } - - /** - * album: /var/albums/album1/album2 - * photo: /var/albums/album1/album2/photo.jpg - */ - public function file_path() { - return VARPATH . "albums/"; - } - - /** - * album: http://example.com/gallery3/var/resizes/album1/ - * photo: http://example.com/gallery3/var/albums/album1/photo.jpg - */ - public function file_url($full_uri=false) { - return; - } - - /** - * album: /var/resizes/album1/.thumb.jpg - * photo: /var/albums/album1/photo.thumb.jpg - */ - public function thumb_path() { - } - - /** - * Return true if there is a thumbnail for this item. - */ - public function has_thumb() { - return false; - } - - /** - * album: http://example.com/gallery3/var/resizes/album1/.thumb.jpg - * photo: http://example.com/gallery3/var/albums/album1/photo.thumb.jpg - */ - public function thumb_url($full_uri=false) { - } - - /** - * album: /var/resizes/album1/.resize.jpg - * photo: /var/albums/album1/photo.resize.jpg - */ - public function resize_path() { - } - - /** - * album: http://example.com/gallery3/var/resizes/album1/.resize.jpg - * photo: http://example.com/gallery3/var/albums/album1/photo.resize.jpg - */ - public function resize_url($full_uri=false) { - } - - - /** - * Return the relative path to this item's file. Note that the components of the path are - * urlencoded so if you want to use this as a filesystem path, you need to call urldecode - * on it. - * @return string - */ - public function relative_path() { - if (!$this->loaded()) { - return; - } - - if (!isset($this->relative_path_cache)) { - $this->_build_relative_caches()->save(); - } - return $this->relative_path_cache; - } - - /** - * Return the relative url to this item's file. - * @return string - */ - public function relative_url() { - } - - - /** - * Handle any business logic necessary to create or modify an item. - * @see ORM::save() - * - * @return ORM Item_Model - */ - public function save() { - } - - /** - * Return the Item_Model representing the cover for this album. - * @return Item_Model or null if there's no cover - */ - public function album_cover() { - return null; - } - - /** - * Find the position of the given child id in this album. The resulting value is 1-indexed, so - * the first child in the album is at position 1. - */ - public function get_position($child, $where=array()) { - /* - if ($this->sort_order == "DESC") { - $comp = ">"; - } else { - $comp = "<"; - } - $db = db::build(); - - // If the comparison column has NULLs in it, we can't use comparators on it and will have to - // deal with it the hard way. - $count = $db->from("items") - ->where("parent_id", "=", $this->id) - ->where($this->sort_column, "IS", null) - ->merge_where($where) - ->count_records(); - - if (empty($count)) { - // There are no NULLs in the sort column, so we can just use it directly. - $sort_column = $this->sort_column; - - $position = $db->from("items") - ->where("parent_id", "=", $this->id) - ->where($sort_column, $comp, $child->$sort_column) - ->merge_where($where) - ->count_records(); - - // We stopped short of our target value in the sort (notice that we're using a < comparator - // above) because it's possible that we have duplicate values in the sort column. An - // equality check would just arbitrarily pick one of those multiple possible equivalent - // columns, which would mean that if you choose a sort order that has duplicates, it'd pick - // any one of them as the child's "position". - // - // Fix this by doing a 2nd query where we iterate over the equivalent columns and add them to - // our base value. - foreach ($db - ->select("id") - ->from("items") - ->where("parent_id", "=", $this->id) - ->where($sort_column, "=", $child->$sort_column) - ->merge_where($where) - ->order_by(array("id" => "ASC")) - ->execute() as $row) { - $position++; - if ($row->id == $child->id) { - break; - } - } - } else { - // There are NULLs in the sort column, so we can't use MySQL comparators. Fall back to - // iterating over every child row to get to the current one. This can be wildly inefficient - // for really large albums, but it should be a rare case that the user is sorting an album - // with null values in the sort column. - // - // Reproduce the children() functionality here using Database directly to avoid loading the - // whole ORM for each row. - $order_by = array($this->sort_column => $this->sort_order); - // Use id as a tie breaker - if ($this->sort_column != "id") { - $order_by["id"] = "ASC"; - } - - $position = 0; - foreach ($db->select("id") - ->from("items") - ->where("parent_id", "=", $this->id) - ->merge_where($where) - ->order_by($order_by) - ->execute() as $row) { - $position++; - if ($row->id == $child->id) { - break; - } - } - } - - return $position;*/ - } - - /** - * Return an tag for the thumbnail. - * @param array $extra_attrs Extra attributes to add to the img tag - * @param int (optional) $max Maximum size of the thumbnail (default: null) - * @param boolean (optional) $center_vertically Center vertically (default: false) - * @return string - */ - public function thumb_img($extra_attrs=array(), $max=null, $center_vertically=false) { - return ""; - } - - /** - * Calculate the largest width/height that fits inside the given maximum, while preserving the - * aspect ratio. - * @param int $max Maximum size of the largest dimension - * @return array - */ - public function scale_dimensions($max) { - } - - /** - * Return an tag for the resize. - * @param array $extra_attrs Extra attributes to add to the img tag - * @return string - */ - public function resize_img($extra_attrs) { - } - - /** - * Return a flowplayer - - '; - - return $google_code; - } -} diff --git a/3.1/modules/google_analytics/module.info b/3.1/modules/google_analytics/module.info deleted file mode 100644 index ca5a51e3..00000000 --- a/3.1/modules/google_analytics/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Google Analytics" -description = "Renders the Google Analytics Code at the end of the page. Written by 'mcp'." -version = 2 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:google_analytics" -discuss_url = "http://gallery.menalto.com/forum_module_google_analytics" diff --git a/3.1/modules/google_analytics/views/admin_google_analytics.html.php b/3.1/modules/google_analytics/views/admin_google_analytics.html.php deleted file mode 100644 index e516f35a..00000000 --- a/3.1/modules/google_analytics/views/admin_google_analytics.html.php +++ /dev/null @@ -1,6 +0,0 @@ - -
    -

    -

    - -
    diff --git a/3.1/modules/gwtorganize/.classpath b/3.1/modules/gwtorganize/.classpath deleted file mode 100644 index f3207544..00000000 --- a/3.1/modules/gwtorganize/.classpath +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/3.1/modules/gwtorganize/.externalToolBuilders/New_Builder.launch b/3.1/modules/gwtorganize/.externalToolBuilders/New_Builder.launch deleted file mode 100644 index e9b2194c..00000000 --- a/3.1/modules/gwtorganize/.externalToolBuilders/New_Builder.launch +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/3.1/modules/gwtorganize/.project b/3.1/modules/gwtorganize/.project deleted file mode 100644 index c5360dd8..00000000 --- a/3.1/modules/gwtorganize/.project +++ /dev/null @@ -1,50 +0,0 @@ - - - gwtorganise - - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.google.gwt.eclipse.core.gwtProjectValidator - - - - - com.google.appengine.eclipse.core.enhancerbuilder - - - - - com.google.appengine.eclipse.core.projectValidator - - - - - com.google.gdt.eclipse.core.webAppProjectValidator - - - - - org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/New_Builder.launch - - - - - - org.eclipse.jdt.core.javanature - com.google.appengine.eclipse.core.gaeNature - com.google.gwt.eclipse.core.gwtNature - com.google.gdt.eclipse.core.webAppNature - - diff --git a/3.1/modules/gwtorganize/.settings/com.google.appengine.eclipse.core.prefs b/3.1/modules/gwtorganize/.settings/com.google.appengine.eclipse.core.prefs deleted file mode 100644 index 2d415391..00000000 --- a/3.1/modules/gwtorganize/.settings/com.google.appengine.eclipse.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Dec 22 13:14:57 NZDT 2009 -eclipse.preferences.version=1 -filesCopiedToWebInfLib=appengine-api-1.0-sdk-1.2.5.jar|appengine-api-labs-1.2.5.jar|datanucleus-appengine-1.0.3.jar|datanucleus-core-1.1.5.jar|datanucleus-jpa-1.1.5.jar|geronimo-jpa_3.0_spec-1.1.1.jar|geronimo-jta_1.1_spec-1.1.1.jar|jdo2-api-2.3-eb.jar diff --git a/3.1/modules/gwtorganize/.settings/com.google.gdt.eclipse.core.prefs b/3.1/modules/gwtorganize/.settings/com.google.gdt.eclipse.core.prefs deleted file mode 100644 index 62909a5c..00000000 --- a/3.1/modules/gwtorganize/.settings/com.google.gdt.eclipse.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Thu Dec 31 12:58:02 NZDT 2009 -eclipse.preferences.version=1 -jarsExcludedFromWebInfLib= diff --git a/3.1/modules/gwtorganize/.settings/com.google.gwt.eclipse.core.prefs b/3.1/modules/gwtorganize/.settings/com.google.gwt.eclipse.core.prefs deleted file mode 100644 index 92fa02a2..00000000 --- a/3.1/modules/gwtorganize/.settings/com.google.gwt.eclipse.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Fri Mar 26 11:43:34 NZDT 2010 -eclipse.preferences.version=1 -entryPointModules= -filesCopiedToWebInfLib=gwt-servlet.jar -gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48L2d3dC1jb21waWxlLXNldHRpbmdzPg\=\= diff --git a/3.1/modules/gwtorganize/build.xml b/3.1/modules/gwtorganize/build.xml deleted file mode 100644 index d63b9adb..00000000 --- a/3.1/modules/gwtorganize/build.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - Generate build info class... - - - - Virtual PVT Cell Revision: ${svn.revision} - Time stamp ${TODAY} - Write build info to file ${basedir}\helpers\BuildInfo.java - - -<?php defined("SYSPATH") or die("No direct script access."); -class revision_Core { - static function getTimeStamp(){ - return "${TODAY}"; - } -} - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/controllers/admin_gwtorganise.php b/3.1/modules/gwtorganize/controllers/admin_gwtorganise.php deleted file mode 100644 index 0c2b0486..00000000 --- a/3.1/modules/gwtorganize/controllers/admin_gwtorganise.php +++ /dev/null @@ -1,26 +0,0 @@ -content = new View("gwtorganise_view.html"); - print $view; - } -} diff --git a/3.1/modules/gwtorganize/controllers/admin_upload_configure.php b/3.1/modules/gwtorganize/controllers/admin_upload_configure.php deleted file mode 100644 index ab981dc8..00000000 --- a/3.1/modules/gwtorganize/controllers/admin_upload_configure.php +++ /dev/null @@ -1,53 +0,0 @@ -validate()) { - - upload_configuration::extractForm($form); - message::success(t("GWTOrganise Module Configured!")); - json::reply(array("result" => "success")); - return; - } - else - { - json::reply(array("result" => "error", "html" => (string) $form)); - return; - - } - } - else - { - upload_configuration::populateForm($form); - } - - print $form; - } -} diff --git a/3.1/modules/gwtorganize/controllers/json_album.php b/3.1/modules/gwtorganize/controllers/json_album.php deleted file mode 100644 index 542efb01..00000000 --- a/3.1/modules/gwtorganize/controllers/json_album.php +++ /dev/null @@ -1,341 +0,0 @@ - $child->id, - 'title' => $child->title, - 'type' => $child->type, - 'thumb' => $child->thumb_url(), - 'resize' => $child->resize_url(), - 'sort' => $child->sort_column); - } - - private function child_elements($item_id, $where = array()) { - $item = ORM::factory("item", $item_id); - access::required("view", $item); - - $children = $item->children(null, null, $where); - $encoded = array(); - foreach ($children as $id => $child){ - $encoded[$id] = self::child_json_encode($child); - } - - return json_encode($encoded); - } - - function is_admin() { - if (identity::active_user()->admin) { - json::reply(array("result" => "success", "csrf" => access::csrf_token())); - return; - } - json::reply(array("result" => "failure")); - - } - - function albums($item_id) { - print $this->child_elements($item_id, array(array("type", "=", "album"))); - } - - function children($item_id){ - - print $this->child_elements($item_id); - } - - function item($item_id){ - - $item = ORM::factory("item", $item_id); - access::required("view", $item); - json::reply(self::child_json_encode($item)); - } - - - function move_to($target_album_id) { - access::verify_csrf(); - - $target_album = ORM::factory("item", $target_album_id); - access::required("view", $target_album); - access::required("add", $target_album); - - $source_album = null; - - $js = json_decode($_REQUEST["sourceids"]); - $i = 0; - $source_album = null; - foreach ($js as $source_id) { - $source = ORM::factory("item", $source_id); - if (empty($source_album)) { // get the source_album - $source_album = $source->parent(); - } - if (!$source->contains($target_album)) { - access::required("edit", $source); - item::move($source, $target_album); - } - $i++; - } - - json::reply(array("result" => "success")); - } - - function rearrange($target_id, $before_or_after) { - access::verify_csrf(); - $target = ORM::factory("item", $target_id); - $album = $target->parent(); - access::required("view", $album); - access::required("edit", $album); - - $source_ids = json_decode($_REQUEST["sourceids"]); - - if ($album->sort_column != "weight") { - $i = 0; - foreach ($album->children() as $child) { - // Do this directly in the database to avoid sending notifications - db::build() - ->update("items") - ->set("weight", ++$i) - ->where("id", "=", $child->id) - ->execute(); - } - $album->sort_column = "weight"; - $album->sort_order = "ASC"; - $album->save(); - $target->reload(); - } - - // Find the insertion point - $target_weight = $target->weight; - if ($before_or_after == "after") { - $target_weight++; - } - - // Make a hole - $count = count($source_ids); - db::build() - ->update("items") - ->set("weight", new Database_Expression("`weight` + $count")) - ->where("weight", ">=", $target_weight) - ->where("parent_id", "=", $album->id) - ->execute(); - // Insert source items into the hole - foreach ($source_ids as $source_id) { - db::build() - ->update("items") - ->set("weight", $target_weight++) - ->where("id", "=", $source_id) - ->execute(); - } - - module::event("album_rearrange", $album); - - json::reply(array("result" => "success")); - - } - - public function start() { - batch::start(); - } - - public function add_photo($id) { - - access::verify_csrf(); - $album = ORM::factory("item", $id); - access::required("view", $album); - access::required("add", $album); - - - try { - $name = $_REQUEST["filename"]; - $body = @file_get_contents('php://input'); - //$stream = http_get_request_body(); - - $directory = Kohana::config('upload.directory', TRUE); - - // Make sure the directory ends with a slash - $directory = str_replace('\\','/',$directory); - $directory = rtrim($directory, '/').'/'; - - if ( ! is_dir($directory) AND Kohana::config('upload.create_directories') === TRUE) - { - // Create the upload directory - mkdir($directory, 0777, TRUE); - } - - if ( ! is_writable($directory)) - throw new Kohana_Exception('upload.not_writable', $directory); - - $temp_filename = $directory.$name; - $file = fopen($temp_filename,'w'); - - fwrite($file,$body); - - fclose($file); - - $item = ORM::factory("item"); - $item->name = basename($temp_filename); // Skip unique identifier Kohana adds - $item->title = item::convert_filename_to_title($item->name); - $item->parent_id = $album->id; - $item->set_data_file($temp_filename); - - $path_info = @pathinfo($temp_filename); - if (array_key_exists("extension", $path_info) && - in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) { - $item->type = "movie"; - $item->save(); - log::success("content", t("Added a movie"), - html::anchor("movies/$item->id", t("view movie"))); - } else { - $item->type = "photo"; - $item->save(); - log::success("content", t("Added a photo"), - html::anchor("photos/$item->id", t("view photo"))); - } - - } catch (Exception $e) { - Kohana::log("alert", $e->__toString()); - if (file_exists($temp_filename)) { - unlink($temp_filename); - } - throw new Kohana_Exception('Problem creating file.'. $e->__toString()); - } - unlink($temp_filename); - - json::reply(self::child_json_encode($item)); - } - - public function make_album_cover($id) { - access::verify_csrf(); - - $item = model_cache::get("item", $id); - access::required("view", $item); - access::required("view", $item->parent()); - access::required("edit", $item->parent()); - - item::make_album_cover($item); - - json::reply(array("result" => "success")); - } - - public function p_rotate($item, $dir){ - $degrees = 0; - switch($dir) { - case "ccw": - $degrees = -90; - break; - - case "cw": - $degrees = 90; - break; - } - - if ($degrees) { - gallery_graphics::rotate($item->file_path(), $item->file_path(), array("degrees" => $degrees), $item); - - list($item->width, $item->height) = getimagesize($item->file_path()); - $item->resize_dirty= 1; - $item->thumb_dirty= 1; - $item->save(); - - graphics::generate($item); - - $parent = $item->parent(); - if ($parent->album_cover_item_id == $item->id) { - copy($item->thumb_path(), $parent->thumb_path()); - $parent->thumb_width = $item->thumb_width; - $parent->thumb_height = $item->thumb_height; - $parent->save(); - } - } - - return $item; - } - - public function delete_many($id) { - - access::verify_csrf(); - - $js = json_decode($_REQUEST["sourceids"]); - - $i = 0; - $toreturn = array(); - foreach ($js as $item_id) { - $item = ORM::factory("item", $item_id); - access::required("view", $item); - access::required("edit", $item); - if ($item->is_album()) { - $msg = t("Deleted album %title", array("title" => html::purify($item->title))); - } else { - $msg = t("Deleted photo %title", array("title" => html::purify($item->title))); - } - $parent = $item->parent(); - $item->delete(); - message::success($msg); - } - - json::reply(array("result" => "success")); - - } - - public function rotate_many($dir) { - access::verify_csrf(); - - $js = json_decode($_REQUEST["sourceids"]); - - $i = 0; - $toreturn = array(); - foreach ($js as $item_id) { - $item = ORM::factory("item", $item_id); - access::required("view", $item); - access::required("edit", $item); - $item = $this->p_rotate($item, $dir); - $toreturn[$item_id] = self::child_json_encode($item); - $i++; - } - - print json_encode($toreturn); - } - - - public function rotate($id, $dir) { - access::verify_csrf(); - $item = model_cache::get("item", $id); - access::required("view", $item); - access::required("edit", $item); - - $item = $this->p_rotate($item, $dir); - - print json_encode(self::child_json_encode($item)); - } - - public function resize_config(){ - if (upload_configuration::isResize()) - { - json::reply(array( - "resize" => true, - "max_width" => upload_configuration::getMaxWidth(), - "max_height" => upload_configuration::getMaxHeight())); - } - else - { - json::reply(array("resize" => false)); - } - } -} diff --git a/3.1/modules/gwtorganize/helpers/gwtorganise_event.php b/3.1/modules/gwtorganize/helpers/gwtorganise_event.php deleted file mode 100644 index dd7696a9..00000000 --- a/3.1/modules/gwtorganize/helpers/gwtorganise_event.php +++ /dev/null @@ -1,31 +0,0 @@ -add_after("dashboard", - Menu::factory("link") - ->id("gwtorganise") - ->label(t("GWT Organise")) - ->url(url::site("admin/gwtorganise"))); - } - -} diff --git a/3.1/modules/gwtorganize/helpers/gwtorganise_installer.php b/3.1/modules/gwtorganize/helpers/gwtorganise_installer.php deleted file mode 100644 index cf5f5946..00000000 --- a/3.1/modules/gwtorganize/helpers/gwtorganise_installer.php +++ /dev/null @@ -1,34 +0,0 @@ - "gConfigureForm")); - $group = $form->group("configure")->label(t("Configure Upload Options")); - $group->checkbox("resize")->label(t("Resize before upload"))->id("gResize"); - $group->input("max_width")->label(t("Max Width"))->id("gMaxWidth"); - $group->input("max_height")->label(t("Max Height"))->id("gMax Height"); - $group->submit("")->value(t("Save")); - return $form; - } - - static function populateForm($form){ - $form->configure->resize->checked(upload_configuration::isResize()); - $form->configure->max_width->value(upload_configuration::getMaxWidth()); - $form->configure->max_height->value(upload_configuration::getMaxHeight()); - } - - static function extractForm($form){ - $resize = $form->configure->resize->value; - $max_width = $form->configure->max_width->value; - $max_height= $form->configure->max_height->value; - upload_configuration::setResize($resize); - upload_configuration::setMaxWidth($max_width); - upload_configuration::setMaxHeight($max_height); - } - - static function isResize(){ - return module::get_var("gwtorganise","resize"); - } - - static function getMaxWidth(){ - return intval(module::get_var("gwtorganise","max_width")); - } - - static function getMaxHeight(){ - return intval(module::get_var("gwtorganise","max_height")); - } - - static function setResize($isResize){ - module::set_var("gwtorganise","resize",$isResize); - } - - static function setMaxWidth($max_width){ - module::set_var("gwtorganise","max_width",$max_width); - } - - static function setMaxHeight($max_height){ - module::set_var("gwtorganise","max_height",$max_height); - } -} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/module.info b/3.1/modules/gwtorganize/module.info deleted file mode 100644 index c56c0976..00000000 --- a/3.1/modules/gwtorganize/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "GWT Organise" -description = "An alternative to organise and simple uploader making use of funky google technology." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:gwtorganize" -discuss_url = "http://gallery.menalto.com/forum_module_gwtorganize" diff --git a/3.1/modules/gwtorganize/src/META-INF/jdoconfig.xml b/3.1/modules/gwtorganize/src/META-INF/jdoconfig.xml deleted file mode 100644 index 5f56aa19..00000000 --- a/3.1/modules/gwtorganize/src/META-INF/jdoconfig.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/G3viewer.gwt.xml b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/G3viewer.gwt.xml deleted file mode 100644 index ffe12be4..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/G3viewer.gwt.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Album.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Album.java deleted file mode 100644 index 0fac208e..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Album.java +++ /dev/null @@ -1,467 +0,0 @@ -package com.gloopics.g3viewer.client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.google.gwt.event.logical.shared.CloseEvent; -import com.google.gwt.event.logical.shared.CloseHandler; -import com.google.gwt.gears.client.Factory; -import com.google.gwt.gears.client.desktop.Desktop; -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.gears.client.desktop.OpenFilesHandler; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONString; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.Command; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.MenuBar; -import com.google.gwt.user.client.ui.MenuItem; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.TreeItem; -import com.google.gwt.user.client.ui.Widget; - -/** - * encapsulates an album - * - * @author User - * - */ -public class Album extends TreeItem { - - private final int m_ID; - - private String m_Title; - - private final G3Viewer m_Container; - - private final View m_View; - - private final Label m_Label; - - private String m_Sort; - - private final List m_Items = new ArrayList(); - - private final Map m_IDtoItem = new HashMap(); - - private final Map m_IDtoAlbum = new HashMap(); - - private final Set m_AllUploads = new HashSet(); - - private final AlbumTreeDropController m_DropController; - - private final UploadControl m_UploadControl; - - public Album(JSONObject jsonObject, G3Viewer a_Container) { - m_UploadControl = a_Container.getUploadControl(); - m_ID = Utils.extractId(jsonObject.get("id")); - m_Title = ((JSONString) jsonObject.get("title")).stringValue(); - m_Sort = ((JSONString) jsonObject.get("sort")).stringValue(); - - m_Container = a_Container; - m_View = a_Container.getView(); - m_DropController = new AlbumTreeDropController(this); - m_Label = initComponents(); - - } - - public Album(G3Viewer a_Container) { - m_UploadControl = a_Container.getUploadControl(); - m_ID = 1; - m_Title = "Root"; - m_Container = a_Container; - m_View = a_Container.getView(); - m_Sort = "Unknown"; - m_DropController = new AlbumTreeDropController(this); - m_Label = initComponents(); - refresh(); - } - - public void updateValues(JSONValue a_Jso) { - JSONObject jso = a_Jso.isObject(); - if (jso != null) { - m_Title = ((JSONString) jso.get("title")).stringValue(); - String oldSort = m_Sort; - m_Sort = ((JSONString) jso.get("sort")).stringValue(); - if (!oldSort.equals(m_Sort)) { - if (m_View.getCurrentAlbum() == this) { - select(); - } - } - m_Label.setText(m_Title); - } - } - - public void refresh() { - m_Container.doJSONRequest(G3Viewer.VIEW_ITEM_URL + getId(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - updateValues(aValue); - } - }, false, true); - } - - public void showPopupMenu(Event event) { - m_Label.addStyleName("popped"); - final PopupPanel popupPanel = new PopupPanel(true); - popupPanel.setAnimationEnabled(true); - MenuBar popupMenuBar = new MenuBar(true); - - MenuItem editItem = new MenuItem("Edit Album", true, new Command() { - - @Override - public void execute() { - m_Container.doDialog("index.php/form/edit/albums/" + m_ID, - new HttpDialogHandler() { - @Override - public void success(String aResult) { - refresh(); - - } - }); - popupPanel.hide(); - - } - }); - - MenuItem addAlbum = new MenuItem("Add Album", true, new Command() { - - @Override - public void execute() { - m_Container.doDialog("index.php/form/add/albums/" + m_ID - + "?type=album", new HttpDialogHandler() { - @Override - public void success(String aResult) { - expand(); - m_View.getCurrentAlbum().select(); - } - }); - - popupPanel.hide(); - - } - }); - - MenuItem userPermissions = new MenuItem("User Permissions", true, - new Command() { - @Override - public void execute() { - m_Container.doDialog("index.php/permissions/browse/" - + m_ID, new HttpDialogHandler() { - @Override - public void success(String aResult) { - } - }); - - popupPanel.hide(); - - } - }); - - popupPanel.setStyleName("popup"); - editItem.addStyleName("popup-item"); - addAlbum.addStyleName("popup-item"); - userPermissions.addStyleName("popup-item"); - - if (m_Container.isUploadEnabled()) { - MenuItem uploadPhotos = new MenuItem("Upload Photos", true, - new Command() { - - @Override - public void execute() { - uploadFiles(); - popupPanel.hide(); - - } - }); - uploadPhotos.addStyleName("popup-item"); - popupMenuBar.addItem(uploadPhotos); - } - - popupMenuBar.addItem(editItem); - popupMenuBar.addItem(addAlbum); - popupMenuBar.addItem(userPermissions); - - popupMenuBar.setVisible(true); - popupPanel.add(popupMenuBar); - - int x = DOM.eventGetClientX(event); - int y = DOM.eventGetClientY(event); - popupPanel.setPopupPosition(x, y); - popupPanel.addCloseHandler(new CloseHandler() { - - @Override - public void onClose(CloseEvent event) { - - m_Label.removeStyleName("popped"); - } - }); - - popupPanel.show(); - } - - private Label initComponents() { - Label toReturn = new Label(m_Title); - toReturn.addStyleName("Tree-Album"); - setWidget(toReturn); - m_Container.getDragController() - .registerDropController(m_DropController); - expand(); - - return toReturn; - } - - public int getId() { - return m_ID; - } - - /* - * Adds the albums in the json response TreeItem. - */ - private void addAlbums(JSONValue jsonValue) { - JSONArray jsonArray = (JSONArray) jsonValue; - Set allAlbums = new HashSet(m_IDtoAlbum.keySet()); - for (int i = 0; i < jsonArray.size(); ++i) { - JSONObject jso = (JSONObject) jsonArray.get(i); - - int id = Utils.extractId(jso.get("id")); - - if (m_IDtoAlbum.containsKey(id)) { - m_IDtoAlbum.get(id).updateValues(jso); - } else { - Album album = new Album(jso, m_Container); - m_IDtoAlbum.put(id, album); - addItem(album); - } - allAlbums.remove(id); - } - for (Integer id : allAlbums) { - Album a = m_IDtoAlbum.remove(id); - a.cleanup(); - - removeItem(a); - } - } - - public void cleanup() { - m_Container.getDragController().unregisterDropController( - m_DropController); - for (int i = 0; i < getChildCount(); i++) { - ((Album) getChild(i)).cleanup(); - } - } - - /** - * moves the given array of ids to this album - */ - public void moveTo(JSONArray a_Ids) { - Loading.getInstance().loading("Moving Items.."); - - m_Container.doJSONRequest(G3Viewer.MOVE_TO_ALBUM_URL + getId() - + "?sourceids=" + a_Ids.toString(), new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - expand(); - m_View.getCurrentAlbum().expand(); - m_View.getCurrentAlbum().select(); - } - }, true, true); - } - - /** - * rearranges the albums - */ - - public void rearrangeTo(JSONArray a_Ids, Item m_CompareTo, boolean m_Before) { - Loading.getInstance().loading("Re-arranging.."); - String bora = m_Before ? "before" : "after"; - - m_Container.doJSONRequest(G3Viewer.REARRANGE_URL + m_CompareTo.getID() - + "/" + bora + "?sourceids=" + a_Ids.toString(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - m_View.getCurrentAlbum().select(); - } - }, true, true); - } - - /** - * returns the album with the given id - */ - public void selectSubAlbum(int a_Id) { - for (int i = 0; i < getChildCount(); i++) { - Album ab = ((Album) getChild(i)); - if (ab.m_ID == a_Id) { - ab.select(); - m_Container.getTree().ensureSelected(ab); - } - } - } - - /* - * Fetch the requested URL. - */ - public void expand() { - - m_Container.doJSONRequest(G3Viewer.VIEW_ALBUM_URL + getId(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - addAlbums(aValue); - } - }, false, true); - } - - public void select() { - Loading.getInstance().loading("Loading Contents.."); - m_Container.doJSONRequest(G3Viewer.VIEW_CHILDREN_URL + getId(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - viewAlbum(aValue); - } - }, false, true); - - } - - /* - * view Album contents - */ - private void viewAlbum(JSONValue a_Value) { - - JSONArray jsonArray = (JSONArray) a_Value; - - Item item = null; - int id; - JSONObject jso; - - m_Items.clear(); - - for (int i = 0; i < jsonArray.size(); ++i) { - jso = (JSONObject) jsonArray.get(i); - id = Utils.extractId(jso.get("id")); - - if (m_IDtoItem.containsKey(id)) { - item = m_IDtoItem.get(id); - item.updateValues(jso); - } else { - item = new Item(this, jso, m_Container); - m_IDtoItem.put(id, item); - - if (item.isAlbum()) { - linkAlbum(item); - } - } - m_Items.add(item); - - } - - m_View.setAlbum(this); - addPendingDownloads(); - } - - public List getItems() { - return m_Items; - } - - public void linkAlbum(Item a_Item) { - // link album - int id = a_Item.getID(); - Album child; - for (int j = 0; j < getChildCount(); j++) { - child = (Album) getChild(j); - if (child.m_ID == id) { - a_Item.setLinkedAlbum(child); - j = getChildCount(); - } - - } - } - - public boolean isManualSort() { - return m_Sort.equalsIgnoreCase("weight"); - } - - public void uploadFiles() { - Desktop desktop = Factory.getInstance().createDesktop(); - - desktop.openFiles(new OpenFilesHandler() { - - public void onOpenFiles(OpenFilesEvent event) { - uploadFiles(event.getFiles()); - } - }, false); - - } - - public void uploadFiles(final File[] files) { - - m_Container.doJSONRequest(G3Viewer.RESIZE_DETAILS_URL, - new HttpSuccessHandler() { - - public void success(JSONValue a_Value) { - JSONObject jso = a_Value.isObject(); - if (jso != null) { - - ResizeOptions ro = new ResizeOptions(jso); - UploadFile uf; - for (File file : files) { - uf = m_UploadControl.createUploadFile( - Album.this, file, ro); - m_AllUploads.add(uf); - m_View.addToView(uf); - } - m_Container.updateInformation(); - } - } - }, false, true); - - } - - public void removeUpload(UploadFile a_Uf) { - m_AllUploads.remove(a_Uf); - } - - public void replaceUpload(UploadFile a_Uf, JSONValue a_Return) { - m_AllUploads.remove(a_Uf); - - JSONObject jo = a_Return.isObject(); - - if (jo != null) { - Item item = new Item(this, jo, m_Container); - m_IDtoItem.put(item.getID(), item); - m_Items.add(item); - - if (m_View.getCurrentAlbum() == this) { - m_View.replaceInView(a_Uf, item); - } - } else { - if (m_View.getCurrentAlbum() == this) { - m_View.removeFromView(a_Uf); - } - } - } - - public void addPendingDownloads() { - for (UploadFile uf : m_AllUploads) { - m_View.addToView(uf); - } - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumItemDropContainer.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumItemDropContainer.java deleted file mode 100644 index 5e82bdfd..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumItemDropContainer.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.allen_sauer.gwt.dnd.client.DragContext; -import com.allen_sauer.gwt.dnd.client.VetoDragException; -import com.allen_sauer.gwt.dnd.client.drop.DropController; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.user.client.ui.Widget; - -public class AlbumItemDropContainer implements DropController{ - /** - * the tree - */ - private final Album m_Album; - - private final Item m_Item; - - public AlbumItemDropContainer(Item a_Item, Album a_Album){ - m_Album = a_Album; - m_Item = a_Item; - } - - @Override - public Widget getDropTarget() { - // TODO Auto-generated method stub - return m_Item; - } - - @Override - public void onDrop(DragContext context) { - m_Album.moveTo(Utils.extractIds(context)); - } - - @Override - public void onEnter(DragContext context) { - m_Item.addStyleName("drop-target"); - //m_Album.g - // TODO Auto-generated method stub - - } - - @Override - public void onLeave(DragContext context) { - // TODO Auto-generated method stub - m_Item.removeStyleName("drop-target"); - } - - @Override - public void onMove(DragContext context) { - // m_Album. - // TODO Auto-generated method stub - - } - - @Override - public void onPreviewDrop(DragContext context) throws VetoDragException { - // TODO Auto-generated method stub - - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumTree.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumTree.java deleted file mode 100644 index 0150ac06..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumTree.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.event.logical.shared.SelectionEvent; -import com.google.gwt.event.logical.shared.SelectionHandler; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.ui.Tree; -import com.google.gwt.user.client.ui.TreeItem; - -public class AlbumTree extends Tree{ - - private final G3Viewer m_Container; - - - public AlbumTree(G3Viewer a_Container){ - super(); - - sinkEvents(Event.ONMOUSEUP | Event.ONMOUSEDOWN | Event.ONCONTEXTMENU); - - m_Container = a_Container; - - addSelectionHandler(new SelectionHandler() { - - @Override - public void onSelection(SelectionEvent event) { - ((Album) event.getSelectedItem()).select(); - - } - }); - - - } - - public void fetchTree() - { - // fetch top album - Album tree = new Album(m_Container); - addItem(tree); - setSelectedItem(tree); - } - - public void onBrowserEvent(Event event) { - - - switch (DOM.eventGetType(event)) { - - case Event.ONMOUSEUP: - if (DOM.eventGetButton(event) == Event.BUTTON_RIGHT) { - event.preventDefault(); - break; - - } - else - { - super.onBrowserEvent(event); - } - break; - - case Event.ONMOUSEDOWN: - if (DOM.eventGetButton(event) == Event.BUTTON_RIGHT) { - event.preventDefault(); - break; - - } - else - { - super.onBrowserEvent(event); - } - break; - - case Event.ONCONTEXTMENU: - event.preventDefault(); - - popupMenu(event); - //GWT.log("Event.ONCONTEXTMENU", null); - break; - - default: - super.onBrowserEvent(event); - }//end switch - } - - public void refresh() - { - ((Album)getSelectedItem()).select(); - } - - public void ensureSelected(Album album) - { - setSelectedItem(album); - ensureSelectedItemVisible(); - } - - - /* do popup - */ - public void popupMenu(Event event){ - ((Album)getSelectedItem()).showPopupMenu(event); - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumTreeDropController.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumTreeDropController.java deleted file mode 100644 index 990ba9c7..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AlbumTreeDropController.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.allen_sauer.gwt.dnd.client.DragContext; -import com.allen_sauer.gwt.dnd.client.VetoDragException; -import com.allen_sauer.gwt.dnd.client.drop.DropController; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.user.client.ui.Widget; - -public class AlbumTreeDropController implements DropController{ - - /** - * the tree - */ - private final Album m_Album; - - public AlbumTreeDropController(Album a_Album){ - m_Album = a_Album; - } - - @Override - public Widget getDropTarget() { - // TODO Auto-generated method stub - return m_Album.getWidget(); - } - - @Override - public void onDrop(DragContext context) { - JSONArray jsa = new JSONArray(); - - int i = 0; - for (Widget widget : context.selectedWidgets){ - if (widget instanceof Item){ - jsa.set(i, new JSONNumber(((Item)widget).getID())); - i++; - } - } - m_Album.moveTo(jsa); - // context. - // TODO Auto-generated method stub - - } - - @Override - public void onEnter(DragContext context) { - m_Album.getWidget().addStyleName("drop-target"); - //m_Album.g - // TODO Auto-generated method stub - - } - - @Override - public void onLeave(DragContext context) { - // TODO Auto-generated method stub - m_Album.getWidget().removeStyleName("drop-target"); - } - - @Override - public void onMove(DragContext context) { - // m_Album. - // TODO Auto-generated method stub - - } - - @Override - public void onPreviewDrop(DragContext context) throws VetoDragException { - // TODO Auto-generated method stub - - } - - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AsyncResizer.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AsyncResizer.java deleted file mode 100644 index 3f02df0d..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AsyncResizer.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.gloopics.g3viewer.client.canvas.Canvas; - -import com.google.gwt.core.client.RunAsyncCallback; -import com.google.gwt.gears.client.blob.Blob; - -public class AsyncResizer implements RunAsyncCallback{ - - private final Blob m_Blob; - - private final UploadFile m_UploadFile; - - private final ResizeOptions m_ResizeOptions; - - public AsyncResizer(Blob a_Blob, UploadFile a_UploadFile){ - m_Blob = a_Blob; - m_UploadFile = a_UploadFile; - m_ResizeOptions = a_UploadFile.getResizeOptions(); - } - - @Override - public void onFailure(Throwable reason) { - G3Viewer.displayError("Error Resizing image", reason.toString()); - } - - @Override - public void onSuccess() { - // resize file - Canvas upThumb = com.gloopics.g3viewer.client.canvas.Factory.getInstance().createCanvas(); - upThumb.decode(m_Blob); - - float imageWidth = (float)upThumb.getWidth(); - float imageHeight = (float)upThumb.getHeight(); - - float widthRatio = imageWidth/((float)m_ResizeOptions.getMaxWidth()); - float heightRatio = imageHeight/((float)m_ResizeOptions.getMaxHeight()); - - if (widthRatio > heightRatio){ - if (widthRatio > 1) { - upThumb.resize(m_ResizeOptions.getMaxWidth(), (int)(imageHeight / widthRatio) ); - m_UploadFile.uploadBlob(upThumb.encode()); - return; - } - m_UploadFile.uploadBlob(m_Blob); - } - else - { - if (heightRatio > 1){ - upThumb.resize((int)(imageWidth / heightRatio), m_ResizeOptions.getMaxHeight()); - m_UploadFile.uploadBlob(upThumb.encode()); - return; - } - m_UploadFile.uploadBlob(m_Blob); - } - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AsyncRunner.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AsyncRunner.java deleted file mode 100644 index 15224353..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/AsyncRunner.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.core.client.RunAsyncCallback; - -public class AsyncRunner implements RunAsyncCallback{ - - private final Runnable m_Runnable; - - public AsyncRunner(Runnable a_Runnable){ - m_Runnable = a_Runnable; - } - - @Override - public void onFailure(Throwable reason) { - G3Viewer.displayError("Error Running Async", reason.toString()); - } - - - @Override - public void onSuccess() { - m_Runnable.run(); - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ConfirmDialogBox.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ConfirmDialogBox.java deleted file mode 100644 index 17af1422..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ConfirmDialogBox.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.http.client.RequestBuilder; -import com.google.gwt.http.client.RequestException; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.DialogBox; -import com.google.gwt.user.client.ui.DockPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTML; - - -public class ConfirmDialogBox extends DialogBox { - - public ConfirmCallBack m_Callback; - private final HTML m_Dialog; - - public interface ConfirmCallBack{ - void ok(); - } - - public ConfirmDialogBox(G3Viewer a_Parent){ - m_Dialog = new HTML("Empty"); - initComponents(); - } - - public void initComponents(){ - setModal(true); - addStyleName("dialog"); - setAnimationEnabled(true); - setText("Confirm"); - - Button close = new Button("Cancel", new ClickHandler() { - - public void onClick(ClickEvent event) { - ConfirmDialogBox.this.hide(); - - } - }); - - - Button ok = new Button("ok", new ClickHandler() { - - public void onClick(ClickEvent event) { - if (m_Callback!=null) - { - m_Callback.ok(); - } - - ConfirmDialogBox.this.hide(); - } - }); - - FlowPanel fp = new FlowPanel(); - fp.add(ok); - fp.add(close); - fp.addStyleName("dButtons"); - DockPanel dp = new DockPanel(); - dp.add(m_Dialog , DockPanel.CENTER); - dp.add(fp, DockPanel.SOUTH); - dp.addStyleName("dContents"); - add(dp); - - } - - public void doDialog(String a_Message, ConfirmCallBack a_Callback){ - m_Callback = a_Callback; - m_Dialog.setHTML(a_Message); - show(); - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/DropZoneController.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/DropZoneController.java deleted file mode 100644 index a083cb13..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/DropZoneController.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.allen_sauer.gwt.dnd.client.DragContext; -import com.allen_sauer.gwt.dnd.client.VetoDragException; -import com.allen_sauer.gwt.dnd.client.drop.DropController; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.Widget; - -public class DropZoneController implements DropController{ - - /** - * the album - */ - private final Album m_Album; - - /** - * the album - */ - private final HTML m_DropZone; - - /** - * compare to - */ - private final Item m_CompareTo; - - /** - * before - */ - private final boolean m_Before; - - public DropZoneController(Album a_Album, HTML a_DropZone, Item a_CompareTo, boolean a_Before){ - m_Album = a_Album; - m_DropZone = a_DropZone; - m_CompareTo = a_CompareTo; - m_Before = a_Before; - } - - @Override - public Widget getDropTarget() { - // TODO Auto-generated method stub - return m_DropZone; - } - - @Override - public void onDrop(DragContext context) { - - JSONArray jsa = new JSONArray(); - - int i = 0; - for (Widget widget : context.selectedWidgets){ - if (widget instanceof Item){ - jsa.set(i, new JSONNumber(((Item)widget).getID())); - i++; - } - } - m_Album.rearrangeTo(jsa, m_CompareTo, m_Before); - - } - - @Override - public void onEnter(DragContext context) { - m_DropZone.addStyleName("drop-target"); - - } - - @Override - public void onLeave(DragContext context) { - // TODO Auto-generated method stub - m_DropZone.removeStyleName("drop-target"); - } - - @Override - public void onMove(DragContext context) { - - } - - @Override - public void onPreviewDrop(DragContext context) throws VetoDragException { - - } - - -} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/G3Viewer.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/G3Viewer.java deleted file mode 100644 index af42fce8..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/G3Viewer.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Copyright 2007 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.gloopics.g3viewer.client; - - -import com.allen_sauer.gwt.dnd.client.PickupDragController; -import com.gloopics.g3viewer.client.ConfirmDialogBox.ConfirmCallBack; -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.InputElement; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.http.client.RequestBuilder; -import com.google.gwt.http.client.RequestException; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONString; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.DialogBox; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.DockPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.HorizontalSplitPanel; -import com.google.gwt.user.client.ui.RootPanel; -import com.google.gwt.user.client.ui.SimplePanel; - -/** - * Class that acts as a client to a JSON service. Currently, this client just - * requests a text which contains a JSON encoding of a search result set from - * yahoo. We use a text file to demonstrate how the pieces work without tripping - * on cross-site scripting issues. - * - * If you would like to make this a more dynamic example, you can associate a - * servlet with this example and simply have it hit the yahoo service and return - * the results. - */ -public class G3Viewer { - - private static String m_CSRF = null; - - private static class ErrorDialog extends DialogBox - { - - public ErrorDialog(String error) { - // Set the dialog box's caption. - setText("Error"); - - DockPanel dp = new DockPanel(); - dp.addStyleName("error"); - - error = error.replaceAll("<", "<").replaceAll(">", ">"); - dp.add(new HTML("
    " + error + "
    "), DockPanel.CENTER); - - - // DialogBox is a SimplePanel, so you have to set its widget property to - // whatever you want its contents to be. - Button ok = new Button("OK"); - ok.addClickHandler(new ClickHandler() { - public void onClick(ClickEvent event) { - ErrorDialog.this.hide(); - } - }); - - dp.add(ok, DockPanel.NORTH); - - setWidget(dp); - } - } - - /* - * BASE url - */ - private static String BASE_URL = - ((InputElement)Document.get().getElementById - ("baseurl")).getValue(); - - /* - * url to view album - */ - public static final String VIEW_ALBUM_URL = BASE_URL + "index.php/json_album/albums/"; - - /* - * url to view album - */ - public static final String MOVE_TO_ALBUM_URL = BASE_URL + "index.php/json_album/move_to/"; - - /* - * url to view album - */ - public static final String VIEW_CHILDREN_URL = BASE_URL + "index.php/json_album/children/"; - - /* - * Load Item - */ - public static final String VIEW_ITEM_URL = BASE_URL + "index.php/json_album/item/"; - - /** - * upload url - */ - public static final String UPLOAD_URL = BASE_URL + "index.php/json_album/add_photo/"; - - /** - * upload url - */ - public static final String REARRANGE_URL = BASE_URL + "index.php/json_album/rearrange/"; - - /** - * upload url - */ - public static final String IS_ADMIN_URL = BASE_URL + "index.php/json_album/is_admin/"; - - /** - * upload url - */ - public static final String MAKE_ALBUM_COVER_URL = BASE_URL + "index.php/json_album/make_album_cover/"; - - /** - * rotate url - */ - public static final String ROTATE_URL = BASE_URL + "index.php/json_album/rotate/"; - - /** - * rotate url - */ - public static final String ROTATE_ALL_URL = BASE_URL + "index.php/json_album/rotate_many/"; - - /** - * Resize details URL - */ - public static final String RESIZE_DETAILS_URL = BASE_URL + "index.php/json_album/resize_config"; - - /** - * Resize details URL - */ - public static final String DELETE_ALL_URL = BASE_URL + "index.php/json_album/delete_many/"; - - - /* - * tree - */ - private final AlbumTree m_Tree; - - /** - * the info panel - */ - private final InformationBar m_InfoBar; - - /** - * the only image dialog box - */ - private final ImageDialogBox m_ImageDialogBox = new ImageDialogBox(); - - /** - * the only dialog box - */ - private final HttpDialogBox m_HttpDialogBox= new HttpDialogBox(this); - - /** - * the only confirmation dialog box - */ - private final ConfirmDialogBox m_ConfirmDialogBox = new ConfirmDialogBox(this); - - private class SimplePanelEx extends SimplePanel - { - public SimplePanelEx() - { - super(); - sinkEvents(Event.ONMOUSEUP | Event.ONMOUSEDOWN | Event.ONCONTEXTMENU); - - } - - public void onBrowserEvent(Event event) { - - - switch (DOM.eventGetType(event)) { - - case Event.ONMOUSEUP: - if (DOM.eventGetButton(event) == Event.BUTTON_RIGHT) { - event.preventDefault(); - break; - - } - else - { - super.onBrowserEvent(event); - } - break; - - case Event.ONMOUSEDOWN: - if (DOM.eventGetButton(event) == Event.BUTTON_RIGHT) { - event.preventDefault(); - break; - - } - else - { - super.onBrowserEvent(event); - } - break; - - case Event.ONCONTEXTMENU: - event.preventDefault(); - m_Tree.popupMenu(event); - //GWT.log("Event.ONCONTEXTMENU", null); - break; - - default: - super.onBrowserEvent(event); - }//end switch - } - - } - - /** - * central split panel - */ - private final HorizontalSplitPanel m_SplitPanel = new HorizontalSplitPanel(); - - - /** - * Grid View - */ - private final View m_View = new View(this); - - /** - * the drag controller - */ - private final MyPickupDragController m_DragController; - - /** - * the upload control - */ - private final UploadControl m_UploadControl; - - /** - * constructor - */ - - public G3Viewer(){ - m_DragController = new MyPickupDragController(RootPanel.get(),false); - m_DragController.setBehaviorMultipleSelection(true); - m_DragController.setBehaviorDragStartSensitivity(5); - m_DragController.setBehaviorDragProxy(true); - m_UploadControl = (UploadControl)GWT.create(UploadControl.class); - m_UploadControl.init(this); - m_InfoBar = new InformationBar(this, m_UploadControl); - m_Tree = new AlbumTree(this); - - - checkAdmin(); - } - - public UploadControl getUploadControl() - { - return m_UploadControl; - } - - public boolean isUploadEnabled() - { - return m_UploadControl.isUploadEnabled(); - } - - public static String getCSRF() - { - return m_CSRF; - } - - private void checkAdmin(){ - - doJSONRequest(IS_ADMIN_URL, new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - JSONObject jso = aValue.isObject(); - if (jso != null){ - JSONString jss = jso.get("result").isString(); - if (jss != null){ - if (jss.stringValue().equals("success")) - { - - m_CSRF = (jso.get("csrf").isString()).stringValue(); - m_Tree.fetchTree(); - return; - } - } - } - - doDialog("index.php/login/ajax", new HttpDialogHandler() { - - @Override - public void success(String aResult) { - // recheck admin - checkAdmin(); - - } - }); - } - },false,true); - } - - - - /** - * Entry point for this simple application. Currently, we build the - * application's form and wait for events. - */ - public void onModuleLoad() { - initializeMainForm(); - } - - public static void displayError(String errorType, String errorMessage) { - new ErrorDialog(errorType + "\n" + errorMessage).show(); - } - - /** - * returns the drag controller - */ - public MyPickupDragController getDragController(){ - return m_DragController; - } - - public AlbumTree getTree(){ - return m_Tree; - } - - public View getView(){ - return m_View; - } - - public void updateInformation(){ - m_InfoBar.updateInformation(); - } - - public void doDialog(String a_Url, HttpDialogHandler a_Handler) - { - m_HttpDialogBox.doDialog(BASE_URL + a_Url, a_Handler); - } - - public void doConfirm(String a_Text, ConfirmCallBack a_Handler) - { - m_ConfirmDialogBox.doDialog(a_Text, a_Handler); - } - - public void showImage(String a_Url) - { - m_ImageDialogBox.doDialog( a_Url); - } - - public void doJSONRequest(final String a_URL, final HttpSuccessHandler a_Handler, final boolean a_hasParams, final boolean a_IncludeCSRF){ - doJSONRequest(a_URL, a_Handler, a_hasParams, a_IncludeCSRF, ""); - } - - - public void doJSONRequest(final String a_URL, final HttpSuccessHandler a_Handler, final boolean a_hasParams, final boolean a_IncludeCSRF, - String a_Data ){ - try { - String url; - if (m_CSRF != null && a_IncludeCSRF) - { - url = a_URL + (a_hasParams?"&csrf=":"?csrf=") + m_CSRF; - } - else - { - url = a_URL; - } - RequestBuilder requestBuilder = new RequestBuilder( - RequestBuilder.POST, url); - requestBuilder.setHeader("Content-Type", "application/x-www-form-urlencoded"); - requestBuilder.setHeader("X-Requested-With", "XMLHttpRequest"); - requestBuilder.setCallback(new JSONResponseTextHandler( - new JSONResponseCallback() { - - @Override - public void onResponse(JSONValue aValue) { - a_Handler.success(aValue); - } - - @Override - public void onError(Throwable aThrowable) { - - if (aThrowable.getCause() != null) - { - StringBuffer stack = new StringBuffer(); - StackTraceElement[] stes = aThrowable.getCause().getStackTrace(); - for (StackTraceElement ste: stes){ - stack.append(ste.toString()); - stack.append(" \n "); - } - displayError("a Unexpected Error ", - aThrowable.toString() + " - " + a_URL + "\n " + stack.toString()); - - } - else - { - displayError("a Unexpected Error ", - aThrowable.toString() + " - " + a_URL); - } - }} - )); - - requestBuilder.setRequestData(a_Data); - requestBuilder.send(); - } catch (RequestException ex) { - displayError("Request Exception", ex.toString() + " - " + a_URL); - } - } - - /** - * Initialize the main form's layout and content. - */ - private void initializeMainForm() { - - m_View.addStyleName("view"); - - m_Tree.setVisible(true); - - m_SplitPanel.setSplitPosition("20%"); - - m_SplitPanel.setLeftWidget(m_Tree); - - m_SplitPanel.setRightWidget(m_View); - - SimplePanel sp = new SimplePanelEx(); - sp.add(m_SplitPanel); - - m_InfoBar.initializeForm(); - RootPanel.get("main").add(sp); - RootPanel.get("main").add(m_InfoBar); - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpDialogBox.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpDialogBox.java deleted file mode 100644 index b7e8bf07..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpDialogBox.java +++ /dev/null @@ -1,297 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.NodeList; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.http.client.Request; -import com.google.gwt.http.client.RequestBuilder; -import com.google.gwt.http.client.RequestCallback; -import com.google.gwt.http.client.RequestException; -import com.google.gwt.http.client.Response; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.DialogBox; -import com.google.gwt.user.client.ui.DockPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.FormPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.FormPanel.SubmitEvent; - -public class HttpDialogBox extends DialogBox { - - private FormPanel m_FormPanel = null; - - private HttpDialogHandler m_Callback; - - private final HTML m_Dialog; - private final G3Viewer m_Parent; - - public HttpDialogBox(G3Viewer a_Parent) { - m_Parent = a_Parent; - m_Dialog = new HTML("Empty"); - initComponents(); - } - - public void initComponents() { - setModal(true); - addStyleName("dialog"); - setAnimationEnabled(true); - setText("Dialog"); - - Button close = new Button("Cancel", new ClickHandler() { - - public void onClick(ClickEvent event) { - HttpDialogBox.this.hide(); - Loading.getInstance().endLoading(); - - } - }); - - Button ok = new Button("ok", new ClickHandler() { - - public void onClick(ClickEvent event) { - submitForm(); - } - }); - - FlowPanel fp = new FlowPanel(); - fp.add(ok); - fp.add(close); - fp.addStyleName("dButtons"); - DockPanel dp = new DockPanel(); - dp.add(m_Dialog, DockPanel.CENTER); - dp.add(fp, DockPanel.SOUTH); - dp.addStyleName("dContents"); - add(dp); - - } - - private class RequestCallbackImpl implements RequestCallback { - - private static final int STATUS_CODE_OK = 200; - - private final String m_URL; - - public RequestCallbackImpl(String a_URL) { - m_URL = a_URL; - } - - public void onError(Request request, Throwable exception) { - showDialog("Could not get " + m_URL + " Exception thrown " - + exception.toString()); - } - - public void onResponseReceived(Request request, Response response) { - if (STATUS_CODE_OK == response.getStatusCode()) { - showDialog(response.getText()); - } else { - showDialog(m_URL + response.getText()); - } - } - } - - public native static String createData(Element form) /*-{ - var fieldValue = function(el, successful) { - var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); - if (typeof successful == 'undefined') successful = true; - - if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || - (t == 'checkbox' || t == 'radio') && !el.checked || - (t == 'submit' || t == 'image') && el.form && el.form.clk != el || - tag == 'select' && el.selectedIndex == -1)) - return null; - - if (tag == 'select') { - var index = el.selectedIndex; - if (index < 0) return null; - var a = [], ops = el.options; - var one = (t == 'select-one'); - var max = (one ? index+1 : ops.length); - for(var i=(one ? index : 0); i < max; i++) { - var op = ops[i]; - if (op.selected) { - var v = op.value; - if (!v) // extra pain for IE... - v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value; - if (one) return v; - a.push(v); - } - } - return a; - } - return el.value; - }; - - - var a = ""; - var added = false; - var appendA = function(str) - { - if(added) - { - a = a+"&"+str; - } - else - { - a = a+str; - added = true; - } - } - - var els = form.getElementsByTagName('*'); //: form.elements; - if (!els) return a; - for(var i=0, max=els.length; i < max; i++) { - var el = els[i]; - var n = el.name; - if (!n) continue; - - var v = fieldValue(el, true); - if (v && v.constructor == Array) { - for(var j=0, jmax=v.length; j < jmax; j++) - appendA(n+"="+escape(v[j])); - } - else if (v !== null && typeof v != 'undefined') - appendA(n+"="+escape(v)); - } - - return a; - }-*/; - - private void submitForm() { - if (m_FormPanel != null) { - String url = m_FormPanel.getAction(); - - String data = createData(m_FormPanel.getElement()); - - m_Parent.doJSONRequest(url, new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - JSONObject object = aValue.isObject(); - if (object != null) { - JSONValue result = object.get("result"); - if (result != null) { - if (result.isString().stringValue().equals( - "success")) { - m_Callback.success(aValue.toString()); - Loading.getInstance().endLoading(); - } else { - JSONValue resul = object.get("form"); - showDialog(resul.isString().stringValue()); - } - } else { - G3Viewer.displayError("result was null ", aValue - .toString()); - } - } else { - G3Viewer.displayError("Only JSON Value Returned ", - aValue.toString()); - } - } - }, false, false, data); - } - - HttpDialogBox.this.hide(); - Loading.getInstance().loading("Please Wait.."); - - } - - private void showDialog(String a_Text) { - - m_Dialog.setHTML(a_Text); - - // hide all submits - NodeList inputs = this.getElement().getElementsByTagName( - "input"); - Element input; - for (int i = 0; i < inputs.getLength(); i++) { - input = inputs.getItem(i); - - if (input.getAttribute("type").equals("submit")) { - input.setAttribute("style", "display:none"); - } - } - - Loading.getInstance().hideAnimation(); - show(); - - // find forms if it exists - NodeList forms = this.getElement() - .getElementsByTagName("form"); - if (forms.getLength() > 0) { - Element element = this.getElement().getElementsByTagName("form") - .getItem(0); - setText(element.getElementsByTagName("legend").getItem(0) - .getInnerText()); - - m_FormPanel = FormPanel.wrap(element, true); - m_FormPanel.addSubmitHandler(new FormPanel.SubmitHandler() { - - @Override - public void onSubmit(SubmitEvent event) { - event.cancel(); - submitForm(); - } - }); - } else { - setText(this.getElement().getElementsByTagName("legend").getItem(0) - .getInnerText()); - m_FormPanel = null; - } - - setPopupPosition(Window.getClientWidth() / 2 - this.getOffsetWidth() - / 2, Window.getClientHeight() / 2 - this.getOffsetHeight() / 2); - - Timer t = new Timer() { - public void run() { - - // find any scripts if they exist - NodeList scripts = HttpDialogBox.this.getElement() - .getElementsByTagName("script"); - for (int i = 0; i < scripts.getLength(); i++) { - Element script = scripts.getItem(i); - // script.removeFromParent(); - Element nscript = DOM.createElement("script"); - nscript.setAttribute("type", script.getAttribute("type")); - nscript.setAttribute("src", script.getAttribute("src")); - - getElementByTagName("head").appendChild(nscript); - } - - } - }; - t.schedule(10); - } - - /** - * Gets an element by its tag name; handy for single elements like HTML, - * HEAD, BODY. - * - * @param tagName - * The name of the tag. - * @return The element with that tag name. - */ - public native static Element getElementByTagName(String tagName) /*-{ - var elem = $doc.getElementsByTagName(tagName); - return elem ? elem[0] : null; - }-*/; - - public void doDialog(String url, HttpDialogHandler a_Callback) { - m_Callback = a_Callback; - Loading.getInstance().loading("Please Wait"); - RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url); - - try { - builder.sendRequest(null, new RequestCallbackImpl(url)); - } catch (RequestException e) { - showDialog("Could not call " + url + " Exception thrown " - + e.toString()); - } - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpDialogHandler.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpDialogHandler.java deleted file mode 100644 index 691ba9b2..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpDialogHandler.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.gloopics.g3viewer.client; - - -public interface HttpDialogHandler { - - public void success(String a_Result); -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpSuccessHandler.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpSuccessHandler.java deleted file mode 100644 index 6fe3a1f2..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/HttpSuccessHandler.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.json.client.JSONValue; - -public interface HttpSuccessHandler { - public void success(JSONValue a_Value); -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ImageDialogBox.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ImageDialogBox.java deleted file mode 100644 index 5b95d116..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ImageDialogBox.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.ErrorEvent; -import com.google.gwt.event.dom.client.ErrorHandler; -import com.google.gwt.event.dom.client.LoadEvent; -import com.google.gwt.event.dom.client.LoadHandler; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.RootPanel; -import com.google.gwt.user.client.ui.SimplePanel; - -public class ImageDialogBox extends PopupPanel{ - - private Image m_Image = null; - - public ImageDialogBox(){ - initComponents(); - } - - - private void initComponents() - { - setModal(true); - addStyleName("dialog"); - setAnimationEnabled(true); - - addDomHandler(new ClickHandler() { - - @Override - public void onClick(ClickEvent event) { - ImageDialogBox.this.hide(); - - Loading.getInstance().endLoading(); - } - - } ,ClickEvent.getType()); - - } - - public void doDialog(String a_Image){ - - Loading.getInstance().loading("Loading Image.."); - - if (m_Image != null){ - m_Image.removeFromParent(); - } - - m_Image = new Image(); - final SimplePanel sp = new SimplePanel(); - m_Image.addLoadHandler(new LoadHandler() { - - @Override - public void onLoad(LoadEvent event) { - sp.removeFromParent(); - - Loading.getInstance().hideAnimation(); - - add(m_Image); - show(); - - setPopupPosition(Window.getClientWidth() / 2 - getOffsetWidth() / 2, - Window.getClientHeight() / 2 - getOffsetHeight() / 2); - - - - - - } - }); - m_Image.addErrorHandler(new ErrorHandler() { - - @Override - public void onError(ErrorEvent event) { - sp.removeFromParent(); - G3Viewer.displayError("Error Loading Image", "It could be that the resized version of the image has not been built correctly."); - Loading.getInstance().endLoading(); - } - }); - - sp.setSize("0px", "0px"); - sp.setStylePrimaryName("hideme"); - sp.setWidget(m_Image); - RootPanel.get().add(sp); - - m_Image.setUrl(a_Image); - - } - - - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/InformationBar.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/InformationBar.java deleted file mode 100644 index c60524e6..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/InformationBar.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.gloopics.g3viewer.client; - -import java.util.HashSet; -import java.util.Set; - -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.user.client.ui.Anchor; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.Label; - -public class InformationBar extends FlowPanel{ - - private final G3Viewer m_Container; - - private final Label m_Label = new Label(); - - private final UploadControl m_UploadControl; - - - public InformationBar(G3Viewer a_Container, UploadControl a_UploadControl){ - m_UploadControl = a_UploadControl; - m_Container = a_Container; - setStylePrimaryName("infobar"); - } - - public void initializeForm(){ - if (m_UploadControl.isUploadEnabled()) - { - Anchor button = new Anchor("Upload Options"); - button.addStyleName("up-options"); - button.addClickHandler(new ClickHandler() { - - @Override - public void onClick(ClickEvent event) { - m_Container.doDialog("index.php/admin/upload_configure", new HttpDialogHandler() { - @Override - public void success(String aResult) { - } - }); - - - } - }); - - add(button); - - updateInformation(); - add(m_Label); - } - else - { - add(new HTML("Please install Google Gears to allow upload")); - } - } - - public void updateInformation() - { - int size = m_UploadControl.size(); - if (size == 0){ - m_Label.setText(""); - } - else - { - if (size == 1){ - m_Label.setText("Uploading file."); - } - else{ - m_Label.setText("Uploading " + size + " files."); - } - - } - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Item.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Item.java deleted file mode 100644 index 3de7094b..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Item.java +++ /dev/null @@ -1,391 +0,0 @@ -package com.gloopics.g3viewer.client; - -import java.util.Iterator; -import java.util.List; - -import com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile; -import com.gloopics.g3viewer.client.dnddesktop.DesktopDroppableWidget; -import com.gloopics.g3viewer.client.dnddesktop.DndDesktopFactory; -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ContextMenuEvent; -import com.google.gwt.event.dom.client.ContextMenuHandler; -import com.google.gwt.event.dom.client.DoubleClickEvent; -import com.google.gwt.event.dom.client.DoubleClickHandler; -import com.google.gwt.event.dom.client.HasAllMouseHandlers; -import com.google.gwt.event.dom.client.MouseDownEvent; -import com.google.gwt.event.dom.client.MouseDownHandler; -import com.google.gwt.event.dom.client.MouseMoveEvent; -import com.google.gwt.event.dom.client.MouseMoveHandler; -import com.google.gwt.event.dom.client.MouseOutEvent; -import com.google.gwt.event.dom.client.MouseOutHandler; -import com.google.gwt.event.dom.client.MouseOverEvent; -import com.google.gwt.event.dom.client.MouseOverHandler; -import com.google.gwt.event.dom.client.MouseUpEvent; -import com.google.gwt.event.dom.client.MouseUpHandler; -import com.google.gwt.event.dom.client.MouseWheelEvent; -import com.google.gwt.event.dom.client.MouseWheelHandler; -import com.google.gwt.event.logical.shared.CloseEvent; -import com.google.gwt.event.logical.shared.CloseHandler; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONString; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.Command; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.MenuBar; -import com.google.gwt.user.client.ui.MenuItem; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.Widget; - - -public class Item extends Composite implements HasAllMouseHandlers, DesktopDroppableWidget{ - - private final int m_ID; - - private String m_Title; - - private String m_Thumb; - - private String m_Resized; - - private final String m_Type; - - private final Album m_Parent; - - private Album m_LinkedAlbum = null; - - private final G3Viewer m_Container; - - private final boolean m_IsAlbum; - - private final boolean m_IsPhoto; - - private final View m_View; - - private AlbumItemDropContainer m_DropContainer = null; - - private final Image m_ThumbImage; - private final Label m_TitleLabel; - - public Item(Album a_Parent, JSONObject a_Value, G3Viewer a_Container){ - m_Container = a_Container; - m_View = a_Container.getView(); - m_Parent = a_Parent; - m_ID = Utils.extractId(a_Value.get("id")); - m_Title = ((JSONString)a_Value.get("title")).stringValue(); - m_Thumb = ((JSONString)a_Value.get("thumb")).stringValue(); - m_Type = ((JSONString)a_Value.get("type")).stringValue(); - m_Resized = ((JSONString)a_Value.get("resize")).stringValue(); - m_IsAlbum = m_Type.equals("album"); - m_IsPhoto = m_Type.equals("photo"); - FlowPanel dp = new FlowPanel(); - - - m_ThumbImage = new Image(m_Thumb); - dp.add(m_ThumbImage); - - m_TitleLabel = new Label(m_Title); - dp.add(m_TitleLabel); - - initWidget(dp); - - this.setStylePrimaryName("item"); - this.addStyleName("i" + m_Type); - - addDomHandler(new ContextMenuHandler() { - - @Override - public void onContextMenu(ContextMenuEvent event) { - showPopupMenu(event); - event.stopPropagation(); - event.preventDefault(); - } - }, ContextMenuEvent.getType()); - - addDomHandler(new DoubleClickHandler() { - - @Override - public void onDoubleClick(DoubleClickEvent event) { - if (isAlbum()){ - m_Parent.selectSubAlbum(m_ID); - } - else if (isPhoto()){ - m_Container.showImage(m_Resized); - } - - } - },DoubleClickEvent.getType()); - - a_Container.getDragController().makeDraggable(this); - - if (m_IsAlbum) - { - if (m_Container.isUploadEnabled()) - { - ((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this); - } - } - - } - - public void showing(){ - if (isAlbum() && m_LinkedAlbum != null){ - m_DropContainer = new AlbumItemDropContainer(this, m_LinkedAlbum); - m_Container.getDragController().registerDropController( - m_DropContainer); - } - } - - public void hidding(){ - if (m_DropContainer != null){ - m_Container.getDragController().unregisterDropController(m_DropContainer); - } - } - - public void updateValues(JSONValue aValue){ - JSONObject jso = aValue.isObject(); - - if (jso != null) { - m_Title = ((JSONString)jso.get("title")).stringValue(); - m_Thumb = ((JSONString)jso.get("thumb")).stringValue(); - m_Resized = ((JSONString)jso.get("resize")).stringValue(); - if (m_LinkedAlbum != null){ - m_LinkedAlbum.updateValues(jso); - } - - m_TitleLabel.setText(m_Title); - m_ThumbImage.setUrl(m_Thumb); - } - } - - public void updateImages(JSONValue a_Value){ - JSONObject jso = a_Value.isObject(); - - if (jso != null) { - m_Thumb = ((JSONString)jso.get("thumb")).stringValue(); - m_ThumbImage.setUrl(m_Thumb); - m_Resized = ((JSONString)jso.get("resize")).stringValue(); - } - - } - - public void refresh(){ - - m_Container.doJSONRequest(G3Viewer.VIEW_ITEM_URL + getID(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - updateValues(aValue); - } - },false,true); - - } - - public void setLinkedAlbum(Album a_Album){ - m_LinkedAlbum = a_Album; - } - - public void removeLinkedAlbum() - { - if (m_LinkedAlbum != null){ - m_LinkedAlbum.remove(); - } - } - - - public void showPopupMenu(ContextMenuEvent event){ - // show views popup menu if items are selected - if (m_Container.getDragController().getSelectedWidgetcount() > 1) - { - m_View.showPopupMenu(event); - return; - } - - this.addStyleName("popped"); - final PopupPanel popupPanel = new PopupPanel(true); - popupPanel.setAnimationEnabled(true); - popupPanel.setStyleName("popup"); - MenuBar popupMenuBar = new MenuBar(true); - - MenuItem deleteItem = new MenuItem("Delete " + m_Type, true, new Command() { - - @Override - public void execute() { - m_Container.doDialog("index.php/quick/form_delete/" + m_ID, new HttpDialogHandler() { - public void success(String aResult) { - m_View.removeFromView(Item.this); - if (m_LinkedAlbum != null){ - m_LinkedAlbum.remove(); - } - } - }); - popupPanel.hide(); - - } - }); - deleteItem.addStyleName("popup-item"); - popupMenuBar.addItem(deleteItem); - - MenuItem editItem = new MenuItem("Edit " + m_Type, true, new Command() { - - @Override - public void execute() { - m_Container.doDialog("index.php/form/edit/" + m_Type + "s/" + m_ID, - new HttpDialogHandler() { - public void success(String aResult) { - refresh(); - } - }); - popupPanel.hide(); - - } - }); - editItem.addStyleName("popup-item"); - popupMenuBar.addItem(editItem); - - MenuItem albumCover = new MenuItem("Make Album Cover", true, new Command() { - - @Override - public void execute() { - m_Container.doJSONRequest(G3Viewer.MAKE_ALBUM_COVER_URL + m_ID, new HttpSuccessHandler() { - - public void success(JSONValue aValue) { - // nothing to do - } - },false,true); - popupPanel.hide(); - } - }); - albumCover.addStyleName("popup-item"); - popupMenuBar.addItem(albumCover); - - if (isPhoto()) - { - MenuItem rotateCW = new MenuItem("Rotate Clockwise", true, new Command() { - @Override - public void execute() { - setLoadingThumb(); - m_Container.doJSONRequest(G3Viewer.ROTATE_URL + m_ID + "/cw", new HttpSuccessHandler() { - - public void success(JSONValue aValue) { - updateImages(aValue); - } - },false,true); - popupPanel.hide(); - } - }); - rotateCW.addStyleName("popup-item"); - popupMenuBar.addItem(rotateCW); - - MenuItem rotateCCW = new MenuItem("Rotate Couter-Clockwise", true, new Command() { - @Override - public void execute() { - setLoadingThumb(); - m_Container.doJSONRequest(G3Viewer.ROTATE_URL + m_ID + "/ccw", new HttpSuccessHandler() { - - public void success(JSONValue aValue) { - updateImages(aValue); - } - },false,true); - popupPanel.hide(); - } - }); - rotateCCW.addStyleName("popup-item"); - popupMenuBar.addItem(rotateCCW); - } - - - - - popupMenuBar.setVisible(true); - popupPanel.add(popupMenuBar); - - int x = DOM.eventGetClientX((Event)event.getNativeEvent()); - int y = DOM.eventGetClientY((Event)event.getNativeEvent()); - popupPanel.setPopupPosition(x, y); - popupPanel.addCloseHandler(new CloseHandler() { - - @Override - public void onClose(CloseEvent event) { - - Item.this.removeStyleName("popped"); - } - }); - - popupPanel.show(); - } - - public void setLoadingThumb() - { - m_ThumbImage.setUrl(Loading.URL); - } - - public boolean isAlbum(){ - return m_IsAlbum; - } - - public boolean isPhoto(){ - return m_IsPhoto; - } - - public int getID() - { - return m_ID; - } - - @Override - public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) { - return addDomHandler(handler, MouseDownEvent.getType()); - } - - @Override - public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) { - return addDomHandler(handler, MouseUpEvent.getType()); - } - - @Override - public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) { - return addDomHandler(handler, MouseOutEvent.getType()); - } - - @Override - public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { - return addDomHandler(handler, MouseOverEvent.getType()); - } - - @Override - public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) { - return addDomHandler(handler, MouseMoveEvent.getType()); - } - - @Override - public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler) { - return addDomHandler(handler, MouseWheelEvent.getType()); - } - - @Override - public void dropFiles(File[] aFile) { - if (m_IsAlbum) - { - m_LinkedAlbum.uploadFiles(aFile); - } - - } - - @Override - public Widget getActualWidget() { - return this; - } - - - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/JSONResponseCallback.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/JSONResponseCallback.java deleted file mode 100644 index f1684a49..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/JSONResponseCallback.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.json.client.JSONValue; - -public interface JSONResponseCallback { - void onError(Throwable a_Throwable); - - void onResponse(JSONValue a_Value); -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/JSONResponseTextHandler.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/JSONResponseTextHandler.java deleted file mode 100644 index fdcdb652..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/JSONResponseTextHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.http.client.Request; -import com.google.gwt.http.client.RequestCallback; -import com.google.gwt.http.client.Response; -import com.google.gwt.json.client.JSONException; -import com.google.gwt.json.client.JSONParser; -import com.google.gwt.json.client.JSONValue; - -public class JSONResponseTextHandler implements RequestCallback -{ - private final JSONResponseCallback m_Callback; - - public JSONResponseTextHandler(JSONResponseCallback a_Callback){ - m_Callback = a_Callback; - } - - public void onError(Request request, Throwable exception) { - m_Callback.onError(exception); - } - - public void onResponseReceived(Request request, Response response) { - //response. - String responseText = response.getText(); - try { - JSONValue jsonValue = JSONParser.parse(responseText); - m_Callback.onResponse(jsonValue); - } catch (JSONException e) { - m_Callback.onError(new Throwable(response.getText(), e)); - }catch (Exception e) { - m_Callback.onError(new Throwable(response.getText() + e.toString(), e)); - } - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Loading.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Loading.java deleted file mode 100644 index 5b453e2f..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Loading.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.gloopics.g3viewer.client; - - -import com.google.gwt.core.client.GWT; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.AbsolutePanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.RootPanel; - -public class Loading{ - - public static final String URL = GWT.getModuleBaseURL() + "loading.gif"; - - private static final Loading INSTANCE = new Loading(); - - /** - * the image widget - */ - private final Image m_Image = new Image(URL); - - private final Label m_Label = new Label(); - - private final HTML m_Back = new HTML(); - - private Loading(){ - m_Back.addStyleName("loading"); - m_Label.setStyleName("loading-label"); - m_Image.setStyleName("loading-image"); - } - - /** - * get instance - */ - public static Loading getInstance(){ - return INSTANCE; - } - - public void loading(String message){ - RootPanel.get().add(m_Back); - - int width = RootPanel.get().getOffsetWidth(); - int height = RootPanel.get().getOffsetHeight(); - height = height / 2 - 20; - width = width / 2 - 40; - RootPanel.get().add(m_Image, width, height); - - if (message != null) - { - m_Label.setText(message); - RootPanel.get().add(m_Label, 0, height + 45); - } - - //RootPanel.get().add(this); - } - - public void endLoading(){ - if (m_Image.isAttached()){ - RootPanel.get().remove(m_Image); - } - if (m_Label.isAttached()){ - RootPanel.get().remove(m_Label); - } - if (m_Back.isAttached()){ - RootPanel.get().remove(m_Back); - } - } - - public void hideAnimation(){ - if (m_Image.isAttached()){ - RootPanel.get().remove(m_Image); - } - if (m_Label.isAttached()){ - RootPanel.get().remove(m_Label); - } - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/MyPickupDragController.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/MyPickupDragController.java deleted file mode 100644 index 9cf16896..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/MyPickupDragController.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.gloopics.g3viewer.client; - -import java.util.List; - -import com.allen_sauer.gwt.dnd.client.DragContext; -import com.allen_sauer.gwt.dnd.client.PickupDragController; -import com.google.gwt.user.client.ui.AbsolutePanel; -import com.google.gwt.user.client.ui.Widget; - -public class MyPickupDragController extends PickupDragController{ - - public MyPickupDragController(AbsolutePanel boundaryPanel, boolean allowDroppingOnBoundaryPanel) { - super(boundaryPanel, allowDroppingOnBoundaryPanel); - } - - public DragContext getDragContext() - { - return context; - } - - public List getSelectedWidgets() - { - return context.selectedWidgets; - } - - public int getSelectedWidgetcount() - { - return context.selectedWidgets.size(); - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ResizeOptions.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ResizeOptions.java deleted file mode 100644 index e83c21bd..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/ResizeOptions.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.json.client.JSONBoolean; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONString; - -public class ResizeOptions { - - private final boolean m_Resize; - - private final int m_MaxWidth; - - private final int m_MaxHeight; - - - public ResizeOptions(JSONObject a_Value){ - JSONBoolean jbool = a_Value.get("resize").isBoolean(); - if (jbool == null) - { - throw new RuntimeException("JBool was null."); - } - m_Resize = jbool.booleanValue(); - if (m_Resize) - { - m_MaxWidth = Integer.parseInt(a_Value.get("max_width").toString()); - m_MaxHeight = Integer.parseInt(a_Value.get("max_height").toString()); - } - else - { - m_MaxWidth = 0; - m_MaxHeight = 0; - } - } - - public boolean isResize() - { - return m_Resize; - } - - public int getMaxHeight() - { - return m_MaxHeight; - } - - public int getMaxWidth() - { - return m_MaxWidth; - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadControl.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadControl.java deleted file mode 100644 index e416b925..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadControl.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.gloopics.g3viewer.client; - -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Set; - -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONValue; - -public class UploadControl { - - private final LinkedList m_PrepareUploadQueue = new LinkedList(); - private final LinkedList m_UploadQueue = new LinkedList(); - private final Set m_Uploads = new HashSet(); - - private boolean m_Running = false; - private boolean m_PrepareRunning = false; - - private G3Viewer m_Container; - - public void init(G3Viewer a_Container) - { - m_Container = a_Container; - } - - public UploadFile createUploadFile(Album a_Album, File a_File, ResizeOptions a_ResizeOptions) - { - - UploadFile uf = new UploadFile(this, a_Album, a_File, a_ResizeOptions); - - m_Uploads.add(uf); - m_PrepareUploadQueue.addLast(uf); - prepareNext(); - - return uf; - } - - private void cleanupUpload(UploadFile uf) - { - m_Uploads.remove(uf); - prepareNext(); - next(); - m_Container.updateInformation(); - - } - - public int size() - { - return m_Uploads.size(); - } - - public void finishedUploadWithError(UploadFile uf) - { - cleanupUpload(uf); - } - - public void finishedUpload(UploadFile uf) - { - cleanupUpload(uf); - } - - private void next() - { - if (m_UploadQueue.size() > 0) - { - UploadFile uf = m_UploadQueue.removeFirst(); - uf.startUpload(); - } - else - { - m_Running = false; - } - } - - private void prepareNext() - { - if (!m_PrepareRunning) - { - if ((m_PrepareUploadQueue.size() > 0) && (m_UploadQueue.size() < 10)) - { - UploadFile uf = m_PrepareUploadQueue.removeFirst(); - m_PrepareRunning = true; - uf.prepareUpload(); - } - else - { - m_PrepareRunning = false; - } - } - } - - public void finishedPrepare(UploadFile a_UploadFile) - { - m_UploadQueue.addLast(a_UploadFile); - - if (!m_Running) - { - m_Running = true; - next(); - } - - m_PrepareRunning = false; - prepareNext(); - - } - - public boolean isUploadEnabled(){ - return true; - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadControlNoGears.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadControlNoGears.java deleted file mode 100644 index 734d9a0d..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadControlNoGears.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.core.client.EntryPoint; -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.RootPanel; - -public class UploadControlNoGears extends UploadControl{ - public UploadFile createUploadFile(Album a_Album, File a_File, ResizeOptions a_ResizeOptions) - { - return null; - } - - public void init(G3Viewer a_Container) - { - - } - - private void cleanupUpload(UploadFile uf) - { - - } - - public int size() - { - return 0; - } - - public void finishedUploadWithError(UploadFile uf) - { - } - - public void finishedUpload(UploadFile uf) - { - } - - private void next() - { - } - - private void prepareNext() - { - } - - public void finishedPrepare(UploadFile a_UploadFile) - { - - } - - public boolean isUploadEnabled(){ - return false; - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadFile.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadFile.java deleted file mode 100644 index f877f6ee..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/UploadFile.java +++ /dev/null @@ -1,188 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.gloopics.g3viewer.client.canvas.Canvas; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.core.client.GWT; -import com.google.gwt.gears.client.Factory; -import com.google.gwt.gears.client.blob.Blob; -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.gears.client.httprequest.HttpRequest; -import com.google.gwt.gears.client.httprequest.ProgressEvent; -import com.google.gwt.gears.client.httprequest.ProgressHandler; -import com.google.gwt.gears.client.httprequest.RequestCallback; -import com.google.gwt.gears.client.localserver.ResourceStore; -import com.google.gwt.json.client.JSONParser; -import com.google.gwt.json.client.JSONValue; - -public class UploadFile extends Composite{ - - private final static ResourceStore RS = Factory.getInstance().createLocalServer().createStore("temp"); - - - private class ProgressBar extends SimplePanel{ - private final SimplePanel m_ProgressInner; - public ProgressBar(){ - addStyleName("progressBar"); - m_ProgressInner = new SimplePanel(); - m_ProgressInner.addStyleName("progessInner"); - add(m_ProgressInner); - } - - public void setProgress(int a_Percent){ - m_ProgressInner.setWidth( a_Percent + "%"); - - } - } - - private final ResizeOptions m_ResizeOptions; - - private final String m_Name; - - private final Album m_Parent; - - private Blob m_Blob; - - //private final Canvas m_UpThumb; - - private final Label m_Label = new Label("Pending.."); - private final ProgressBar m_ProgressBar = new ProgressBar(); - - //private final Image m_Image; - private final File m_File; - - private final SimplePanel m_ImageContainer; - - private final UploadControl m_UploadControl; - - /** - * Loads an image into this Canvas, replacing the Canvas' current dimensions - * and contents. - * - * @param blob The Blob to decode. The image should be in PNG or JPEG format. - */ - public final native void captureBlob(ResourceStore rs, Blob blob, String a_Url) /*-{ - rs.captureBlob(blob, a_Url, "image/JPEG"); - }-*/; - - /** - * Loads an image into this Canvas, replacing the Canvas' current dimensions - * and contents. - * - * @param blob The Blob to decode. The image should be in PNG or JPEG format. - */ - public final native void removeCapture(ResourceStore rs, String a_Url) /*-{ - rs.remove(a_Url); - }-*/; - - public UploadFile(UploadControl a_UploadControl, Album a_Parent, File a_File, ResizeOptions a_ResizeOptions){ - m_UploadControl = a_UploadControl; - m_File = a_File; - m_ResizeOptions = a_ResizeOptions; - m_Parent = a_Parent; - m_Name = a_File.getName(); - - FlowPanel dp = new FlowPanel(); - - - m_ImageContainer = new SimplePanel(); - m_ImageContainer.setWidget(new Label(m_Name)); - dp.add(m_ImageContainer); - - dp.add(m_ProgressBar); - dp.add(m_Label); - - initWidget(dp); - setStylePrimaryName("item"); - addStyleName("iUpload"); - - } - - protected void uploadBlob(Blob a_Blob){ - m_Label.setText("Uploading.."); - HttpRequest request = Factory.getInstance().createHttpRequest(); - request.open("POST", G3Viewer.UPLOAD_URL + m_Parent.getId() + "?filename=" - + m_Name + "&csrf=" + G3Viewer.getCSRF()); - - request.getUpload().setProgressHandler(new ProgressHandler() { - - @Override - public void onProgress(ProgressEvent event) { - double pcnt = ((double) event.getLoaded() / event.getTotal()); - m_ProgressBar.setProgress((int) Math.floor(pcnt * 100)); - - } - }); - - request.setCallback(new RequestCallback() { - - @Override - public void onResponseReceived(HttpRequest request) { - - if (request.getStatus() != 200) - { - m_Label.setText("Upload Error"); - addStyleName("upload-error"); - G3Viewer.displayError("Error Uploading", request.getResponseText()); - } - removeCapture(RS, m_Name); - - if (request.getStatus() == 200) - { - try{ - JSONValue jv = JSONParser.parse(request.getResponseText()); - m_UploadControl.finishedUpload(UploadFile.this); - m_Parent.replaceUpload(UploadFile.this, jv); - return; - } - catch (Exception e){ - G3Viewer.displayError("Exception on Upload", e.toString() + " " + request.getResponseText()); - } - } - m_Parent.removeUpload(UploadFile.this); - m_UploadControl.finishedUploadWithError(UploadFile.this); - - } - }); - - request.send(a_Blob); - - } - - public ResizeOptions getResizeOptions(){ - return m_ResizeOptions; - } - - public void prepareUpload(){ - GWT.runAsync(new AsyncRunner(new Runnable() { - - @Override - public void run() { - m_Blob = m_File.getBlob(); - captureBlob(RS, m_Blob , m_Name); - Image img = new Image(m_Name); - - m_ImageContainer.setWidget(img); - m_UploadControl.finishedPrepare(UploadFile.this); - } - })); - - } - - public void startUpload(){ - - if (m_ResizeOptions.isResize()) - { - m_Label.setText("Resizing.."); - GWT.runAsync(new AsyncResizer(m_Blob, this)); - } - else - { - uploadBlob(m_Blob); - } - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Utils.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Utils.java deleted file mode 100644 index c59060c4..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/Utils.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.allen_sauer.gwt.dnd.client.DragContext; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.ui.Widget; - -public class Utils { - public static int extractId(JSONValue a_Value){ - JSONNumber jn = a_Value.isNumber(); - if (jn != null){ - return (int) jn.doubleValue(); - } - else{ - String val = a_Value.isString().stringValue(); - return Integer.parseInt(val); - } - } - - public static JSONArray extractIds(DragContext context) { - JSONArray jsa = new JSONArray(); - - int i = 0; - for (Widget widget : context.selectedWidgets){ - if (widget instanceof Item){ - jsa.set(i, new JSONNumber(((Item)widget).getID())); - i++; - } - } - return jsa; - } - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/View.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/View.java deleted file mode 100644 index 09e2b0d9..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/View.java +++ /dev/null @@ -1,241 +0,0 @@ -package com.gloopics.g3viewer.client; - -import java.util.ArrayList; -import java.util.List; - -import com.allen_sauer.gwt.dnd.client.DragController; -import com.allen_sauer.gwt.dnd.client.PickupDragController; -import com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile; -import com.gloopics.g3viewer.client.dnddesktop.DesktopDroppableWidget; -import com.gloopics.g3viewer.client.dnddesktop.DndDesktopFactory; -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ContextMenuEvent; -import com.google.gwt.event.logical.shared.CloseEvent; -import com.google.gwt.event.logical.shared.CloseHandler; -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.json.client.JSONArray; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.Command; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.ui.DialogBox; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.MenuBar; -import com.google.gwt.user.client.ui.MenuItem; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.Widget; - -public class View extends FlowPanel implements DesktopDroppableWidget{ - - /** - * the current album being viewed - */ - private Album m_Album; - - - /** - * the list of drop zones - */ - private final List m_DropZones - = new ArrayList(); - - private final G3Viewer m_Container; - - public View(G3Viewer a_Container){ - m_Container = a_Container; - if (m_Container.isUploadEnabled()) - { - ((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this); - } - } - - - private void clearView(){ - PickupDragController pdc = m_Container.getDragController(); - if (m_DropZones.size() > 0){ - for (DropZoneController dropController : m_DropZones){ - pdc.unregisterDropController(dropController); - } - m_DropZones.clear(); - } - - for (Widget widget : getChildren()){ - if (widget instanceof Item){ - ((Item)widget).hidding(); - } - } - pdc.clearSelection(); - clear(); - } - - public void setAlbum(Album a_Album){ - - clearView(); - m_Album = a_Album; - Item last = null; - for (Item item : a_Album.getItems()) - { - if (a_Album.isManualSort()){ - addDropZone(a_Album, item, true); - } - - addToView(item); - - item.showing(); - - last = item; - } - if (a_Album.isManualSort() && (last != null)){ - addDropZone(a_Album, last, false); - } - - Loading.getInstance().endLoading(); - - } - - private void addDropZone(Album a_Parent,Item a_CompareTo, boolean a_Before){ - HTML drop = new HTML(); - drop.addStyleName("DropZone"); - DropZoneController dzp = new DropZoneController(a_Parent, drop, a_CompareTo, a_Before); - m_Container.getDragController().registerDropController(dzp); - m_DropZones.add(dzp); - addToView(drop); - } - - public void addToView(Widget a_Widget){ - add(a_Widget); - } - - public void replaceInView(UploadFile a_Remove, Item a_Insert){ - int index = getWidgetIndex(a_Remove); - insert(a_Insert, index); - remove(a_Remove); - } - - public void removeFromView(Widget a_Widget){ - remove(a_Widget); - } - - public Album getCurrentAlbum(){ - return m_Album; - } - - - @Override - public void dropFiles(File[] aFile) { - if (m_Album != null){ - m_Album.uploadFiles(aFile); - } - } - - - @Override - public Widget getActualWidget() { - return this; - } - - public void showPopupMenu(ContextMenuEvent event){ - final PopupPanel popupPanel = new PopupPanel(true); - popupPanel.setAnimationEnabled(true); - popupPanel.setStyleName("popup"); - MenuBar popupMenuBar = new MenuBar(true); - - MenuItem deleteItem = new MenuItem("Delete Selected Items", true, new Command() { - - @Override - public void execute() { - popupPanel.hide(); - - m_Container.doConfirm("Are you sure you wish to delete selected items?", new ConfirmDialogBox.ConfirmCallBack() { - - public void ok() { - JSONArray jsa = Utils.extractIds(m_Container.getDragController().getDragContext()); - - m_Container.doJSONRequest(G3Viewer.DELETE_ALL_URL + "?sourceids=" + jsa.toString() , new HttpSuccessHandler() { - public void success(JSONValue aValue) { - final List widgets = m_Container.getDragController().getSelectedWidgets(); - Item i; - for (Widget widget: widgets){ - i = (Item)widget; - removeFromView(i); - i.removeLinkedAlbum(); - } - - }}, true, true); - } - }); - - } - }); - deleteItem.addStyleName("popup-item"); - popupMenuBar.addItem(deleteItem); - - popupMenuBar.setVisible(true); - popupPanel.add(popupMenuBar); - - MenuItem rotateAllCW = new MenuItem("Rotate All Clockwise", true, new Command() { - @Override - public void execute() { - // change all thumbs into loading - final List widgets = m_Container.getDragController().getSelectedWidgets(); - - for (Widget widget: widgets){ - final Item i = ((Item)widget); - if (i.isPhoto()) - { - i.setLoadingThumb(); - } - - m_Container.doJSONRequest(G3Viewer.ROTATE_URL + i.getID() + "/cw", - new HttpSuccessHandler() { - - public void success(JSONValue aValue) { - i.updateImages(aValue); - } - },false,true); - } - popupPanel.hide(); - } - }); - - rotateAllCW.addStyleName("popup-item"); - popupMenuBar.addItem(rotateAllCW); - - - MenuItem rotateAllCCW = new MenuItem("Rotate All Counter-Clockwise", true, new Command() { - @Override - public void execute() { - // change all thumbs into loading - final List widgets = m_Container.getDragController().getSelectedWidgets(); - - for (Widget widget: widgets){ - final Item i = ((Item)widget); - if (i.isPhoto()) - { - i.setLoadingThumb(); - } - m_Container.doJSONRequest(G3Viewer.ROTATE_URL + i.getID() + "/cw", - new HttpSuccessHandler() { - - public void success(JSONValue aValue) { - i.updateImages(aValue); - } - },false,true); - } - popupPanel.hide(); - } - }); - - rotateAllCW.addStyleName("popup-item"); - popupMenuBar.addItem(rotateAllCCW); - - int x = DOM.eventGetClientX((Event)event.getNativeEvent()); - int y = DOM.eventGetClientY((Event)event.getNativeEvent()); - popupPanel.setPopupPosition(x, y); - - popupPanel.show(); - - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/Canvas.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/Canvas.java deleted file mode 100644 index 3e47a126..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/Canvas.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2009 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.gloopics.g3viewer.client.canvas; - -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.gears.client.blob.Blob; - -/** - * The Canvas module is a graphics API that is inspired by the HTML5 canvas, with additional methods to decode from and encode to - * binary formats (such as PNG and JPEG), represented by Blobs. A Gears Canvas - * is not yet a complete implementation of the HTML5 canvas specification, and - * there are two significant differences: - *
      - *
    • A Gears Canvas is off-screen, in that creating a Canvas object doesn't - * directly paint any pixels on the screen. Furthermore, for technical reasons, - * a Gears Canvas is not a DOM Element. On the other hand, you can create a - * Gears Canvas in a Worker. - *
    • A Gears Canvas does not implement getContext, and in - * particular does not provide a 2D context. - *
    - *

    - * Permission - *

    - * This API requires user permission. If you would like to customize the default - * dialog, you can explicitly call - * {@link com.google.gwt.gears.client.Factory#getPermission()}. - */ -public class Canvas extends JavaScriptObject { - - public static final String MIMETYPE_JPEG = "image/jpeg"; - public static final String MIMETYPE_PNG = "image/png"; - - protected Canvas() { - // required for overlay types - } - - /** - * Crops the Canvas. The crop happens "in-place", as opposed to returning a - * new Canvas. - * - * @param x The left co-ordinate of the crop rectangle. - * @param y The top co-ordinate of the crop rectangle. - * @param w The width of the crop rectangle. - * @param h The height of the crop rectangle. - */ - public final native void crop(int x, int y, int w, int h) /*-{ - this.crop(x, y, w, h); - }-*/; - - /** - * Loads an image into this Canvas, replacing the Canvas' current dimensions - * and contents. - * - * @param blob The Blob to decode. The image should be in PNG or JPEG format. - */ - public final native void decode(Blob blob) /*-{ - this.decode(blob); - }-*/; - - /** - * Saves the Canvas' contents to PNG format. - * - * @return A new Blob encoding the Canvas' image data. - */ - public final native Blob encode() /*-{ - return this.encode(); - }-*/; - - /** - * Saves the Canvas' contents to a binary format, such as PNG or JPEG. - * - * @param mimeType The image format to encode to. Valid values include - * "image/png" and "image/jpeg". - * @return A new Blob encoding the Canvas' image data. - */ - public final native Blob encode(String mimeType) /*-{ - return this.encode(mimeType); - }-*/; - - /** - * Saves the Canvas' contents to JPEG format. - * - * @param quality the JPEG quality as a number between 0.0 and 1.0 inclusive. - * @return A new Blob encoding the Canvas' image data. - */ - public final native Blob encodeJpeg(float quality) /*-{ - return this.encode("image/jpeg", { quality: quality }); - }-*/; - - /** - * Returns the height of the Canvas. The default value is 150. - * - * @return the canvas height. - */ - public final native int getHeight()/*-{ - return this.height; - }-*/; - - /** - * Returns the width of the Canvas. The default value is 300. - * - * @return the canvas width. - */ - public final native int getWidth() /*-{ - return this.width; - }-*/; - - /** - * Resizes the Canvas. The resize happens "in-place", as opposed to returning - * a new Canvas. - *

    - * Uses bi-linear filtering. - * - * @param w The new width. - * @param h The new height. - */ - public final native void resize(int w, int h) /*-{ - this.resize(w, h); - }-*/; - - /** - * Resizes the Canvas. The resize happens "in-place", as opposed to returning - * a new Canvas. - * - * @param w The new width. - * @param h The new height. - * @param filter The image filter. - */ - public final void resize(int w, int h, ResizeFilter filter) { - resize(w, h, filter.getFilter()); - } - - /** - * Resizes the Canvas. The resize happens "in-place", as opposed to returning - * a new Canvas. - * - * @param w The new width. - * @param h The new height. - * @param filter A string specifying the image filter. There are two options: - * "nearest" for nearest-neighbor filtering, and "bilinear" for - * bi-linear filtering. - */ - public final native void resize(int w, int h, String filter) /*-{ - this.resize(w, h, filter); - }-*/; - - /** - * Sets the height of the Canvas. The default value is 150. - * - * @param height the canvas height. - */ - public final native void setHeight(int height) /*-{ - this.height = height; - }-*/; - - /** - * Sets the width of the Canvas. The default value is 300. - * - * @param width the canvas width. - */ - public final native void setWidth(int width) /*-{ - this.width = width; - }-*/; -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/Factory.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/Factory.java deleted file mode 100644 index 8ac5ba59..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/Factory.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2008 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.gloopics.g3viewer.client.canvas; - -import com.google.gwt.core.client.JavaScriptObject; - -/** - * Factory class used to create all other Gears objects. - */ -public final class Factory extends JavaScriptObject { - /** - * String used to request a BlobBuilder instance from Gears. - */ - public static final String BLOBBUILDER = "beta.blobbuilder"; - - /** - * String used to request a Canvas instance from Gears. - */ - public static final String CANVAS = "beta.canvas"; - - - /** - * Returns the singleton instance of the Factory class or null - * if Gears is not installed or accessible. - * - * @return singleton instance of the Factory class or null if - * Gears is not installed or accessible - */ - public static native Factory getInstance() /*-{ - return $wnd.google && $wnd.google.gears && $wnd.google.gears.factory; - }-*/; - - protected Factory() { - // Required for overlay types - } - - /** - * Creates a new {@link Canvas} instance. - * - * @return a new {@link Canvas} instance - */ - public Canvas createCanvas() { - return create(CANVAS); - } - - /** - * Creates an instance of the specified Gears object. - * - * @param Gears object type to return - * @param className name of the object to create - * @return an instance of the specified Gears object - */ - private native T create(String className) /*-{ - return this.create(className); - }-*/; -} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/ResizeFilter.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/ResizeFilter.java deleted file mode 100644 index 198ad8ea..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/canvas/ResizeFilter.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2009 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.gloopics.g3viewer.client.canvas; - -/** - * Filters used when resizing a Canvas. - */ -public enum ResizeFilter { - NEAREST { - @Override - public String getFilter() { - return "nearest"; - } - }, - BILINEAR { - @Override - public String getFilter() { - return "bilinear"; - } - }; - - public abstract String getFilter(); -} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java deleted file mode 100644 index 2b5be2c4..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -public interface DesktopDrop { - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java deleted file mode 100644 index d55a67ea..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.gears.client.Factory; -import com.google.gwt.gears.client.desktop.Desktop; -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.user.client.ui.Widget; - -public abstract class DesktopDropBase implements DesktopDrop{ - private final DesktopDroppableWidget m_DropFile; - protected final Widget m_Widget; - private final Desktop m_Desktop; - - public DesktopDropBase (DesktopDroppableWidget a_Widget){ - m_DropFile = a_Widget; - m_Widget = a_Widget.getActualWidget(); - - m_Desktop = Factory.getInstance().createDesktop(); - } - - public void onDragEnter(JavaScriptObject e) - { - m_Widget.addStyleName("drop-target"); - setDropEffect(m_Desktop, e); - finishDrag(e); - } - - public final native void finishDrag(JavaScriptObject e) /*-{ - if (e.stopPropagation) e.stopPropagation(); - else e.cancelBubble = true; - if (e.preventDefault) e.preventDefault(); - else e.returnValue = false; - }-*/; - - public void onDragLeave(JavaScriptObject e) - { - m_Widget.removeStyleName("drop-target"); - finishDrag(e); - - } - - public void onDrop(JavaScriptObject e) - { - File[] files = getDragData(m_Desktop, e); - if (files != null) - { - m_DropFile.dropFiles(files); - } - - onDragLeave(e); - } - - public final native File[] getDragData(Desktop d, JavaScriptObject e) /*-{ - var data = d.getDragData(e, 'application/x-gears-files'); - return data && data.files; - }-*/; - - public final native File[] setDropEffect(Desktop d, JavaScriptObject e) /*-{ - var data = d.setDropEffect(e, 'copy'); - }-*/; -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java deleted file mode 100644 index 1c8085d4..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -import com.google.gwt.dom.client.Element; -import com.google.gwt.user.client.Window.Navigator; - -public class DesktopDropFile extends DesktopDropBase{ - - public DesktopDropFile(DesktopDroppableWidget a_Widget){ - super(a_Widget); - addDropEvents(m_Widget.getElement()); - } - - - public native void addDropEvents(Element e) /*-{ - var t = this; - - e.addEventListener('dragenter', - function(e) - { - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDragEnter(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - } - , false); - - - e.addEventListener('dragleave', - function(e) - { - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDragLeave(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - } - , false); - - e.addEventListener('dragexit', - function(e) - { - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDragLeave(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - } - , false); - - e.addEventListener('dragover', - function(e) - { - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::finishDrag(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - } - , false); - - e.addEventListener('dragdrop', - function(e) - { - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDrop(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - } - , false); - - e.addEventListener('drop', - function(e) - { - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDrop(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - } - , false); - - }-*/; - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java deleted file mode 100644 index da5437dd..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -import com.google.gwt.dom.client.Element; - -public class DesktopDropFileIE extends DesktopDropBase{ - - public DesktopDropFileIE(DesktopDroppableWidget a_Widget){ - super(a_Widget); - addDropEvents(m_Widget.getElement()); - } - - - public native void addDropEvents(Element e) /*-{ - var t = this; - e.attachEvent('ondragenter', - function(e){ - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDragEnter(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - return false; - - }); - - e.attachEvent('ondragover', - function(e){ - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::finishDrag(Lcom/google/gwt/core/client/JavaScriptObject;)(e); - return false; - }); - - e.attachEvent('ondragleave', - function(e){ - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDragLeave(Lcom/google/gwt/core/client/JavaScriptObject;)(e) - return false; - }); - - e.attachEvent('ondrop', - function(e){ - t.@com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile::onDrop(Lcom/google/gwt/core/client/JavaScriptObject;)(e) - return false; - }); - - }-*/; - - -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.java deleted file mode 100644 index a3efaaf0..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -import com.google.gwt.gears.client.desktop.File; -import com.google.gwt.user.client.ui.Widget; - -public interface DesktopDroppableWidget { - - Widget getActualWidget(); - - void dropFiles(File[] a_File); -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java deleted file mode 100644 index f6afac22..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -public class DndDesktopFactory { - - public DesktopDrop getInstance(DesktopDroppableWidget a_Widget) - { - return new DesktopDropFile(a_Widget); - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java deleted file mode 100644 index 145f023a..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -public class DndDesktopFactoryIE extends DndDesktopFactory{ - - public DesktopDrop getInstance(DesktopDroppableWidget a_Widget) - { - return new DesktopDropFileIE(a_Widget); - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java deleted file mode 100644 index 25318438..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.gloopics.g3viewer.client.dnddesktop; - -public class DndDesktopFactoryNoGears extends DndDesktopFactory{ - public DesktopDrop getInstance(DesktopDroppableWidget a_Widget) - { - return new DesktopDrop(){}; - } -} diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/public/G3viewer.css b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/public/G3viewer.css deleted file mode 100644 index c6f40841..00000000 --- a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/public/G3viewer.css +++ /dev/null @@ -1,47 +0,0 @@ -* {padding:0; margin:0;} - -#main {position:relative; width:100%; height:100%} - -.error {width:300px; height:200px;} - -.upload-error {background-color: #FFAAAA;} -.item {width:100px; height: 130px; padding:3px; border: 2px solid #FFF; overflow: hidden; float:left; text-align:center; position:relative;margin:3px;} -.item img{max-width:96px; max-height:76px; *width:96px; *height:76px; border:2px solid #AAA;} -.item h3{font-size:10px; font-weight:normal; position:absolute; bottom:5px; left:0px; width:100%; text-align:center; padding:0; margin:0;} -.ialbum {background-color: #e3effb; border: 2px solid #91c0ef; } -.popped {background-color: #e3effb;} -.view {height: 100%;} -.DropZone {height: 100px; width:6px; margin: 0 -3px 0 -3px; padding: 0; float:left; text-align:center; position:relative;} -.infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid; - border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;} -.infobar div {float:right; } -.infobar .up-options {float:left;} -.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);} -.loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;} -.loading-image{z-index:10;} -.gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;} -.Tree-Album {padding: 1px;} -.Tree-Album:hover{text-decoration:underline;} -.drop-target{background-color: #91c0ef; color: #000;} - -.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;} - -.popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF} - -.dialog fieldset{ border: none; padding: 0px; margin: 0px;} -.dialog legend{ display: none;} -.dialog ul {padding:0; margin:0;} -.dialog ul ul li {float:left;} -.dialog li {list-style: none; padding:0;margin:0;} -.dialog form input[type="password"], .dialog form input[type="text"], .dialog form textarea .dialog form select {border: 1px solid #000; padding: 0.2em; display:block; clear: both;} -.dialog form input[type="password"], .dialog form input[type="text"], .dialog form textarea {width: 100%} -.dialog form textarea {height: 12em;} - -.label {width:90px; text-align:center;} -.progressBar {border: 1px solid #cccccc; width: 100px; height: 10px;} -.progessInner {background: #34628c;width: 0px;height: 10px;} - -.dContents {padding: 2px 5px 2px 5px;} -.dButtons {text-align: right} - -.hideme {overflow:hidden; width:0; height:0; margin:0; padding:0;} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/public/loading.gif b/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/public/loading.gif deleted file mode 100644 index 8f56a82c..00000000 Binary files a/3.1/modules/gwtorganize/src/com/gloopics/g3viewer/public/loading.gif and /dev/null differ diff --git a/3.1/modules/gwtorganize/src/log4j.properties b/3.1/modules/gwtorganize/src/log4j.properties deleted file mode 100644 index d9c3edc9..00000000 --- a/3.1/modules/gwtorganize/src/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# A default log4j configuration for log4j users. -# -# To use this configuration, deploy it into your application's WEB-INF/classes -# directory. You are also encouraged to edit it as you like. - -# Configure the console as our one appender -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n - -# tighten logging on the DataNucleus Categories -log4j.category.DataNucleus.JDO=WARN, A1 -log4j.category.DataNucleus.Persistence=WARN, A1 -log4j.category.DataNucleus.Cache=WARN, A1 -log4j.category.DataNucleus.MetaData=WARN, A1 -log4j.category.DataNucleus.General=WARN, A1 -log4j.category.DataNucleus.Utility=WARN, A1 -log4j.category.DataNucleus.Transaction=WARN, A1 -log4j.category.DataNucleus.Datastore=WARN, A1 -log4j.category.DataNucleus.ClassLoading=WARN, A1 -log4j.category.DataNucleus.Plugin=WARN, A1 -log4j.category.DataNucleus.ValueGeneration=WARN, A1 -log4j.category.DataNucleus.Enhancer=WARN, A1 -log4j.category.DataNucleus.SchemaTool=WARN, A1 diff --git a/3.1/modules/gwtorganize/views/gwtorganise_view.html.php b/3.1/modules/gwtorganize/views/gwtorganise_view.html.php deleted file mode 100644 index 1b0ec868..00000000 --- a/3.1/modules/gwtorganize/views/gwtorganise_view.html.php +++ /dev/null @@ -1,7 +0,0 @@ - - - -GWT Organise version built on \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/.htaccess b/3.1/modules/gwtorganize/war/.htaccess deleted file mode 100644 index b303d424..00000000 --- a/3.1/modules/gwtorganize/war/.htaccess +++ /dev/null @@ -1,9 +0,0 @@ - - - ExpiresDefault "access" - - - - ExpiresDefault "now plus 1 year" - - diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/META-INF/jdoconfig.xml b/3.1/modules/gwtorganize/war/WEB-INF/classes/META-INF/jdoconfig.xml deleted file mode 100644 index 5f56aa19..00000000 --- a/3.1/modules/gwtorganize/war/WEB-INF/classes/META-INF/jdoconfig.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml deleted file mode 100644 index ffe12be4..00000000 --- a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$1.class deleted file mode 100644 index 03e8d371..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$10.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$10.class deleted file mode 100644 index de2da6f1..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$10.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$11.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$11.class deleted file mode 100644 index cc78fb65..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$11.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$12.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$12.class deleted file mode 100644 index 17aff120..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$12.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2$1.class deleted file mode 100644 index efd647d8..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2.class deleted file mode 100644 index 8f4fda99..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3$1.class deleted file mode 100644 index 323f3083..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3.class deleted file mode 100644 index e46db8dd..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4$1.class deleted file mode 100644 index 55c74232..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4.class deleted file mode 100644 index 721d6a2e..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5.class deleted file mode 100644 index d5bad4b3..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$6.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$6.class deleted file mode 100644 index f8f7f057..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$6.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$7.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$7.class deleted file mode 100644 index 803496fb..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$7.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$8.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$8.class deleted file mode 100644 index bff1da5b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$8.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$9.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$9.class deleted file mode 100644 index 648cc387..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$9.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album.class deleted file mode 100644 index a4aa4a70..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumItemDropContainer.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumItemDropContainer.class deleted file mode 100644 index 8632a193..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumItemDropContainer.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree$1.class deleted file mode 100644 index b5142ea0..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree.class deleted file mode 100644 index 0f8db508..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTreeDropController.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTreeDropController.class deleted file mode 100644 index b540915a..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTreeDropController.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncResizer.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncResizer.class deleted file mode 100644 index bd77f116..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncResizer.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncRunner.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncRunner.class deleted file mode 100644 index c449a0f2..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncRunner.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$1.class deleted file mode 100644 index 4367b5eb..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$2.class deleted file mode 100644 index 890e6d95..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$ConfirmCallBack.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$ConfirmCallBack.class deleted file mode 100644 index f447b3fd..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox$ConfirmCallBack.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox.class deleted file mode 100644 index e69896cc..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ConfirmDialogBox.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/DropZoneController.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/DropZoneController.class deleted file mode 100644 index f8fed7cf..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/DropZoneController.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1$1.class deleted file mode 100644 index 58d9f492..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1.class deleted file mode 100644 index b6a343ab..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$2.class deleted file mode 100644 index bdc79c97..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog$1.class deleted file mode 100644 index fe0c4086..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog.class deleted file mode 100644 index 67996768..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$SimplePanelEx.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$SimplePanelEx.class deleted file mode 100644 index 40090e8f..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$SimplePanelEx.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer.class deleted file mode 100644 index bbdc9c9c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$1.class deleted file mode 100644 index 43983166..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$2.class deleted file mode 100644 index c64b7227..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$3.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$3.class deleted file mode 100644 index 1e03d444..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$3.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$4.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$4.class deleted file mode 100644 index f79aecfe..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$4.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$5.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$5.class deleted file mode 100644 index 85cf463b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$5.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$RequestCallbackImpl.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$RequestCallbackImpl.class deleted file mode 100644 index 2c4b7eb8..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$RequestCallbackImpl.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox.class deleted file mode 100644 index f660365e..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogHandler.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogHandler.class deleted file mode 100644 index ced48bc3..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogHandler.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpSuccessHandler.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpSuccessHandler.class deleted file mode 100644 index f5dc523a..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpSuccessHandler.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$1.class deleted file mode 100644 index bce80447..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$2.class deleted file mode 100644 index d390264c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$3.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$3.class deleted file mode 100644 index c1ff1330..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$3.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox.class deleted file mode 100644 index 6d9c834b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1$1.class deleted file mode 100644 index e3b76f1b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1.class deleted file mode 100644 index 28de8e5b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar.class deleted file mode 100644 index 6e000def..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$1.class deleted file mode 100644 index ddb54919..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$2.class deleted file mode 100644 index 3b941d40..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$3.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$3.class deleted file mode 100644 index b67f967f..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$3.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4$1.class deleted file mode 100644 index 122710ba..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4.class deleted file mode 100644 index ad6412fa..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5$1.class deleted file mode 100644 index f88398a1..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5.class deleted file mode 100644 index 98f37863..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6$1.class deleted file mode 100644 index ddc4db8c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6.class deleted file mode 100644 index 32441372..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7$1.class deleted file mode 100644 index 61a3f4d1..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7.class deleted file mode 100644 index f561c44d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8$1.class deleted file mode 100644 index a6802655..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8.class deleted file mode 100644 index 435fa9d6..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$9.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$9.class deleted file mode 100644 index a88834b8..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$9.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item.class deleted file mode 100644 index 26c5289f..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseCallback.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseCallback.class deleted file mode 100644 index 78d986d0..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseCallback.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseTextHandler.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseTextHandler.class deleted file mode 100644 index 05ed41b1..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseTextHandler.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Loading.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Loading.class deleted file mode 100644 index a193937b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Loading.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/MyPickupDragController.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/MyPickupDragController.class deleted file mode 100644 index f002e52a..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/MyPickupDragController.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ResizeOptions.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ResizeOptions.class deleted file mode 100644 index dc4050a7..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/ResizeOptions.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControl.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControl.class deleted file mode 100644 index 8ea5f38c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControl.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControlNoGears.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControlNoGears.class deleted file mode 100644 index 2ef143e0..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControlNoGears.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$1.class deleted file mode 100644 index 0fd63556..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$2.class deleted file mode 100644 index de9282b5..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$3.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$3.class deleted file mode 100644 index 75ef7785..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$3.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$ProgressBar.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$ProgressBar.class deleted file mode 100644 index d01d465d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$ProgressBar.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile.class deleted file mode 100644 index 3ceac4ae..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Utils.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Utils.class deleted file mode 100644 index 883be9dc..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/Utils.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1$1$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1$1$1.class deleted file mode 100644 index 15805eb4..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1$1$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1$1.class deleted file mode 100644 index 9ebe190d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1.class deleted file mode 100644 index f6a1c39c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$2$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$2$1.class deleted file mode 100644 index df7fcfbf..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$2$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$2.class deleted file mode 100644 index 7ccc963d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$3$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$3$1.class deleted file mode 100644 index 91639046..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$3$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$3.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$3.class deleted file mode 100644 index 8fa8c5ea..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$3.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View.class deleted file mode 100644 index 8da4d798..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/View.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Canvas.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Canvas.class deleted file mode 100644 index e3224e8c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Canvas.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Factory.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Factory.class deleted file mode 100644 index 8431ae44..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Factory.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$1.class deleted file mode 100644 index a7211aca..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$2.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$2.class deleted file mode 100644 index de43b25f..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$2.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter.class deleted file mode 100644 index e7a21338..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.class deleted file mode 100644 index 25bdd8b6..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.class deleted file mode 100644 index 31d3d0ff..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.class deleted file mode 100644 index 2919410f..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.class deleted file mode 100644 index 3e895142..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.class deleted file mode 100644 index 9aaaf96d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.class deleted file mode 100644 index 2f8a4542..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.class deleted file mode 100644 index b4e76dee..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears$1.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears$1.class deleted file mode 100644 index 464e9391..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears$1.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.class b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.class deleted file mode 100644 index 610d289d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.class and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/public/G3viewer.css b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/public/G3viewer.css deleted file mode 100644 index c6f40841..00000000 --- a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/public/G3viewer.css +++ /dev/null @@ -1,47 +0,0 @@ -* {padding:0; margin:0;} - -#main {position:relative; width:100%; height:100%} - -.error {width:300px; height:200px;} - -.upload-error {background-color: #FFAAAA;} -.item {width:100px; height: 130px; padding:3px; border: 2px solid #FFF; overflow: hidden; float:left; text-align:center; position:relative;margin:3px;} -.item img{max-width:96px; max-height:76px; *width:96px; *height:76px; border:2px solid #AAA;} -.item h3{font-size:10px; font-weight:normal; position:absolute; bottom:5px; left:0px; width:100%; text-align:center; padding:0; margin:0;} -.ialbum {background-color: #e3effb; border: 2px solid #91c0ef; } -.popped {background-color: #e3effb;} -.view {height: 100%;} -.DropZone {height: 100px; width:6px; margin: 0 -3px 0 -3px; padding: 0; float:left; text-align:center; position:relative;} -.infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid; - border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;} -.infobar div {float:right; } -.infobar .up-options {float:left;} -.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);} -.loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;} -.loading-image{z-index:10;} -.gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;} -.Tree-Album {padding: 1px;} -.Tree-Album:hover{text-decoration:underline;} -.drop-target{background-color: #91c0ef; color: #000;} - -.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;} - -.popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF} - -.dialog fieldset{ border: none; padding: 0px; margin: 0px;} -.dialog legend{ display: none;} -.dialog ul {padding:0; margin:0;} -.dialog ul ul li {float:left;} -.dialog li {list-style: none; padding:0;margin:0;} -.dialog form input[type="password"], .dialog form input[type="text"], .dialog form textarea .dialog form select {border: 1px solid #000; padding: 0.2em; display:block; clear: both;} -.dialog form input[type="password"], .dialog form input[type="text"], .dialog form textarea {width: 100%} -.dialog form textarea {height: 12em;} - -.label {width:90px; text-align:center;} -.progressBar {border: 1px solid #cccccc; width: 100px; height: 10px;} -.progessInner {background: #34628c;width: 0px;height: 10px;} - -.dContents {padding: 2px 5px 2px 5px;} -.dButtons {text-align: right} - -.hideme {overflow:hidden; width:0; height:0; margin:0; padding:0;} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/public/loading.gif b/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/public/loading.gif deleted file mode 100644 index 8f56a82c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/classes/com/gloopics/g3viewer/public/loading.gif and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/classes/log4j.properties b/3.1/modules/gwtorganize/war/WEB-INF/classes/log4j.properties deleted file mode 100644 index d9c3edc9..00000000 --- a/3.1/modules/gwtorganize/war/WEB-INF/classes/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# A default log4j configuration for log4j users. -# -# To use this configuration, deploy it into your application's WEB-INF/classes -# directory. You are also encouraged to edit it as you like. - -# Configure the console as our one appender -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n - -# tighten logging on the DataNucleus Categories -log4j.category.DataNucleus.JDO=WARN, A1 -log4j.category.DataNucleus.Persistence=WARN, A1 -log4j.category.DataNucleus.Cache=WARN, A1 -log4j.category.DataNucleus.MetaData=WARN, A1 -log4j.category.DataNucleus.General=WARN, A1 -log4j.category.DataNucleus.Utility=WARN, A1 -log4j.category.DataNucleus.Transaction=WARN, A1 -log4j.category.DataNucleus.Datastore=WARN, A1 -log4j.category.DataNucleus.ClassLoading=WARN, A1 -log4j.category.DataNucleus.Plugin=WARN, A1 -log4j.category.DataNucleus.ValueGeneration=WARN, A1 -log4j.category.DataNucleus.Enhancer=WARN, A1 -log4j.category.DataNucleus.SchemaTool=WARN, A1 diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar deleted file mode 100644 index 5e461a1b..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar deleted file mode 100644 index 5325404d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar deleted file mode 100644 index fa0773db..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-core-1.1.5.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-core-1.1.5.jar deleted file mode 100644 index c450ab94..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-core-1.1.5.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar deleted file mode 100644 index c326e0bc..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar deleted file mode 100644 index 12d4ab0d..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar deleted file mode 100644 index ee9963df..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/gwt-servlet.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/gwt-servlet.jar deleted file mode 100644 index 50e2a81c..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/gwt-servlet.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/WEB-INF/lib/jdo2-api-2.3-eb.jar b/3.1/modules/gwtorganize/war/WEB-INF/lib/jdo2-api-2.3-eb.jar deleted file mode 100644 index 2547a0b0..00000000 Binary files a/3.1/modules/gwtorganize/war/WEB-INF/lib/jdo2-api-2.3-eb.jar and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/0A9476898799A150D840F0B1C3672921.cache.png b/3.1/modules/gwtorganize/war/g3viewer/0A9476898799A150D840F0B1C3672921.cache.png deleted file mode 100644 index 08671ce8..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/0A9476898799A150D840F0B1C3672921.cache.png and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html b/3.1/modules/gwtorganize/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html deleted file mode 100644 index eb93e477..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html +++ /dev/null @@ -1,1728 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html b/3.1/modules/gwtorganize/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html deleted file mode 100644 index 6ae3eb2f..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html +++ /dev/null @@ -1,1733 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/396F806CD63ABD414BFBB9D57429F05B.cache.png b/3.1/modules/gwtorganize/war/g3viewer/396F806CD63ABD414BFBB9D57429F05B.cache.png deleted file mode 100644 index 009e9872..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/396F806CD63ABD414BFBB9D57429F05B.cache.png and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html b/3.1/modules/gwtorganize/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html deleted file mode 100644 index 9f1d2b2a..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html +++ /dev/null @@ -1,1840 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html b/3.1/modules/gwtorganize/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html deleted file mode 100644 index 7fa662e1..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html +++ /dev/null @@ -1,1821 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html b/3.1/modules/gwtorganize/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html deleted file mode 100644 index 71d67f32..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html +++ /dev/null @@ -1,1862 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html b/3.1/modules/gwtorganize/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html deleted file mode 100644 index e3bf202e..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html +++ /dev/null @@ -1,1835 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html b/3.1/modules/gwtorganize/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html deleted file mode 100644 index d3b48c83..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html +++ /dev/null @@ -1,1687 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/8603379B5088782D2C0620FAE856E112.cache.png b/3.1/modules/gwtorganize/war/g3viewer/8603379B5088782D2C0620FAE856E112.cache.png deleted file mode 100644 index ded37855..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/8603379B5088782D2C0620FAE856E112.cache.png and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html b/3.1/modules/gwtorganize/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html deleted file mode 100644 index 70fc28c4..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html +++ /dev/null @@ -1,1701 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html b/3.1/modules/gwtorganize/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html deleted file mode 100644 index 59d502f2..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html +++ /dev/null @@ -1,1706 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html b/3.1/modules/gwtorganize/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html deleted file mode 100644 index 87e12a44..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html +++ /dev/null @@ -1,1863 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html b/3.1/modules/gwtorganize/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html deleted file mode 100644 index 45651178..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html +++ /dev/null @@ -1,1868 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html b/3.1/modules/gwtorganize/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html deleted file mode 100644 index d6666f29..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html +++ /dev/null @@ -1,1729 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/DF7764EEC1903CD03C9545B354D8D8E4.cache.png b/3.1/modules/gwtorganize/war/g3viewer/DF7764EEC1903CD03C9545B354D8D8E4.cache.png deleted file mode 100644 index fbae9473..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/DF7764EEC1903CD03C9545B354D8D8E4.cache.png and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/E44767377485D18D6B6864F65BA8EF73.cache.png b/3.1/modules/gwtorganize/war/g3viewer/E44767377485D18D6B6864F65BA8EF73.cache.png deleted file mode 100644 index 030ffab4..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/E44767377485D18D6B6864F65BA8EF73.cache.png and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/EDC7827FEEA59EE44AD790B1C6430C45.cache.png b/3.1/modules/gwtorganize/war/g3viewer/EDC7827FEEA59EE44AD790B1C6430C45.cache.png deleted file mode 100644 index 714cbb11..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/EDC7827FEEA59EE44AD790B1C6430C45.cache.png and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/G3viewer.css b/3.1/modules/gwtorganize/war/g3viewer/G3viewer.css deleted file mode 100644 index c6f40841..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/G3viewer.css +++ /dev/null @@ -1,47 +0,0 @@ -* {padding:0; margin:0;} - -#main {position:relative; width:100%; height:100%} - -.error {width:300px; height:200px;} - -.upload-error {background-color: #FFAAAA;} -.item {width:100px; height: 130px; padding:3px; border: 2px solid #FFF; overflow: hidden; float:left; text-align:center; position:relative;margin:3px;} -.item img{max-width:96px; max-height:76px; *width:96px; *height:76px; border:2px solid #AAA;} -.item h3{font-size:10px; font-weight:normal; position:absolute; bottom:5px; left:0px; width:100%; text-align:center; padding:0; margin:0;} -.ialbum {background-color: #e3effb; border: 2px solid #91c0ef; } -.popped {background-color: #e3effb;} -.view {height: 100%;} -.DropZone {height: 100px; width:6px; margin: 0 -3px 0 -3px; padding: 0; float:left; text-align:center; position:relative;} -.infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid; - border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;} -.infobar div {float:right; } -.infobar .up-options {float:left;} -.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);} -.loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;} -.loading-image{z-index:10;} -.gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;} -.Tree-Album {padding: 1px;} -.Tree-Album:hover{text-decoration:underline;} -.drop-target{background-color: #91c0ef; color: #000;} - -.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;} - -.popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF} - -.dialog fieldset{ border: none; padding: 0px; margin: 0px;} -.dialog legend{ display: none;} -.dialog ul {padding:0; margin:0;} -.dialog ul ul li {float:left;} -.dialog li {list-style: none; padding:0;margin:0;} -.dialog form input[type="password"], .dialog form input[type="text"], .dialog form textarea .dialog form select {border: 1px solid #000; padding: 0.2em; display:block; clear: both;} -.dialog form input[type="password"], .dialog form input[type="text"], .dialog form textarea {width: 100%} -.dialog form textarea {height: 12em;} - -.label {width:90px; text-align:center;} -.progressBar {border: 1px solid #cccccc; width: 100px; height: 10px;} -.progessInner {background: #34628c;width: 0px;height: 10px;} - -.dContents {padding: 2px 5px 2px 5px;} -.dButtons {text-align: right} - -.hideme {overflow:hidden; width:0; height:0; margin:0; padding:0;} \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/clear.cache.gif b/3.1/modules/gwtorganize/war/g3viewer/clear.cache.gif deleted file mode 100644 index e565824a..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/clear.cache.gif and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js deleted file mode 100644 index e53d53ed..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function ZQ(){} -function WQ(){} -function dR(){} -function VQ(){} -function bR(){return EN} -function YQ(){return DN} -function _Q(){_Q=k9;$Q=new WQ} -function cR(){$Q=(_Q(),new VQ);zx((wx(),vx),1);!!$stats&&$stats(dy(wob,xob,null,null));$Q.Xb();!!$stats&&$stats(dy(wob,yob,null,null))} -var Bob='AsyncLoader1',Aob='AsyncLoader1__Super',wob='runCallbacks1';_=WQ.prototype=new Gf;_.gC=YQ;_.Xb=ZQ;_.tI=0;_=VQ.prototype=new WQ;_.gC=bR;_.Xb=dR;_.tI=0;var $Q;var DN=R1(zob,Aob),EN=R1(zob,Bob);cR(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js deleted file mode 100644 index b2a4c208..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function iR(){} -function fR(){} -function oR(){} -function eR(){} -function mR(){return GN} -function hR(){return FN} -function kR(){kR=k9;jR=new fR} -function nR(){jR=(kR(),new eR);zx((wx(),vx),2);!!$stats&&$stats(dy(Cob,xob,null,null));jR.Xb();!!$stats&&$stats(dy(Cob,yob,null,null))} -var Eob='AsyncLoader2',Dob='AsyncLoader2__Super',Cob='runCallbacks2';_=fR.prototype=new Gf;_.gC=hR;_.Xb=iR;_.tI=0;_=eR.prototype=new fR;_.gC=mR;_.Xb=oR;_.tI=0;var jR;var FN=R1(zob,Dob),GN=R1(zob,Eob);nR(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js deleted file mode 100644 index ca33975b..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function ux(){} -function Ix(){} -function Sx(){} -function Wx(){} -function ly(){} -function H6(){} -function P6(){} -function Gx(){Bx(vx)} -function Hx(){return CM} -function Rx(){return yM} -function Vx(){return zM} -function $x(){return AM} -function oy(){return BM} -function M6(){return MP} -function S6(){return LP} -function Bx(a){zx(a,a.d)} -function _x(a){Zx(this,a)} -function Nx(a){a.c=0;a.d=0} -function Qx(a){return a.d-a.c} -function N2(){return this.b} -function O6(){return this.c.b.e} -function Ox(a){return a.b[a.c]} -function Mx(a,b){a.b[a.d++]=b} -function Yx(a,b){a.b=b;return a} -function R6(a,b){a.b=b;return a} -function T6(){return k6(this.b.b)} -function Px(a){return a.b[a.c++]} -function L6(a){return Q4(this.b,a)} -function t8(a){if(a.c==0){throw c9(new a9)}} -function J6(a,b,c){a.b=b;a.c=c;return a} -function ny(a,b,c){a.c=b;a.b=c;return a} -function Ux(a,b){kz(a);a.g=Hob+b;return a} -function Lx(a,b){a.b=fK(_P,0,-1,b,1);return a} -function r8(a){var b;t8(a);--a.c;b=a.b.b;N8(b);return b.d} -function U6(){var a;a=vK(l6(this.b.b),61).nc();return a} -function N6(){var a;a=v5(new t5,this.c.b);return R6(new P6,a)} -function D4(a){var b;b=l5(new e5,a);return J6(new H6,a,b)} -function Dx(a,b,c,d){!!$stats&&$stats(dy(a,b,c,d))} -function jy(b,c){function d(a){c.Hb(a)} -return __gwtStartLoadingFragment(b,d)} -function Q4(a,b){if(a.d&&V7(a.c,b)){return true}else if(P4(a,b)){return true}else if(N4(a,b)){return true}return false} -function yx(a,b,c){wx();a.b=T7(new R7);a.g=n8(new l8);a.d=b;a.c=c;a.f=Lx(new Ix,b+1);return a} -function wx(){wx=k9;vx=yx(new ux,3,gK(_P,0,-1,[]))} -function ky(a,b){var c,d;c=jy(a,b);if(c==null){return}d=u1();d.open(wgb,c,true);s1(d,ny(new ly,d,b));d.send(null)} -function Ax(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){e7(h,vK(r8(b.b.g),41));Px(b.b.f)}Nx(b.b.f);g7(h,D4(b.b.b));M4(b.b.b);i=null;for(g=j6(new g6,h);g.b1){return}if(Qx(a.e)>0){c=Ox(a.e);Dx(c==a.d?Fob:Gob+c,xob,Q2(c),null);ky(c,Yx(new Wx,a));return}while(Qx(a.f)>0){c=Px(a.f);b=vK(r8(a.g),41);Dx(c==a.d?Fob:Gob+c,xob,Q2(c),null);ky(c,b)}} -var Pob='AbstractMap$2',Qob='AbstractMap$2$1',Kob='AsyncFragmentLoader',Lob='AsyncFragmentLoader$BoundedIntQueue',Mob='AsyncFragmentLoader$HttpDownloadFailure',Nob='AsyncFragmentLoader$InitialFragmentDownloadFailed',Oob='AsyncFragmentLoader$XhrLoadingStrategy$1',Hob='HTTP download failed with status ',Job='[I',xob='begin',zob='com.google.gwt.lang.asyncloaders.',Gob='download',yob='end',Fob='leftoversDownload',Iob='runAsync';_=ux.prototype=new Gf;_.gC=Hx;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var vx;_=Ix.prototype=new Gf;_.gC=Rx;_.tI=0;_.b=null;_.c=0;_.d=0;_=Sx.prototype=new rw;_.gC=Vx;_.tI=76;_=Wx.prototype=new Gf;_.gC=$x;_.Hb=_x;_.tI=77;_.b=null;_=ly.prototype=new Gf;_.gC=oy;_.Ib=py;_.tI=0;_.b=null;_.c=null;_=F2.prototype;_.gc=N2;_=H6.prototype=new o4;_.ic=L6;_.gC=M6;_.ob=N6;_.jc=O6;_.tI=0;_.b=null;_.c=null;_=P6.prototype=new Gf;_.gC=S6;_.Yb=T6;_.Zb=U6;_.tI=0;_.b=null;var _P=Q1(nbb,Job),CM=R1(clb,Kob),yM=R1(clb,Lob),zM=R1(clb,Mob),AM=R1(clb,Nob),BM=R1(clb,Oob),MP=R1(djb,Pob),LP=R1(djb,Qob);Gx(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js deleted file mode 100644 index d583bce7..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function SQ(){} -function PQ(){} -function YQ(){} -function OQ(){} -function WQ(){return yN} -function RQ(){return xN} -function UQ(){UQ=i9;TQ=new PQ} -function XQ(){TQ=(UQ(),new OQ);Bx((yx(),xx),1);!!$stats&&$stats(fy(xob,yob,null,null));TQ.Vb();!!$stats&&$stats(fy(xob,zob,null,null))} -var Cob='AsyncLoader1',Bob='AsyncLoader1__Super',xob='runCallbacks1';_=PQ.prototype=new Ef;_.gC=RQ;_.Vb=SQ;_.tI=0;_=OQ.prototype=new PQ;_.gC=WQ;_.Vb=YQ;_.tI=0;var TQ;var xN=P1(Aob,Bob),yN=P1(Aob,Cob);XQ(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js deleted file mode 100644 index 7bb8a12e..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function bR(){} -function $Q(){} -function hR(){} -function ZQ(){} -function fR(){return AN} -function aR(){return zN} -function dR(){dR=i9;cR=new $Q} -function gR(){cR=(dR(),new ZQ);Bx((yx(),xx),2);!!$stats&&$stats(fy(Dob,yob,null,null));cR.Vb();!!$stats&&$stats(fy(Dob,zob,null,null))} -var Fob='AsyncLoader2',Eob='AsyncLoader2__Super',Dob='runCallbacks2';_=$Q.prototype=new Ef;_.gC=aR;_.Vb=bR;_.tI=0;_=ZQ.prototype=new $Q;_.gC=fR;_.Vb=hR;_.tI=0;var cR;var zN=P1(Aob,Eob),AN=P1(Aob,Fob);gR(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js deleted file mode 100644 index 8e8f02c9..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function wx(){} -function Kx(){} -function Ux(){} -function Yx(){} -function ny(){} -function F6(){} -function N6(){} -function Ix(){Dx(xx)} -function Jx(){return yM} -function Tx(){return uM} -function Xx(){return vM} -function ay(){return wM} -function qy(){return xM} -function K6(){return FP} -function Q6(){return EP} -function Dx(a){Bx(a,a.d)} -function by(a){_x(this,a)} -function Px(a){a.c=0;a.d=0} -function Sx(a){return a.d-a.c} -function L2(){return this.b} -function M6(){return this.c.b.e} -function Qx(a){return a.b[a.c]} -function Ox(a,b){a.b[a.d++]=b} -function $x(a,b){a.b=b;return a} -function P6(a,b){a.b=b;return a} -function R6(){return i6(this.b.b)} -function Rx(a){return a.b[a.c++]} -function J6(a){return O4(this.b,a)} -function r8(a){if(a.c==0){throw a9(new $8)}} -function H6(a,b,c){a.b=b;a.c=c;return a} -function py(a,b,c){a.c=b;a.b=c;return a} -function Wx(a,b){mz(a);a.g=Iob+b;return a} -function Nx(a,b){a.b=aK(UP,0,-1,b,1);return a} -function Fx(a,b,c,d){!!$stats&&$stats(fy(a,b,c,d))} -function ly(b,c){function d(a){c.Jb(a)} -return __gwtStartLoadingFragment(b,d)} -function p8(a){var b;r8(a);--a.c;b=a.b.b;L8(b);return b.d} -function S6(){var a;a=qK(j6(this.b.b),61).lc();return a} -function B4(a){var b;b=j5(new c5,a);return H6(new F6,a,b)} -function L6(){var a;a=t5(new r5,this.c.b);return P6(new N6,a)} -function yx(){yx=i9;xx=Ax(new wx,3,bK(UP,0,-1,[]))} -function Bx(a,b){var c;c=b==a.d?Gob:Hob+b;Fx(c,zob,O2(b),null);if(Cx(a,b)){Rx(a.e);Y4(a.b,O2(b));Hx(a)}} -function my(a,b){var c,d;c=ly(a,b);if(c==null){return}d=s1();d.open(vgb,c,true);q1(d,py(new ny,d,b));d.send(null)} -function Cx(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e1){return}if(Sx(a.e)>0){c=Qx(a.e);Fx(c==a.d?Gob:Hob+c,yob,O2(c),null);my(c,$x(new Yx,a));return}while(Sx(a.f)>0){c=Rx(a.f);b=qK(p8(a.g),41);Fx(c==a.d?Gob:Hob+c,yob,O2(c),null);my(c,b)}} -function _x(b,c){var a,e,f,g,h,i;h=b7(new $6);while(Sx(b.b.f)>0){c7(h,qK(p8(b.b.g),41));Rx(b.b.f)}Px(b.b.f);e7(h,B4(b.b.b));K4(b.b.b);i=null;for(g=h6(new e6,h);g.bb){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));vw(a.d,e.encode());return}vw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);vw(a.d,e.encode());return}vw(a.d,a.b)}} -var Etb='AsyncLoader2',Ctb='beta.canvas',Dtb='runCallbacks2';_=QU.prototype=new RU;_.gC=aV;_.Zb=eV;_.tI=0;var fR=J5(orb,Etb);bV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js deleted file mode 100644 index 4481e97b..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function zo(){} -function xw(){} -function Cw(){} -function UU(){} -function RU(){} -function fV(){} -function jV(){} -function gA(){bA(Wz)} -function Do(){return KO} -function Bw(){return DP} -function Gw(){return EP} -function TU(){return eR} -function hV(){return cR} -function lV(){return dR} -function bA(a){$z(a,a.e)} -function zw(a,b){a.b=b;return a} -function Ew(a,b){a.b=b;return a} -function $U(){$U=edb;XU=new RU} -function iV(a){$U();ZU=false;dV(a)} -function VJ(a,b){if(!a){return}Fw(a,b)} -function YJ(c,b){c.onprogress=function(a){ZJ(b,a)}} -function Bo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function _w(a,b,c){var d;d=B3(a.g,b);ut(a,c,a.I,d,true);vt(a,b)} -function gw(a,b){T8(a.g.b,b)!=null;lw(a);kw(a);Lt(a.b.f)} -function uw(a){if(a.i.d){(UC(),a.e.I).textContent=Ftb;cV(Bo(new zo,a.b,a))}else{vw(a,a.b)}} -function dV(a){$U();while(VU){dr();jq(Fr(new Dr,Otb+Mh(a)));VU=VU.c}WU=null} -function ZJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(RN(Math.floor(c*100))+Ntb)} -function $z(a,b){var c;c=b==a.e?tkb:ukb+b;dA(c,Atb,I6(b),null);if(aA(a,b)){pA(a.f);T8(a.b,I6(b));fA(a)}} -function kw(a){var b;if(a.f.c>0){b=EN(lcb(a.f),37);uw(b)}else{a.e=false}} -function cV(a){$U();var b;b=new jV;b.b=a;!!WU&&(WU.c=b);WU=b;!VU&&(VU=b);if(YU){XU.Zb();return}if(!ZU){ZU=true;_z((Xz(),Wz),2,new fV)}} -function gl(a,b,c){var d,e;T8(a.b.b,b)!=null;e=c.Xb();if(e){d=fu(new Wt,a,e,a.c);P8(a.g,I6(d.d),d);Zab(a.h,d);a.m.b==a&&_w(a.m,b,d)}else{a.m.b==a&&vt(a.m,b)}} -function Fw(b,c){var a,e,f;if(c.status!=200){(UC(),b.b.e.I).textContent=Jtb;tk(b.b._(),Ktb,true);dr();jq(Fr(new Dr,Ltb+c.responseText))}(pw(),ow).remove(b.b.f);if(c.status==200){try{f=SM(c.responseText);gw(b.b.j,b.b);gl(b.b.g,b.b,f);return}catch(a){a=RT(a);if(HN(a,23)){e=a;dr();jq(Fr(new Dr,Mtb+Mh(e)+wfb+c.responseText))}else throw a}}T8(b.b.g.b.b,b.b)!=null;gw(b.b.j,b.b)} -function UJ(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){VJ(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function vw(a,b){var c;(UC(),a.e.I).textContent=Gtb;c=vJ().create(Htb);c.open(Xkb,(dr(),$q)+a.g.e+Itb+a.f+yhb+cr);YJ(c.upload,zw(new xw,a));UJ(c,Ew(new Cw,a));c.send(b)} -var Ntb='%',Itb='?filename=',Ttb='AsyncLoader2$1',Utb='AsyncLoader2__Callback',Stb='AsyncLoader2__Super',Ptb='AsyncResizer',Otb='Error Resizing image\n',Ltb='Error Uploading\n',Mtb='Exception on Upload\n',Ftb='Resizing..',Jtb='Upload Error',Qtb='UploadFile$1',Rtb='UploadFile$2',Gtb='Uploading..',Htb='beta.httprequest',Atb='end',Ktb='upload-error';_=zo.prototype=new Wf;_.gC=Do;_.tI=0;_.b=null;_.c=null;_.d=null;_=xw.prototype=new Wf;_.gC=Bw;_.tI=0;_.b=null;_=Cw.prototype=new Wf;_.gC=Gw;_.tI=0;_.b=null;_=RU.prototype=new Wf;_.gC=TU;_.Zb=UU;_.tI=0;var VU=null,WU=null,XU,YU=false,ZU=false;_=fV.prototype=new Wf;_.gC=hV;_.Nb=iV;_.tI=95;_=jV.prototype=new Wf;_.gC=lV;_.tI=0;_.b=null;_.c=null;var KO=J5(fob,Ptb),DP=J5(fob,Qtb),EP=J5(fob,Rtb),eR=J5(orb,Stb),cR=J5(orb,Ttb),dR=J5(orb,Utb);gA(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js deleted file mode 100644 index 3a44f42f..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function pU(){} -function BU(){return _Q} -function FU(){var a;while(uU){a=uU;uU=uU.c;!uU&&(vU=null);Iw(a.b.b)}} -function gw(a,b){Xbb(a.f,b);if(!a.e){a.e=true;iw(a)}a.c=false;jw(a)} -function Iw(a){var b;a.b.b=a.b.c.blob;(nw(),mw).captureBlob(a.b.b,a.b.f,gtb);b=s0(new p0,a.b.f);a.b.d.sb(b);gw(a.b.j,a.b)} -function CU(){xU=true;wU=(zU(),new pU);Yz((Vz(),Uz),1);!!$stats&&$stats(CA(htb,hkb,null,null));wU.$b();!!$stats&&$stats(CA(htb,itb,null,null))} -var jtb='AsyncLoader1',gtb='image/JPEG',htb='runCallbacks1';_=pU.prototype=new qU;_.gC=BU;_.$b=FU;_.tI=0;var _Q=u5(Zqb,jtb);CU(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js deleted file mode 100644 index 7b5a86ac..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function NU(){} -function ZU(){return dR} -function bV(){var a;while(SU){a=SU;SU=SU.c;!SU&&(TU=null);Bo(a.b)}} -function $U(){VU=true;UU=(XU(),new NU);Yz((Vz(),Uz),2);!!$stats&&$stats(CA(ltb,hkb,null,null));UU.$b();!!$stats&&$stats(CA(ltb,itb,null,null))} -function Bo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(ktb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));tw(a.d,e.encode());return}tw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);tw(a.d,e.encode());return}tw(a.d,a.b)}} -var mtb='AsyncLoader2',ktb='beta.canvas',ltb='runCallbacks2';_=NU.prototype=new OU;_.gC=ZU;_.$b=bV;_.tI=0;var dR=u5(Zqb,mtb);$U(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js deleted file mode 100644 index 96fe591c..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function yo(){} -function vw(){} -function Aw(){} -function RU(){} -function OU(){} -function cV(){} -function gV(){} -function eA(){_z(Uz)} -function Co(){return IO} -function zw(){return BP} -function Ew(){return CP} -function QU(){return cR} -function eV(){return aR} -function iV(){return bR} -function _z(a){Yz(a,a.e)} -function xw(a,b){a.b=b;return a} -function Cw(a,b){a.b=b;return a} -function XU(){XU=Scb;UU=new OU} -function fV(a){XU();WU=false;aV(a)} -function TJ(a,b){if(!a){return}Dw(a,b)} -function WJ(c,b){c.onprogress=function(a){XJ(b,a)}} -function Ao(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function Zw(a,b,c){var d;d=x3(a.g,b);st(a,c,a.I,d,true);tt(a,b)} -function ew(a,b){F8(a.g.b,b)!=null;jw(a);iw(a);Jt(a.b.f)} -function sw(a){if(a.i.d){sD((XC(),a.e.I),ntb);_U(Ao(new yo,a.b,a))}else{tw(a,a.b)}} -function iw(a){var b;if(a.f.c>0){b=CN(Zbb(a.f),37);sw(b)}else{a.e=false}} -function XJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(PN(Math.floor(c*100))+vtb)} -function Yz(a,b){var c;c=b==a.e?fkb:gkb+b;bA(c,itb,t6(b),null);if($z(a,b)){nA(a.f);F8(a.b,t6(b));dA(a)}} -function tw(a,b){var c;sD((XC(),a.e.I),otb);c=tJ().create(ptb);c.open(Jkb,(br(),Yq)+a.g.e+qtb+a.f+khb+ar);WJ(c.upload,xw(new vw,a));SJ(c,Cw(new Aw,a));c.send(b)} -function aV(a){XU();while(SU){br();hq(Dr(new Br,wtb+Lh(a)));SU=SU.c}TU=null} -function _U(a){XU();var b;b=new gV;b.b=a;!!TU&&(TU.c=b);TU=b;!SU&&(SU=b);if(VU){UU.$b();return}if(!WU){WU=true;Zz((Vz(),Uz),2,new cV)}} -function fl(a,b,c){var d,e;F8(a.b.b,b)!=null;e=c.Yb();if(e){d=du(new Ut,a,e,a.c);B8(a.g,t6(d.d),d);Lab(a.h,d);a.m.b==a&&Zw(a.m,b,d)}else{a.m.b==a&&tt(a.m,b)}} -function Dw(b,c){var a,e,f;if(c.status!=200){sD((XC(),b.b.e.I),rtb);sk(b.b._(),stb,true);br();hq(Dr(new Br,ttb+c.responseText))}(nw(),mw).remove(b.b.f);if(c.status==200){try{f=QM(c.responseText);ew(b.b.j,b.b);fl(b.b.g,b.b,f);return}catch(a){a=OT(a);if(FN(a,23)){e=a;br();hq(Dr(new Br,utb+Lh(e)+ifb+c.responseText))}else throw a}}F8(b.b.g.b.b,b.b)!=null;ew(b.b.j,b.b)} -function SJ(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){TJ(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -var vtb='%',qtb='?filename=',Btb='AsyncLoader2$1',Ctb='AsyncLoader2__Callback',Atb='AsyncLoader2__Super',xtb='AsyncResizer',wtb='Error Resizing image\n',ttb='Error Uploading\n',utb='Exception on Upload\n',ntb='Resizing..',rtb='Upload Error',ytb='UploadFile$1',ztb='UploadFile$2',otb='Uploading..',ptb='beta.httprequest',itb='end',stb='upload-error';_=yo.prototype=new Vf;_.gC=Co;_.tI=0;_.b=null;_.c=null;_.d=null;_=vw.prototype=new Vf;_.gC=zw;_.tI=0;_.b=null;_=Aw.prototype=new Vf;_.gC=Ew;_.tI=0;_.b=null;_=OU.prototype=new Vf;_.gC=QU;_.$b=RU;_.tI=0;var SU=null,TU=null,UU,VU=false,WU=false;_=cV.prototype=new Vf;_.gC=eV;_.Nb=fV;_.tI=95;_=gV.prototype=new Vf;_.gC=iV;_.tI=0;_.b=null;_.c=null;var IO=u5(Qnb,xtb),BP=u5(Qnb,ytb),CP=u5(Qnb,ztb),cR=u5(Zqb,Atb),aR=u5(Zqb,Btb),bR=u5(Zqb,Ctb);eA(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js deleted file mode 100644 index 37f81533..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function SU(){} -function cV(){return uR} -function gV(){var a;while(XU){a=XU;XU=XU.b;!XU&&(YU=null);Kw(a.a.a)}} -function iw(a,b){Hdb(a.e,b);if(!a.d){a.d=true;kw(a)}a.b=false;lw(a)} -function Kw(a){var b;a.a.a=a.a.b.blob;(pw(),ow).captureBlob(a.a.a,a.a.e,Hvb);b=F1(new C1,a.a.e);a.a.c.rb(b);iw(a.a.i,a.a)} -function dV(){$U=true;ZU=(aV(),new SU);cA((_z(),$z),1);!!$stats&&$stats(IA(Ivb,Mlb,null,null));ZU.Zb();!!$stats&&$stats(IA(Ivb,Jvb,null,null))} -var Kvb='AsyncLoader1',Hvb='image/JPEG',Ivb='runCallbacks1';_=SU.prototype=new TU;_.gC=cV;_.Zb=gV;_.tI=0;var uR=f7(ptb,Kvb);dV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js deleted file mode 100644 index 51e8d46b..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function oV(){} -function AV(){return yR} -function EV(){var a;while(tV){a=tV;tV=tV.b;!tV&&(uV=null);Do(a.a)}} -function BV(){wV=true;vV=(yV(),new oV);cA((_z(),$z),2);!!$stats&&$stats(IA(Mvb,Mlb,null,null));vV.Zb();!!$stats&&$stats(IA(Mvb,Jvb,null,null))} -function Do(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Lvb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));vw(a.c,e.encode());return}vw(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);vw(a.c,e.encode());return}vw(a.c,a.a)}} -var Nvb='AsyncLoader2',Lvb='beta.canvas',Mvb='runCallbacks2';_=oV.prototype=new pV;_.gC=AV;_.Zb=EV;_.tI=0;var yR=f7(ptb,Nvb);BV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js deleted file mode 100644 index f4fa9cb0..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function Ao(){} -function xw(){} -function Cw(){} -function sV(){} -function pV(){} -function FV(){} -function JV(){} -function kA(){fA($z)} -function Eo(){return dP} -function Bw(){return YP} -function Gw(){return ZP} -function rV(){return xR} -function HV(){return vR} -function LV(){return wR} -function fA(a){cA(a,a.d)} -function zw(a,b){a.a=b;return a} -function Ew(a,b){a.a=b;return a} -function yV(){yV=Ceb;vV=new pV} -function IV(a){yV();xV=false;DV(a)} -function pK(a,b){if(!a){return}Fw(a,b)} -function gw(a,b){pab(a.f.a,b)!=null;lw(a);kw(a);Lt(a.a.e)} -function uw(a){if(a.h.c){(UC(),a.d.H).innerText=Ovb;CV(Co(new Ao,a.a,a))}else{vw(a,a.a)}} -function _w(a,b,c){var d;d=M4(a.f,b);ut(a,c,a.H,d,true);vt(a,b)} -function sK(c,b){c.onprogress=function(a){tK(b,a)}} -function Co(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} -function DV(a){yV();while(tV){dr();jq(Fr(new Dr,Xvb+Qh(a)));tV=tV.b}uV=null} -function tK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(lO(Math.floor(c*100))+Wvb)} -function kw(a){var b;if(a.e.b>0){b=$N(Jdb(a.e),37);uw(b)}else{a.d=false}} -function CV(a){yV();var b;b=new JV;b.a=a;!!uV&&(uV.b=b);uV=b;!tV&&(tV=b);if(wV){vV.Zb();return}if(!xV){xV=true;dA((_z(),$z),2,new FV)}} -function cA(a,b){var c;c=b==a.d?Klb:Llb+b;hA(c,Jvb,e8(b),null);if(eA(a,b)){tA(a.e);pab(a.a,e8(b));jA(a)}} -function hl(a,b,c){var d,e;pab(a.a.a,b)!=null;e=c.Xb();if(e){d=fu(new Wt,a,e,a.b);lab(a.f,e8(d.c),d);vcb(a.g,d);a.l.a==a&&_w(a.l,b,d)}else{a.l.a==a&&vt(a.l,b)}} -function Fw(b,c){var a,e,f;if(c.status!=200){(UC(),b.a.d.H).innerText=Svb;uk(b.a.$(),Tvb,true);dr();jq(Fr(new Dr,Uvb+c.responseText))}(pw(),ow).remove(b.a.e);if(c.status==200){try{f=mN(c.responseText);gw(b.a.i,b.a);hl(b.a.f,b.a,f);return}catch(a){a=pU(a);if(bO(a,23)){e=a;dr();jq(Fr(new Dr,Vvb+Qh(e)+Ngb+c.responseText))}else throw a}}pab(b.a.f.a.a,b.a)!=null;gw(b.a.i,b.a)} -function oK(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){pK(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function vw(a,b){var c;(UC(),a.d.H).innerText=Pvb;c=RJ().create(Qvb);c.open(jmb,(dr(),$q)+a.f.d+Rvb+a.e+Rib+cr);sK(c.upload,zw(new xw,a));oK(c,Ew(new Cw,a));c.send(b)} -var Wvb='%',Rvb='?filename=',awb='AsyncLoader2$1',bwb='AsyncLoader2__Callback',_vb='AsyncLoader2__Super',Yvb='AsyncResizer',Xvb='Error Resizing image\n',Uvb='Error Uploading\n',Vvb='Exception on Upload\n',Ovb='Resizing..',Svb='Upload Error',Zvb='UploadFile$1',$vb='UploadFile$2',Pvb='Uploading..',Qvb='beta.httprequest',Jvb='end',Tvb='upload-error';_=Ao.prototype=new $f;_.gC=Eo;_.tI=0;_.a=null;_.b=null;_.c=null;_=xw.prototype=new $f;_.gC=Bw;_.tI=0;_.a=null;_=Cw.prototype=new $f;_.gC=Gw;_.tI=0;_.a=null;_=pV.prototype=new $f;_.gC=rV;_.Zb=sV;_.tI=0;var tV=null,uV=null,vV,wV=false,xV=false;_=FV.prototype=new $f;_.gC=HV;_.Mb=IV;_.tI=95;_=JV.prototype=new $f;_.gC=LV;_.tI=0;_.a=null;_.b=null;var dP=f7(iqb,Yvb),YP=f7(iqb,Zvb),ZP=f7(iqb,$vb),xR=f7(ptb,_vb),vR=f7(ptb,awb),wR=f7(ptb,bwb);kA(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js deleted file mode 100644 index a0dac49e..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function AU(){} -function MU(){return eR} -function QU(){var a;while(FU){a=FU;FU=FU.b;!FU&&(GU=null);Iw(a.a.a)}} -function gw(a,b){Scb(a.e,b);if(!a.d){a.d=true;iw(a)}a.b=false;jw(a)} -function Iw(a){var b;a.a.a=a.a.b.blob;(nw(),mw).captureBlob(a.a.a,a.a.e,mub);b=k1(new h1,a.a.e);a.a.c.rb(b);gw(a.a.i,a.a)} -function NU(){IU=true;HU=(KU(),new AU);_z((Yz(),Xz),1);!!$stats&&$stats(FA(nub,Ykb,null,null));HU.Zb();!!$stats&&$stats(FA(nub,oub,null,null))} -var pub='AsyncLoader1',mub='image/JPEG',nub='runCallbacks1';_=AU.prototype=new BU;_.gC=MU;_.Zb=QU;_.tI=0;var eR=q6(Yrb,pub);NU(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js deleted file mode 100644 index 453a199b..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function YU(){} -function iV(){return iR} -function mV(){var a;while(bV){a=bV;bV=bV.b;!bV&&(cV=null);Bo(a.a)}} -function jV(){eV=true;dV=(gV(),new YU);_z((Yz(),Xz),2);!!$stats&&$stats(FA(rub,Ykb,null,null));dV.Zb();!!$stats&&$stats(FA(rub,oub,null,null))} -function Bo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(qub);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));tw(a.c,e.encode());return}tw(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);tw(a.c,e.encode());return}tw(a.c,a.a)}} -var sub='AsyncLoader2',qub='beta.canvas',rub='runCallbacks2';_=YU.prototype=new ZU;_.gC=iV;_.Zb=mV;_.tI=0;var iR=q6(Yrb,sub);jV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js deleted file mode 100644 index b5795b52..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function yo(){} -function vw(){} -function Aw(){} -function aV(){} -function ZU(){} -function nV(){} -function rV(){} -function hA(){cA(Xz)} -function Co(){return PO} -function zw(){return IP} -function Ew(){return JP} -function _U(){return hR} -function pV(){return fR} -function tV(){return gR} -function cA(a){_z(a,a.d)} -function xw(a,b){a.a=b;return a} -function Cw(a,b){a.a=b;return a} -function gV(){gV=Ndb;dV=new ZU} -function qV(a){gV();fV=false;lV(a)} -function _J(a,b){if(!a){return}Dw(a,b)} -function ew(a,b){A9(a.f.a,b)!=null;jw(a);iw(a);Jt(a.a.e)} -function sw(a){if(a.h.c){(QC(),a.d.H).innerText=tub;kV(Ao(new yo,a.a,a))}else{tw(a,a.a)}} -function Zw(a,b,c){var d;d=p4(a.f,b);st(a,c,a.H,d,true);tt(a,b)} -function cK(c,b){c.onprogress=function(a){dK(b,a)}} -function iw(a){var b;if(a.e.b>0){b=KN(Ucb(a.e),37);sw(b)}else{a.d=false}} -function dK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(XN(Math.floor(c*100))+Bub)} -function lV(a){gV();while(bV){br();hq(Dr(new Br,Cub+Oh(a)));bV=bV.b}cV=null} -function Ao(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} -function _z(a,b){var c;c=b==a.d?Wkb:Xkb+b;eA(c,oub,p7(b),null);if(bA(a,b)){qA(a.e);A9(a.a,p7(b));gA(a)}} -function tw(a,b){var c;(QC(),a.d.H).innerText=uub;c=BJ().create(vub);c.open(tlb,(br(),Yq)+a.f.d+wub+a.e+bib+ar);cK(c.upload,xw(new vw,a));$J(c,Cw(new Aw,a));c.send(b)} -function kV(a){gV();var b;b=new rV;b.a=a;!!cV&&(cV.b=b);cV=b;!bV&&(bV=b);if(eV){dV.Zb();return}if(!fV){fV=true;aA((Yz(),Xz),2,new nV)}} -function fl(a,b,c){var d,e;A9(a.a.a,b)!=null;e=c.Xb();if(e){d=du(new Ut,a,e,a.b);w9(a.f,p7(d.c),d);Gbb(a.g,d);a.l.a==a&&Zw(a.l,b,d)}else{a.l.a==a&&tt(a.l,b)}} -function Dw(b,c){var a,e,f;if(c.status!=200){(QC(),b.a.d.H).innerText=xub;sk(b.a.$(),yub,true);br();hq(Dr(new Br,zub+c.responseText))}(nw(),mw).remove(b.a.e);if(c.status==200){try{f=YM(c.responseText);ew(b.a.i,b.a);fl(b.a.f,b.a,f);return}catch(a){a=ZT(a);if(NN(a,23)){e=a;br();hq(Dr(new Br,Aub+Oh(e)+Zfb+c.responseText))}else throw a}}A9(b.a.f.a.a,b.a)!=null;ew(b.a.i,b.a)} -function $J(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){_J(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -var Bub='%',wub='?filename=',Hub='AsyncLoader2$1',Iub='AsyncLoader2__Callback',Gub='AsyncLoader2__Super',Dub='AsyncResizer',Cub='Error Resizing image\n',zub='Error Uploading\n',Aub='Exception on Upload\n',tub='Resizing..',xub='Upload Error',Eub='UploadFile$1',Fub='UploadFile$2',uub='Uploading..',vub='beta.httprequest',oub='end',yub='upload-error';_=yo.prototype=new Yf;_.gC=Co;_.tI=0;_.a=null;_.b=null;_.c=null;_=vw.prototype=new Yf;_.gC=zw;_.tI=0;_.a=null;_=Aw.prototype=new Yf;_.gC=Ew;_.tI=0;_.a=null;_=ZU.prototype=new Yf;_.gC=_U;_.Zb=aV;_.tI=0;var bV=null,cV=null,dV,eV=false,fV=false;_=nV.prototype=new Yf;_.gC=pV;_.Mb=qV;_.tI=95;_=rV.prototype=new Yf;_.gC=tV;_.tI=0;_.a=null;_.b=null;var PO=q6(Rob,Dub),IP=q6(Rob,Eub),JP=q6(Rob,Fub),hR=q6(Yrb,Gub),fR=q6(Yrb,Hub),gR=q6(Yrb,Iub);hA(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js deleted file mode 100644 index 4428a14f..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function wQ(){} -function tQ(){} -function CQ(){} -function sQ(){} -function AQ(){return fN} -function vQ(){return eN} -function yQ(){yQ=m8;xQ=new tQ} -function BQ(){xQ=(yQ(),new sQ);sx((px(),ox),1);!!$stats&&$stats(Yx(snb,tnb,null,null));xQ.Tb();!!$stats&&$stats(Yx(snb,unb,null,null))} -var xnb='AsyncLoader1',wnb='AsyncLoader1__Super',snb='runCallbacks1';_=tQ.prototype=new zf;_.gC=vQ;_.Tb=wQ;_.tI=0;_=sQ.prototype=new tQ;_.gC=AQ;_.Tb=CQ;_.tI=0;var xQ;var eN=S0(vnb,wnb),fN=S0(vnb,xnb);BQ(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js deleted file mode 100644 index fe89e09b..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function HQ(){} -function EQ(){} -function NQ(){} -function DQ(){} -function LQ(){return hN} -function GQ(){return gN} -function JQ(){JQ=m8;IQ=new EQ} -function MQ(){IQ=(JQ(),new DQ);sx((px(),ox),2);!!$stats&&$stats(Yx(ynb,tnb,null,null));IQ.Tb();!!$stats&&$stats(Yx(ynb,unb,null,null))} -var Anb='AsyncLoader2',znb='AsyncLoader2__Super',ynb='runCallbacks2';_=EQ.prototype=new zf;_.gC=GQ;_.Tb=HQ;_.tI=0;_=DQ.prototype=new EQ;_.gC=LQ;_.Tb=NQ;_.tI=0;var IQ;var gN=S0(vnb,znb),hN=S0(vnb,Anb);MQ(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js deleted file mode 100644 index efb84b56..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function nx(){} -function Bx(){} -function Lx(){} -function Px(){} -function ey(){} -function J5(){} -function R5(){} -function zx(){ux(ox)} -function Ax(){return gM} -function Kx(){return cM} -function Ox(){return dM} -function Tx(){return eM} -function hy(){return fM} -function O5(){return jP} -function U5(){return iP} -function ux(a){sx(a,a.d)} -function Ux(a){Sx(this,a)} -function Gx(a){a.c=0;a.d=0} -function Jx(a){return a.d-a.c} -function O1(){return this.b} -function Q5(){return this.c.b.e} -function Hx(a){return a.b[a.c]} -function Fx(a,b){a.b[a.d++]=b} -function Rx(a,b){a.b=b;return a} -function T5(a,b){a.b=b;return a} -function V5(){return m5(this.b.b)} -function Ix(a){return a.b[a.c++]} -function N5(a){return S3(this.b,a)} -function Nx(a,b){cz(a);a.g=Dnb+b;return a} -function gy(a,b,c){a.c=b;a.b=c;return a} -function L5(a,b,c){a.b=b;a.c=c;return a} -function Ex(a,b){a.b=LJ(yP,0,-1,b,1);return a} -function wx(a,b,c,d){!!$stats&&$stats(Yx(a,b,c,d))} -function cy(b,c){function d(a){c.Hb(a)} -return __gwtStartLoadingFragment(b,d)} -function W5(){var a;a=_J(n5(this.b.b),61).hc();return a} -function P5(){var a;a=x4(new v4,this.c.b);return T5(new R5,a)} -function px(){px=m8;ox=rx(new nx,3,MJ(yP,0,-1,[]))} -function F3(a){var b;b=n4(new g4,a);return L5(new J5,a,b)} -function v7(a){if(a.c==0){throw e8(new c8)}} -function t7(a){var b;v7(a);--a.c;b=a.b.b;P7(b);return b.d} -function sx(a,b){var c;c=b==a.d?Bnb:Cnb+b;wx(c,unb,R1(b),null);if(tx(a,b)){Ix(a.e);a4(a.b,R1(b));yx(a)}} -function dy(a,b){var c,d;c=cy(a,b);if(c==null){return}d=v0();d.open(zfb,c,true);t0(d,gy(new ey,d,b));d.send(null)} -function tx(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e1){return}if(Jx(a.e)>0){c=Hx(a.e);wx(c==a.d?Bnb:Cnb+c,tnb,R1(c),null);dy(c,Rx(new Px,a));return}while(Jx(a.f)>0){c=Ix(a.f);b=_J(t7(a.g),41);wx(c==a.d?Bnb:Cnb+c,tnb,R1(c),null);dy(c,b)}} -function Sx(b,c){var a,e,f,g,h,i;h=f6(new c6);while(Jx(b.b.f)>0){g6(h,_J(t7(b.b.g),41));Ix(b.b.f)}Gx(b.b.f);i6(h,F3(b.b.b));O3(b.b.b);i=null;for(g=l5(new i5,h);g.b0){b7(h,hK(o8(b.a.f),41));Lx(b.a.e)}Jx(b.a.e);d7(h,A4(b.a.a));J4(b.a.a);i=null;for(g=g6(new d6,h);g.a1){return}if(Mx(a.d)>0){c=Kx(a.d);zx(c==a.c?Job:Kob+c,Bob,N2(c),null);gy(c,Ux(new Sx,a));return}while(Mx(a.e)>0){c=Lx(a.e);b=hK(o8(a.f),41);zx(c==a.c?Job:Kob+c,Bob,N2(c),null);gy(c,b)}} -var Tob='AbstractMap$2',Uob='AbstractMap$2$1',Oob='AsyncFragmentLoader',Pob='AsyncFragmentLoader$BoundedIntQueue',Qob='AsyncFragmentLoader$HttpDownloadFailure',Rob='AsyncFragmentLoader$InitialFragmentDownloadFailed',Sob='AsyncFragmentLoader$XhrLoadingStrategy$1',Lob='HTTP download failed with status ',Nob='[I',Bob='begin',Dob='com.google.gwt.lang.asyncloaders.',Kob='download',Cob='end',Job='leftoversDownload',Mob='runAsync';_=qx.prototype=new Cf;_.gC=Dx;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var rx;_=Ex.prototype=new Cf;_.gC=Nx;_.tI=0;_.a=null;_.b=0;_.c=0;_=Ox.prototype=new kw;_.gC=Rx;_.tI=76;_=Sx.prototype=new Cf;_.gC=Wx;_.Gb=Xx;_.tI=77;_.a=null;_=hy.prototype=new Cf;_.gC=ky;_.Hb=ly;_.tI=0;_.a=null;_.b=null;_=C2.prototype;_.ac=K2;_=E6.prototype=new l4;_.cc=I6;_.gC=J6;_.nb=K6;_.dc=L6;_.tI=0;_.a=null;_.b=null;_=M6.prototype=new Cf;_.gC=P6;_.Tb=Q6;_.Ub=R6;_.tI=0;_.a=null;var JP=N1(lbb,Nob),nM=O1(ilb,Oob),jM=O1(ilb,Pob),kM=O1(ilb,Qob),lM=O1(ilb,Rob),mM=O1(ilb,Sob),uP=O1(jjb,Tob),tP=O1(jjb,Uob);Cx(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js deleted file mode 100644 index 5cd9b09c..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function zQ(){} -function wQ(){} -function FQ(){} -function vQ(){} -function DQ(){return hN} -function yQ(){return gN} -function BQ(){BQ=A8;AQ=new wQ} -function EQ(){AQ=(BQ(),new vQ);ux((rx(),qx),1);!!$stats&&$stats($x(Knb,Lnb,null,null));AQ.Sb();!!$stats&&$stats($x(Knb,Mnb,null,null))} -var Pnb='AsyncLoader1',Onb='AsyncLoader1__Super',Knb='runCallbacks1';_=wQ.prototype=new Af;_.gC=yQ;_.Sb=zQ;_.tI=0;_=vQ.prototype=new wQ;_.gC=DQ;_.Sb=FQ;_.tI=0;var AQ;var gN=f1(Nnb,Onb),hN=f1(Nnb,Pnb);EQ(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js deleted file mode 100644 index 4ffb2aa4..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function KQ(){} -function HQ(){} -function QQ(){} -function GQ(){} -function OQ(){return jN} -function JQ(){return iN} -function MQ(){MQ=A8;LQ=new HQ} -function PQ(){LQ=(MQ(),new GQ);ux((rx(),qx),2);!!$stats&&$stats($x(Qnb,Lnb,null,null));LQ.Sb();!!$stats&&$stats($x(Qnb,Mnb,null,null))} -var Snb='AsyncLoader2',Rnb='AsyncLoader2__Super',Qnb='runCallbacks2';_=HQ.prototype=new Af;_.gC=JQ;_.Sb=KQ;_.tI=0;_=GQ.prototype=new HQ;_.gC=OQ;_.Sb=QQ;_.tI=0;var LQ;var iN=f1(Nnb,Rnb),jN=f1(Nnb,Snb);PQ(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js deleted file mode 100644 index 114ed2d9..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function px(){} -function Dx(){} -function Nx(){} -function Rx(){} -function gy(){} -function X5(){} -function d6(){} -function Bx(){wx(qx)} -function Cx(){return iM} -function Mx(){return eM} -function Qx(){return fM} -function Vx(){return gM} -function jy(){return hM} -function a6(){return mP} -function g6(){return lP} -function wx(a){ux(a,a.d)} -function Wx(a){Ux(this,a)} -function Ix(a){a.c=0;a.d=0} -function Lx(a){return a.d-a.c} -function b2(){return this.b} -function c6(){return this.c.b.e} -function Jx(a){return a.b[a.c]} -function Hx(a,b){a.b[a.d++]=b} -function Tx(a,b){a.b=b;return a} -function f6(a,b){a.b=b;return a} -function h6(){return A5(this.b.b)} -function Kx(a){return a.b[a.c++]} -function _5(a){return e4(this.b,a)} -function J7(a){if(a.c==0){throw s8(new q8)}} -function Z5(a,b,c){a.b=b;a.c=c;return a} -function iy(a,b,c){a.c=b;a.b=c;return a} -function Px(a,b){fz(a);a.g=Vnb+b;return a} -function Gx(a,b){a.b=NJ(BP,0,-1,b,1);return a} -function H7(a){var b;J7(a);--a.c;b=a.b.b;b8(b);return b.d} -function i6(){var a;a=bK(B5(this.b.b),61).gc();return a} -function b6(){var a;a=L4(new J4,this.c.b);return f6(new d6,a)} -function T3(a){var b;b=B4(new u4,a);return Z5(new X5,a,b)} -function yx(a,b,c,d){!!$stats&&$stats($x(a,b,c,d))} -function ey(b,c){function d(a){c.Hb(a)} -return __gwtStartLoadingFragment(b,d)} -function e4(a,b){if(a.d&&j7(a.c,b)){return true}else if(d4(a,b)){return true}else if(b4(a,b)){return true}return false} -function tx(a,b,c){rx();a.b=h7(new f7);a.g=D7(new B7);a.d=b;a.c=c;a.f=Gx(new Dx,b+1);return a} -function rx(){rx=A8;qx=tx(new px,3,OJ(BP,0,-1,[]))} -function fy(a,b){var c,d;c=ey(a,b);if(c==null){return}d=K0();d.open(Nfb,c,true);I0(d,iy(new gy,d,b));d.send(null)} -function vx(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){u6(h,bK(H7(b.b.g),41));Kx(b.b.f)}Ix(b.b.f);w6(h,T3(b.b.b));a4(b.b.b);i=null;for(g=z5(new w5,h);g.b1){return}if(Lx(a.e)>0){c=Jx(a.e);yx(c==a.d?Tnb:Unb+c,Lnb,e2(c),null);fy(c,Tx(new Rx,a));return}while(Lx(a.f)>0){c=Kx(a.f);b=bK(H7(a.g),41);yx(c==a.d?Tnb:Unb+c,Lnb,e2(c),null);fy(c,b)}} -var bob='AbstractMap$2',cob='AbstractMap$2$1',Ynb='AsyncFragmentLoader',Znb='AsyncFragmentLoader$BoundedIntQueue',$nb='AsyncFragmentLoader$HttpDownloadFailure',_nb='AsyncFragmentLoader$InitialFragmentDownloadFailed',aob='AsyncFragmentLoader$XhrLoadingStrategy$1',Vnb='HTTP download failed with status ',Xnb='[I',Lnb='begin',Nnb='com.google.gwt.lang.asyncloaders.',Unb='download',Mnb='end',Tnb='leftoversDownload',Wnb='runAsync';_=px.prototype=new Af;_.gC=Cx;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var qx;_=Dx.prototype=new Af;_.gC=Mx;_.tI=0;_.b=null;_.c=0;_.d=0;_=Nx.prototype=new mw;_.gC=Qx;_.tI=76;_=Rx.prototype=new Af;_.gC=Vx;_.Hb=Wx;_.tI=77;_.b=null;_=gy.prototype=new Af;_.gC=jy;_.Ib=ky;_.tI=0;_.b=null;_.c=null;_=V1.prototype;_._b=b2;_=X5.prototype=new E3;_.bc=_5;_.gC=a6;_.ob=b6;_.cc=c6;_.tI=0;_.b=null;_.c=null;_=d6.prototype=new Af;_.gC=g6;_.Tb=h6;_.Ub=i6;_.tI=0;_.b=null;var BP=e1(Dab,Xnb),iM=f1(wkb,Ynb),eM=f1(wkb,Znb),fM=f1(wkb,$nb),gM=f1(wkb,_nb),hM=f1(wkb,aob),mP=f1(xib,bob),lP=f1(xib,cob);Bx(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js deleted file mode 100644 index 4f191dc0..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function SU(){} -function cV(){return yR} -function gV(){var a;while(XU){a=XU;XU=XU.c;!XU&&(YU=null);Pw(a.b.b)}} -function nw(a,b){Wcb(a.f,b);if(!a.e){a.e=true;pw(a)}a.c=false;qw(a)} -function Pw(a){var b;a.b.b=a.b.c.blob;(uw(),tw).captureBlob(a.b.b,a.b.f,lub);b=_0(new Y0,a.b.f);a.b.d.sb(b);nw(a.b.j,a.b)} -function dV(){$U=true;ZU=(aV(),new SU);dA((aA(),_z),1);!!$stats&&$stats(JA(mub,blb,null,null));ZU.cc();!!$stats&&$stats(JA(mub,nub,null,null))} -var oub='AsyncLoader1',lub='image/JPEG',mub='runCallbacks1';_=SU.prototype=new TU;_.gC=cV;_.cc=gV;_.tI=0;var yR=u6($rb,oub);dV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js deleted file mode 100644 index 35fe43df..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function oV(){} -function AV(){return CR} -function EV(){var a;while(tV){a=tV;tV=tV.c;!tV&&(uV=null);Io(a.b)}} -function BV(){wV=true;vV=(yV(),new oV);dA((aA(),_z),2);!!$stats&&$stats(JA(qub,blb,null,null));vV.cc();!!$stats&&$stats(JA(qub,nub,null,null))} -function Io(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(pub);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Aw(a.d,e.encode());return}Aw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Aw(a.d,e.encode());return}Aw(a.d,a.b)}} -var rub='AsyncLoader2',pub='beta.canvas',qub='runCallbacks2';_=oV.prototype=new pV;_.gC=AV;_.cc=EV;_.tI=0;var CR=u6($rb,rub);BV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js deleted file mode 100644 index a7e3e3d6..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function Fo(){} -function Cw(){} -function Hw(){} -function sV(){} -function pV(){} -function FV(){} -function JV(){} -function lA(){gA(_z)} -function Jo(){return cP} -function Gw(){return XP} -function Lw(){return YP} -function rV(){return BR} -function HV(){return zR} -function LV(){return AR} -function gA(a){dA(a,a.e)} -function Ew(a,b){a.b=b;return a} -function Jw(a,b){a.b=b;return a} -function yV(){yV=Rdb;vV=new pV} -function IV(a){yV();xV=false;DV(a)} -function nK(a,b){if(!a){return}Kw(a,b)} -function qK(c,b){c.onprogress=function(a){rK(b,a)}} -function Ho(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function ex(a,b,c){var d;d=e4(a.g,b);zt(a,c,a.I,d,true);At(a,b)} -function lw(a,b){E9(a.g.b,b)!=null;qw(a);pw(a);Qt(a.b.f)} -function zw(a){if(a.i.d){LD((rD(),a.e.I),sub);CV(Ho(new Fo,a.b,a))}else{Aw(a,a.b)}} -function DV(a){yV();while(tV){ir();oq(Kr(new Ir,Bub+Sh(a)));tV=tV.c}uV=null} -function rK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(jO(Math.floor(c*100))+Aub)} -function dA(a,b){var c;c=b==a.e?_kb:alb+b;iA(c,nub,t7(b),null);if(fA(a,b)){uA(a.f);E9(a.b,t7(b));kA(a)}} -function pw(a){var b;if(a.f.c>0){b=YN(Ycb(a.f),37);zw(b)}else{a.e=false}} -function CV(a){yV();var b;b=new JV;b.b=a;!!uV&&(uV.c=b);uV=b;!tV&&(tV=b);if(wV){vV.cc();return}if(!xV){xV=true;eA((aA(),_z),2,new FV)}} -function ml(a,b,c){var d,e;E9(a.b.b,b)!=null;e=c.ac();if(e){d=ku(new _t,a,e,a.c);A9(a.g,t7(d.d),d);Kbb(a.h,d);a.m.b==a&&ex(a.m,b,d)}else{a.m.b==a&&At(a.m,b)}} -function Kw(b,c){var a,e,f;if(c.status!=200){LD((rD(),b.b.e.I),wub);zk(b.b._(),xub,true);ir();oq(Kr(new Ir,yub+c.responseText))}(uw(),tw).remove(b.b.f);if(c.status==200){try{f=kN(c.responseText);lw(b.b.j,b.b);ml(b.b.g,b.b,f);return}catch(a){a=pU(a);if(_N(a,23)){e=a;ir();oq(Kr(new Ir,zub+Sh(e)+cgb+c.responseText))}else throw a}}E9(b.b.g.b.b,b.b)!=null;lw(b.b.j,b.b)} -function mK(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){nK(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Aw(a,b){var c;LD((rD(),a.e.I),tub);c=PJ().create(uub);c.open(Hlb,(ir(),dr)+a.g.e+vub+a.f+eib+hr);qK(c.upload,Ew(new Cw,a));mK(c,Jw(new Hw,a));c.send(b)} -var Aub='%',vub='?filename=',Gub='AsyncLoader2$1',Hub='AsyncLoader2__Callback',Fub='AsyncLoader2__Super',Cub='AsyncResizer',Bub='Error Resizing image\n',yub='Error Uploading\n',zub='Exception on Upload\n',sub='Resizing..',wub='Upload Error',Dub='UploadFile$1',Eub='UploadFile$2',tub='Uploading..',uub='beta.httprequest',nub='end',xub='upload-error';_=Fo.prototype=new ag;_.gC=Jo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Cw.prototype=new ag;_.gC=Gw;_.tI=0;_.b=null;_=Hw.prototype=new ag;_.gC=Lw;_.tI=0;_.b=null;_=pV.prototype=new ag;_.gC=rV;_.cc=sV;_.tI=0;var tV=null,uV=null,vV,wV=false,xV=false;_=FV.prototype=new ag;_.gC=HV;_.Nb=IV;_.tI=95;_=JV.prototype=new ag;_.gC=LV;_.tI=0;_.b=null;_.c=null;var cP=u6(Oob,Cub),XP=u6(Oob,Dub),YP=u6(Oob,Eub),BR=u6($rb,Fub),zR=u6($rb,Gub),AR=u6($rb,Hub);lA(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js deleted file mode 100644 index ad849765..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function LU(){} -function XU(){return sR} -function _U(){var a;while(QU){a=QU;QU=QU.c;!QU&&(RU=null);Rw(a.b.b)}} -function pw(a,b){Ucb(a.f,b);if(!a.e){a.e=true;rw(a)}a.c=false;sw(a)} -function Rw(a){var b;a.b.b=a.b.c.blob;(ww(),vw).captureBlob(a.b.b,a.b.f,mub);b=T0(new Q0,a.b.f);a.b.d.ub(b);pw(a.b.j,a.b)} -function YU(){TU=true;SU=(VU(),new LU);fA((cA(),bA),1);!!$stats&&$stats(LA(nub,elb,null,null));SU.ac();!!$stats&&$stats(LA(nub,oub,null,null))} -var pub='AsyncLoader1',mub='image/JPEG',nub='runCallbacks1';_=LU.prototype=new MU;_.gC=XU;_.ac=_U;_.tI=0;var sR=s6(asb,pub);YU(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js deleted file mode 100644 index e48dfe65..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function hV(){} -function tV(){return wR} -function xV(){var a;while(mV){a=mV;mV=mV.c;!mV&&(nV=null);Jo(a.b)}} -function uV(){pV=true;oV=(rV(),new hV);fA((cA(),bA),2);!!$stats&&$stats(LA(rub,elb,null,null));oV.ac();!!$stats&&$stats(LA(rub,oub,null,null))} -function Jo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(qub);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Cw(a.d,e.encode());return}Cw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Cw(a.d,e.encode());return}Cw(a.d,a.b)}} -var sub='AsyncLoader2',qub='beta.canvas',rub='runCallbacks2';_=hV.prototype=new iV;_.gC=tV;_.ac=xV;_.tI=0;var wR=s6(asb,sub);uV(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js deleted file mode 100644 index 5f8c4d35..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function Go(){} -function Ew(){} -function Jw(){} -function lV(){} -function iV(){} -function yV(){} -function CV(){} -function nA(){iA(bA)} -function Ko(){return $O} -function Iw(){return TP} -function Nw(){return UP} -function kV(){return vR} -function AV(){return tR} -function EV(){return uR} -function iA(a){fA(a,a.e)} -function Gw(a,b){a.b=b;return a} -function Lw(a,b){a.b=b;return a} -function rV(){rV=Pdb;oV=new iV} -function BV(a){rV();qV=false;wV(a)} -function iK(a,b){if(!a){return}Mw(a,b)} -function lK(c,b){c.onprogress=function(a){mK(b,a)}} -function Io(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function gx(a,b,c){var d;d=Y3(a.g,b);Bt(a,c,a.K,d,true);Ct(a,b)} -function nw(a,b){C9(a.g.b,b)!=null;sw(a);rw(a);St(a.b.f)} -function Bw(a){if(a.i.d){YD((aD(),a.e.K),tub);vV(Io(new Go,a.b,a))}else{Cw(a,a.b)}} -function wV(a){rV();while(mV){kr();qq(Mr(new Kr,Cub+Qh(a)));mV=mV.c}nV=null} -function mK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.db(eO(Math.floor(c*100))+Bub)} -function fA(a,b){var c;c=b==a.e?clb:dlb+b;kA(c,oub,r7(b),null);if(hA(a,b)){wA(a.f);C9(a.b,r7(b));mA(a)}} -function rw(a){var b;if(a.f.c>0){b=TN(Wcb(a.f),37);Bw(b)}else{a.e=false}} -function vV(a){rV();var b;b=new CV;b.b=a;!!nV&&(nV.c=b);nV=b;!mV&&(mV=b);if(pV){oV.ac();return}if(!qV){qV=true;gA((cA(),bA),2,new yV)}} -function nl(a,b,c){var d,e;C9(a.b.b,b)!=null;e=c.$b();if(e){d=mu(new bu,a,e,a.c);y9(a.g,r7(d.d),d);Ibb(a.h,d);a.m.b==a&&gx(a.m,b,d)}else{a.m.b==a&&Ct(a.m,b)}} -function Mw(b,c){var a,e,f;if(c.status!=200){YD((aD(),b.b.e.K),xub);Ak(b.b.bb(),yub,true);kr();qq(Mr(new Kr,zub+c.responseText))}(ww(),vw).remove(b.b.f);if(c.status==200){try{f=fN(c.responseText);nw(b.b.j,b.b);nl(b.b.g,b.b,f);return}catch(a){a=iU(a);if(WN(a,23)){e=a;kr();qq(Mr(new Kr,Aub+Qh(e)+fgb+c.responseText))}else throw a}}C9(b.b.g.b.b,b.b)!=null;nw(b.b.j,b.b)} -function hK(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){iK(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Cw(a,b){var c;YD((aD(),a.e.K),uub);c=KJ().create(vub);c.open(Glb,(kr(),fr)+a.g.e+wub+a.f+hib+jr);lK(c.upload,Gw(new Ew,a));hK(c,Lw(new Jw,a));c.send(b)} -var Bub='%',wub='?filename=',Hub='AsyncLoader2$1',Iub='AsyncLoader2__Callback',Gub='AsyncLoader2__Super',Dub='AsyncResizer',Cub='Error Resizing image\n',zub='Error Uploading\n',Aub='Exception on Upload\n',tub='Resizing..',xub='Upload Error',Eub='UploadFile$1',Fub='UploadFile$2',uub='Uploading..',vub='beta.httprequest',oub='end',yub='upload-error';_=Go.prototype=new $f;_.gC=Ko;_.tI=0;_.b=null;_.c=null;_.d=null;_=Ew.prototype=new $f;_.gC=Iw;_.tI=0;_.b=null;_=Jw.prototype=new $f;_.gC=Nw;_.tI=0;_.b=null;_=iV.prototype=new $f;_.gC=kV;_.ac=lV;_.tI=0;var mV=null,nV=null,oV,pV=false,qV=false;_=yV.prototype=new $f;_.gC=AV;_.Pb=BV;_.tI=95;_=CV.prototype=new $f;_.gC=EV;_.tI=0;_.b=null;_.c=null;var $O=s6(Sob,Dub),TP=s6(Sob,Eub),UP=s6(Sob,Fub),vR=s6(asb,Gub),tR=s6(asb,Hub),uR=s6(asb,Iub);nA(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js deleted file mode 100644 index 2bd71e07..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function ZQ(){} -function WQ(){} -function dR(){} -function VQ(){} -function bR(){return AN} -function YQ(){return zN} -function _Q(){_Q=Y9;$Q=new WQ} -function cR(){$Q=(_Q(),new VQ);yx((vx(),ux),1);!!$stats&&$stats(cy(Vpb,Wpb,null,null));$Q.Sb();!!$stats&&$stats(cy(Vpb,Xpb,null,null))} -var $pb='AsyncLoader1',Zpb='AsyncLoader1__Super',Vpb='runCallbacks1';_=WQ.prototype=new Ef;_.gC=YQ;_.Sb=ZQ;_.tI=0;_=VQ.prototype=new WQ;_.gC=bR;_.Sb=dR;_.tI=0;var $Q;var zN=D2(Ypb,Zpb),AN=D2(Ypb,$pb);cR(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js deleted file mode 100644 index 1263b2b5..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function iR(){} -function fR(){} -function oR(){} -function eR(){} -function mR(){return CN} -function hR(){return BN} -function kR(){kR=Y9;jR=new fR} -function nR(){jR=(kR(),new eR);yx((vx(),ux),2);!!$stats&&$stats(cy(_pb,Wpb,null,null));jR.Sb();!!$stats&&$stats(cy(_pb,Xpb,null,null))} -var bqb='AsyncLoader2',aqb='AsyncLoader2__Super',_pb='runCallbacks2';_=fR.prototype=new Ef;_.gC=hR;_.Sb=iR;_.tI=0;_=eR.prototype=new fR;_.gC=mR;_.Sb=oR;_.tI=0;var jR;var BN=D2(Ypb,aqb),CN=D2(Ypb,bqb);nR(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js b/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js deleted file mode 100644 index cfb339de..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function tx(){} -function Hx(){} -function Rx(){} -function Vx(){} -function ky(){} -function t7(){} -function B7(){} -function Fx(){Ax(ux)} -function Gx(){return DM} -function Qx(){return zM} -function Ux(){return AM} -function Zx(){return BM} -function ny(){return CM} -function y7(){return MP} -function E7(){return LP} -function Ax(a){yx(a,a.c)} -function $x(a){Yx(this,a)} -function Mx(a){a.b=0;a.c=0} -function Px(a){return a.c-a.b} -function z3(){return this.a} -function Nx(a){return a.a[a.b]} -function Lx(a,b){a.a[a.c++]=b} -function Xx(a,b){a.a=b;return a} -function D7(a,b){a.a=b;return a} -function Ox(a){return a.a[a.b++]} -function A7(){return this.b.a.d} -function F7(){return Y6(this.a.a)} -function x7(a){return C5(this.a,a)} -function f9(a){if(a.b==0){throw Q9(new O9)}} -function v7(a,b,c){a.a=b;a.b=c;return a} -function my(a,b,c){a.b=b;a.a=c;return a} -function Tx(a,b){kz(a);a.f=eqb+b;return a} -function Kx(a,b){a.a=hK(_P,0,-1,b,1);return a} -function p5(a){var b;b=Z5(new S5,a);return v7(new t7,a,b)} -function d9(a){var b;f9(a);--a.b;b=a.a.a;z9(b);return b.c} -function G7(){var a;a=xK(Z6(this.a.a),61).hc();return a} -function z7(){var a;a=h6(new f6,this.b.a);return D7(new B7,a)} -function Cx(a,b,c,d){!!$stats&&$stats(cy(a,b,c,d))} -function iy(b,c){function d(a){c.Gb(a)} -return __gwtStartLoadingFragment(b,d)} -function C5(a,b){if(a.c&&H8(a.b,b)){return true}else if(B5(a,b)){return true}else if(z5(a,b)){return true}return false} -function xx(a,b,c){vx();a.a=F8(new D8);a.f=_8(new Z8);a.c=b;a.b=c;a.e=Kx(new Hx,b+1);return a} -function vx(){vx=Y9;ux=xx(new tx,3,iK(_P,0,-1,[]))} -function jy(a,b){var c,d;c=iy(a,b);if(c==null){return}d=g2();d.open(bhb,c,true);e2(d,my(new ky,d,b));d.send(null)} -function zx(a,b){var c,d,e,f;if(b==a.c){return true}for(d=a.b,e=0,f=d.length;e0){S7(h,xK(d9(b.a.f),41));Ox(b.a.e)}Mx(b.a.e);U7(h,p5(b.a.a));y5(b.a.a);i=null;for(g=X6(new U6,h);g.a1){return}if(Px(a.d)>0){c=Nx(a.d);Cx(c==a.c?cqb:dqb+c,Wpb,C3(c),null);jy(c,Xx(new Vx,a));return}while(Px(a.e)>0){c=Ox(a.e);b=xK(d9(a.f),41);Cx(c==a.c?cqb:dqb+c,Wpb,C3(c),null);jy(c,b)}} -var mqb='AbstractMap$2',nqb='AbstractMap$2$1',hqb='AsyncFragmentLoader',iqb='AsyncFragmentLoader$BoundedIntQueue',jqb='AsyncFragmentLoader$HttpDownloadFailure',kqb='AsyncFragmentLoader$InitialFragmentDownloadFailed',lqb='AsyncFragmentLoader$XhrLoadingStrategy$1',eqb='HTTP download failed with status ',gqb='[I',Wpb='begin',Ypb='com.google.gwt.lang.asyncloaders.',dqb='download',Xpb='end',cqb='leftoversDownload',fqb='runAsync';_=tx.prototype=new Ef;_.gC=Gx;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var ux;_=Hx.prototype=new Ef;_.gC=Qx;_.tI=0;_.a=null;_.b=0;_.c=0;_=Rx.prototype=new nw;_.gC=Ux;_.tI=76;_=Vx.prototype=new Ef;_.gC=Zx;_.Gb=$x;_.tI=77;_.a=null;_=ky.prototype=new Ef;_.gC=ny;_.Hb=oy;_.tI=0;_.a=null;_.b=null;_=r3.prototype;_.ac=z3;_=t7.prototype=new a5;_.cc=x7;_.gC=y7;_.nb=z7;_.dc=A7;_.tI=0;_.a=null;_.b=null;_=B7.prototype=new Ef;_.gC=E7;_.Tb=F7;_.Ub=G7;_.tI=0;_.a=null;var _P=C2(_bb,gqb),DM=D2(Bmb,hqb),zM=D2(Bmb,iqb),AM=D2(Bmb,jqb),BM=D2(Bmb,kqb),CM=D2(Bmb,lqb),MP=D2(Ckb,mqb),LP=D2(Ckb,nqb);Fx(); \ No newline at end of file diff --git a/3.1/modules/gwtorganize/war/g3viewer/g3viewer.nocache.js b/3.1/modules/gwtorganize/war/g3viewer/g3viewer.nocache.js deleted file mode 100644 index 8ef094fe..00000000 --- a/3.1/modules/gwtorganize/war/g3viewer/g3viewer.nocache.js +++ /dev/null @@ -1,11 +0,0 @@ -function g3viewer(){var M='',nb='" for "gwt:onLoadErrorFn"',lb='" for "gwt:onPropertyErrorFn"',Y='"><\/script>',$='#',Xb='.cache.html',ab='/',Lb='0D97DF37194D1924CC80394AAA96B9A3',Mb='27AC86F0820D8F960DBF73C151C0332B',Nb='4AFE598FDFDF189DD61F57E554328B10',Ob='4E8EC2279CB4B46228EFF0682ED166A4',Pb='4F7AD7D8299143D876CB4071BE00BF02',Qb='6462B363383D23B8418857B7A6FAD85B',Rb='71ED95F3DFB964762667E45E2922704D',Sb='884CB866FECF37EDDE4914CA60AF2511',Tb='9DC95FB4BEC084EF810751F04B440FD7',hc=' - -This html file is for hosted mode support. - diff --git a/3.1/modules/gwtorganize/war/g3viewer/loading.gif b/3.1/modules/gwtorganize/war/g3viewer/loading.gif deleted file mode 100644 index 8f56a82c..00000000 Binary files a/3.1/modules/gwtorganize/war/g3viewer/loading.gif and /dev/null differ diff --git a/3.1/modules/gwtorganize/war/index.php b/3.1/modules/gwtorganize/war/index.php deleted file mode 100644 index 3a5cf905..00000000 --- a/3.1/modules/gwtorganize/war/index.php +++ /dev/null @@ -1,6 +0,0 @@ -Gallery Administration - - -

    diff --git a/3.1/modules/highroller/controllers/highroller.php b/3.1/modules/highroller/controllers/highroller.php deleted file mode 100644 index 80eb05be..00000000 --- a/3.1/modules/highroller/controllers/highroller.php +++ /dev/null @@ -1,29 +0,0 @@ -get("name"); - if ($name) { - Session::instance()->set("highroller_theme", $name); - } else { - Session::instance()->delete("highroller_theme"); - } - } -} diff --git a/3.1/modules/highroller/helpers/highroller_theme.php b/3.1/modules/highroller/helpers/highroller_theme.php deleted file mode 100644 index 9bdfbad1..00000000 --- a/3.1/modules/highroller/helpers/highroller_theme.php +++ /dev/null @@ -1,50 +0,0 @@ -script("highroller.js") - . sprintf("", url::site("highroller/pick_theme")); - } - - static function header_top($theme) { - $session = Session::instance(); - $highroller_theme = $session->get("highroller_theme", ""); - if ($highroller_theme) { - print html::stylesheet( - url::abs_file("modules/highroller/themes/$highroller_theme/theme.css")); - } - } - - static function footer($theme) { - $base = MODPATH . "highroller/themes/"; - $base_len = strlen($base); - $options[] = ""; - foreach (glob("$base*") as $theme) { - $name = substr($theme, $base_len); - $options[$name] = $name; - } - $session = Session::instance(); - $highroller_theme = $session->get("highroller_theme"); - print '
    Theme: ' . - form::dropdown("", $options, $highroller_theme, - 'style="display: inline" onchange="pick_theme(this.value)"') . - '
    '; - } -} \ No newline at end of file diff --git a/3.1/modules/highroller/js/highroller.js b/3.1/modules/highroller/js/highroller.js deleted file mode 100644 index bfa4573c..00000000 --- a/3.1/modules/highroller/js/highroller.js +++ /dev/null @@ -1,7 +0,0 @@ -var pick_theme = function(name) { - $.get(PICK_THEME_URL, - {name: name}, - function() { - window.location.reload(); - }); -}; diff --git a/3.1/modules/highroller/module.info b/3.1/modules/highroller/module.info deleted file mode 100644 index 7b89e9cb..00000000 --- a/3.1/modules/highroller/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "High Roller" -description = "Let users choose from a selection of ThemeRoller themes" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:highroller" -discuss_url = "http://gallery.menalto.com/forum_module_highroller" diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png deleted file mode 100644 index 82524abb..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_20_e69700_40x40.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_20_e69700_40x40.png deleted file mode 100644 index 6aed97a2..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_20_e69700_40x40.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_22_1484e6_40x40.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_22_1484e6_40x40.png deleted file mode 100644 index f11ca67a..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_22_1484e6_40x40.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_26_2293f7_40x40.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_26_2293f7_40x40.png deleted file mode 100644 index ce718683..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_diagonals-thick_26_2293f7_40x40.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_flat_0_e69700_40x100.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_flat_0_e69700_40x100.png deleted file mode 100644 index f567c286..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_flat_0_e69700_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_flat_0_e6b900_40x100.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_flat_0_e6b900_40x100.png deleted file mode 100644 index 29e99655..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_flat_0_e6b900_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png deleted file mode 100644 index 4f9e1ae2..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-bg_inset-hard_100_eeeeee_1x100.png b/3.1/modules/highroller/themes/eggplant/images/ui-bg_inset-hard_100_eeeeee_1x100.png deleted file mode 100644 index f811f309..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-bg_inset-hard_100_eeeeee_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-icons_0a82eb_256x240.png b/3.1/modules/highroller/themes/eggplant/images/ui-icons_0a82eb_256x240.png deleted file mode 100644 index 9c9f6b7f..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-icons_0a82eb_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-icons_0b54d5_256x240.png b/3.1/modules/highroller/themes/eggplant/images/ui-icons_0b54d5_256x240.png deleted file mode 100644 index b4bd27f1..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-icons_0b54d5_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-icons_5fa5e3_256x240.png b/3.1/modules/highroller/themes/eggplant/images/ui-icons_5fa5e3_256x240.png deleted file mode 100644 index 8167e62a..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-icons_5fa5e3_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-icons_fcdd4a_256x240.png b/3.1/modules/highroller/themes/eggplant/images/ui-icons_fcdd4a_256x240.png deleted file mode 100644 index 7b28a62c..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-icons_fcdd4a_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/images/ui-icons_ffffff_256x240.png b/3.1/modules/highroller/themes/eggplant/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index bef5178a..00000000 Binary files a/3.1/modules/highroller/themes/eggplant/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/eggplant/theme.css b/3.1/modules/highroller/themes/eggplant/theme.css deleted file mode 100644 index 868f5b02..00000000 --- a/3.1/modules/highroller/themes/eggplant/theme.css +++ /dev/null @@ -1,406 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.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%; } - - - -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=segoe%20ui,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=3px&bgColorHeader=f9f9f9&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=cccccc&fcHeader=e69700&iconColorHeader=5fa5e3&bgColorContent=eeeeee&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=0a82eb&bgColorDefault=1484e6&bgTextureDefault=08_diagonals_thick.png&bgImgOpacityDefault=22&borderColorDefault=ffffff&fcDefault=ffffff&iconColorDefault=fcdd4a&bgColorHover=2293f7&bgTextureHover=08_diagonals_thick.png&bgImgOpacityHover=26&borderColorHover=2293f7&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=e69700&bgTextureActive=08_diagonals_thick.png&bgImgOpacityActive=20&borderColorActive=e69700&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=c5ddfc&bgTextureHighlight=07_diagonals_small.png&bgImgOpacityHighlight=25&borderColorHighlight=ffffff&fcHighlight=333333&iconColorHighlight=0b54d5&bgColorError=e69700&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=20&borderColorError=e69700&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=e6b900&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=e69700&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=20&thicknessShadow=0px&offsetTopShadow=6px&offsetLeftShadow=6px&cornerRadiusShadow=3px -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: segoe ui, Arial, sans-serif; font-size: 1.1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: segoe ui, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa; background: #eeeeee url(images/ui-bg_inset-hard_100_eeeeee_1x100.png) 50% bottom repeat-x; color: #222222; } -.ui-widget-content a { color: #222222; } -.ui-widget-header { border: 1px solid #cccccc; background: #f9f9f9 url(images/ui-bg_highlight-soft_100_f9f9f9_1x100.png) 50% 50% repeat-x; color: #e69700; font-weight: bold; } -.ui-widget-header a { color: #e69700; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #ffffff; background: #1484e6 url(images/ui-bg_diagonals-thick_22_1484e6_40x40.png) 50% 50% repeat; font-weight: bold; color: #ffffff; outline: none; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; 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 #2293f7; background: #2293f7 url(images/ui-bg_diagonals-thick_26_2293f7_40x40.png) 50% 50% repeat; font-weight: bold; color: #ffffff; outline: none; } -.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; outline: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #e69700; background: #e69700 url(images/ui-bg_diagonals-thick_20_e69700_40x40.png) 50% 50% repeat; font-weight: bold; color: #ffffff; outline: none; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; outline: none; text-decoration: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #ffffff; background: #c5ddfc url(images/ui-bg_diagonals-small_25_c5ddfc_40x40.png) 50% 50% repeat; color: #333333; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #333333; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #e69700; background: #e69700 url(images/ui-bg_diagonals-thick_20_e69700_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; } -.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_0a82eb_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_0a82eb_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_5fa5e3_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_fcdd4a_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_0b54d5_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_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: 3px; -webkit-border-top-left-radius: 3px; } -.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; } -.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; } -.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; } -.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; } -.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; } -.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; } - -/* Overlays */ -.ui-widget-overlay { background: #e6b900 url(images/ui-bg_flat_0_e6b900_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: 6px 0 0 6px; padding: 0px; background: #e69700 url(images/ui-bg_flat_0_e69700_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 3px; -webkit-border-radius: 3px; }/* Accordion -----------------------------------*/ -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } -.ui-accordion .ui-accordion-content-active { display: block; }/* 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:both; 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*/ -}/* 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; zoom: 1; } -.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; } -/* Progressbar -----------------------------------*/ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* 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;}/* Slider -----------------------------------*/ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs -----------------------------------*/ -.ui-tabs { padding: .2em; zoom: 1; } -.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_glass_55_fcf0ba_1x400.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_glass_55_fcf0ba_1x400.png deleted file mode 100644 index 7e99e746..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_glass_55_fcf0ba_1x400.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_gloss-wave_100_ece8da_500x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_gloss-wave_100_ece8da_500x100.png deleted file mode 100644 index 709b5ab1..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_gloss-wave_100_ece8da_500x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png deleted file mode 100644 index 6045f63e..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_100_fafaf4_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_100_fafaf4_1x100.png deleted file mode 100644 index bfc39c67..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_100_fafaf4_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_15_459e00_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_15_459e00_1x100.png deleted file mode 100644 index 5f609250..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_15_459e00_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_95_cccccc_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_95_cccccc_1x100.png deleted file mode 100644 index ca80bffc..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-hard_95_cccccc_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-soft_25_67b021_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-soft_25_67b021_1x100.png deleted file mode 100644 index b33bd7b6..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-soft_25_67b021_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-soft_95_ffedad_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-soft_95_ffedad_1x100.png deleted file mode 100644 index b4cb8241..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_highlight-soft_95_ffedad_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_inset-soft_15_2b2922_1x100.png b/3.1/modules/highroller/themes/excite-bike/images/ui-bg_inset-soft_15_2b2922_1x100.png deleted file mode 100644 index 8e5c3a3f..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-bg_inset-soft_15_2b2922_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_808080_256x240.png b/3.1/modules/highroller/themes/excite-bike/images/ui-icons_808080_256x240.png deleted file mode 100644 index 6f3d2e61..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_808080_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_847e71_256x240.png b/3.1/modules/highroller/themes/excite-bike/images/ui-icons_847e71_256x240.png deleted file mode 100644 index 89b86802..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_847e71_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_8DC262_256x240.png b/3.1/modules/highroller/themes/excite-bike/images/ui-icons_8DC262_256x240.png deleted file mode 100644 index f087a163..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_8DC262_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_cd0a0a_256x240.png b/3.1/modules/highroller/themes/excite-bike/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 7930a558..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_eeeeee_256x240.png b/3.1/modules/highroller/themes/excite-bike/images/ui-icons_eeeeee_256x240.png deleted file mode 100644 index 0f60311e..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_eeeeee_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_ffffff_256x240.png b/3.1/modules/highroller/themes/excite-bike/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index bef5178a..00000000 Binary files a/3.1/modules/highroller/themes/excite-bike/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/excite-bike/theme.css b/3.1/modules/highroller/themes/excite-bike/theme.css deleted file mode 100644 index 99e7e242..00000000 --- a/3.1/modules/highroller/themes/excite-bike/theme.css +++ /dev/null @@ -1,406 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.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%; } - - - -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=segoe%20ui,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=ece8da&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=100&borderColorHeader=d4ccb0&fcHeader=433f38&iconColorHeader=847e71&bgColorContent=f5f3e5&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dfd9c3&fcContent=312e25&iconColorContent=808080&bgColorDefault=459e00&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=15&borderColorDefault=327E04&fcDefault=ffffff&iconColorDefault=eeeeee&bgColorHover=67b021&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=25&borderColorHover=327E04&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=fafaf4&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=100&borderColorActive=d4ccb0&fcActive=459e00&iconColorActive=8DC262&bgColorHighlight=fcf0ba&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=e8e1b5&fcHighlight=363636&iconColorHighlight=8DC262&bgColorError=ffedad&bgTextureError=03_highlight_soft.png&bgImgOpacityError=95&borderColorError=e3a345&fcError=cd5c0a&iconColorError=cd0a0a&bgColorOverlay=2b2922&bgTextureOverlay=05_inset_soft.png&bgImgOpacityOverlay=15&opacityOverlay=90&bgColorShadow=cccccc&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=95&opacityShadow=20&thicknessShadow=12px&offsetTopShadow=-12px&offsetLeftShadow=-12px&cornerRadiusShadow=10px -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: segoe ui, Arial, sans-serif; font-size: 1.1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: segoe ui, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dfd9c3; background: #f5f3e5 url(images/ui-bg_highlight-hard_100_f5f3e5_1x100.png) 50% top repeat-x; color: #312e25; } -.ui-widget-content a { color: #312e25; } -.ui-widget-header { border: 1px solid #d4ccb0; background: #ece8da url(images/ui-bg_gloss-wave_100_ece8da_500x100.png) 50% 50% repeat-x; color: #433f38; font-weight: bold; } -.ui-widget-header a { color: #433f38; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #327E04; background: #459e00 url(images/ui-bg_highlight-hard_15_459e00_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; outline: none; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; 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 #327E04; background: #67b021 url(images/ui-bg_highlight-soft_25_67b021_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; outline: none; } -.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; outline: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #d4ccb0; background: #fafaf4 url(images/ui-bg_highlight-hard_100_fafaf4_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #459e00; outline: none; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #459e00; outline: none; text-decoration: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #e8e1b5; background: #fcf0ba url(images/ui-bg_glass_55_fcf0ba_1x400.png) 50% 50% repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #e3a345; background: #ffedad url(images/ui-bg_highlight-soft_95_ffedad_1x100.png) 50% top repeat-x; color: #cd5c0a; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd5c0a; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd5c0a; } -.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_808080_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_808080_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_847e71_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_eeeeee_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_8DC262_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_8DC262_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: 6px; -webkit-border-top-left-radius: 6px; } -.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; } -.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } -.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } -.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } -.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; } -.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; } - -/* Overlays */ -.ui-widget-overlay { background: #2b2922 url(images/ui-bg_inset-soft_15_2b2922_1x100.png) 50% bottom repeat-x; opacity: .90;filter:Alpha(Opacity=90); } -.ui-widget-shadow { margin: -12px 0 0 -12px; padding: 12px; background: #cccccc url(images/ui-bg_highlight-hard_95_cccccc_1x100.png) 50% top repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 10px; -webkit-border-radius: 10px; }/* Accordion -----------------------------------*/ -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } -.ui-accordion .ui-accordion-content-active { display: block; }/* 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:both; 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*/ -}/* 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; zoom: 1; } -.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; } -/* Progressbar -----------------------------------*/ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* 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;}/* Slider -----------------------------------*/ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs -----------------------------------*/ -.ui-tabs { padding: .2em; zoom: 1; } -.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_0_aaaaaa_40x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index 5b5dab2a..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_0_eeeeee_40x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_0_eeeeee_40x100.png deleted file mode 100644 index e44f861b..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_0_eeeeee_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_55_994d53_40x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_55_994d53_40x100.png deleted file mode 100644 index 822d5205..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_55_994d53_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_55_fafafa_40x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_55_fafafa_40x100.png deleted file mode 100644 index 62685abd..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_flat_55_fafafa_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_gloss-wave_30_3d3644_500x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_gloss-wave_30_3d3644_500x100.png deleted file mode 100644 index b349aae8..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_gloss-wave_30_3d3644_500x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_100_dcd9de_1x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_100_dcd9de_1x100.png deleted file mode 100644 index 8fb964ce..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_100_dcd9de_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_100_eae6ea_1x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_100_eae6ea_1x100.png deleted file mode 100644 index 1e2ae7c9..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_100_eae6ea_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_25_30273a_1x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_25_30273a_1x100.png deleted file mode 100644 index 399c01ff..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_25_30273a_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_45_5f5964_1x100.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_45_5f5964_1x100.png deleted file mode 100644 index 18a1b0ba..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-bg_highlight-soft_45_5f5964_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_454545_256x240.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_454545_256x240.png deleted file mode 100644 index 7ec70d11..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_734d99_256x240.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_734d99_256x240.png deleted file mode 100644 index 2bb90aae..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_734d99_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_8d78a5_256x240.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_8d78a5_256x240.png deleted file mode 100644 index a1ca0b60..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_8d78a5_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_a8a3ae_256x240.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_a8a3ae_256x240.png deleted file mode 100644 index dfffcbfe..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_a8a3ae_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_ebccce_256x240.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_ebccce_256x240.png deleted file mode 100644 index 68bef14f..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_ebccce_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_ffffff_256x240.png b/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index bef5178a..00000000 Binary files a/3.1/modules/highroller/themes/pepper-grinder/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/pepper-grinder/theme.css b/3.1/modules/highroller/themes/pepper-grinder/theme.css deleted file mode 100644 index 4b66a710..00000000 --- a/3.1/modules/highroller/themes/pepper-grinder/theme.css +++ /dev/null @@ -1,406 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.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%; } - - - -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=30273a&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=25&borderColorHeader=231d2b&fcHeader=ffffff&iconColorHeader=a8a3ae&bgColorContent=3d3644&bgTextureContent=12_gloss_wave.png&bgImgOpacityContent=30&borderColorContent=7e7783&fcContent=ffffff&iconColorContent=ffffff&bgColorDefault=dcd9de&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=100&borderColorDefault=dcd9de&fcDefault=665874&iconColorDefault=8d78a5&bgColorHover=eae6ea&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=100&borderColorHover=d1c5d8&fcHover=734d99&iconColorHover=734d99&bgColorActive=5f5964&bgTextureActive=03_highlight_soft.png&bgImgOpacityActive=45&borderColorActive=7e7783&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=fafafa&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=ffdb1f&fcHighlight=333333&iconColorHighlight=8d78a5&bgColorError=994d53&bgTextureError=01_flat.png&bgImgOpacityError=55&borderColorError=994d53&fcError=ffffff&iconColorError=ebccce&bgColorOverlay=eeeeee&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0px -*/ - - -/* 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-content { border: 1px solid #7e7783; background: #3d3644 url(images/ui-bg_gloss-wave_30_3d3644_500x100.png) 50% top repeat-x; color: #ffffff; } -.ui-widget-content a { color: #ffffff; } -.ui-widget-header { border: 1px solid #231d2b; background: #30273a url(images/ui-bg_highlight-soft_25_30273a_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #dcd9de; background: #dcd9de url(images/ui-bg_highlight-soft_100_dcd9de_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #665874; outline: none; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #665874; 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 #d1c5d8; background: #eae6ea url(images/ui-bg_highlight-soft_100_eae6ea_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #734d99; outline: none; } -.ui-state-hover a, .ui-state-hover a:hover { color: #734d99; text-decoration: none; outline: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #7e7783; background: #5f5964 url(images/ui-bg_highlight-soft_45_5f5964_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; outline: none; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; outline: none; text-decoration: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #ffdb1f; background: #fafafa url(images/ui-bg_flat_55_fafafa_40x100.png) 50% 50% repeat-x; color: #333333; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #333333; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #994d53; background: #994d53 url(images/ui-bg_flat_55_994d53_40x100.png) 50% 50% repeat-x; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; } -.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_ffffff_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_a8a3ae_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_8d78a5_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_734d99_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_8d78a5_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ebccce_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: 6px; -webkit-border-top-left-radius: 6px; } -.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; } -.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } -.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } -.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } -.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; } -.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; } - -/* Overlays */ -.ui-widget-overlay { background: #eeeeee url(images/ui-bg_flat_0_eeeeee_40x100.png) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); } -.ui-widget-shadow { margin: -4px 0 0 -4px; padding: 4px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 0px; -webkit-border-radius: 0px; }/* Accordion -----------------------------------*/ -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } -.ui-accordion .ui-accordion-content-active { display: block; }/* 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:both; 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*/ -}/* 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; zoom: 1; } -.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; } -/* Progressbar -----------------------------------*/ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* 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;}/* Slider -----------------------------------*/ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs -----------------------------------*/ -.ui-tabs { padding: .2em; zoom: 1; } -.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png deleted file mode 100644 index 954e22db..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png deleted file mode 100644 index 64ece570..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png deleted file mode 100644 index abdc0108..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png deleted file mode 100644 index 9b383f4d..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png deleted file mode 100644 index a23baad2..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 42ccba26..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png deleted file mode 100644 index 39d5824d..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png deleted file mode 100644 index f1273672..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png deleted file mode 100644 index 32f86222..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_222222_256x240.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_222222_256x240.png deleted file mode 100644 index ee039dc0..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_228ef1_256x240.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_228ef1_256x240.png deleted file mode 100644 index 10e3631d..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_228ef1_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png deleted file mode 100644 index 35bb8efa..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png deleted file mode 100644 index baebb63e..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ffffff_256x240.png b/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index bef5178a..00000000 Binary files a/3.1/modules/highroller/themes/ui-lightness/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/3.1/modules/highroller/themes/ui-lightness/theme.css b/3.1/modules/highroller/themes/ui-lightness/theme.css deleted file mode 100644 index 9d7aa08b..00000000 --- a/3.1/modules/highroller/themes/ui-lightness/theme.css +++ /dev/null @@ -1,406 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.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%; } - - - -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; outline: none; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; 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 #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; outline: none; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; outline: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; outline: none; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; outline: none; text-decoration: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; } -.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_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_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: 4px; -webkit-border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; }/* Accordion -----------------------------------*/ -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } -.ui-accordion .ui-accordion-content-active { display: block; }/* 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:both; 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*/ -}/* 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; zoom: 1; } -.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; } -/* Progressbar -----------------------------------*/ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* 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;}/* Slider -----------------------------------*/ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs -----------------------------------*/ -.ui-tabs { padding: .2em; zoom: 1; } -.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/3.1/modules/html_uploader/controllers/uploader.php b/3.1/modules/html_uploader/controllers/uploader.php deleted file mode 100644 index 0b9b5351..00000000 --- a/3.1/modules/html_uploader/controllers/uploader.php +++ /dev/null @@ -1,128 +0,0 @@ -is_album()) { - $album = $album->parent(); - } - - print $this->_get_add_form($album); - } - - public function add($id) { - $album = ORM::factory("item", $id); - access::required("view", $album); - access::required("add", $album); - access::verify_csrf(); - - $form = $this->_get_add_form($album); - if ($form->validate()) { - batch::start(); - - $count = 0; - $added_a_movie = false; - $added_a_photo = false; - foreach (array("file1", "file2", "file3") as $key) { - if ($form->add_photos->$key->value == "") { - continue; - } - - try { - $temp_filename = $form->add_photos->$key->value; - $item = ORM::factory("item"); - $item->name = basename($temp_filename); - $item->title = item::convert_filename_to_title($item->name); - $item->parent_id = $album->id; - $item->set_data_file($temp_filename); - - $path_info = @pathinfo($temp_filename); - if (array_key_exists("extension", $path_info) && - in_array(strtolower($path_info["extension"]), array("flv", "mp4", "m4v"))) { - $item->type = "movie"; - $item->save(); - $added_a_movie = true; - log::success("content", t("Added a movie"), - html::anchor("movies/$item->id", t("view movie"))); - } else { - $item->type = "photo"; - $item->save(); - $added_a_photo = true; - log::success("content", t("Added a photo"), - html::anchor("photos/$item->id", t("view photo"))); - } - $count++; - module::event("add_photos_form_completed", $item, $form); - } catch (Exception $e) { - // Lame error handling for now. Just record the exception and move on - Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); - - // Ugh. I hate to use instanceof, But this beats catching the exception separately since - // we mostly want to treat it the same way as all other exceptions - if ($e instanceof ORM_Validation_Exception) { - Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); - } - } - - if (file_exists($temp_filename)) { - unlink($temp_filename); - } - } - batch::stop(); - if ($count) { - if ($added_a_photo && $added_a_movie) { - message::success(t("Added %count photos and movies", array("count" => $count))); - } else if ($added_a_photo) { - message::success(t2("Added one photo", "Added %count photos", $count)); - } else { - message::success(t2("Added one movie", "Added %count movies", $count)); - } - } - json::reply(array("result" => "success")); - } else { - json::reply(array("result" => "error", "html" => (string) $form)); - } - - // Override the application/json mime type. The dialog based HTML uploader uses an iframe to - // buffer the reply, and on some browsers (Firefox 3.6) it does not know what to do with the - // JSON that it gets back so it puts up a dialog asking the user what to do with it. So force - // the encoding type back to HTML for the iframe. - // See: http://jquery.malsup.com/form/#file-upload - header("Content-Type: text/html; charset=" . Kohana::CHARSET); - } - - private function _get_add_form($album) { - $form = new Forge("uploader/add/{$album->id}", "", "post", array("id" => "g-add-photos-form")); - $group = $form->group("add_photos") - ->label(t("Add photos to %album_title", array("album_title" => html::purify($album->title)))); - $group->upload("file1")->add_rule("foo"); - $group->upload("file2"); - $group->upload("file3"); - - module::event("add_photos_form", $album, $form); - - $group = $form->group("buttons")->label(""); - $group->submit("")->value(t("Upload")); - - return $form; - } -} diff --git a/3.1/modules/html_uploader/module.info b/3.1/modules/html_uploader/module.info deleted file mode 100644 index de2becbb..00000000 --- a/3.1/modules/html_uploader/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "HTML Uploader" -description = "Simple HTML uploader that replaces the Flash based uploader" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:html_uploader" -discuss_url = "http://gallery.menalto.com/forum_module_html_uploader" diff --git a/3.1/modules/iptc/controllers/admin_iptc.php b/3.1/modules/iptc/controllers/admin_iptc.php deleted file mode 100644 index e8bdd06c..00000000 --- a/3.1/modules/iptc/controllers/admin_iptc.php +++ /dev/null @@ -1,84 +0,0 @@ -content = new View("admin_iptc.html"); - $view->content->iptc_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Save user preferences to the database. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Make sure the user filled out the form properly. - $form = $this->_get_admin_form(); - if ($form->validate()) { - Kohana_Log::add("error",print_r($form,1)); - - // Save settings to Gallery's database. - foreach (iptc::keys() as $keyword => $iptcvar) { - $checkbox = false; - for ($i = 0; $i < count($form->Global->$keyword); $i++) { - if ($form->Global->$keyword->value[$i] == $keyword) { - $checkbox = true; - } - } - module::set_var("iptc", "show_".$keyword, $checkbox); - } - // Display a success message and redirect back to the TagsMap admin page. - message::success(t("Your settings have been saved.")); - url::redirect("admin/iptc"); - } - - // Else show the page with errors - $view = new Admin_View("admin.html"); - $view->content = new View("admin_iptc.html"); - $view->content->iptc_form = $form; - print $view; - } - - private function _get_admin_form() { - // Make a new Form. - $form = new Forge("admin/iptc/saveprefs", "", "post", array("id" => "g-iptc-adminForm")); - - // Create group for display settings - $iptc_display_group = $form->group("Global") - ->label(t("Display Settings")); - - $show = t("Show"); - foreach (iptc::keys() as $keyword => $iptcvar) { - unset($checkbox); - $checkbox[$keyword] = array($show." \"".$iptcvar[1]."\" ?", module::get_var("iptc", "show_".$keyword)); - $iptc_display_group->checklist($keyword) - ->options($checkbox); - } - // Add a save button to the form. - $form->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} diff --git a/3.1/modules/iptc/helpers/iptc.php b/3.1/modules/iptc/helpers/iptc.php deleted file mode 100644 index cca0f61f..00000000 --- a/3.1/modules/iptc/helpers/iptc.php +++ /dev/null @@ -1,207 +0,0 @@ -is_photo() && $item->mime_type == "image/jpeg") { - $info = getJpegHeader($item->file_path()); - if ($info !== FALSE) { - $iptcBlock = getIptcBlock($info); - if ($iptcBlock !== FALSE) { - $iptc = iptcparse($iptcBlock); - } else { - $iptc = array(); - } - $xmp = getXmpDom($info); - - foreach (self::keys() as $keyword => $iptcvar) { - $iptc_key = $iptcvar[0]; - $xpath = $iptcvar[2]; - $value = null; - if ($xpath != null) { - $value = getXmpValue($xmp, $xpath); - } - if ($value == null) { - if (!empty($iptc[$iptc_key])) { - $value = implode(";", $iptc[$iptc_key]); - if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { - $value = utf8_encode($value); - } - } - } - if ($value != null) { - $keys[$keyword] = Input::clean($value); - } - } - } - } - - $record = ORM::factory("iptc_record")->where("item_id", "=", $item->id)->find(); - if (!$record->loaded()) { - $record->item_id = $item->id; - } - $record->data = serialize($keys); - $record->key_count = count($keys); - $record->dirty = 0; - $record->save(); - } - - static function get($item) { - $iptc = array(); - $record = ORM::factory("iptc_record") - ->where("item_id", "=", $item->id) - ->find(); - if (!$record->loaded()) { - return array(); - } - - $definitions = self::keys(); - $keys = unserialize($record->data); - foreach ($keys as $key => $value) { - if (module::get_var("iptc", "show_".$key) == 1) - $iptc[] = array("caption" => $definitions[$key][1], "value" => $value); - } - - return $iptc; - } - - - public static function keys() { - if (!isset(self::$iptc_keys)) { - self::$iptc_keys = array( - "ObjectName" => array("2#005", - t("IPTC Object Name"), - "/x:xmpmeta/rdf:RDF/rdf:Description/dc:title/rdf:Alt/rdf:li" ), - "EditStatus" => array("2#007", - t("IPTC Edit Status"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@mediapro:Status" ), - "Category" => array("2#015", - t("IPTC Category"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Category" ), - "SupplementalCategories" => array("2#020", - t("IPTC Categories"), - "/x:xmpmeta/rdf:RDF/rdf:Description/photoshop:SupplementalCategories/rdf:Bag/rdf:li" ), - "FixtureIdentifier" => array("2#022", - t("IPTC Identifier"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@mediapro:Event" ), - "Keywords" => array("2#025", - t("IPTC Keywords"), - "/x:xmpmeta/rdf:RDF/rdf:Description/dc:subject/rdf:Bag/rdf:li" ), - "LocationCode" => array("2#026", - t("IPTC Location Code"), - null ), - "SpecialInstructions" => array("2#040", - t("IPTC Instructions"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Instructions" ), - "DateCreated" => array("2#055", - t("IPTC Created Date"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:DateCreated" ), - "ByLine" => array("2#080", - t("IPTC Author"), - "/x:xmpmeta/rdf:RDF/rdf:Description/dc:creator/rdf:Seq/rdf:li" ), - "ByLineTitle" => array("2#085", - t("IPTC Author Title"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:AuthorsPosition" ), - "City" => array("2#090", - t("IPTC City"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:City" ), - "SubLocation" => array("2#092", - t("IPTC SubLocation"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@Iptc4xmpCore:Location | /x:xmpmeta/rdf:RDF/rdf:Description/@mediapro:Location" ), - "ProvinceState" => array("2#095", - t("IPTC Province State"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:State" ), - "CountryCode" => array("2#100", - t("IPTC Country Code"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@Iptc4xmpCore:CountryCode" ), - "CountryName" => array("2#101", - t("IPTC Country Name"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Country" ), - "Transmission" => array("2#103", - t("IPTC Transmission,"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:TransmissionReference" ), - "HeadLine" => array("2#105", - t("IPTC HeadLine"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Headline" ), - "Credit" => array("2#110", - t("IPTC Credit"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Credit | /x:xmpmeta/rdf:RDF/rdf:Description/photoshop:Credit" ), - "Source" => array("2#115", - t("IPTC Source"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Source" ), - "Copyright" => array("2#116", - t("IPTC Copyright"), - "/x:xmpmeta/rdf:RDF/rdf:Description/dc:rights/rdf:Alt/rdf:li" ), - "Contacts" => array("2#118", - t("IPTC Contacts"), - "/x:xmpmeta/rdf:RDF/rdf:Description/mediapro:People/rdf:Bag/rdf:li" ), - "Caption" => array("2#120", - t("IPTC Caption"), - "/x:xmpmeta/rdf:RDF/rdf:Description/dc:description/rdf:Alt/rdf:li" ), - "Redactor" => array("2#122", - t("IPTC Redactor"), - "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:CaptionWriter" ) - ); - } - return self::$iptc_keys; - } - - - static function stats() { - $missing_iptc = db::build() - ->select("items.id") - ->from("items") - ->join("iptc_records", "items.id", "iptc_records.item_id", "left") - ->where("type", "=", "photo") - ->and_open() - ->where("iptc_records.item_id", "IS", null) - ->or_where("iptc_records.dirty", "=", 1) - ->close() - ->execute() - ->count(); - - $total_items = ORM::factory("item")->where("type", "=", "photo")->count_all(); - if (!$total_items) { - return array(0, 0, 0); - } - return array($missing_iptc, $total_items, - round(100 * (($total_items - $missing_iptc) / $total_items))); - } - - static function check_index() { - list ($remaining) = iptc::stats(); - if ($remaining) { - site_status::warning( - t('Your Iptc index needs to be updated. Fix this now', - array("url" => html::mark_clean(url::site("admin/maintenance/start/iptc_task::update_index?csrf=__CSRF__")))), - "iptc_index_out_of_date"); - } - } -} diff --git a/3.1/modules/iptc/helpers/iptc_event.php b/3.1/modules/iptc/helpers/iptc_event.php deleted file mode 100644 index c7b4a6cc..00000000 --- a/3.1/modules/iptc/helpers/iptc_event.php +++ /dev/null @@ -1,42 +0,0 @@ -is_photo()) { - iptc::extract($item); - } - } - - static function item_deleted($item) { - db::build() - ->delete("iptc_records") - ->where("item_id", "=", $item->id) - ->execute(); - } - - static function admin_menu($menu, $theme) { - // Add a link to the admin page to the Settings menu. - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("iptc") - ->label(t("IPTC Settings")) - ->url(url::site("admin/iptc"))); - } -} diff --git a/3.1/modules/iptc/helpers/iptc_installer.php b/3.1/modules/iptc/helpers/iptc_installer.php deleted file mode 100644 index 11a17a56..00000000 --- a/3.1/modules/iptc/helpers/iptc_installer.php +++ /dev/null @@ -1,46 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {iptc_records} ( - `id` int(9) NOT NULL auto_increment, - `item_id` INTEGER(9) NOT NULL, - `key_count` INTEGER(9) default 0, - `data` TEXT, - `dirty` BOOLEAN default 1, - PRIMARY KEY (`id`), - KEY(`item_id`)) - DEFAULT CHARSET=utf8;"); - module::set_version("iptc", 1); - } - - static function activate() { - iptc::check_index(); - } - - static function deactivate() { - site_status::clear("iptc_index_out_of_date"); - } - - static function uninstall() { - Database::instance()->query("DROP TABLE IF EXISTS {iptc_records};"); - } -} diff --git a/3.1/modules/iptc/helpers/iptc_task.php b/3.1/modules/iptc/helpers/iptc_task.php deleted file mode 100644 index d4715bff..00000000 --- a/3.1/modules/iptc/helpers/iptc_task.php +++ /dev/null @@ -1,88 +0,0 @@ -delete("iptc_records") - ->where("item_id", "NOT IN", - db::build()->select("id")->from("items")->where("type", "=", "photo")) - ->execute(); - - list ($remaining, $total, $percent) = iptc::stats(); - return array(Task_Definition::factory() - ->callback("iptc_task::update_index") - ->name(t("Extract Iptc data")) - ->description($remaining - ? t2("1 photo needs to be scanned", - "%count (%percent%) of your photos need to be scanned", - $remaining, array("percent" => (100 - $percent))) - : t("IPTC data is up-to-date")) - ->severity($remaining ? log::WARNING : log::SUCCESS)); - } - - static function update_index($task) { - try { - $completed = $task->get("completed", 0); - - $start = microtime(true); - foreach (ORM::factory("item") - ->join("iptc_records", "items.id", "iptc_records.item_id", "left") - ->where("type", "=", "photo") - ->and_open() - ->where("iptc_records.item_id", "IS", null) - ->or_where("iptc_records.dirty", "=", 1) - ->close() - ->find_all() as $item) { - // The query above can take a long time, so start the timer after its done - // to give ourselves a little time to actually process rows. - if (!isset($start)) { - $start = microtime(true); - } - - iptc::extract($item); - $completed++; - - if (microtime(true) - $start > 1.5) { - break; - } - } - - list ($remaining, $total, $percent) = iptc::stats(); - $task->set("completed", $completed); - if ($remaining == 0 || !($remaining + $completed)) { - $task->done = true; - $task->state = "success"; - site_status::clear("iptc_index_out_of_date"); - $task->percent_complete = 100; - } else { - $task->percent_complete = round(100 * $completed / ($remaining + $completed)); - } - $task->status = t2("one record updated, index is %percent% up-to-date", - "%count records updated, index is %percent% up-to-date", - $completed, array("percent" => $percent)); - } catch (Exception $e) { - $task->done = true; - $task->state = "error"; - $task->status = $e->getMessage(); - $task->log((string)$e); - } - } -} diff --git a/3.1/modules/iptc/lib/functions.php b/3.1/modules/iptc/lib/functions.php deleted file mode 100644 index 91ca129f..00000000 --- a/3.1/modules/iptc/lib/functions.php +++ /dev/null @@ -1,97 +0,0 @@ - 0xD7) { - $size = fread($file, 2); - if ($size === FALSE) { - fclose($file); - return $result; - } - $sizeOfSegment = unpack("nV", $size); - $data = fread($file, $sizeOfSegment['V']-2); - if ($data === FALSE) { - fclose($file); - return $result; - } - if ($result === FALSE) - unset($result); - $result[] = array("type" => $typeOfSegment, "data" => $data); // Multiple segments can have the same type like Exif and XMP - } - } while (!feof($file)); - fclose($file); - return $result; -} - - -function getIptcBlock($jpegHeader) -{ - for ($i = 0; $i < count($jpegHeader); $i++) { - if ($jpegHeader[$i]['type'] == 0xED) { - if (strncmp($jpegHeader[$i]['data'], "Photoshop 3.0\x00", 14) == 0) { - return $jpegHeader[$i]['data']; - } - } - } - return FALSE; -} - - -function getXmpDom($jpegHeader) -{ - for ($i = 0; $i < count($jpegHeader); $i++) { - if ($jpegHeader[$i]['type'] == 0xE1) { - if (strncmp($jpegHeader[$i]['data'], "http://ns.adobe.com/xap/1.0/\x00", 29) == 0) { - $xmlstr = substr($jpegHeader[$i]['data'], 29); - $doc = new DOMDocument(); - $doc->loadXML($xmlstr); - return $doc; - } - } - } - return FALSE; -} - - -function getXmpValue($dom, $xpathQuery) -{ - if ($dom === FALSE) - return null; - $xpath = new DOMXPath($dom); - $xpath->registerNamespace('rdf', "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); - $xpath->registerNamespace('photoshop', "http://ns.adobe.com/photoshop/1.0/"); - $xpath->registerNamespace('Iptc4xmpCore', "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"); - $xpath->registerNamespace('dc', "http://purl.org/dc/elements/1.1/"); - $xpath->registerNamespace('mediapro', "http://ns.iview-multimedia.com/mediapro/1.0/"); - $nodeList = $xpath->query($xpathQuery); - $result = ""; - foreach ($nodeList as $node) { - if (!empty($result)) - $result .= ';'; - $result .= $node->nodeValue; - } - return $result; -} - diff --git a/3.1/modules/iptc/models/iptc_key.php b/3.1/modules/iptc/models/iptc_key.php deleted file mode 100644 index fadcb37b..00000000 --- a/3.1/modules/iptc/models/iptc_key.php +++ /dev/null @@ -1,21 +0,0 @@ - -
    -

    -
    - -
    -
    diff --git a/3.1/modules/iptc/views/iptc_block.html.php b/3.1/modules/iptc/views/iptc_block.html.php deleted file mode 100644 index c446935a..00000000 --- a/3.1/modules/iptc/views/iptc_block.html.php +++ /dev/null @@ -1,9 +0,0 @@ - - diff --git a/3.1/modules/item_links/helpers/item_links_event.php b/3.1/modules/item_links/helpers/item_links_event.php deleted file mode 100644 index 12cc94a1..00000000 --- a/3.1/modules/item_links/helpers/item_links_event.php +++ /dev/null @@ -1,58 +0,0 @@ -where("item_id", "=", $item->id) - ->find_all(); - - $existing_url = ""; - if (count($item_url) > 0) { - $existing_url = $item_url[0]->url; - } - $form->edit_item - ->input("item_links_url") - ->label(t("Redirect to URL:")) - ->value($existing_url); - } - - static function item_deleted($item) { - // Whenever an item is deleted, delete any corresponding data. - db::build()->delete("item_links")->where("item_id", "=", $item->id)->execute(); - } - - static function item_edit_form_completed($item, $form) { - // Update the database with any changes to the item_links field. - $record = ORM::factory("item_link")->where("item_id", "=", $item->id)->find(); - - if ($form->edit_item->item_links_url->value != "") { - if (!$record->loaded()) { - $record->item_id = $item->id; - } - $record->url = $form->edit_item->item_links_url->value; - $record->save(); - } else { - db::build()->delete("item_links")->where("item_id", "=", $item->id)->execute(); - } - } -} diff --git a/3.1/modules/item_links/helpers/item_links_installer.php b/3.1/modules/item_links/helpers/item_links_installer.php deleted file mode 100644 index f9d34d98..00000000 --- a/3.1/modules/item_links/helpers/item_links_installer.php +++ /dev/null @@ -1,34 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {item_links} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `url` text default NULL, - PRIMARY KEY (`id`), - KEY(`item_id`, `id`)) - DEFAULT CHARSET=utf8;"); - - // Set the module's version number. - module::set_version("item_links", 1); - } -} diff --git a/3.1/modules/item_links/helpers/item_links_theme.php b/3.1/modules/item_links/helpers/item_links_theme.php deleted file mode 100644 index fbfcbb45..00000000 --- a/3.1/modules/item_links/helpers/item_links_theme.php +++ /dev/null @@ -1,34 +0,0 @@ -item()) { - $item_url = ORM::factory("item_link") - ->where("item_id", "=", $theme->item->id) - ->find_all(); - if (count($item_url) > 0) { - url::redirect($item_url[0]->url); - } - } - return; - } -} diff --git a/3.1/modules/item_links/models/item_link.php b/3.1/modules/item_links/models/item_link.php deleted file mode 100644 index 65335e27..00000000 --- a/3.1/modules/item_links/models/item_link.php +++ /dev/null @@ -1,21 +0,0 @@ -viewable() - ->where("parent_id", "=", $album_id) - ->where("type", "!=", "album") - ->find_all(); - - print count($item); - } - - public function md5($album_id, $file_name) { - // Locate an item with $file_name in the album $album_id - // and display it's md5 checksum. - $item = ORM::factory("item") - ->where("parent_id", "=", $album_id) - ->where("name", "=", $file_name) - ->find_all(); - - if (count($item) > 0) { - access::required("view_full", $item[0]); - - // If the KeepOriginal module is active, check for/use the - // original image instead of the gallery edited version. - if (module::is_active("keeporiginal")) { - $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item[0]->file_path()); - if ($item[0]->is_photo() && file_exists($original_image)) { - print md5_file($original_image); - } else { - print md5_file($item[0]->file_path()); - } - } else { - print md5_file($item[0]->file_path()); - } - } else { - print "0"; - } - } - - public function sha1($album_id, $file_name) { - // Locate an item with $file_name in the album $album_id - // and display it's sha-1 checksum. - - $item = ORM::factory("item") - ->where("parent_id", "=", $album_id) - ->where("name", "=", $file_name) - ->find_all(); - - if (count($item) > 0) { - access::required("view_full", $item[0]); - - // If the KeepOriginal module is active, check for/use the - // original image instead of the gallery edited version. - if (module::is_active("keeporiginal")) { - $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item[0]->file_path()); - if ($item[0]->is_photo() && file_exists($original_image)) { - print sha1_file($original_image); - } else { - print sha1_file($item[0]->file_path()); - } - } else { - print sha1_file($item[0]->file_path()); - } - } else { - print "0"; - } - } -} diff --git a/3.1/modules/itemchecksum/helpers/item_itemchecksums_rest.php b/3.1/modules/itemchecksum/helpers/item_itemchecksums_rest.php deleted file mode 100644 index c4699f6a..00000000 --- a/3.1/modules/itemchecksum/helpers/item_itemchecksums_rest.php +++ /dev/null @@ -1,42 +0,0 @@ -url); - access::required("view", $item); - - $checksums = array(rest::url("itemchecksum_md5", $item), rest::url("itemchecksum_sha1", $item)); - return array( - "url" => $request->url, - "members" => $checksums); - } - - static function resolve($id) { - $item = ORM::factory("item", $id); - if (!access::can("view", $item)) { - throw new Kohana_404_Exception(); - } - return $item; - } - - static function url($item) { - return url::abs_site("rest/item_checksums/{$item->id}"); - } -} diff --git a/3.1/modules/itemchecksum/helpers/itemchecksum_md5_rest.php b/3.1/modules/itemchecksum/helpers/itemchecksum_md5_rest.php deleted file mode 100644 index e896369c..00000000 --- a/3.1/modules/itemchecksum/helpers/itemchecksum_md5_rest.php +++ /dev/null @@ -1,55 +0,0 @@ -url); - access::required("view", $item); - $checksum = "0"; - // If the KeepOriginal module is active, check for/use the - // original image instead of the gallery edited version. - if (module::is_active("keeporiginal")) { - $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - if ($item->is_photo() && file_exists($original_image)) { - $checksum = md5_file($original_image); - } else { - $checksum = md5_file($item->file_path()); - } - } else { - $checksum = md5_file($item->file_path()); - } - $data = array("checksum" => $checksum); - - return array( - "url" => $request->url, - "entity" => $data); - } - - static function resolve($id) { - $item = ORM::factory("item", $id); - if (!access::can("view", $item)) { - throw new Kohana_404_Exception(); - } - return $item; - } - - static function url($item) { - return url::abs_site("rest/itemchecksum_md5/{$item->id}"); - } -} diff --git a/3.1/modules/itemchecksum/helpers/itemchecksum_rest.php b/3.1/modules/itemchecksum/helpers/itemchecksum_rest.php deleted file mode 100644 index 236ef643..00000000 --- a/3.1/modules/itemchecksum/helpers/itemchecksum_rest.php +++ /dev/null @@ -1,41 +0,0 @@ - array( - "url" => rest::url("item_itemchecksums", $resource))); - } - } - - static function resolve($id) { - $item = ORM::factory("item", $id); - if (!access::can("view", $item)) { - throw new Kohana_404_Exception(); - } - return $item; - } - - static function url($item) { - return url::abs_site("rest/itemchecksum/{$item->id}"); - } -} diff --git a/3.1/modules/itemchecksum/helpers/itemchecksum_sha1_rest.php b/3.1/modules/itemchecksum/helpers/itemchecksum_sha1_rest.php deleted file mode 100644 index 847b637b..00000000 --- a/3.1/modules/itemchecksum/helpers/itemchecksum_sha1_rest.php +++ /dev/null @@ -1,55 +0,0 @@ -url); - access::required("view", $item); - $checksum = "0"; - // If the KeepOriginal module is active, check for/use the - // original image instead of the gallery edited version. - if (module::is_active("keeporiginal")) { - $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - if ($item->is_photo() && file_exists($original_image)) { - $checksum = sha1_file($original_image); - } else { - $checksum = sha1_file($item->file_path()); - } - } else { - $checksum = sha1_file($item->file_path()); - } - $data = array("checksum" => $checksum); - - return array( - "url" => $request->url, - "entity" => $data); - } - - static function resolve($id) { - $item = ORM::factory("item", $id); - if (!access::can("view", $item)) { - throw new Kohana_404_Exception(); - } - return $item; - } - - static function url($item) { - return url::abs_site("rest/itemchecksum_sha1/{$item->id}"); - } -} diff --git a/3.1/modules/itemchecksum/module.info b/3.1/modules/itemchecksum/module.info deleted file mode 100644 index d56f7b20..00000000 --- a/3.1/modules/itemchecksum/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "ItemChecksum" -description = "Display's a photo or video's MD5 and SHA-1 checksum." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:itemchecksum" -discuss_url = "http://gallery.menalto.com/node/90270" diff --git a/3.1/modules/jhead/helpers/jhead_event.php b/3.1/modules/jhead/helpers/jhead_event.php deleted file mode 100644 index b9d2f6f0..00000000 --- a/3.1/modules/jhead/helpers/jhead_event.php +++ /dev/null @@ -1,56 +0,0 @@ -is_photo()) { - return; - } - - // Locate jhead - if ( ! is_file($path = exec('which jhead'))) { - // @todo throw an exception ? - Kohana::log('error', 'jhead is not installed'); - } - $binary = str_replace('\\', '/', realpath(dirname($path))); - $binary .= '/jhead'; - $binary .= (PHP_SHLIB_SUFFIX === 'dll') ? '.exe' : ''; - - if ( ! is_file($binary)) { - // @todo throw an exception ? - Kohana::log('error', 'Unable to locate jhead binary'); - } - - // Invoke jhead - if ($error = exec(escapeshellcmd($binary).' -q -autorot '.$item->file_path())) { - // @todo throw an exception ? - Kohana::log('error', 'Error during execution of jhead'); - } - - // Update item - $image_info = getimagesize($item->file_path()); - $item->width = $image_info[0]; - $item->height = $image_info[1]; - $item->resize_dirty = 1; - $item->thumb_dirty = 1; - $item->save(); - graphics::generate($item); - } -} diff --git a/3.1/modules/jhead/helpers/jhead_installer.php b/3.1/modules/jhead/helpers/jhead_installer.php deleted file mode 100644 index 606f231e..00000000 --- a/3.1/modules/jhead/helpers/jhead_installer.php +++ /dev/null @@ -1,33 +0,0 @@ -file_path()); - - // Make sure the current item is a photo and that an original exists. - if ($item->is_photo() && file_exists($original_image)) { - // Delete the modified version of the photo. - @unlink($item->file_path()); - - // Copy the original image back over, display an error message if the copy fails. - if (@rename($original_image, $item->file_path())) { - // Re-generate the items resize and thumbnail. - $item_data = model_cache::get("item", $id); - $item_data->resize_dirty= 1; - $item_data->thumb_dirty= 1; - $item_data->save(); - graphics::generate($item_data); - - // If the item is the thumbnail for the parent album, - // fix the parent's thumbnail as well. - $parent = $item_data->parent(); - if ($parent->album_cover_item_id == $item_data->id) { - copy($item_data->thumb_path(), $parent->thumb_path()); - $parent->thumb_width = $item_data->thumb_width; - $parent->thumb_height = $item_data->thumb_height; - $parent->save(); - } - - // Display a success message and redirect to the items page. - message::success(t("Your original image has been restored.")); - url::redirect($item->url()); - - } else { - // Display an error message if the copy failed. - message::error(t("Image restore failed!")); - url::redirect($item->url()); - } - } else { - // Display an error message if there is not an original photo. - message::error(t("Image restore failed!")); - url::redirect($item->url()); - } - } -} diff --git a/3.1/modules/keeporiginal/helpers/keeporiginal_event.php b/3.1/modules/keeporiginal/helpers/keeporiginal_event.php deleted file mode 100644 index 8febcb35..00000000 --- a/3.1/modules/keeporiginal/helpers/keeporiginal_event.php +++ /dev/null @@ -1,131 +0,0 @@ -is_photo()) { - $original_file = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - if (file_exists($original_file)) { - @unlink($original_file); - } - } - - // When deleting an album, make sure its corresponding location in - // VARPATH/original/ is deleted as well, if it exists. - if ($item->is_album()) { - $original_file = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - if (file_exists($original_file)) { - @dir::unlink($original_file); - } - } - } - - static function item_updated($old, $new) { - // When updating an item, check and see if the file name is being changed. - // If so, check for and modify any corresponding file/folder in - // VARPATH/original/ as well. - - if ($old->is_photo() || $old->is_album()) { - if ($old->file_path() != $new->file_path()) { - $old_original = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $old->file_path()); - $new_original = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $new->file_path()); - if (file_exists($old_original)) { - @rename($old_original, $new_original); - } - } - } - } - - static function item_moved($item, $old_parent) { - // When moving an item, check and see if a corresponding file exists - // in VARPATH/original/. If so, move that item to a similar directory - // in original as well. - - if ($item->is_photo() || $item->is_album()) { - $old_item_path = $old_parent->file_path() . "/" . $item->name; - if ($item->file_path() != $old_item_path) { - $old_original = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $old_item_path); - $new_original = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - - if (file_exists($old_original)) { - - // Make sure the new folder exists, create it if it doesn't. - $individual_dirs = split("[/\]", "original/" . str_replace(VARPATH . "albums/", "", $item->file_path())); - $new_img_path = VARPATH; - for($i = 0; $i < count($individual_dirs)-1; $i++) { - $new_img_path = $new_img_path . "/" . $individual_dirs[$i]; - if(!file_exists($new_img_path)) { - @mkdir($new_img_path); - } - } - - // Move the file to its new location. - @rename($old_original, $new_original); - } - } - } - } - - static function site_menu($menu, $theme) { - // Create a menu option to restore the original photo. - if ($item = $theme->item()) { - if ((access::can("view", $item)) && (access::can("edit", $item))) { - $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); - - if ($item->is_photo() && file_exists($original_image)) { - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("restore") - ->label(t("Restore original")) - ->css_id("g-keep-originals-link") - ->url(url::site("keeporiginal/restore/" . $item->id))); - } - } - } - } -} \ No newline at end of file diff --git a/3.1/modules/keeporiginal/helpers/keeporiginal_installer.php b/3.1/modules/keeporiginal/helpers/keeporiginal_installer.php deleted file mode 100644 index 16c38e89..00000000 --- a/3.1/modules/keeporiginal/helpers/keeporiginal_installer.php +++ /dev/null @@ -1,25 +0,0 @@ -content = new View("admin_language_flags.html"); - $view->content->preferences_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Save Settings - module::set_var("language_flags", "flag_shape", Input::instance()->post("flag_shape")); - - // Load Admin page. - message::success(t("Your Selection Has Been Saved.")); - $view = new Admin_View("admin.html"); - $view->content = new View("admin_language_flags.html"); - $view->content->preferences_form = $this->_get_admin_form(); - print $view; - } - - private function _get_admin_form() { - // Make a new Form. - $form = new Forge("admin/language_flags/saveprefs", "", "post", - array("id" => "g-language-flags-adminForm")); - - // Figure out what type of flags to display. - $group_flag_types = $form->group("flag_types"); - $group_flag_types->dropdown('flag_shape') - ->label(t("Flag Shape:")) - ->options(array('rectangular'=>'Rectangular', 'round'=>'Round', 'square'=>'Square', 'custom'=>'Custom')) - ->selected(module::get_var("language_flags", "flag_shape")); - - // Add a save button to the form. - $form->submit("SavePrefs")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} \ No newline at end of file diff --git a/3.1/modules/language_flags/css/language_flags_sidebar.css b/3.1/modules/language_flags/css/language_flags_sidebar.css deleted file mode 100644 index 705dad2d..00000000 --- a/3.1/modules/language_flags/css/language_flags_sidebar.css +++ /dev/null @@ -1,20 +0,0 @@ -/* Flag container divs */ -#g-selected-language-flag, -#g-language-flag, -#g-default-language-flag { - display: inline; - margin: 2px; -} - -/* Flags with standard size */ -#g-language-flag img, -#g-default-language-flag img { - width: 40px; - margin: 5px; -} - -/* Flag grows when selected */ -#g-selected-language-flag img { - width: 48px; - margin: 1px; -} \ No newline at end of file diff --git a/3.1/modules/language_flags/helpers/language_flags_event.php b/3.1/modules/language_flags/helpers/language_flags_event.php deleted file mode 100644 index 5b0aa2e6..00000000 --- a/3.1/modules/language_flags/helpers/language_flags_event.php +++ /dev/null @@ -1,30 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("language-flags") - ->label(t("Language flag settings")) - ->url(url::site("admin/language_flags"))); - } -} diff --git a/3.1/modules/language_flags/helpers/language_flags_installer.php b/3.1/modules/language_flags/helpers/language_flags_installer.php deleted file mode 100644 index 6fd98a1d..00000000 --- a/3.1/modules/language_flags/helpers/language_flags_installer.php +++ /dev/null @@ -1,31 +0,0 @@ -css("language_flags_sidebar.css"); - } -} diff --git a/3.1/modules/language_flags/images/rectangular/af_ZA.png b/3.1/modules/language_flags/images/rectangular/af_ZA.png deleted file mode 100644 index 81f6c12f..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/af_ZA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ar_SA.png b/3.1/modules/language_flags/images/rectangular/ar_SA.png deleted file mode 100644 index 2818f50b..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ar_SA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/be_BY.png b/3.1/modules/language_flags/images/rectangular/be_BY.png deleted file mode 100644 index 4c697344..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/be_BY.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/bg_BG.png b/3.1/modules/language_flags/images/rectangular/bg_BG.png deleted file mode 100644 index 46da4c6e..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/bg_BG.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ca_ES.png b/3.1/modules/language_flags/images/rectangular/ca_ES.png deleted file mode 100644 index c7105790..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ca_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/da_DK.png b/3.1/modules/language_flags/images/rectangular/da_DK.png deleted file mode 100644 index df9599b3..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/da_DK.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/de_DE.png b/3.1/modules/language_flags/images/rectangular/de_DE.png deleted file mode 100644 index 34809532..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/de_DE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/default.png b/3.1/modules/language_flags/images/rectangular/default.png deleted file mode 100644 index 7066d218..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/default.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/el_GR.png b/3.1/modules/language_flags/images/rectangular/el_GR.png deleted file mode 100644 index 01478071..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/el_GR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/en_GB.png b/3.1/modules/language_flags/images/rectangular/en_GB.png deleted file mode 100644 index 0b6ff8b0..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/en_GB.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/en_US.png b/3.1/modules/language_flags/images/rectangular/en_US.png deleted file mode 100644 index 5f7b1008..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/en_US.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/es_AR.png b/3.1/modules/language_flags/images/rectangular/es_AR.png deleted file mode 100644 index 15c99336..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/es_AR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/es_ES.png b/3.1/modules/language_flags/images/rectangular/es_ES.png deleted file mode 100644 index c7105790..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/es_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/es_MX.png b/3.1/modules/language_flags/images/rectangular/es_MX.png deleted file mode 100644 index d84f5850..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/es_MX.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/eu_ES.png b/3.1/modules/language_flags/images/rectangular/eu_ES.png deleted file mode 100644 index c7105790..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/eu_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/fa_IR.png b/3.1/modules/language_flags/images/rectangular/fa_IR.png deleted file mode 100644 index 1b1f5b41..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/fa_IR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/fi_FI.png b/3.1/modules/language_flags/images/rectangular/fi_FI.png deleted file mode 100644 index 0273d127..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/fi_FI.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/fr_FR.png b/3.1/modules/language_flags/images/rectangular/fr_FR.png deleted file mode 100644 index ba9d89c9..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/fr_FR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ga_IE.png b/3.1/modules/language_flags/images/rectangular/ga_IE.png deleted file mode 100644 index 2ce7a539..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ga_IE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/he_IL.png b/3.1/modules/language_flags/images/rectangular/he_IL.png deleted file mode 100644 index cf23aaee..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/he_IL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/hu_HU.png b/3.1/modules/language_flags/images/rectangular/hu_HU.png deleted file mode 100644 index 4550be18..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/hu_HU.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/is_IS.png b/3.1/modules/language_flags/images/rectangular/is_IS.png deleted file mode 100644 index 20e1f8ed..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/is_IS.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/it_IT.png b/3.1/modules/language_flags/images/rectangular/it_IT.png deleted file mode 100644 index 442d628d..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/it_IT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ja_JP.png b/3.1/modules/language_flags/images/rectangular/ja_JP.png deleted file mode 100644 index 5c38e938..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ja_JP.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ko_KR.png b/3.1/modules/language_flags/images/rectangular/ko_KR.png deleted file mode 100644 index f3872b2e..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ko_KR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/lt_LT.png b/3.1/modules/language_flags/images/rectangular/lt_LT.png deleted file mode 100644 index e4ffc3d0..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/lt_LT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/lv_LV.png b/3.1/modules/language_flags/images/rectangular/lv_LV.png deleted file mode 100644 index 7f48f0b5..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/lv_LV.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/nl_NL.png b/3.1/modules/language_flags/images/rectangular/nl_NL.png deleted file mode 100644 index e38bde91..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/nl_NL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/no_NO.png b/3.1/modules/language_flags/images/rectangular/no_NO.png deleted file mode 100644 index 154d3a0b..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/no_NO.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/pl_PL.png b/3.1/modules/language_flags/images/rectangular/pl_PL.png deleted file mode 100644 index e7a49991..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/pl_PL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/pt_BR.png b/3.1/modules/language_flags/images/rectangular/pt_BR.png deleted file mode 100644 index 46ff4fa0..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/pt_BR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/pt_PT.png b/3.1/modules/language_flags/images/rectangular/pt_PT.png deleted file mode 100644 index ce9cd682..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/pt_PT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ro_RO.png b/3.1/modules/language_flags/images/rectangular/ro_RO.png deleted file mode 100644 index bbb17aa9..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ro_RO.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/ru_RU.png b/3.1/modules/language_flags/images/rectangular/ru_RU.png deleted file mode 100644 index b98b1066..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/ru_RU.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/sk_SK.png b/3.1/modules/language_flags/images/rectangular/sk_SK.png deleted file mode 100644 index af09cf00..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/sk_SK.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/sl_SI.png b/3.1/modules/language_flags/images/rectangular/sl_SI.png deleted file mode 100644 index cb326fcc..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/sl_SI.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/sr_CS.png b/3.1/modules/language_flags/images/rectangular/sr_CS.png deleted file mode 100644 index b369fa5a..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/sr_CS.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/sv_SE.png b/3.1/modules/language_flags/images/rectangular/sv_SE.png deleted file mode 100644 index 3c216703..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/sv_SE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/tr_TR.png b/3.1/modules/language_flags/images/rectangular/tr_TR.png deleted file mode 100644 index a889a7b0..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/tr_TR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/uk_UA.png b/3.1/modules/language_flags/images/rectangular/uk_UA.png deleted file mode 100644 index 2ddf06e5..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/uk_UA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/vi_VN.png b/3.1/modules/language_flags/images/rectangular/vi_VN.png deleted file mode 100644 index 4033f79a..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/vi_VN.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/zh_CN.png b/3.1/modules/language_flags/images/rectangular/zh_CN.png deleted file mode 100644 index 4d54de17..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/zh_CN.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/rectangular/zh_TW.png b/3.1/modules/language_flags/images/rectangular/zh_TW.png deleted file mode 100644 index 4d54de17..00000000 Binary files a/3.1/modules/language_flags/images/rectangular/zh_TW.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/af_ZA.png b/3.1/modules/language_flags/images/round/af_ZA.png deleted file mode 100644 index b02bd971..00000000 Binary files a/3.1/modules/language_flags/images/round/af_ZA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ar_SA.png b/3.1/modules/language_flags/images/round/ar_SA.png deleted file mode 100644 index 7bc7fea3..00000000 Binary files a/3.1/modules/language_flags/images/round/ar_SA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/be_BY.png b/3.1/modules/language_flags/images/round/be_BY.png deleted file mode 100644 index f7af6bce..00000000 Binary files a/3.1/modules/language_flags/images/round/be_BY.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/bg_BG.png b/3.1/modules/language_flags/images/round/bg_BG.png deleted file mode 100644 index 5a3f7026..00000000 Binary files a/3.1/modules/language_flags/images/round/bg_BG.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ca_ES.png b/3.1/modules/language_flags/images/round/ca_ES.png deleted file mode 100644 index 2f363c35..00000000 Binary files a/3.1/modules/language_flags/images/round/ca_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/cs_CZ.png b/3.1/modules/language_flags/images/round/cs_CZ.png deleted file mode 100644 index 3aecdfb1..00000000 Binary files a/3.1/modules/language_flags/images/round/cs_CZ.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/da_DK.png b/3.1/modules/language_flags/images/round/da_DK.png deleted file mode 100644 index 9db72bf8..00000000 Binary files a/3.1/modules/language_flags/images/round/da_DK.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/de_DE.png b/3.1/modules/language_flags/images/round/de_DE.png deleted file mode 100644 index c84c5e6a..00000000 Binary files a/3.1/modules/language_flags/images/round/de_DE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/default.png b/3.1/modules/language_flags/images/round/default.png deleted file mode 100644 index 6295dc09..00000000 Binary files a/3.1/modules/language_flags/images/round/default.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/el_GR.png b/3.1/modules/language_flags/images/round/el_GR.png deleted file mode 100644 index a61583f1..00000000 Binary files a/3.1/modules/language_flags/images/round/el_GR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/en_GB.png b/3.1/modules/language_flags/images/round/en_GB.png deleted file mode 100644 index 79892db4..00000000 Binary files a/3.1/modules/language_flags/images/round/en_GB.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/en_US.png b/3.1/modules/language_flags/images/round/en_US.png deleted file mode 100644 index a8cd9038..00000000 Binary files a/3.1/modules/language_flags/images/round/en_US.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/es_AR.png b/3.1/modules/language_flags/images/round/es_AR.png deleted file mode 100644 index 5fba369a..00000000 Binary files a/3.1/modules/language_flags/images/round/es_AR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/es_ES.png b/3.1/modules/language_flags/images/round/es_ES.png deleted file mode 100644 index 2f363c35..00000000 Binary files a/3.1/modules/language_flags/images/round/es_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/es_MX.png b/3.1/modules/language_flags/images/round/es_MX.png deleted file mode 100644 index 250fc627..00000000 Binary files a/3.1/modules/language_flags/images/round/es_MX.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/et_EE.png b/3.1/modules/language_flags/images/round/et_EE.png deleted file mode 100644 index 1e3f12bb..00000000 Binary files a/3.1/modules/language_flags/images/round/et_EE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/fa_IR.png b/3.1/modules/language_flags/images/round/fa_IR.png deleted file mode 100644 index 19f44c4f..00000000 Binary files a/3.1/modules/language_flags/images/round/fa_IR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/faroe.png b/3.1/modules/language_flags/images/round/faroe.png deleted file mode 100644 index b509bc32..00000000 Binary files a/3.1/modules/language_flags/images/round/faroe.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/fi_FI.png b/3.1/modules/language_flags/images/round/fi_FI.png deleted file mode 100644 index f33982dd..00000000 Binary files a/3.1/modules/language_flags/images/round/fi_FI.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/fr_FR.png b/3.1/modules/language_flags/images/round/fr_FR.png deleted file mode 100644 index c1989222..00000000 Binary files a/3.1/modules/language_flags/images/round/fr_FR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ga_IE.png b/3.1/modules/language_flags/images/round/ga_IE.png deleted file mode 100644 index ca001997..00000000 Binary files a/3.1/modules/language_flags/images/round/ga_IE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/he_IL.png b/3.1/modules/language_flags/images/round/he_IL.png deleted file mode 100644 index e50c0fb6..00000000 Binary files a/3.1/modules/language_flags/images/round/he_IL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/hu_HU.png b/3.1/modules/language_flags/images/round/hu_HU.png deleted file mode 100644 index bc298c4d..00000000 Binary files a/3.1/modules/language_flags/images/round/hu_HU.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/is_IS.png b/3.1/modules/language_flags/images/round/is_IS.png deleted file mode 100644 index d63666a0..00000000 Binary files a/3.1/modules/language_flags/images/round/is_IS.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/it_IT.png b/3.1/modules/language_flags/images/round/it_IT.png deleted file mode 100644 index 45d11e01..00000000 Binary files a/3.1/modules/language_flags/images/round/it_IT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ja_JP.png b/3.1/modules/language_flags/images/round/ja_JP.png deleted file mode 100644 index 4dfa7f68..00000000 Binary files a/3.1/modules/language_flags/images/round/ja_JP.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ko_KR.png b/3.1/modules/language_flags/images/round/ko_KR.png deleted file mode 100644 index 8eb35813..00000000 Binary files a/3.1/modules/language_flags/images/round/ko_KR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/lt_LT.png b/3.1/modules/language_flags/images/round/lt_LT.png deleted file mode 100644 index 0ea2239b..00000000 Binary files a/3.1/modules/language_flags/images/round/lt_LT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/lv_LV.png b/3.1/modules/language_flags/images/round/lv_LV.png deleted file mode 100644 index 64a53135..00000000 Binary files a/3.1/modules/language_flags/images/round/lv_LV.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/nl_NL.png b/3.1/modules/language_flags/images/round/nl_NL.png deleted file mode 100644 index e2b5d5e0..00000000 Binary files a/3.1/modules/language_flags/images/round/nl_NL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/no_NO.png b/3.1/modules/language_flags/images/round/no_NO.png deleted file mode 100644 index 5c7f8034..00000000 Binary files a/3.1/modules/language_flags/images/round/no_NO.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/pl_PL.png b/3.1/modules/language_flags/images/round/pl_PL.png deleted file mode 100644 index 02cf15fd..00000000 Binary files a/3.1/modules/language_flags/images/round/pl_PL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/pt_BR.png b/3.1/modules/language_flags/images/round/pt_BR.png deleted file mode 100644 index 4084fc33..00000000 Binary files a/3.1/modules/language_flags/images/round/pt_BR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/pt_PT.png b/3.1/modules/language_flags/images/round/pt_PT.png deleted file mode 100644 index 5b2a15d9..00000000 Binary files a/3.1/modules/language_flags/images/round/pt_PT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ro_RO.png b/3.1/modules/language_flags/images/round/ro_RO.png deleted file mode 100644 index 8ab45d66..00000000 Binary files a/3.1/modules/language_flags/images/round/ro_RO.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/ru_RU.png b/3.1/modules/language_flags/images/round/ru_RU.png deleted file mode 100644 index a352a3d3..00000000 Binary files a/3.1/modules/language_flags/images/round/ru_RU.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/sk_SK.png b/3.1/modules/language_flags/images/round/sk_SK.png deleted file mode 100644 index 04e2cee7..00000000 Binary files a/3.1/modules/language_flags/images/round/sk_SK.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/sl_SI.png b/3.1/modules/language_flags/images/round/sl_SI.png deleted file mode 100644 index 04e2cee7..00000000 Binary files a/3.1/modules/language_flags/images/round/sl_SI.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/sr_CS.png b/3.1/modules/language_flags/images/round/sr_CS.png deleted file mode 100644 index 80d13304..00000000 Binary files a/3.1/modules/language_flags/images/round/sr_CS.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/sv_SE.png b/3.1/modules/language_flags/images/round/sv_SE.png deleted file mode 100644 index e39a0380..00000000 Binary files a/3.1/modules/language_flags/images/round/sv_SE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/tr_TR.png b/3.1/modules/language_flags/images/round/tr_TR.png deleted file mode 100644 index 39d6acde..00000000 Binary files a/3.1/modules/language_flags/images/round/tr_TR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/uk_UA.png b/3.1/modules/language_flags/images/round/uk_UA.png deleted file mode 100644 index 8febdccf..00000000 Binary files a/3.1/modules/language_flags/images/round/uk_UA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/vi_VN.png b/3.1/modules/language_flags/images/round/vi_VN.png deleted file mode 100644 index c73f50da..00000000 Binary files a/3.1/modules/language_flags/images/round/vi_VN.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/zh_CN.png b/3.1/modules/language_flags/images/round/zh_CN.png deleted file mode 100644 index 105611bd..00000000 Binary files a/3.1/modules/language_flags/images/round/zh_CN.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/round/zh_TW.png b/3.1/modules/language_flags/images/round/zh_TW.png deleted file mode 100644 index 105611bd..00000000 Binary files a/3.1/modules/language_flags/images/round/zh_TW.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/af_ZA.png b/3.1/modules/language_flags/images/square/af_ZA.png deleted file mode 100644 index 33fff8ff..00000000 Binary files a/3.1/modules/language_flags/images/square/af_ZA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ar_SA.png b/3.1/modules/language_flags/images/square/ar_SA.png deleted file mode 100644 index c9794774..00000000 Binary files a/3.1/modules/language_flags/images/square/ar_SA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/be_BG.png b/3.1/modules/language_flags/images/square/be_BG.png deleted file mode 100644 index e4fa699b..00000000 Binary files a/3.1/modules/language_flags/images/square/be_BG.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/be_BY.png b/3.1/modules/language_flags/images/square/be_BY.png deleted file mode 100644 index aaa8c7e1..00000000 Binary files a/3.1/modules/language_flags/images/square/be_BY.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ca_CZ.png b/3.1/modules/language_flags/images/square/ca_CZ.png deleted file mode 100644 index 5ce1d124..00000000 Binary files a/3.1/modules/language_flags/images/square/ca_CZ.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ca_ES.png b/3.1/modules/language_flags/images/square/ca_ES.png deleted file mode 100644 index 4b36885e..00000000 Binary files a/3.1/modules/language_flags/images/square/ca_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/cs_CZ.png b/3.1/modules/language_flags/images/square/cs_CZ.png deleted file mode 100644 index ac171c8b..00000000 Binary files a/3.1/modules/language_flags/images/square/cs_CZ.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/da_DK.png b/3.1/modules/language_flags/images/square/da_DK.png deleted file mode 100644 index 2774386d..00000000 Binary files a/3.1/modules/language_flags/images/square/da_DK.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/de_DE.png b/3.1/modules/language_flags/images/square/de_DE.png deleted file mode 100644 index 15717610..00000000 Binary files a/3.1/modules/language_flags/images/square/de_DE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/default.png b/3.1/modules/language_flags/images/square/default.png deleted file mode 100644 index 35943a56..00000000 Binary files a/3.1/modules/language_flags/images/square/default.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/el_GR.png b/3.1/modules/language_flags/images/square/el_GR.png deleted file mode 100644 index 595c680c..00000000 Binary files a/3.1/modules/language_flags/images/square/el_GR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/en_GB.png b/3.1/modules/language_flags/images/square/en_GB.png deleted file mode 100644 index d7933cc9..00000000 Binary files a/3.1/modules/language_flags/images/square/en_GB.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/es_AR.png b/3.1/modules/language_flags/images/square/es_AR.png deleted file mode 100644 index 9d42b35b..00000000 Binary files a/3.1/modules/language_flags/images/square/es_AR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/es_ES.png b/3.1/modules/language_flags/images/square/es_ES.png deleted file mode 100644 index 4b36885e..00000000 Binary files a/3.1/modules/language_flags/images/square/es_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/et_EE.png b/3.1/modules/language_flags/images/square/et_EE.png deleted file mode 100644 index 466e9632..00000000 Binary files a/3.1/modules/language_flags/images/square/et_EE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/eu_ES.png b/3.1/modules/language_flags/images/square/eu_ES.png deleted file mode 100644 index 4b36885e..00000000 Binary files a/3.1/modules/language_flags/images/square/eu_ES.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/fa_IR.png b/3.1/modules/language_flags/images/square/fa_IR.png deleted file mode 100644 index 37334f83..00000000 Binary files a/3.1/modules/language_flags/images/square/fa_IR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/fi_FI.png b/3.1/modules/language_flags/images/square/fi_FI.png deleted file mode 100644 index 6bf9b92b..00000000 Binary files a/3.1/modules/language_flags/images/square/fi_FI.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/fr_FR.png b/3.1/modules/language_flags/images/square/fr_FR.png deleted file mode 100644 index d20ab1d6..00000000 Binary files a/3.1/modules/language_flags/images/square/fr_FR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ga_IE.png b/3.1/modules/language_flags/images/square/ga_IE.png deleted file mode 100644 index a0deaf0c..00000000 Binary files a/3.1/modules/language_flags/images/square/ga_IE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/he_IL.png b/3.1/modules/language_flags/images/square/he_IL.png deleted file mode 100644 index 226c5195..00000000 Binary files a/3.1/modules/language_flags/images/square/he_IL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/hu_HU.png b/3.1/modules/language_flags/images/square/hu_HU.png deleted file mode 100644 index 860e82cc..00000000 Binary files a/3.1/modules/language_flags/images/square/hu_HU.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/is_IS.png b/3.1/modules/language_flags/images/square/is_IS.png deleted file mode 100644 index bd8d9952..00000000 Binary files a/3.1/modules/language_flags/images/square/is_IS.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/it_IT.png b/3.1/modules/language_flags/images/square/it_IT.png deleted file mode 100644 index d52c6291..00000000 Binary files a/3.1/modules/language_flags/images/square/it_IT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ja_JP.png b/3.1/modules/language_flags/images/square/ja_JP.png deleted file mode 100644 index ec62c2a7..00000000 Binary files a/3.1/modules/language_flags/images/square/ja_JP.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ko_KR.png b/3.1/modules/language_flags/images/square/ko_KR.png deleted file mode 100644 index a2e607d1..00000000 Binary files a/3.1/modules/language_flags/images/square/ko_KR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/lt_LT.png b/3.1/modules/language_flags/images/square/lt_LT.png deleted file mode 100644 index e4f2d280..00000000 Binary files a/3.1/modules/language_flags/images/square/lt_LT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/lv_LV.png b/3.1/modules/language_flags/images/square/lv_LV.png deleted file mode 100644 index f44fe38a..00000000 Binary files a/3.1/modules/language_flags/images/square/lv_LV.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/nl_NL.png b/3.1/modules/language_flags/images/square/nl_NL.png deleted file mode 100644 index 43cd3dc1..00000000 Binary files a/3.1/modules/language_flags/images/square/nl_NL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/no_NO.png b/3.1/modules/language_flags/images/square/no_NO.png deleted file mode 100644 index c9453e0b..00000000 Binary files a/3.1/modules/language_flags/images/square/no_NO.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/pl_PL.png b/3.1/modules/language_flags/images/square/pl_PL.png deleted file mode 100644 index 5da0b07c..00000000 Binary files a/3.1/modules/language_flags/images/square/pl_PL.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/pt_BR.png b/3.1/modules/language_flags/images/square/pt_BR.png deleted file mode 100644 index 651cb122..00000000 Binary files a/3.1/modules/language_flags/images/square/pt_BR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/pt_PT.png b/3.1/modules/language_flags/images/square/pt_PT.png deleted file mode 100644 index 59ff8a0b..00000000 Binary files a/3.1/modules/language_flags/images/square/pt_PT.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ro_RO.png b/3.1/modules/language_flags/images/square/ro_RO.png deleted file mode 100644 index b79dbdee..00000000 Binary files a/3.1/modules/language_flags/images/square/ro_RO.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/ru_RU.png b/3.1/modules/language_flags/images/square/ru_RU.png deleted file mode 100644 index 70c1b814..00000000 Binary files a/3.1/modules/language_flags/images/square/ru_RU.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/sk_SK.png b/3.1/modules/language_flags/images/square/sk_SK.png deleted file mode 100644 index 78c56a4c..00000000 Binary files a/3.1/modules/language_flags/images/square/sk_SK.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/sl_SI.png b/3.1/modules/language_flags/images/square/sl_SI.png deleted file mode 100644 index 36b3ed50..00000000 Binary files a/3.1/modules/language_flags/images/square/sl_SI.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/sr_CS.png b/3.1/modules/language_flags/images/square/sr_CS.png deleted file mode 100644 index 187591dd..00000000 Binary files a/3.1/modules/language_flags/images/square/sr_CS.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/sv_SE.png b/3.1/modules/language_flags/images/square/sv_SE.png deleted file mode 100644 index 24bf4372..00000000 Binary files a/3.1/modules/language_flags/images/square/sv_SE.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/tr_TR.png b/3.1/modules/language_flags/images/square/tr_TR.png deleted file mode 100644 index 0b6232ae..00000000 Binary files a/3.1/modules/language_flags/images/square/tr_TR.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/uk_UA.png b/3.1/modules/language_flags/images/square/uk_UA.png deleted file mode 100644 index 53afc4df..00000000 Binary files a/3.1/modules/language_flags/images/square/uk_UA.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/vi_VN.png b/3.1/modules/language_flags/images/square/vi_VN.png deleted file mode 100644 index 49fd1766..00000000 Binary files a/3.1/modules/language_flags/images/square/vi_VN.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/zh_CN.png b/3.1/modules/language_flags/images/square/zh_CN.png deleted file mode 100644 index 63fba8b6..00000000 Binary files a/3.1/modules/language_flags/images/square/zh_CN.png and /dev/null differ diff --git a/3.1/modules/language_flags/images/square/zh_TW.png b/3.1/modules/language_flags/images/square/zh_TW.png deleted file mode 100644 index 63fba8b6..00000000 Binary files a/3.1/modules/language_flags/images/square/zh_TW.png and /dev/null differ diff --git a/3.1/modules/language_flags/module.info b/3.1/modules/language_flags/module.info deleted file mode 100644 index d0ce676b..00000000 --- a/3.1/modules/language_flags/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Language Flags" -description = "Replaces the language selection drop-down box with clickable flags." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:language_flags" -discuss_url = "http://gallery.menalto.com/node/94647" diff --git a/3.1/modules/language_flags/views/admin_language_flags.html.php b/3.1/modules/language_flags/views/admin_language_flags.html.php deleted file mode 100644 index f5bf04c5..00000000 --- a/3.1/modules/language_flags/views/admin_language_flags.html.php +++ /dev/null @@ -1,5 +0,0 @@ - -
    -

    - -
    diff --git a/3.1/modules/language_flags/views/user_languages_block.html.php b/3.1/modules/language_flags/views/user_languages_block.html.php deleted file mode 100644 index a7fe26d9..00000000 --- a/3.1/modules/language_flags/views/user_languages_block.html.php +++ /dev/null @@ -1,57 +0,0 @@ - -" . - "\"""; - } - next($installed_locales); - } -?> - diff --git a/3.1/modules/latestalbums/helpers/latestalbums_rss.php b/3.1/modules/latestalbums/helpers/latestalbums_rss.php deleted file mode 100644 index aa34088c..00000000 --- a/3.1/modules/latestalbums/helpers/latestalbums_rss.php +++ /dev/null @@ -1,48 +0,0 @@ -items = ORM::factory("item") - ->viewable() - ->where("type", "=", "album") - ->order_by("created", "DESC") - ->find_all($limit, $offset); - - $all_items = ORM::factory("item") - ->viewable() - ->where("type", "=", "album") - ->order_by("created", "DESC"); - - $feed->max_pages = ceil($all_items->find_all()->count() / $limit); - $feed->title = t("Latest albums"); - $feed->description = t("Most recently created albums"); - return $feed; - } - } -} diff --git a/3.1/modules/latestalbums/module.info b/3.1/modules/latestalbums/module.info deleted file mode 100644 index 9c78cc31..00000000 --- a/3.1/modules/latestalbums/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "Latest Albums" -description = "Display recently created albums." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:latestalbums" -discuss_url = "http://gallery.menalto.com/forum_module_latestalbums" diff --git a/3.1/modules/latestupdates/controllers/latestupdates.php b/3.1/modules/latestupdates/controllers/latestupdates.php deleted file mode 100644 index 491dee22..00000000 --- a/3.1/modules/latestupdates/controllers/latestupdates.php +++ /dev/null @@ -1,144 +0,0 @@ -get("page", 1); - if ($page < 1) { - url::redirect("latestupdates/albums/{$item->id}"); - } - - // First item to display. - $offset = ($page - 1) * $page_size; - - $item = ORM::factory("item", $id); - - // Determine the total number of items, - // for page numbering purposes. - $count = $item - ->viewable() - ->where("type", "!=", "album") - ->order_by("created", "DESC") - ->descendants_count(); - - // Figure out what the highest page number is. - $max_pages = ceil($count / $page_size); - - // Don't let the visitor go past the last page. - if ($max_pages && $page > $max_pages) { - url::redirect("latestupdates/albums/{$item->id}?page=$max_pages"); - } - - // Figure out which items to display on this page. - $children = $item - ->viewable() - ->where("type", "!=", "album") - ->order_by("created", "DESC") - ->descendants($page_size, $offset); - - // Set up the previous and next page buttons. - if ($page > 1) { - $previous_page = $page - 1; - $view->previous_page_link = url::site("latestupdates/albums/{$item->id}?page={$previous_page}"); - } - if ($page < $max_pages) { - $next_page = $page + 1; - $view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}"); - } - - // Set up and display the actual page. - $template = new Theme_View("page.html", "collection", "LatestUpdates"); - $template->page_title = t("Gallery :: Latest Updates"); - $template->set_global("page", $page); - $template->set_global("page_size", $page_size); - $template->set_global("max_pages", $max_pages); - $template->set_global("children", $children); - $template->set_global("children_count", $count); - $template->content = new View("dynamic.html"); - $template->content->title = t("Latest Updates"); - print $template; - } - - public function updates() { - // Figure out how many items to display on each page. - $page_size = module::get_var("gallery", "page_size", 9); - - // Figure out which page # the visitor is on and - // don't allow the visitor to go below page 1. - $page = Input::instance()->get("page", 1); - if ($page < 1) { - url::redirect("latestupdates/updates"); - } - - // First item to display. - $offset = ($page - 1) * $page_size; - - // Determine the total number of items, - // for page numbering purposes. - $count = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->find_all() - ->count(); - - // Figure out what the highest page number is. - $max_pages = ceil($count / $page_size); - - // Don't let the visitor go past the last page. - if ($max_pages && $page > $max_pages) { - url::redirect("latestupdates/updates?page=$max_pages"); - } - - // Figure out which items to display on this page. - $items = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->order_by("created", "DESC") - ->find_all($page_size, $offset); - - // Set up the previous and next page buttons. - if ($page > 1) { - $previous_page = $page - 1; - $view->previous_page_link = url::site("latestupdates/updates?page={$previous_page}"); - } - if ($page < $max_pages) { - $next_page = $page + 1; - $view->next_page_link = url::site("latestupdates/updates?page={$next_page}"); - } - - // Set up and display the actual page. - $template = new Theme_View("page.html", "collection", "LatestUpdates"); - $template->page_title = t("Gallery :: Latest Updates"); - $template->set_global("page", $page); - $template->set_global("page_size", $page_size); - $template->set_global("max_pages", $max_pages); - $template->set_global("children", $items); - $template->set_global("children_count", $count); - $template->content = new View ("dynamic.html"); - $template->content->title = t("Latest Updates"); - print $template; - } - -} \ No newline at end of file diff --git a/3.1/modules/latestupdates/helpers/latestupdates_block.php b/3.1/modules/latestupdates/helpers/latestupdates_block.php deleted file mode 100644 index 4af70f06..00000000 --- a/3.1/modules/latestupdates/helpers/latestupdates_block.php +++ /dev/null @@ -1,53 +0,0 @@ - t("Latest Updates")); - } - - static function get($block_id, $theme) { - $block = ""; - - - switch ($block_id) { - case "latestupdates": - - // Make a new sidebar block. - $block = new Block(); - $block->css_id = "g-latest-updates"; - $block->title = t("Latest Updates"); - $block->content = new View("latestupdates_block.html"); - - if (!$theme->item()) { - $block->content->update_links = array( - "Entire Gallery" => url::site("latestupdates/updates")); - } else { - // Determine the ID# of the current album. - $albumID = $theme->item->is_album() ? $theme->item->id : $theme->item->parent_id; - $block->content->update_links = array( - "Entire Gallery" => url::site("latestupdates/updates"), - "This Album" => url::site("latestupdates/albums/$albumID") - ); - } - break; - } - return $block; - } -} diff --git a/3.1/modules/latestupdates/module.info b/3.1/modules/latestupdates/module.info deleted file mode 100644 index a4916cd6..00000000 --- a/3.1/modules/latestupdates/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "LatestUpdates" -description = "Display recently uploaded photos and videos." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:latestupdates" -discuss_url = "http://gallery.menalto.com/forum_module_latestupdates" diff --git a/3.1/modules/latestupdates/views/latestupdates_block.html.php b/3.1/modules/latestupdates/views/latestupdates_block.html.php deleted file mode 100644 index b1dd9074..00000000 --- a/3.1/modules/latestupdates/views/latestupdates_block.html.php +++ /dev/null @@ -1,10 +0,0 @@ - -
      - $url): ?> -
    • - - - -
    • - -
    diff --git a/3.1/modules/ldap/config/gallery_sample.ldif b/3.1/modules/ldap/config/gallery_sample.ldif deleted file mode 100644 index bc52d08a..00000000 --- a/3.1/modules/ldap/config/gallery_sample.ldif +++ /dev/null @@ -1,74 +0,0 @@ -dn: ou=people,dc=gallery,dc=local -objectClass: organizationalUnit -ou: people - -dn: ou=groups,dc=gallery,dc=local -objectClass: organizationalUnit -ou: groups - -dn: ou=systems,dc=gallery,dc=local -objectClass: organizationalUnit -ou: systems - -dn: uid=jdoe,ou=people,dc=gallery,dc=local -objectClass: inetOrgPerson -objectClass: posixAccount -uid: jdoe -sn: Doe -givenname: John -cn: John Doe -userpassword: {SSHA}76qIsKTflGM6dj0f5c5olnD9ltKKXAFE -displayName: John Doe -homeDirectory: /home/jdoe -uidnumber: 1000 -gidnumber: 10000 -mail: jdoe@gallery.local - -dn: uid=hwallbanger,ou=people,dc=gallery,dc=local -objectClass: inetOrgPerson -objectClass: posixAccount -uid: hwallbanger -sn: Wallbanger -givenname: Harvey -cn: Harvey Wallbanger -userpassword: {SSHA}084H+FFr6s/anIoaIhI+O8OaH2u0MIBL -displayName: Harvey Wallbanger -homeDirectory: /home/hwallbanger -uidnumber: 1001 -gidnumber: 10001 -mail: hwallbanger@gallery.local - -dn: uid=rnail,ou=people,dc=gallery,dc=local -objectClass: inetOrgPerson -objectClass: posixAccount -uid: rnail -sn: Nail -givenname: Rusty -cn: Rusty Nail -userpassword: {SSHA}wXVdpfbP6n9LwoLxrB+NvY2oDN1j/M2z -displayName: Rusty Nail -homeDirectory: /home/rnail -uidnumber: 1002 -gidnumber: 10001 -mail: rnail@gallery.local - -dn: cn=admins,ou=groups,dc=gallery,dc=local -objectclass: posixGroup -cn: admins -gidnumber: 10000 -memberuid: jdoe - -dn: cn=users,ou=groups,dc=gallery,dc=local -objectclass: posixGroup -cn: users -gidnumber: 10001 -memberuid: jdoe -memberuid: hwallbanger -memberuid: rnail - -dn: cn=guest,ou=groups,dc=gallery,dc=local -objectclass: posixGroup -cn: guest -gidnumber: 10002 - - diff --git a/3.1/modules/ldap/config/identity.php b/3.1/modules/ldap/config/identity.php deleted file mode 100644 index 8c4136b2..00000000 --- a/3.1/modules/ldap/config/identity.php +++ /dev/null @@ -1,47 +0,0 @@ - "ldap", - "allow_updates" => false, - "params" => array( - "groups" => array("engineering", "everybody", "guest"), - "everybody_group" => "guest", - "registered_users_group" => "everybody", - "admins" => array("alice", "bob"), - "url" => "ldaps://ldap.mycompany.com/", - "group_domain" => "ou=Posix,ou=Groups,dc=ymcompany,dc=com", - "user_domain" => "ou=People,dc=MyCompany,dc=com", - "bind_rdn" => null, - "bind_password" => null, - ) -); diff --git a/3.1/modules/ldap/helpers/ldap_installer.php b/3.1/modules/ldap/helpers/ldap_installer.php deleted file mode 100644 index d9bdbfd4..00000000 --- a/3.1/modules/ldap/helpers/ldap_installer.php +++ /dev/null @@ -1,53 +0,0 @@ -groups() as $group) { - module::event("group_deleted", $group); - } - } - - static function initialize() { - module::set_version("ldap", 1); - $root = item::root(); - foreach (IdentityProvider::instance()->groups() as $group) { - module::event("group_created", $group); - access::allow($group, "view", $root); - access::allow($group, "view_full", $root); - } - } -} \ No newline at end of file diff --git a/3.1/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php b/3.1/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php deleted file mode 100644 index 93b540e6..00000000 --- a/3.1/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php +++ /dev/null @@ -1,292 +0,0 @@ -id = 0; - self::$_guest_user->name = "Guest"; - self::$_guest_user->full_name = "Guest"; - self::$_guest_user->guest = true; - self::$_guest_user->admin = false; - self::$_guest_user->locale = null; - self::$_guest_user->email = null; - self::$_guest_user->groups = array($this->everybody()); - } - return self::$_guest_user; - } - - /** - * @see IdentityProvider_Driver::admin_user. - */ - public function admin_user() { - return self::lookup_user_by_name(self::$_params["admins"][0]); - } - - /** - * @see IdentityProvider_Driver::create_user. - */ - public function create_user($name, $full_name, $password, $email) { - throw new Exception("@todo INVALID OPERATION"); - } - - /** - * @see IdentityProvider_Driver::is_correct_password. - */ - public function is_correct_password($user, $password) { - $connection = ldap_connect(self::$_params["url"]); - ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, 3); - $lbind = @ldap_bind($connection, $user->dn, $password); - ldap_unbind($connection); - - return ($lbind) ? true : false; - } - - /** - * @see IdentityProvider_Driver::lookup_user. - */ - public function lookup_user($id) { - if ($id == 0) { - return $this->guest(); - } - $result = ldap_search(self::$_connection, self::$_params["user_domain"], "uidNumber=$id"); - $entries = ldap_get_entries(self::$_connection, $result); - if ($entries["count"] > 0) { - return new Ldap_User($entries[0]); - } - return null; - } - - /** - * @see IdentityProvider_Driver::lookup_user_by_name. - * - * Special processing: if the supplied name is admin then look up the first user - * specified by the "admins" driver params - */ - public function lookup_user_by_name($name) { - $result = ldap_search(self::$_connection, self::$_params["user_domain"], "uid=$name"); - $entries = ldap_get_entries(self::$_connection, $result); - if ($entries["count"] > 0) { - return new Ldap_User($entries[0]); - } - return null; - } - - /** - * @see IdentityProvider_Driver::create_group. - */ - public function create_group($name) { - throw new Exception("@todo INVALID OPERATION"); - } - - /** - * @see IdentityProvider_Driver::everybody. - */ - public function everybody() { - return $this->lookup_group_by_name(self::$_params["everybody_group"]); - } - - /** - * @see IdentityProvider_Driver::registered_users. - */ - public function registered_users() { - return $this->lookup_group_by_name(self::$_params["registered_users_group"]); - } - - /** - * @see IdentityProvider_Driver::lookup_group. - */ - public function lookup_group($id) { - $result = @ldap_search(self::$_connection, self::$_params["group_domain"], "gidNumber=$id"); - $entry_id = ldap_first_entry(self::$_connection, $result); - - if ($entry_id !== false) { - $cn_entry = ldap_get_values(self::$_connection, $entry_id, "cn"); - $gid_number_entry = ldap_get_values(self::$_connection, $entry_id, "gidNumber"); - return new Ldap_Group($gid_number_entry[0], $cn_entry[0]); - } - return null; - } - - /** - * Look up the group by name. - * @param string $name the name of the group to locate - * @return Group_Definition - */ - public function lookup_group_by_name($name) { - $result = @ldap_search(self::$_connection, self::$_params["group_domain"], "cn=$name"); - $entry_id = ldap_first_entry(self::$_connection, $result); - - if ($entry_id !== false) { - $cn_entry = ldap_get_values(self::$_connection, $entry_id, "cn"); - $gid_number_entry = ldap_get_values(self::$_connection, $entry_id, "gidNumber"); - return new Ldap_Group($gid_number_entry[0], $cn_entry[0]); - } - return null; - } - - /** - * @see IdentityProvider_Driver::get_user_list. - */ - public function get_user_list($ids) { - $users = array(); - foreach ($ids as $id) { - $users[] = $this->lookup_user($id); - } - return $users; - } - - /** - * @see IdentityProvider_Driver::groups. - */ - public function groups() { - $groups = array(); - foreach (self::$_params["groups"] as $group_name) { - $groups[] = $this->lookup_group_by_name($group_name); - } - return $groups; - } - - static function groups_for($user) { - if ($user->guest) { - return $user->groups; - } - - $result = ldap_search(self::$_connection, self::$_params["group_domain"], - "(memberUid=$user->name)"); - - $associated_groups = self::$_params["groups"]; - $groups = array(); - for ($entry_id = ldap_first_entry(self::$_connection, $result); - $entry_id != false; - $entry_id = ldap_next_entry(self::$_connection, $entry_id)) { - $group_id = ldap_get_values(self::$_connection, $entry_id, "gidNumber"); - $group_name = ldap_get_values(self::$_connection, $entry_id, "cn"); - if (in_array($group_name[0], $associated_groups)) { - $groups[] = new Ldap_Group($group_id[0], $group_name[0]); - } - } - return $groups; - } - - /** - * @see IdentityProvider_Driver::add_user_to_group. - */ - public function add_user_to_group($user, $group) { - throw new Exception("@todo INVALID OPERATION"); - } - - /** - * @see IdentityProvider_Driver::remove_user_to_group. - */ - public function remove_user_from_group($user, $group) { - throw new Exception("@todo INVALID OPERATION"); - } -} // End Identity Gallery Driver - -class Ldap_User implements User_Definition { - private $ldap_entry; - - public function __construct($ldap_entry=null) { - $this->ldap_entry = $ldap_entry; - } - - public function display_name() { - return $this->ldap_entry["displayname"][0]; - } - - public function __get($key) { - switch($key) { - case "name": - return $this->ldap_entry["uid"][0]; - - case "guest": - return false; - - case "id": - return $this->ldap_entry["uidnumber"][0]; - - case "locale": // @todo - return null; - - case "admin": - return in_array($this->ldap_entry["uid"][0], - IdentityProvider_Ldap_Driver::$_params["admins"]); - - case "email": - return $this->ldap_entry["mail"][0]; - - case "full_name": - return $this->ldap_entry["cn"][0]; - - case "dn": - return $this->ldap_entry["dn"]; - - case "url": // @todo - return null; - - default: - throw new Exception("@todo UNKNOWN_KEY ($key)"); - } - } - - public function groups() { - return IdentityProvider_Ldap_Driver::groups_for($this); - } - - public function avatar_url($size=80, $default=null) { - return sprintf("http://www.gravatar.com/avatar/%s.jpg?s=%d&r=pg%s", - md5($this->email), $size, $default ? "&d=" . urlencode($default) : ""); - } -} - -class Ldap_Group implements Group_Definition { - public $id; - public $name; - - public function __construct($id, $name) { - $this->id = $id; - $this->name = $name; - $this->special = false; - } -} diff --git a/3.1/modules/ldap/module.info b/3.1/modules/ldap/module.info deleted file mode 100644 index 96785139..00000000 --- a/3.1/modules/ldap/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "LDAP" -description = "Use LDAP for authentication" -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:ldap" -discuss_url = "http://gallery.menalto.com/forum_module_ldap" diff --git a/3.1/modules/max_size/helpers/max_size_event.php b/3.1/modules/max_size/helpers/max_size_event.php deleted file mode 100644 index be879e56..00000000 --- a/3.1/modules/max_size/helpers/max_size_event.php +++ /dev/null @@ -1,38 +0,0 @@ -is_photo()) { - list ($width, $height, $mime_type) = photo::get_file_metadata($item->data_file); - if ($width > $max_size || $height > $max_size) { - $tempnam = tempnam(TMPPATH, "size"); - $tmpfile = $tempnam . "." . pathinfo($item->data_file, PATHINFO_EXTENSION); - gallery_graphics::resize( - $item->data_file, $tmpfile, - array("width" => $max_size, "height" => $max_size, "master" => Image::AUTO), - $item); - rename($tmpfile, $item->data_file); - unlink($tempnam); - } - } - } -} \ No newline at end of file diff --git a/3.1/modules/max_size/helpers/max_size_installer.php b/3.1/modules/max_size/helpers/max_size_installer.php deleted file mode 100644 index 1a7f2be9..00000000 --- a/3.1/modules/max_size/helpers/max_size_installer.php +++ /dev/null @@ -1,25 +0,0 @@ -deactivate)) { - site_status::warning( - t("The MetaDescription module requires the Tags module. " . - "Activate the Tags module now", - array("url" => url::site("admin/modules"))), - "metadescription_needs_tag"); - } else { - site_status::clear("metadescription_needs_tag"); - } - } - - static function pre_deactivate($data) { - if ($data->module == "tag") { - $data->messages["warn"][] = t("The MetaDescription module requires the Tags module."); - } - } -} diff --git a/3.1/modules/metadescription/helpers/metadescription_installer.php b/3.1/modules/metadescription/helpers/metadescription_installer.php deleted file mode 100644 index 6609ecd9..00000000 --- a/3.1/modules/metadescription/helpers/metadescription_installer.php +++ /dev/null @@ -1,42 +0,0 @@ -tag()) { - // If the current page belongs to a tag, look up - // the information for that tag. - $tagsItem = ORM::factory("tag") - ->where("id", "=", $theme->tag()->id) - ->find_all(); - - } elseif ($theme->item()) { - // If the current page belongs to an item (album, photo, etc.), - // look up any tags that have been applied to that item. - $tagsItem = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $theme->item->id) - ->find_all(); - - } else { - // If the current page is neighter an item nor tag, do nothing. - return; - } - - // Load the meta tags into the top of the page. - // @todo: metadescription_block.html requires an item so for now, don't render it unless we - // have one. - if ($theme->item() || $theme->tag()) { - $metaView = new View("metadescription_block.html"); - $metaView->tags = $tagsItem; - return $metaView; - } - } -} diff --git a/3.1/modules/metadescription/module.info b/3.1/modules/metadescription/module.info deleted file mode 100644 index 7010a0d1..00000000 --- a/3.1/modules/metadescription/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "MetaDescription" -description = "Automatically generates and inserts KEYWORD and DESCRIPTION meta tags into any theme." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:metadescription" -discuss_url = "http://gallery.menalto.com/node/102477" diff --git a/3.1/modules/metadescription/views/metadescription_block.html.php b/3.1/modules/metadescription/views/metadescription_block.html.php deleted file mode 100644 index 2464b6f1..00000000 --- a/3.1/modules/metadescription/views/metadescription_block.html.php +++ /dev/null @@ -1,45 +0,0 @@ - -item; - $metaTags = ""; - if (count($tags) > 0) { - for ($counter=0; $countername) . ","; - } else { - $metaTags = $metaTags . html::clean($tags[$counter]->name); - } - } - } - - // If $metaTags is empty, use the item's title instead. - if ($metaTags == "") { - $metaTags = html::clean($item->title); - } - - $metaDescription = ""; - $metaDescription = trim(nl2br(html::purify($item->description))); - // If description is empty, use title instead. - if ($metaDescription == "") { - $metaDescription = html::clean($item->title); - } - // If this page belongs to a tag, use the description of the first item instead. - if ($theme->tag()) { - if (count($children) > 0) { - $metaDescription = trim(nl2br(html::purify($children[0]->description))); - } - } - // If it's still empty, use $metaTags. - if ($metaDescription == "") { - $metaDescription = $metaTags; - } - - // Strip HTML - $metaDescription = strip_tags($metaDescription); - // Strip Line Breaks - $metaDescription = str_replace("\n", " ", $metaDescription); - // Limit Description to 150 characters. - $metaDescription = substr($metaDescription, 0,150); -?> - - diff --git a/3.1/modules/minislideshow/controllers/admin_minislideshow.php b/3.1/modules/minislideshow/controllers/admin_minislideshow.php deleted file mode 100644 index f66a495a..00000000 --- a/3.1/modules/minislideshow/controllers/admin_minislideshow.php +++ /dev/null @@ -1,126 +0,0 @@ -content = new View("admin_minislideshow.html"); - $view->content->minislideshow_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Process the admin form. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Save user specified settings to the database. - $str_slideshow_url = Input::instance()->post("slideshow_url"); - module::set_var("minislideshow", "slideshow_url", $str_slideshow_url); - - $str_slideshow_shuffle = Input::instance()->post("shuffle"); - module::set_var("minislideshow", "shuffle", $str_slideshow_shuffle); - - $str_slideshow_dropshadow = Input::instance()->post("dropshadow"); - module::set_var("minislideshow", "dropshadow", $str_slideshow_dropshadow); - - $str_slideshow_show_title = Input::instance()->post("show_title"); - module::set_var("minislideshow", "show_title", $str_slideshow_show_title); - - $str_slideshow_trans_in_type = Input::instance()->post("trans_in_type"); - module::set_var("minislideshow", "trans_in_type", $str_slideshow_trans_in_type); - - $str_slideshow_trans_out_type = Input::instance()->post("trans_out_type"); - module::set_var("minislideshow", "trans_out_type", $str_slideshow_trans_out_type); - - $str_slideshow_mask = Input::instance()->post("mask"); - module::set_var("minislideshow", "mask", $str_slideshow_mask); - - $str_slideshow_use_full_image = Input::instance()->post("use_full_image"); - module::set_var("minislideshow", "use_full_image", $str_slideshow_use_full_image); - - $str_slideshow_delay = Input::instance()->post("delay"); - module::set_var("minislideshow", "delay", $str_slideshow_delay); - - // Display a success message and load the admin screen. - message::success(t("Your Settings Have Been Saved.")); - $view = new Admin_View("admin.html"); - $view->content = new View("admin_minislideshow.html"); - $view->content->minislideshow_form = $this->_get_admin_form(); - print $view; - } - - private function _get_admin_form() { - // Generate a form for configuring the slideshow. - - // Make a new Form. - $form = new Forge("admin/minislideshow/saveprefs", "", "post", - array("id" => "g-mini-slideshow-admin-form")); - - // Get location of slideshow files. - $group_slideshow_files = $form->group("Minislideshow"); - $group_slideshow_files->input("slideshow_url") - ->label(t("URL to your minislideshow.swf")) - ->value(module::get_var("minislideshow", "slideshow_url")); - - // Get additional settings for the slideshow. - $group_slideshow_settings = $form->group("MinislideshowSettings"); - $group_slideshow_settings->label(t("MiniSlide Show Settings")); - $group_slideshow_settings->dropdown('shuffle') - ->label(t("Shuffle:")) - ->options(array('true'=>'True', ''=>'False')) - ->selected(module::get_var("minislideshow", "shuffle")); - $group_slideshow_settings->dropdown('dropshadow') - ->label(t("Drop Shadow:")) - ->options(array('true'=>'True', ''=>'False')) - ->selected(module::get_var("minislideshow", "dropshadow")); - $group_slideshow_settings->dropdown('show_title') - ->label(t("Show Title:")) - ->options(array('top'=>'Top', 'bottom'=>'Bottom', ''=>'False')) - ->selected(module::get_var("minislideshow", "show_title")); - $group_slideshow_settings->dropdown('trans_in_type') - ->label(t("Transition In:")) - ->options(array('Blinds'=>'Blinds', ''=>'Fade', 'Fly'=>'Fly', 'Iris'=>'Iris', 'Photo'=>'Photo', 'PixelDissolve'=>'Pixel Dissolve', 'Rotate'=>'Rotate', 'Squeeze'=>'Squeeze', 'Wipe'=>'Wipe', 'Zoom'=>'Zoom', 'Random'=>'Random')) - ->selected(module::get_var("minislideshow", "trans_in_type")); - $group_slideshow_settings->dropdown('trans_out_type') - ->label(t("Transition Out:")) - ->options(array('Blinds'=>'Blinds', ''=>'Fade', 'Fly'=>'Fly', 'Iris'=>'Iris', 'Photo'=>'Photo', 'PixelDissolve'=>'Pixel Dissolve', 'Rotate'=>'Rotate', 'Squeeze'=>'Squeeze', 'Wipe'=>'Wipe', 'Zoom'=>'Zoom', 'Random'=>'Random')) - ->selected(module::get_var("minislideshow", "trans_out_type")); - $group_slideshow_settings->dropdown('mask') - ->label(t("Mask:")) - ->options(array(''=>'None', 'circleMask'=>'Circle', 'roundedMask'=>'Rounded Corners', 'starMask'=>'Star')) - ->selected(module::get_var("minislideshow", "mask")); - $group_slideshow_settings->dropdown('use_full_image') - ->label(t("Use Full Image:")) - ->options(array('true', 'false', 'Use Resize')) - ->selected(module::get_var("minislideshow", "use_full_image")); - $group_slideshow_settings->input("delay") - ->label(t("Delay:")) - ->value(module::get_var("minislideshow", "delay")); - - // Add a save button to the form. - $form->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } -} diff --git a/3.1/modules/minislideshow/controllers/minislideshow.php b/3.1/modules/minislideshow/controllers/minislideshow.php deleted file mode 100644 index bd52f67f..00000000 --- a/3.1/modules/minislideshow/controllers/minislideshow.php +++ /dev/null @@ -1,70 +0,0 @@ -is_album()) { - $view->item_id = $item->id; - } else { - $view->item_id = $item->parent_id; - $item = ORM::factory("item", $item_id); - } - access::required("view", $item); - - // Generate additional slideshow parameters from database values. - $slideshow_params = ""; - if (module::get_var("minislideshow", "shuffle") != "") { - $slideshow_params = $slideshow_params . "&shuffle=" . module::get_var("minislideshow", "shuffle"); - } - if (module::get_var("minislideshow", "dropshadow") != "") { - $slideshow_params = $slideshow_params . "&showDropShadow=" . module::get_var("minislideshow", "dropshadow"); - } - if (module::get_var("minislideshow", "show_title") != "") { - $slideshow_params = $slideshow_params . "&showTitle=" . module::get_var("minislideshow", "show_title"); - } - if (module::get_var("minislideshow", "trans_in_type") != "") { - $slideshow_params = $slideshow_params . "&transInType=" . module::get_var("minislideshow", "trans_in_type"); - } - if (module::get_var("minislideshow", "trans_out_type") != "") { - $slideshow_params = $slideshow_params . "&transOutType=" . module::get_var("minislideshow", "trans_out_type"); - } - if (module::get_var("minislideshow", "mask") != "") { - $slideshow_params = $slideshow_params . "&" . module::get_var("minislideshow", "mask") . "=true"; - } - if (module::get_var("minislideshow", "use_full_image") != "") { - $slideshow_params = $slideshow_params . "&useFull=true"; - if (module::get_var("minislideshow", "use_full_image") == "2") { - $slideshow_params = $slideshow_params . "&useResizes=true"; - } - } - if (module::get_var("minislideshow", "delay") != "") { - $slideshow_params = $slideshow_params . "&delay=" . module::get_var("minislideshow", "delay"); - } - $view->slideshow_params = $slideshow_params; - - // Display the slideshow. - print $view; - } -} diff --git a/3.1/modules/minislideshow/css/minislideshow_menu.css b/3.1/modules/minislideshow/css/minislideshow_menu.css deleted file mode 100644 index d1f5271f..00000000 --- a/3.1/modules/minislideshow/css/minislideshow_menu.css +++ /dev/null @@ -1,3 +0,0 @@ -#g-view-menu #g-mini-slideshow-link { - background-image: url('../images/ico-view-minislideshow.png'); -} diff --git a/3.1/modules/minislideshow/helpers/minislideshow_event.php b/3.1/modules/minislideshow/helpers/minislideshow_event.php deleted file mode 100644 index e91198e0..00000000 --- a/3.1/modules/minislideshow/helpers/minislideshow_event.php +++ /dev/null @@ -1,73 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("minislideshow") - ->label(t("MiniSlide Show settings")) - ->url(url::site("admin/minislideshow"))); - } - - static function module_change($changes) { - // Display a warning message if the RSS module is not installed. - if (!module::is_active("rss") || in_array("rss", $changes->deactivate)) { - site_status::warning( - t("The MiniSlide Show module requires the RSS module. " . - "Activate the RSS module now", - array("url" => url::site("admin/modules"))), - "minislideshow_needs_rss"); - } else { - site_status::clear("minislideshow_needs_rss"); - } - } - - static function pre_deactivate($data) { - if ($data->module == "rss") { - $data->messages["warn"][] = t("The MiniSlide Show module requires the RSS module."); - } - } - - static function album_menu($menu, $theme) { - // Add an option to access the slideshow from the album view. - if ($theme->item()->children_count(array(array("type", "=", "photo")))) { - $menu - ->append(Menu::factory("link") - ->id("minislideshow") - ->label(t("View MiniSlide Show")) - ->url(url::site("minislideshow/showslideshow/" . $theme->item()->id)) - ->css_class("g-dialog-link") - ->css_id("g-mini-slideshow-link")); - } - } - - static function photo_menu($menu, $theme) { - // Add an option to access the slideshow from the photo view. - $menu - ->append(Menu::factory("link") - ->id("minislideshow") - ->label(t("View MiniSlide Show")) - ->url(url::site("minislideshow/showslideshow/" . $theme->item()->id)) - ->css_class("g-dialog-link") - ->css_id("g-mini-slideshow-link")); - } -} diff --git a/3.1/modules/minislideshow/helpers/minislideshow_theme.php b/3.1/modules/minislideshow/helpers/minislideshow_theme.php deleted file mode 100644 index ee724bcc..00000000 --- a/3.1/modules/minislideshow/helpers/minislideshow_theme.php +++ /dev/null @@ -1,25 +0,0 @@ -css("minislideshow_menu.css"); - } -} diff --git a/3.1/modules/minislideshow/images/ico-view-minislideshow.png b/3.1/modules/minislideshow/images/ico-view-minislideshow.png deleted file mode 100644 index 6293b413..00000000 Binary files a/3.1/modules/minislideshow/images/ico-view-minislideshow.png and /dev/null differ diff --git a/3.1/modules/minislideshow/module.info b/3.1/modules/minislideshow/module.info deleted file mode 100644 index 923b02d5..00000000 --- a/3.1/modules/minislideshow/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "MiniSlide Show" -description = "Display MiniSlide Show on your Gallery." -version = 1 -author_name = "rWatcher" -author_url = "http://codex.gallery2.org/User:RWatcher" -info_url = "http://codex.gallery2.org/Gallery3:Modules:minislideshow" -discuss_url = "http://gallery.menalto.com/node/90362" diff --git a/3.1/modules/minislideshow/views/admin_minislideshow.html.php b/3.1/modules/minislideshow/views/admin_minislideshow.html.php deleted file mode 100644 index 9ee9187b..00000000 --- a/3.1/modules/minislideshow/views/admin_minislideshow.html.php +++ /dev/null @@ -1,5 +0,0 @@ - -
    -

    - -
    diff --git a/3.1/modules/minislideshow/views/minislideshow_dialog.html.php b/3.1/modules/minislideshow/views/minislideshow_dialog.html.php deleted file mode 100644 index 9ae60c0b..00000000 --- a/3.1/modules/minislideshow/views/minislideshow_dialog.html.php +++ /dev/null @@ -1,18 +0,0 @@ - - -

    -
    -" width="485" height="300" - align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" -type="application/x-shockwave-flash" name="minislide" wmode="transparent" - allowFullscreen="true" allowScriptAccess="always" quality="high" -flashvars="xmlUrl="> - - - -
    Embed:" width="485" height="300" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="minislide" wmode="transparent" allowFullscreen="true" allowScriptAccess="always" quality="high" flashvars="xmlUrl=">" readonly>
    -
    diff --git a/3.1/modules/moduleorder/controllers/admin_moduleorder.php b/3.1/modules/moduleorder/controllers/admin_moduleorder.php deleted file mode 100644 index 3eb7fca1..00000000 --- a/3.1/modules/moduleorder/controllers/admin_moduleorder.php +++ /dev/null @@ -1,83 +0,0 @@ -_get_view(); - } - - private function _get_view() { - $view = new Admin_View("admin.html"); - $view->page_title = t("Manage module order"); - $view->content = new View("admin_moduleorder.html"); - $view->content->csrf = access::csrf_token(); - $view->content->available = new View("admin_moduleorder_blocks.html"); - $view->content->active = new View("admin_moduleorder_blocks.html"); - if (module::get_version("gallery") > 31) { - $view->content->available->modules = $this->_get_modules(); - } - return $view; - } - - public function update() { - //Get the ordered list of modules - $modulerawlist = explode("&", trim($_POST['modulelist'], "&")); - - //Make sure that gallery and user modules are first in the list - $current_weight = 2; - $identity_provider = module::get_var("gallery", "identity_provider"); - foreach ($modulerawlist as $row) { - $currentry = explode("=", $row); - $currentry = explode(":", $currentry[1]); - if ($currentry[0] == "gallery") { - $modulelist[0] = $row; - } elseif ($currentry[0] == $identity_provider) { - $modulelist[1] = $row; - } else { - $modulelist[$current_weight] = $row; - $current_weight++; - } - } - ksort($modulelist); - - //Write the correct weight values - $current_weight = 0; - foreach ($modulelist as $row) { - $current_weight++; - $currentry = explode("=", $row); - $currentry = explode(":", $currentry[1]); - db::build() - ->update("modules") - ->set("weight", $current_weight) - ->where("id", "=", $currentry[1]) - ->execute(); - } - - message::success(t("Your settings have been saved.")); - url::redirect("admin/moduleorder"); - print $this->_get_view(); - } - - private function _get_modules() { - $active_blocks = array(); - $available_modules = moduleorder::get_available_site_modules(); - return $available_modules; - } -} - diff --git a/3.1/modules/moduleorder/helpers/moduleorder.php b/3.1/modules/moduleorder/helpers/moduleorder.php deleted file mode 100644 index 570e234b..00000000 --- a/3.1/modules/moduleorder/helpers/moduleorder.php +++ /dev/null @@ -1,32 +0,0 @@ -select("*")->from("modules")->order_by("weight")->execute() as $row) { - $modules["{$row->name}:$row->id"] = $row->name; - } - return $modules; - } -} diff --git a/3.1/modules/moduleorder/helpers/moduleorder_event.php b/3.1/modules/moduleorder/helpers/moduleorder_event.php deleted file mode 100644 index 84773db1..00000000 --- a/3.1/modules/moduleorder/helpers/moduleorder_event.php +++ /dev/null @@ -1,39 +0,0 @@ -= 32 - if (module::get_version("gallery") < 32) { - site_status::warning( - t("The module 'Module Order' requires Gallery core version of 32 or higher."), - "moduleorder_needs_higherversion"); - } else { - site_status::clear("moduleorder_needs_higherversion"); - } - } - - static function admin_menu($menu, $theme) { - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("moduleorder_menu") - ->label(t("Module order")) - ->url(url::site("admin/moduleorder"))); - } -} diff --git a/3.1/modules/moduleorder/helpers/moduleorder_installer.php b/3.1/modules/moduleorder/helpers/moduleorder_installer.php deleted file mode 100644 index 4dd3b928..00000000 --- a/3.1/modules/moduleorder/helpers/moduleorder_installer.php +++ /dev/null @@ -1,38 +0,0 @@ - - 31): ?> - - - -
    -

    - -

    -

    - -

    - -

    - -

    -

    -

    - -

    - -
    -
    -
    -

    -
    -
      - -
    -
    -
    -
    -
    " method="post"> - -
    -
    - Save - -
    diff --git a/3.1/modules/moduleorder/views/admin_moduleorder_blocks.html.php b/3.1/modules/moduleorder/views/admin_moduleorder_blocks.html.php deleted file mode 100644 index b7d9458f..00000000 --- a/3.1/modules/moduleorder/views/admin_moduleorder_blocks.html.php +++ /dev/null @@ -1,10 +0,0 @@ - - - $text): ?> - -name == ""): ?> -
  • - -
  • name ?>
  • - - diff --git a/3.1/modules/moduleupdates/controllers/admin_moduleupdates.php b/3.1/modules/moduleupdates/controllers/admin_moduleupdates.php deleted file mode 100755 index 72ec5112..00000000 --- a/3.1/modules/moduleupdates/controllers/admin_moduleupdates.php +++ /dev/null @@ -1,354 +0,0 @@ - - */ - public function index() { - - //Start execution timer - $bgtime=time(); - - $view = new Admin_View("admin.html"); - $view->page_title = t("Gallery 3 :: Manage Module Updates"); - $view->content = new View("admin_moduleupdates.html"); - $view->content->mu_version = module::get_version("moduleupdates"); - - $refreshCache = false; - - $cache = unserialize(Cache::instance()->get("moduleupdates_cache")); - $cache_updates = unserialize(Cache::instance()->get("moduleupdates_cache_updates")); - - //if someone pressed the button to refresh now - if (request::method() == "post") { - access::verify_csrf(); - $cache = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); - $cache_updates = array("date" => "", "updates" => 0); - $refreshCache = true; - }else if(count($cache) < 1 or $cache_updates['date'] == ""){ - //if there are no items in the cache array or the update date is "" refresh the data - $cache = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); - $cache_updates = array("date" => "", "updates" => 0); - $refreshCache = true; - } - - //Check the ability to access the Gallery3 GitHub - $GitHub = null; - try { - $GitHub = fopen ("http://github.com", "r"); - if ($GitHub != null) { - $GitHub = 'Online'; - }else{ - $GitHub = 'Offline'; - } - } - catch (Exception $e) { - } - //Check the ability to access the Google - $Google = null; - try { - $Google = fopen ("http://google.com", "r"); - if ($Google != null) { - $Google = 'Online'; - }else{ - $Google = 'Offline'; - } - } - catch (Exception $e) { - } - - $update_count = 0; - - if($refreshCache == true){ - foreach (module::available() as $this_module_name => $module_info) { - - $font_color_local = "black"; - $core_version = ''; - $core_server = ''; - $core_dlink = ''; - $font_color_core = "black"; - $contrib_version = ''; - $contrib_server = ''; - $contrib_dlink = ''; - $font_color_contrib = "black"; - $gh_version = ''; - $gh_server = ''; - $gh_dlink = ''; - $font_color_gh = "black"; - - - - $font_color_local = $this->get_local_module_version_color ($module_info->version, $module_info->code_version); - list ($core_version, $core_server) = $this->get_remote_module_version($this_module_name, "CORE"); - $font_color_core = $this->get_module_version_color ($module_info->version, $module_info->code_version, $core_version); - if(!is_numeric($core_version)) { - list ($contrib_version, $contrib_server) = $this->get_remote_module_version($this_module_name, "CONTRIB"); - $font_color_contrib = $this->get_module_version_color ($module_info->version, $module_info->code_version, $contrib_version); - list ($gh_version, $gh_server) = $this->get_remote_module_version($this_module_name, "GH"); - $font_color_gh = $this->get_module_version_color ($module_info->version, $module_info->code_version, $gh_version); - } - - if($font_color_core == "red" or $font_color_contrib == "red" or $font_color_gh == "red"){ - $update_count++; - } - - $module_info->name = "".$module_info->name.""; - - if (is_numeric($core_version)) { - if($core_version > $module_info->version) { - $core_dlink = "http://github.com/gallery/gallery3/tree/master/modules/".$this_module_name; - } - } - - if (is_numeric($contrib_version)) { - if($contrib_version > $module_info->version) { - $contrib_dlink = "http://github.com/gallery/gallery3-contrib/tree/master/". - substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name; - } - } - - if (is_numeric($gh_version)) { - if($gh_version > $module_info->version) { - $this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))); - if($this_gm_repo == "30"){ - $gh_dlink = "http://www.gallerymodules.com/update/".$this_module_name; - } else { - $gh_dlink = "http://www.gallerymodules.com/update".$this_gm_repo."/".$this_module_name; - } - - } - } - - //populate the list fo modules and their data - $cache->$this_module_name = array ("name" => $module_info->name, "locked" => $module_info->locked, - "code_version" => $module_info->code_version, "active" => $module_info->active, - "version" => $module_info->version,"description" => $module_info->description, - "core_version" => $core_version, "core_server" => $core_server, "font_color_core" => $font_color_core, - "contrib_version" => $contrib_version, "contrib_server" => $contrib_server, "font_color_contrib" => $font_color_contrib, - "gh_version" => $gh_version, "gh_server" => $gh_server, "font_color_gh" => $font_color_gh, - "font_color_local" => $font_color_local, "core_dlink" => $core_dlink, "contrib_dlink" => $contrib_dlink, - "gh_dlink" => $gh_dlink); - } - - //Define right now as YYYY.MM.DD HH:MM with the # of updates that are out of date - $cache_updates = array("date" => date("Y.m.d - H:i"), "updates" => $update_count); - - //Write out the new data to cache with a 30 day expiration & 0 for update data so it's always present - Cache::instance()->set("moduleupdates_cache", serialize($cache), array("ModuleUpdates"), 30*86400); - Cache::instance()->set("moduleupdates_cache_updates", serialize($cache_updates), array("ModuleUpdates"), null); - log::success("moduleupdates", t("Completed checking remote GitHub for modules updates.")); - } - - $view->content->vars = $cache; - $view->content->update_time = $cache_updates['date']; - $view->content->csrf = access::csrf_token(); - $view->content->Google = $Google; - $view->content->GitHub = $GitHub; - $view->content->Gallery_Version = substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")); - - //End execution timer - $ExecutionTime = (time()-$bgtime); - if ($ExecutionTime < 1) { - $ExecutionTime = '1'; - }else if ($ExecutionTime <= 30){ - $ExecutionTime = '' . $ExecutionTime . ''; - }else if ($ExecutionTime <= 60){ - $ExecutionTime = '' . $ExecutionTime . ''; - }else{ - $ExecutionTime = '' . $ExecutionTime . ''; - } - - - $view->content->ExecutionTime = $ExecutionTime; - - print $view; - } - - - /** - * - **/ - private function get_module_version_color ($version, $code_version, $remote_version) { - - $font_color = "black"; - - //BLACK - no module version detected - if ($remote_version == "") { - $font_color = "black"; - //BLUE - DNE: Does Not Exist, this module was not found - } else if ($remote_version == "DNE") { - $font_color = "blue"; - //GREEN - Your version is newer than the GitHub - } else if ($remote_version < $code_version or ($version != '' - and $remote_version < $version)) { - $font_color = "green"; - //RED - Your version is older than the GitHub - } else if ($remote_version > $code_version or ($version != '' - and $remote_version > $version)) { - $font_color = "red"; - } - - return $font_color; - } - - - /** - * - **/ - private function get_local_module_version_color ($version, $code_version) { - - $font_color = "black"; - - //PINK - Your installed version is newer than file version - if ($version != '' and $code_version < $version) { - $font_color = "pink"; - //ORANGE - Your file version is newer than the installed version - } else if ($version != '' and $code_version > $version) { - $font_color = "orange"; - } - - return $font_color; - } - - - /** - * Parses the known GitHub repositories for new versions of modules. - * - * Searches the remote GitHub repositories for a module with a like filename to that of the ones - * installed in the running Gallery isntall. Reads the remote modules module.info file to - * gather the version information. Uses the following locations; - * - * http://github.com/gallery/gallery3 - * http://github.com/gallery/gallery3-contrib - * http://www.gallerymodules.com - * - * @author brentil - * @param String - The folder name of the module to search for on the remote GitHub server - * @param String - The remote server to check against - * @return Array - An array with the remote module version and the server it was found on. - */ - private function get_remote_module_version ($module_name, $server_location) { - - $version = ''; - $server = ''; - $file = null; - - switch ($server_location) { - case "CONTRIB": - //Check the Gallery3 Community Contributions GitHub - if ($file == null) { - try { - $thisInstalledVersion = gallery::VERSION; - //Gallery versions prior to 3.0.2 contained the codename in the version string - if (substr_count($thisInstalledVersion, ' ') > 0 ){ - $thisInstalledVersion = substr_replace($thisInstalledVersion,"",strpos($thisInstalledVersion," ")); - } - //Truncate the minor version number - if (substr_count($thisInstalledVersion, '.') > 1 ){ - $thisInstalledVersion = substr_replace($thisInstalledVersion,"",strripos($thisInstalledVersion,".")); - } - $file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/". - $thisInstalledVersion ."/modules/".$module_name."/module.info", "r"); - - if ($file != null) { - $server = '(GCC)'; - } - } - catch (Exception $e) { - //echo 'Message: ' .$e->getMessage() . '
    '; - } - } - break; - case "CORE": - //Check the main Gallery3 GitHub - if ($file == null) { - try { - $file = fopen ("http://github.com/gallery/gallery3/raw/master/modules/".$module_name."/module.info", "r"); - if ($file != null) { - $server = '(G)'; - } - } - catch (Exception $e) { - } - } - break; - case "GH": - //Check GalleryModules.com - if ($file == null) { - try { - $this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))); - if($this_gm_repo == "30"){ - $file = fopen ("http://www.gallerymodules.com/m/".$module_name, "r"); - } else { - $file = fopen ("http://www.gallerymodules.com/".$this_gm_repo."m/".$module_name, "r"); - } - if ($file != null) { - $server = '(GH)'; - } - } - catch (Exception $e) { - } - } - break; - } - - if ($file != null) { - while (!feof ($file)) { - $line = fgets ($file, 1024); - if ($server_location == "GH"){ - //GH stores only the version info - if($line == "Not entered" or $line == "See git") { - $line = ""; - } - if (substr_count($line, '.') > 0) { - $line = str_replace('.','',$line); - } - $version = $line; - break; - } else { - //Regular expression to find & gather the version number in the remote module.info file - if (preg_match ("@version = (.*)@i", $line, $out)) { - $version = $out[1]; - break; - } - } - } - fclose ($file); - } - - return array ($version, $server); - } -} \ No newline at end of file diff --git a/3.1/modules/moduleupdates/helpers/moduleupdates_event.php b/3.1/modules/moduleupdates/helpers/moduleupdates_event.php deleted file mode 100644 index ebafb880..00000000 --- a/3.1/modules/moduleupdates/helpers/moduleupdates_event.php +++ /dev/null @@ -1,30 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("moduleupdates_menu") - ->label(t("Module Updates")) - ->url(url::site("admin/moduleupdates"))); - } -} \ No newline at end of file diff --git a/3.1/modules/moduleupdates/helpers/moduleupdates_installer.php b/3.1/modules/moduleupdates/helpers/moduleupdates_installer.php deleted file mode 100644 index 85f90489..00000000 --- a/3.1/modules/moduleupdates/helpers/moduleupdates_installer.php +++ /dev/null @@ -1,51 +0,0 @@ -delete("ModuleUpdates"); - //create the blank ModuleUpdates cache entry with an expiration of 0 days - Cache::instance()->set("moduleupdates_cache", "", array("ModuleUpdates"), null); - Cache::instance()->set("moduleupdates_cache_updates", "", array("ModuleUpdates"), null); - } - } - - static function upgrade($version) { - module::set_version("moduleupdates", 8); - //Remove the ModuleUpdates cache entry 'JIC' - Cache::instance()->delete("ModuleUpdates"); - //Empty the ModuleUpdates cache entry so our new version starts from scratch - Cache::instance()->set("moduleupdates_cache", "", array("ModuleUpdates"), null); - Cache::instance()->set("moduleupdates_cache_updates", "", array("ModuleUpdates"), null); - } - - static function uninstall() { - - //Remove the ModuleUpdates cache entry as we remove the module - Cache::instance()->delete("ModuleUpdates"); - module::delete("moduleupdates"); - } -} \ No newline at end of file diff --git a/3.1/modules/moduleupdates/module.info b/3.1/modules/moduleupdates/module.info deleted file mode 100755 index 7c73c340..00000000 --- a/3.1/modules/moduleupdates/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "ModuleUpdates" -description = "Compares your installed module version against the ones stored in the GitHub." -version = 8 -author_name = "brentil" -author_url = "http://gallery.menalto.com/user/153736" -info_url = "http://codex.gallery2.org/Gallery3:Modules:moduleupdates" -discuss_url = "http://gallery.menalto.com/node/96574" diff --git a/3.1/modules/moduleupdates/views/admin_moduleupdates.html.php b/3.1/modules/moduleupdates/views/admin_moduleupdates.html.php deleted file mode 100644 index 18ff31ed..00000000 --- a/3.1/modules/moduleupdates/views/admin_moduleupdates.html.php +++ /dev/null @@ -1,74 +0,0 @@ - - - -
    -

    - - -
    - -
    " id="g-configure-moduleupdates-form"> - -
    - ModuleUpdates Information -
      -
    • Red = Your version is older than the GitHub
      ") ?>
    • -
    • Green = Your version is newer than the GitHub
      ") ?>
    • -
    • Orange = Your file version is newer than the installed version
      ") ?>
    • -
    • Pink = Your installed version is newer than file version
      ") ?>
    • -
    • ") ?>
    • -
    • " class="submit" />
    • -
    -
    -
    - -
    -
      -
    • -
    -
    - Core Modules - - - - - - - - - - "> - - - - - - - -
    Installed") ?>
    "; ?> *"; } ?> "; } ?> "; ?> *"; } ?> $module_name['code_version']) { echo "".$module_name['core_version']."";} else { echo $module_name['core_version']; } ?> "; } ?>
    -
    -
    - Community Contributed Modules - - - - - - - - - - - "> - - - - - - - - -
    Installed") ?>
    "; ?> *"; } ?> "; } ?> "; ?> *"; } ?> $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "".$module_name['contrib_version']."";} else { echo $module_name['contrib_version']; } ?> "; } ?> "; ?> *"; } ?> $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "".$module_name['gh_version']."";} else { echo $module_name['gh_version']; } ?> "; } ?>
    -
    -
    -
    \ No newline at end of file diff --git a/3.1/modules/navcarousel/controllers/admin_navcarousel.php b/3.1/modules/navcarousel/controllers/admin_navcarousel.php deleted file mode 100644 index 5d9dff60..00000000 --- a/3.1/modules/navcarousel/controllers/admin_navcarousel.php +++ /dev/null @@ -1,134 +0,0 @@ -_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - $scrollsize = intval($form->navcarousel->scrollsize->value); - $showelements = intval($form->navcarousel->showelements->value); - $carouselwidth = intval($form->navcarousel->carouselwidth->value); - $thumbsize = intval($form->thumbsettings->thumbsize->value); - if ($showelements < 1) { - $showelements = 1; - message::error(t("You must show at least one item.")); - } - if ($scrollsize < 1) { - $scrollsize = 1; - message::error(t("You must scroll by at least one item.")); - } - if ($thumbsize > 150 || $thumbsize < 25) { - $thumbsize = 50; - message::error(t("The size of the thumbnails must be between 25 and 150 pixel.")); - } - if ($carouselwidth < ($thumbsize + 75) && $carouselwidth > 0) { - $carouselwidth = $thumbsize + 75; - message::error(t("The carousel must be at least %pixel wide.", array("pixel" => $carouselwidth))); - } - if ($carouselwidth > 0) { - if ($carouselwidth < ((($thumbsize + 11) * $showelements) + 64)) { - $showelements = ($carouselwidth - 64) / ($thumbsize + 11); - $showelements = intval(floor($showelements)); - message::error(t("With the selected carousel width and thumbnail size you can show a maximum of %itemno items.", array("itemno" => $showelements))); - } - } else { - message::warning(t("The maximum number of displayable items cannot be calculated when the carousel width is set to 0.")); - } - if ($scrollsize > $showelements) { - $scrollsize = $showelements; - message::error(t("The number of items to scroll must not exceed the number of items to show.")); - } - module::set_var( - "navcarousel", "scrollsize", $scrollsize); - module::set_var( - "navcarousel", "showelements", $showelements); - module::set_var( - "navcarousel", "carouselwidth", $carouselwidth); - module::set_var( - "navcarousel", "thumbsize", $thumbsize); - module::set_var( - "navcarousel", "abovephoto", $form->navcarousel->abovephoto->value, true); - module::set_var( - "navcarousel", "noajax", $form->navcarousel->noajax->value, true); - module::set_var( - "navcarousel", "showondomready", $form->navcarousel->showondomready->value, true); - module::set_var( - "navcarousel", "maintainaspect", $form->thumbsettings->maintainaspect->value, true); - module::set_var( - "navcarousel", "nomouseover", $form->thumbsettings->nomouseover->value, true); - module::set_var( - "navcarousel", "noresize", $form->thumbsettings->noresize->value, true); - - message::success(t("Your settings have been saved.")); - url::redirect("admin/navcarousel"); - } - print $this->_get_view($form); - } - - private function _get_view($form=null) { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_navcarousel.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - $form = new Forge("admin/navcarousel/handler", "", "post", array("id" => "g-admin-form")); - - $group = $form->group("navcarousel")->label(t("Navigation carousel settings")); - $group->input("scrollsize")->label(t('Enter how many items you want to scroll when clicking next or previous')) - ->value(module::get_var("navcarousel", "scrollsize", "7")) - ->rules("valid_numeric|length[1,2]"); - $group->input("showelements")->label(t('Enter how many items you want to be visible')) - ->value(module::get_var("navcarousel", "showelements", "7")) - ->rules("valid_numeric|length[1,2]"); - $group->input("carouselwidth")->label(t('Carousel width (in pixel). If set to 0 the carousel will use the full available width.')) - ->value(module::get_var("navcarousel", "carouselwidth", "600")) - ->rules("valid_numeric|length[1,3]"); - $group->checkbox("abovephoto")->label(t("Show carousel above photo")) - ->checked(module::get_var("navcarousel", "abovephoto", false)); - $group->checkbox("noajax")->label(t("Disable dynamic loading of thumbnails (might be slow for big albums)")) - ->checked(module::get_var("navcarousel", "noajax", false)); - $group->checkbox("showondomready")->label(t("Show carousel before all items are loaded (faster loading on large albums but might cause too early display on Chrome and Opera)")) - ->checked(module::get_var("navcarousel", "showondomready", false)); - - $group = $form->group("thumbsettings")->label(t("Change how thumnails are displayed")); - $group->input("thumbsize")->label(t('Thumbnail size (in pixel)')) - ->value(module::get_var("navcarousel", "thumbsize", "50")) - ->rules("valid_numeric|length[1,3]"); - $group->checkbox("nomouseover")->label(t("Do not show item title and number on mouse over")) - ->checked(module::get_var("navcarousel", "nomouseover", false)); - $group->checkbox("noresize")->label(t("Crop thumbails instead of resizing them.")) - ->onClick("changeaspectstate()") - ->id("noresize") - ->checked(module::get_var("navcarousel", "noresize", false)); - $group->checkbox("maintainaspect")->label(t("Maintain aspect ratio of the items for the thumbnails.")) - ->id("maintainaspect") - ->checked(module::get_var("navcarousel", "maintainaspect", false)); - - $form->submit("submit")->value(t("Save")); - return $form; - } -} diff --git a/3.1/modules/navcarousel/controllers/navcarousel.php b/3.1/modules/navcarousel/controllers/navcarousel.php deleted file mode 100644 index 3b5401a7..00000000 --- a/3.1/modules/navcarousel/controllers/navcarousel.php +++ /dev/null @@ -1,62 +0,0 @@ -parent(); - $item_count = -1; - - // Array indexes are 0-based, jCarousel positions are 1-based. - $first = max(0, intval($_GET['first']) - 1); - $last = max($first + 1, intval($_GET['last']) - 1); - - $length = $last - $first + 1; - - // Build the array with the thumbnail URLs - foreach ($parent->viewable()->children() as $photo) { - if (!$photo->is_album()) { - $item_count++; - $itemlist[$item_count] = $photo->thumb_url(); - } - } - - $total = count($itemlist); - $selected = array_slice($itemlist, $first, $length); - - // --- - - header('Content-Type: text/xml'); - - echo ''; - - // Return total number of images so the callback - // can set the size of the carousel. - echo ' ' . $total . ''; - - foreach ($selected as $img) { - echo ' ' . $img . ''; - } - - echo ''; - - } -} diff --git a/3.1/modules/navcarousel/css/credits.txt b/3.1/modules/navcarousel/css/credits.txt deleted file mode 100644 index e5ec8c29..00000000 --- a/3.1/modules/navcarousel/css/credits.txt +++ /dev/null @@ -1 +0,0 @@ -Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/3.1/modules/navcarousel/css/skin.css b/3.1/modules/navcarousel/css/skin.css deleted file mode 100644 index 695779f0..00000000 --- a/3.1/modules/navcarousel/css/skin.css +++ /dev/null @@ -1,122 +0,0 @@ -.jcarousel-skin-tango .jcarousel-container { - -moz-border-radius: 10px; - background: transparent; - border: 0; -} - -.jcarousel-skin-tango .jcarousel-container-horizontal { - padding: 0 60px; - margin: 0 auto; -} - -.jcarousel-skin-tango .jcarousel-item { - background-color: transparent !important; -} - -.jcarousel-skin-tango .jcarousel-item-horizontal { - margin-right: 2px; - margin-right: 2px; - padding-top: 2px; - text-align: center; -} - -.jcarousel-skin-tango .jcarousel-item-placeholder { - background: #fff; - color: #000; -} - -/** - * Horizontal Buttons - */ -.jcarousel-skin-tango .jcarousel-next-horizontal { - position: absolute; - right: 18px; - width: 32px; - height: 32px; - cursor: pointer; - background: transparent url('../images/next-horizontal.png') no-repeat 0 0; - visibility: hidden; -} - -.jcarousel-skin-tango .jcarousel-next-horizontal:hover { - background-position: -32px 0; -} - -.jcarousel-skin-tango .jcarousel-next-horizontal:active { - background-position: -64px 0; -} - -.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, -.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, -.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { - cursor: default; - background-position: -96px 0; -} - -.jcarousel-skin-tango .jcarousel-prev-horizontal { - position: absolute; - left: 18px; - width: 32px; - height: 32px; - cursor: pointer; - background: transparent url('../images/prev-horizontal.png') no-repeat 0 0; - visibility: hidden; -} - -.jcarousel-skin-tango .jcarousel-prev-horizontal:hover { - background-position: -32px 0; -} - -.jcarousel-skin-tango .jcarousel-prev-horizontal:active { - background-position: -64px 0; -} - -.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, -.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, -.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { - cursor: default; - background-position: -96px 0; -} - -.carousel-thumbnail { - padding: 5px; - margin: 0 !important; -} - -.carousel-thumbnail:hover { - box-shadow: 1px 0px 8px #d7e1fa; - -moz-box-shadow: 1px 0px 8px #d7e1fa; - -webkit-box-shadow: 1px 0px 8px #d7e1fa; -} - -.carousel-current { - box-shadow: 1px 0px 8px #d7e1fa; - -moz-box-shadow: 1px 0px 8px #d7e1fa; - -webkit-box-shadow: 1px 0px 8px #d7e1fa; - padding: 5px; - margin: 0 !important; -} - -#navcarousel-wrapper { - width: 100%; - background: url('../images/ajax-loader.gif') no-repeat center center; -} - -#navcarousel { - visibility: hidden; -} - -/** - * RTL Support - */ - -.jcarousel-skin-tango .jcarousel-direction-rtl {direction:rtl;} -.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal{ margin-right:0; margin-left:10px;} - -/*horizontal buttons*/ -.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal{ - background-image:url('../images/prev-horizontal.png'); right:auto; left:5px; -} -.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal{ - background-image:url('../images/next-horizontal.png'); left:auto; right:5px; -} diff --git a/3.1/modules/navcarousel/helpers/navcarousel_theme.php b/3.1/modules/navcarousel/helpers/navcarousel_theme.php deleted file mode 100644 index f21ac1cf..00000000 --- a/3.1/modules/navcarousel/helpers/navcarousel_theme.php +++ /dev/null @@ -1,127 +0,0 @@ -page_type == "item") { - if (locales::is_rtl()) { - $rtl_support = "rtl: true,\n"; - } else { - $rtl_support = "rtl: false,\n"; - } - $carouselwidth = module::get_var("navcarousel", "carouselwidth", "600"); - if ($carouselwidth == 0) { - $carouselwidth = "100%"; - $containerwidth = ""; - } else { - $carouselwidth = $carouselwidth ."px"; - $containerwidth = ".jcarousel-skin-tango .jcarousel-container-horizontal {\n - width: ". $carouselwidth .";\n - }\n"; - } - $thumbsize = module::get_var("navcarousel", "thumbsize", "50"); - $showelements = module::get_var("navcarousel", "showelements", "7"); - $childcount = $theme->item->parent()->viewable()->children_count(); - $itemoffset = intval(floor($showelements / 2)); - if ($childcount <= $showelements) { - $itemoffset = 1; - } else { - $itempos = $theme->item->parent()->get_position($theme->item); - $itemoffset = $itempos - $itemoffset; - if ($itemoffset < 1) { - $itemoffset = 1; - } - if (($itemoffset + $showelements) > $childcount) { - $itemoffset = $childcount - $showelements + 1; - } - } - if (module::get_var("navcarousel", "noajax", false)) { - $ajaxhandler = ""; - } else { - $ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n"; - } - if (module::get_var("navcarousel", "showondomready", false)) { - $onwinload = ""; - } else { - $onwinload = "});\n - $(window).load(function () {\n"; - } - return - $theme->script("jquery.jcarousel.min.js") - . $theme->css("skin.css") - . "\n - \n - \n - "; - } - } - - static function photo_bottom($theme) { - if (!module::get_var("navcarousel", "abovephoto", false)) { - if ($theme->page_type == "item") { - return new View("navcarousel.html"); - } - } - } - - static function photo_top($theme) { - if (module::get_var("navcarousel", "abovephoto", false)) { - if ($theme->page_type == "item") { - return new View("navcarousel.html"); - } - } - } -} diff --git a/3.1/modules/navcarousel/images/ajax-loader.gif b/3.1/modules/navcarousel/images/ajax-loader.gif deleted file mode 100644 index 3288d103..00000000 Binary files a/3.1/modules/navcarousel/images/ajax-loader.gif and /dev/null differ diff --git a/3.1/modules/navcarousel/images/next-horizontal.png b/3.1/modules/navcarousel/images/next-horizontal.png deleted file mode 100644 index c9943fda..00000000 Binary files a/3.1/modules/navcarousel/images/next-horizontal.png and /dev/null differ diff --git a/3.1/modules/navcarousel/images/prev-horizontal.png b/3.1/modules/navcarousel/images/prev-horizontal.png deleted file mode 100644 index e963d28e..00000000 Binary files a/3.1/modules/navcarousel/images/prev-horizontal.png and /dev/null differ diff --git a/3.1/modules/navcarousel/js/jquery.jcarousel.js b/3.1/modules/navcarousel/js/jquery.jcarousel.js deleted file mode 100644 index 90f2459e..00000000 --- a/3.1/modules/navcarousel/js/jquery.jcarousel.js +++ /dev/null @@ -1,917 +0,0 @@ -/*! - * jCarousel - Riding carousels with jQuery - * http://sorgalla.com/jcarousel/ - * - * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * Built on top of the jQuery library - * http://jquery.com - * - * Inspired by the "Carousel Component" by Bill Scott - * http://billwscott.com/carousel/ - */ - -(function($) { - /** - * Creates a carousel for all matched elements. - * - * @example $("#mycarousel").jcarousel(); - * @before
    • First item
    • Second item
    - * @result - * - *
    - *
    - *
    - *
      - *
    • First item
    • - *
    • Second item
    • - *
    - *
    - *
    - *
    - *
    - *
    - * - * @method jcarousel - * @return jQuery - * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance. - */ - $.fn.jcarousel = function(o) { - if (typeof o == 'string') { - var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); - return instance[o].apply(instance, args); - } else - return this.each(function() { - $(this).data('jcarousel', new $jc(this, o)); - }); - }; - - // Default configuration properties. - var defaults = { - vertical: false, - rtl: false, - start: 1, - offset: 1, - size: null, - scroll: 3, - visible: null, - animation: 'normal', - easing: 'swing', - auto: 0, - wrap: null, - initCallback: null, - reloadCallback: null, - itemLoadCallback: null, - itemFirstInCallback: null, - itemFirstOutCallback: null, - itemLastInCallback: null, - itemLastOutCallback: null, - itemVisibleInCallback: null, - itemVisibleOutCallback: null, - buttonNextHTML: '
    ', - buttonPrevHTML: '
    ', - buttonNextEvent: 'click', - buttonPrevEvent: 'click', - buttonNextCallback: null, - buttonPrevCallback: null, - itemFallbackDimension: null - }, windowLoaded = false; - - $(window).bind('load.jcarousel', function() { windowLoaded = true; }) - - /** - * The jCarousel object. - * - * @constructor - * @class jcarousel - * @param e {HTMLElement} The element to create the carousel for. - * @param o {Object} A set of key/value pairs to set as configuration properties. - * @cat Plugins/jCarousel - */ - $.jcarousel = function(e, o) { - this.options = $.extend({}, defaults, o || {}); - - this.locked = false; - - this.container = null; - this.clip = null; - this.list = null; - this.buttonNext = null; - this.buttonPrev = null; - - // Only set if not explicitly passed as option - if (!o || o.rtl === undefined) - this.options.rtl = ($(e).attr('dir') || $('html').attr('dir') || '').toLowerCase() == 'rtl'; - - this.wh = !this.options.vertical ? 'width' : 'height'; - this.lt = !this.options.vertical ? (this.options.rtl ? 'right' : 'left') : 'top'; - - // Extract skin class - var skin = '', split = e.className.split(' '); - - for (var i = 0; i < split.length; i++) { - if (split[i].indexOf('jcarousel-skin') != -1) { - $(e).removeClass(split[i]); - skin = split[i]; - break; - } - } - - if (e.nodeName.toUpperCase() == 'UL' || e.nodeName.toUpperCase() == 'OL') { - this.list = $(e); - this.container = this.list.parent(); - - if (this.container.hasClass('jcarousel-clip')) { - if (!this.container.parent().hasClass('jcarousel-container')) - this.container = this.container.wrap('
    '); - - this.container = this.container.parent(); - } else if (!this.container.hasClass('jcarousel-container')) - this.container = this.list.wrap('
    ').parent(); - } else { - this.container = $(e); - this.list = this.container.find('ul,ol').eq(0); - } - - if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) - this.container.wrap('
    '); - - this.clip = this.list.parent(); - - if (!this.clip.length || !this.clip.hasClass('jcarousel-clip')) - this.clip = this.list.wrap('
    ').parent(); - - this.buttonNext = $('.jcarousel-next', this.container); - - if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) - this.buttonNext = this.clip.after(this.options.buttonNextHTML).next(); - - this.buttonNext.addClass(this.className('jcarousel-next')); - - this.buttonPrev = $('.jcarousel-prev', this.container); - - if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) - this.buttonPrev = this.clip.after(this.options.buttonPrevHTML).next(); - - this.buttonPrev.addClass(this.className('jcarousel-prev')); - - this.clip.addClass(this.className('jcarousel-clip')).css({ - overflow: 'hidden', - position: 'relative' - }); - this.list.addClass(this.className('jcarousel-list')).css({ - overflow: 'hidden', - position: 'relative', - top: 0, - margin: 0, - padding: 0 - }).css((this.options.rtl ? 'right' : 'left'), 0); - this.container.addClass(this.className('jcarousel-container')).css({ - position: 'relative' - }); - if (!this.options.vertical && this.options.rtl) - this.container.addClass('jcarousel-direction-rtl').attr('dir', 'rtl'); - - var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; - var li = this.list.children('li'); - - var self = this; - - if (li.size() > 0) { - var wh = 0, i = this.options.offset; - li.each(function() { - self.format(this, i++); - wh += self.dimension(this, di); - }); - - this.list.css(this.wh, (wh + 100) + 'px'); - - // Only set if not explicitly passed as option - if (!o || o.size === undefined) - this.options.size = li.size(); - } - - // For whatever reason, .show() does not work in Safari... - this.container.css('display', 'block'); - this.buttonNext.css('display', 'block'); - this.buttonPrev.css('display', 'block'); - - this.funcNext = function() { self.next(); }; - this.funcPrev = function() { self.prev(); }; - this.funcResize = function() { self.reload(); }; - - if (this.options.initCallback != null) - this.options.initCallback(this, 'init'); - - if (!windowLoaded && $.browser.safari) { - this.buttons(false, false); - $(window).bind('load.jcarousel', function() { self.setup(); }); - } else - this.setup(); - }; - - // Create shortcut for internal use - var $jc = $.jcarousel; - - $jc.fn = $jc.prototype = { - jcarousel: '0.2.5' - }; - - $jc.fn.extend = $jc.extend = $.extend; - - $jc.fn.extend({ - /** - * Setups the carousel. - * - * @method setup - * @return undefined - */ - setup: function() { - this.first = null; - this.last = null; - this.prevFirst = null; - this.prevLast = null; - this.animating = false; - this.timer = null; - this.tail = null; - this.inTail = false; - - if (this.locked) - return; - - this.list.css(this.lt, this.pos(this.options.offset) + 'px'); - var p = this.pos(this.options.start); - this.prevFirst = this.prevLast = null; - this.animate(p, false); - - $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); - }, - - /** - * Clears the list and resets the carousel. - * - * @method reset - * @return undefined - */ - reset: function() { - this.list.empty(); - - this.list.css(this.lt, '0px'); - this.list.css(this.wh, '10px'); - - if (this.options.initCallback != null) - this.options.initCallback(this, 'reset'); - - this.setup(); - }, - - /** - * Reloads the carousel and adjusts positions. - * - * @method reload - * @return undefined - */ - reload: function() { - if (this.tail != null && this.inTail) - this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); - - this.tail = null; - this.inTail = false; - - if (this.options.reloadCallback != null) - this.options.reloadCallback(this); - - if (this.options.visible != null) { - var self = this; - var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; - this.list.children('li').each(function(i) { - wh += self.dimension(this, di); - if (i + 1 < self.first) - lt = wh; - }); - - this.list.css(this.wh, wh + 'px'); - this.list.css(this.lt, -lt + 'px'); - } - - this.scroll(this.first, false); - }, - - /** - * Locks the carousel. - * - * @method lock - * @return undefined - */ - lock: function() { - this.locked = true; - this.buttons(); - }, - - /** - * Unlocks the carousel. - * - * @method unlock - * @return undefined - */ - unlock: function() { - this.locked = false; - this.buttons(); - }, - - /** - * Sets the size of the carousel. - * - * @method size - * @return undefined - * @param s {Number} The size of the carousel. - */ - size: function(s) { - if (s != undefined) { - this.options.size = s; - if (!this.locked) - this.buttons(); - } - - return this.options.size; - }, - - /** - * Checks whether a list element exists for the given index (or index range). - * - * @method get - * @return bool - * @param i {Number} The index of the (first) element. - * @param i2 {Number} The index of the last element. - */ - has: function(i, i2) { - if (i2 == undefined || !i2) - i2 = i; - - if (this.options.size !== null && i2 > this.options.size) - i2 = this.options.size; - - for (var j = i; j <= i2; j++) { - var e = this.get(j); - if (!e.length || e.hasClass('jcarousel-item-placeholder')) - return false; - } - - return true; - }, - - /** - * Returns a jQuery object with list element for the given index. - * - * @method get - * @return jQuery - * @param i {Number} The index of the element. - */ - get: function(i) { - return $('.jcarousel-item-' + i, this.list); - }, - - /** - * Adds an element for the given index to the list. - * If the element already exists, it updates the inner html. - * Returns the created element as jQuery object. - * - * @method add - * @return jQuery - * @param i {Number} The index of the element. - * @param s {String} The innerHTML of the element. - */ - add: function(i, s) { - var e = this.get(i), old = 0, n = $(s); - - if (e.length == 0) { - var c, e = this.create(i), j = $jc.intval(i); - while (c = this.get(--j)) { - if (j <= 0 || c.length) { - j <= 0 ? this.list.prepend(e) : c.after(e); - break; - } - } - } else - old = this.dimension(e); - - if (n.get(0).nodeName.toUpperCase() == 'LI') { - e.replaceWith(n); - e = n; - } else - e.empty().append(s); - - this.format(e.removeClass(this.className('jcarousel-item-placeholder')), i); - - var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; - var wh = this.dimension(e, di) - old; - - if (i > 0 && i < this.first) - this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); - - this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); - - return e; - }, - - /** - * Removes an element for the given index from the list. - * - * @method remove - * @return undefined - * @param i {Number} The index of the element. - */ - remove: function(i) { - var e = this.get(i); - - // Check if item exists and is not currently visible - if (!e.length || (i >= this.first && i <= this.last)) - return; - - var d = this.dimension(e); - - if (i < this.first) - this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); - - e.remove(); - - this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); - }, - - /** - * Moves the carousel forwards. - * - * @method next - * @return undefined - */ - next: function() { - this.stopAuto(); - - if (this.tail != null && !this.inTail) - this.scrollTail(false); - else - this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll); - }, - - /** - * Moves the carousel backwards. - * - * @method prev - * @return undefined - */ - prev: function() { - this.stopAuto(); - - if (this.tail != null && this.inTail) - this.scrollTail(true); - else - this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll); - }, - - /** - * Scrolls the tail of the carousel. - * - * @method scrollTail - * @return undefined - * @param b {Boolean} Whether scroll the tail back or forward. - */ - scrollTail: function(b) { - if (this.locked || this.animating || !this.tail) - return; - - var pos = $jc.intval(this.list.css(this.lt)); - - !b ? pos -= this.tail : pos += this.tail; - this.inTail = !b; - - // Save for callbacks - this.prevFirst = this.first; - this.prevLast = this.last; - - this.animate(pos); - }, - - /** - * Scrolls the carousel to a certain position. - * - * @method scroll - * @return undefined - * @param i {Number} The index of the element to scoll to. - * @param a {Boolean} Flag indicating whether to perform animation. - */ - scroll: function(i, a) { - if (this.locked || this.animating) - return; - - this.animate(this.pos(i), a); - }, - - /** - * Prepares the carousel and return the position for a certian index. - * - * @method pos - * @return {Number} - * @param i {Number} The index of the element to scoll to. - */ - pos: function(i) { - var pos = $jc.intval(this.list.css(this.lt)); - - if (this.locked || this.animating) - return pos; - - if (this.options.wrap != 'circular') - i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); - - var back = this.first > i; - - // Create placeholders, new list width/height - // and new list position - var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; - var c = back ? this.get(f) : this.get(this.last); - var j = back ? f : f - 1; - var e = null, l = 0, p = false, d = 0, g; - - while (back ? --j >= i : ++j < i) { - e = this.get(j); - p = !e.length; - if (e.length == 0) { - e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); - c[back ? 'before' : 'after' ](e); - - if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { - g = this.get(this.index(j)); - if (g.length) - e = this.add(j, g.clone(true)); - } - } - - c = e; - d = this.dimension(e); - - if (p) - l += d; - - if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size)))) - pos = back ? pos + d : pos - d; - } - - // Calculate visible items - var clipping = this.clipping(); - var cache = []; - var visible = 0, j = i, v = 0; - var c = this.get(i - 1); - - while (++visible) { - e = this.get(j); - p = !e.length; - if (e.length == 0) { - e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); - // This should only happen on a next scroll - c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e); - - if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { - g = this.get(this.index(j)); - if (g.length) - e = this.add(j, g.clone(true)); - } - } - - c = e; - var d = this.dimension(e); - if (d == 0) { - throw new Error('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); - } - - if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) - cache.push(e); - else if (p) - l += d; - - v += d; - - if (v >= clipping) - break; - - j++; - } - - // Remove out-of-range placeholders - for (var x = 0; x < cache.length; x++) - cache[x].remove(); - - // Resize list - if (l > 0) { - this.list.css(this.wh, this.dimension(this.list) + l + 'px'); - - if (back) { - pos -= l; - this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); - } - } - - // Calculate first and last item - var last = i + visible - 1; - if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) - last = this.options.size; - - if (j > last) { - visible = 0, j = last, v = 0; - while (++visible) { - var e = this.get(j--); - if (!e.length) - break; - v += this.dimension(e); - if (v >= clipping) - break; - } - } - - var first = last - visible + 1; - if (this.options.wrap != 'circular' && first < 1) - first = 1; - - if (this.inTail && back) { - pos += this.tail; - this.inTail = false; - } - - this.tail = null; - if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { - var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom'); - if ((v - m) > clipping) - this.tail = v - clipping - m; - } - - // Adjust position - while (i-- > first) - pos += this.dimension(this.get(i)); - - // Save visible item range - this.prevFirst = this.first; - this.prevLast = this.last; - this.first = first; - this.last = last; - - return pos; - }, - - /** - * Animates the carousel to a certain position. - * - * @method animate - * @return undefined - * @param p {Number} Position to scroll to. - * @param a {Boolean} Flag indicating whether to perform animation. - */ - animate: function(p, a) { - if (this.locked || this.animating) - return; - - this.animating = true; - - var self = this; - var scrolled = function() { - self.animating = false; - - if (p == 0) - self.list.css(self.lt, 0); - - if (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size) - self.startAuto(); - - self.buttons(); - self.notify('onAfterAnimation'); - - // This function removes items which are appended automatically for circulation. - // This prevents the list from growing infinitely. - if (self.options.wrap == 'circular' && self.options.size !== null) - for (var i = self.prevFirst; i <= self.prevLast; i++) - if (i !== null && !(i >= self.first && i <= self.last) && (i < 1 || i > self.options.size)) - self.remove(i); - }; - - this.notify('onBeforeAnimation'); - - // Animate - if (!this.options.animation || a == false) { - this.list.css(this.lt, p + 'px'); - scrolled(); - } else { - var o = !this.options.vertical ? (this.options.rtl ? {'right': p} : {'left': p}) : {'top': p}; - this.list.animate(o, this.options.animation, this.options.easing, scrolled); - } - }, - - /** - * Starts autoscrolling. - * - * @method auto - * @return undefined - * @param s {Number} Seconds to periodically autoscroll the content. - */ - startAuto: function(s) { - if (s != undefined) - this.options.auto = s; - - if (this.options.auto == 0) - return this.stopAuto(); - - if (this.timer != null) - return; - - var self = this; - this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000); - }, - - /** - * Stops autoscrolling. - * - * @method stopAuto - * @return undefined - */ - stopAuto: function() { - if (this.timer == null) - return; - - clearTimeout(this.timer); - this.timer = null; - }, - - /** - * Sets the states of the prev/next buttons. - * - * @method buttons - * @return undefined - */ - buttons: function(n, p) { - if (n == undefined || n == null) { - var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size); - if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size) - n = this.tail != null && !this.inTail; - } - - if (p == undefined || p == null) { - var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); - if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1) - p = this.tail != null && this.inTail; - } - - var self = this; - - this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent + '.jcarousel', this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); - this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent + '.jcarousel', this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); - - if (this.options.buttonNextCallback != null && this.buttonNext.data('jcarouselstate') != n) { - this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); }).data('jcarouselstate', n); - } - - if (this.options.buttonPrevCallback != null && (this.buttonPrev.data('jcarouselstate') != p)) { - this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); }).data('jcarouselstate', p); - } - }, - - /** - * Notify callback of a specified event. - * - * @method notify - * @return undefined - * @param evt {String} The event name - */ - notify: function(evt) { - var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); - - // Load items - this.callback('itemLoadCallback', evt, state); - - if (this.prevFirst !== this.first) { - this.callback('itemFirstInCallback', evt, state, this.first); - this.callback('itemFirstOutCallback', evt, state, this.prevFirst); - } - - if (this.prevLast !== this.last) { - this.callback('itemLastInCallback', evt, state, this.last); - this.callback('itemLastOutCallback', evt, state, this.prevLast); - } - - this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); - this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); - }, - - callback: function(cb, evt, state, i1, i2, i3, i4) { - if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) - return; - - var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; - - if (!$.isFunction(callback)) - return; - - var self = this; - - if (i1 === undefined) - callback(self, state, evt); - else if (i2 === undefined) - this.get(i1).each(function() { callback(self, this, i1, state, evt); }); - else { - for (var i = i1; i <= i2; i++) - if (i !== null && !(i >= i3 && i <= i4)) - this.get(i).each(function() { callback(self, this, i, state, evt); }); - } - }, - - create: function(i) { - return this.format('
  • ', i); - }, - - format: function(e, i) { - var e = $(e), split = e.get(0).className.split(' '); - for (var j = 0; j < split.length; j++) { - if (split[j].indexOf('jcarousel-') != -1) { - e.removeClass(split[j]); - } - } - e.addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ - 'float': (this.options.rtl ? 'right' : 'left'), - 'list-style': 'none' - }).attr('jcarouselindex', i); - return e; - }, - - className: function(c) { - return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); - }, - - dimension: function(e, d) { - var el = e.jquery != undefined ? e[0] : e; - - var old = !this.options.vertical ? - (el.offsetWidth || $jc.intval(this.options.itemFallbackDimension)) + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') : - (el.offsetHeight || $jc.intval(this.options.itemFallbackDimension)) + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom'); - - if (d == undefined || old == d) - return old; - - var w = !this.options.vertical ? - d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') : - d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom'); - - $(el).css(this.wh, w + 'px'); - - return this.dimension(el); - }, - - clipping: function() { - return !this.options.vertical ? - this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : - this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); - }, - - index: function(i, s) { - if (s == undefined) - s = this.options.size; - - return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1; - } - }); - - $jc.extend({ - /** - * Gets/Sets the global default configuration properties. - * - * @method defaults - * @return {Object} - * @param d {Object} A set of key/value pairs to set as configuration properties. - */ - defaults: function(d) { - return $.extend(defaults, d || {}); - }, - - margin: function(e, p) { - if (!e) - return 0; - - var el = e.jquery != undefined ? e[0] : e; - - if (p == 'marginRight' && $.browser.safari) { - var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2; - - $.swap(el, old, function() { oWidth = el.offsetWidth; }); - - old['marginRight'] = 0; - $.swap(el, old, function() { oWidth2 = el.offsetWidth; }); - - return oWidth2 - oWidth; - } - - return $jc.intval($.css(el, p)); - }, - - intval: function(v) { - v = parseInt(v); - return isNaN(v) ? 0 : v; - } - }); - -})(jQuery); diff --git a/3.1/modules/navcarousel/js/jquery.jcarousel.min.js b/3.1/modules/navcarousel/js/jquery.jcarousel.min.js deleted file mode 100644 index 0b8313ad..00000000 --- a/3.1/modules/navcarousel/js/jquery.jcarousel.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * jCarousel - Riding carousels with jQuery - * http://sorgalla.com/jcarousel/ - * - * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * Built on top of the jQuery library - * http://jquery.com - * - * Inspired by the "Carousel Component" by Bill Scott - * http://billwscott.com/carousel/ - */ - -(function(i){i.fn.jcarousel=function(a){if(typeof a=="string"){var c=i(this).data("jcarousel"),b=Array.prototype.slice.call(arguments,1);return c[a].apply(c,b)}else return this.each(function(){i(this).data("jcarousel",new h(this,a))})};var p={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null, itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"
    ",buttonPrevHTML:"
    ",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},q=false;i(window).bind("load.jcarousel",function(){q=true});i.jcarousel=function(a,c){this.options=i.extend({},p,c||{});this.locked=false;this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===undefined)this.options.rtl= (i(a).attr("dir")||i("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),e=0;e");this.container=this.container.parent()}else if(!this.container.hasClass("jcarousel-container"))this.container=this.list.wrap("
    ").parent()}else{this.container=i(a);this.list=this.container.find("ul,ol").eq(0)}b!=""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('
    ');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("
    ").parent(); this.buttonNext=i(".jcarousel-next",this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)this.buttonNext=this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=i(".jcarousel-prev",this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden", position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var f=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;b=this.list.children("li");var g= this;if(b.size()>0){var j=0;e=this.options.offset;b.each(function(){g.format(this,e++);j+=g.dimension(this,f)});this.list.css(this.wh,j+100+"px");if(!c||c.size===undefined)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){g.next()};this.funcPrev=function(){g.prev()};this.funcResize=function(){g.reload()};this.options.initCallback!=null&&this.options.initCallback(this,"init");if(!q&& i.browser.safari){this.buttons(false,false);i(window).bind("load.jcarousel",function(){g.setup()})}else this.setup()};var h=i.jcarousel;h.fn=h.prototype={jcarousel:"0.2.5"};h.fn.extend=h.extend=i.extend;h.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(a, false);i(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!=null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!=null&&this.inTail&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!=null&&this.options.reloadCallback(this);if(this.options.visible!= null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(e){b+=a.dimension(this,c);if(e+1this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return false}return true},get:function(a){return i(".jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,e=i(c);if(b.length==0){var f;b=this.create(a);for(var g=h.intval(a);f=this.get(--g);)if(g<=0||f.length){g<=0?this.list.prepend(b):f.after(b);break}}else d=this.dimension(b);if(e.get(0).nodeName.toUpperCase()=="LI"){b.replaceWith(e); b=e}else b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);e=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;d=this.dimension(b,e)-d;a>0&&a=this.first&&a<=this.last)){var b=this.dimension(c);athis.options.size?this.options.size:a;for(var b=this.first>a,d=this.options.wrap!="circular"&&this.first<=1?1:this.first,e=b?this.get(d):this.get(this.last),f=b?d:d-1,g=null,j=0,l=false,k=0;b?--f>=a:++fthis.options.size)){e=this.get(this.index(f)); if(e.length)g=this.add(f,e.clone(true))}}e=g;k=this.dimension(g);if(l)j+=k;if(this.first!=null&&(this.options.wrap=="circular"||f>=1&&(this.options.size==null||f<=this.options.size)))c=b?c+k:c-k}d=this.clipping();var o=[],n=0;f=a;var m=0;for(e=this.get(a-1);++n;){g=this.get(f);l=!g.length;if(g.length==0){g=this.create(f).addClass(this.className("jcarousel-item-placeholder"));e.length==0?this.list.prepend(g):e[b?"before":"after"](g);if(this.first!=null&&this.options.wrap=="circular"&&this.options.size!== null&&(f<=0||f>this.options.size)){e=this.get(this.index(f));if(e.length)g=this.add(f,e.clone(true))}}e=g;k=this.dimension(g);if(k==0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");if(this.options.wrap!="circular"&&this.options.size!==null&&f>this.options.size)o.push(g);else if(l)j+=k;m+=k;if(m>=d)break;f++}for(g=0;g0){this.list.css(this.wh,this.dimension(this.list)+j+"px");if(b){c-=j;this.list.css(this.lt,h.intval(this.list.css(this.lt))- j+"px")}}j=a+n-1;if(this.options.wrap!="circular"&&this.options.size&&j>this.options.size)j=this.options.size;if(f>j){n=0;f=j;for(m=0;++n;){g=this.get(f--);if(!g.length)break;m+=this.dimension(g);if(m>=d)break}}f=j-n+1;if(this.options.wrap!="circular"&&f<1)f=1;if(this.inTail&&b){c+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&j==this.options.size&&j-n+1>=1){b=h.margin(this.get(j),!this.options.vertical?"marginRight":"marginBottom");if(m-b>d)this.tail=m-d-b}for(;a-- > f;)c+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=f;this.last=j;return c},animate:function(a,c){if(!(this.locked||this.animating)){this.animating=true;var b=this,d=function(){b.animating=false;a==0&&b.list.css(b.lt,0);if(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size==null||b.last=b.first&&e<=b.last)&&(e<1||e>b.options.size))b.remove(e)};this.notify("onBeforeAnimation");if(!this.options.animation||c==false){this.list.css(this.lt,a+"px");d()}else this.list.animate(!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},this.options.animation,this.options.easing,d)}},startAuto:function(a){if(a!=undefined)this.options.auto=a;if(this.options.auto==0)return this.stopAuto();if(this.timer==null){var c=this;this.timer=setTimeout(function(){c.next()}, this.options.auto*1E3)}},stopAuto:function(){if(this.timer!=null){clearTimeout(this.timer);this.timer=null}},buttons:function(a,c){if(a==undefined||a==null){a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size==null||this.last=this.options.size)a=this.tail!=null&&!this.inTail}if(c==undefined||c==null){c=!this.locked&&this.options.size!== 0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1)c=this.tail!=null&&this.inTail}var b=this;this.buttonNext[a?"bind":"unbind"](this.options.buttonNextEvent+".jcarousel",this.funcNext)[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?false:true);this.buttonPrev[c?"bind":"unbind"](this.options.buttonPrevEvent+".jcarousel",this.funcPrev)[c?"removeClass": "addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?false:true);this.options.buttonNextCallback!=null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a);this.options.buttonPrevCallback!=null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)},notify:function(a){var c=this.prevFirst==null?"init":this.prevFirst< this.first?"next":"prev";this.callback("itemLoadCallback",a,c);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",a,c,this.first);this.callback("itemFirstOutCallback",a,c,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",a,c,this.last);this.callback("itemLastOutCallback",a,c,this.prevLast)}this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast, this.first,this.last)},callback:function(a,c,b,d,e,f,g){if(!(this.options[a]==undefined||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var j=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(i.isFunction(j)){var l=this;if(d===undefined)j(l,b,c);else if(e===undefined)this.get(d).each(function(){j(l,this,d,b,c)});else for(var k=d;k<=e;k++)k!==null&&!(k>=f&&k<=g)&&this.get(k).each(function(){j(l,this,k,b,c)})}}},create:function(a){return this.format("
  • ",a)},format:function(a, c){a=i(a);for(var b=a.get(0).className.split(" "),d=0;d - -
    -

    -

    -

    - If you are experiencing this bug then please enable the option 'Disable dynamic loading of thumbnails'.
    - I am working on fixing this bug and will release an update as soon as possible.") ?>

    - -
    diff --git a/3.1/modules/navcarousel/views/navcarousel.html.php b/3.1/modules/navcarousel/views/navcarousel.html.php deleted file mode 100644 index 40af0d8e..00000000 --- a/3.1/modules/navcarousel/views/navcarousel.html.php +++ /dev/null @@ -1,118 +0,0 @@ -parent(); - $item_counter = 0; - $item_offset = 0; - $maintain_aspect = module::get_var("navcarousel", "maintainaspect", false); - $no_resize = module::get_var("navcarousel", "noresize", false); - $no_ajax = module::get_var("navcarousel", "noajax", false); -?> - - -remove("home"); - } -} diff --git a/3.1/modules/no_home_link/module.info b/3.1/modules/no_home_link/module.info deleted file mode 100644 index fc3aa1db..00000000 --- a/3.1/modules/no_home_link/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "No Home Link" -description = "Gets rid of the 'Home' link in the menu." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:no_home_link" -discuss_url = "http://gallery.menalto.com/forum_module_no_home_link" diff --git a/3.1/modules/nobots/helpers/nobots_theme.php b/3.1/modules/nobots/helpers/nobots_theme.php deleted file mode 100644 index 122cfa00..00000000 --- a/3.1/modules/nobots/helpers/nobots_theme.php +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/3.1/modules/noffmpeg/helpers/movie.php b/3.1/modules/noffmpeg/helpers/movie.php deleted file mode 100644 index 99308994..00000000 --- a/3.1/modules/noffmpeg/helpers/movie.php +++ /dev/null @@ -1,147 +0,0 @@ -id", "", "post", array("id" => "g-edit-movie-form")); - $form->hidden("from_id")->value($movie->id); - $group = $form->group("edit_item")->label(t("Edit Movie")); - $group->input("title")->label(t("Title"))->value($movie->title) - ->error_messages("required", t("You must provide a title")) - ->error_messages("length", t("Your title is too long")); - $group->textarea("description")->label(t("Description"))->value($movie->description); - $group->input("name")->label(t("Filename"))->value($movie->name) - ->error_messages( - "conflict", t("There is already a movie, photo or album with this name")) - ->error_messages("no_slashes", t("The movie name can't contain a \"/\"")) - ->error_messages("no_trailing_period", t("The movie name can't end in \".\"")) - ->error_messages("illegal_data_file_extension", t("You cannot change the movie file extension")) - ->error_messages("required", t("You must provide a movie file name")) - ->error_messages("length", t("Your movie file name is too long")); - $group->input("slug")->label(t("Internet Address"))->value($movie->slug) - ->error_messages( - "conflict", t("There is already a movie, photo or album with this internet address")) - ->error_messages( - "not_url_safe", - t("The internet address should contain only letters, numbers, hyphens and underscores")) - ->error_messages("required", t("You must provide an internet address")) - ->error_messages("length", t("Your internet address is too long")); - - module::event("item_edit_form", $movie, $form); - - $group = $form->group("buttons")->label(""); - $group->submit("")->value(t("Modify")); - - return $form; - } - - static function extract_frame($input_file, $output_file) { - $ffmpeg = movie::find_ffmpeg(); - if (empty($ffmpeg)) { - // BEGIN rWatcher Edit. - copy(MODPATH . "noffmpeg/images/missing_movie.png", $output_file); - //throw new Exception("@todo MISSING_FFMPEG"); - // END rWatcher Edit. - } - - $cmd = escapeshellcmd($ffmpeg) . " -i " . escapeshellarg($input_file) . - " -an -ss 00:00:03 -an -r 1 -vframes 1" . - " -y -f mjpeg " . escapeshellarg($output_file) . " 2>&1"; - exec($cmd); - - clearstatcache(); // use $filename parameter when PHP_version is 5.3+ - if (filesize($output_file) == 0) { - // Maybe the movie is shorter, fall back to the first frame. - $cmd = escapeshellcmd($ffmpeg) . " -i " . escapeshellarg($input_file) . - " -an -an -r 1 -vframes 1" . - " -y -f mjpeg " . escapeshellarg($output_file) . " 2>&1"; - exec($cmd); - - clearstatcache(); - if (filesize($output_file) == 0) { - throw new Exception("@todo FFMPEG_FAILED"); - } - } - } - - /** - * Return the path to the ffmpeg binary if one exists and is executable, or null. - */ - static function find_ffmpeg() { - if (!($ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) || !file_exists($ffmpeg_path)) { - $ffmpeg_path = system::find_binary( - "ffmpeg", module::get_var("gallery", "graphics_toolkit_path")); - module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); - } - return $ffmpeg_path; - } - - /** - * Return the width, height, mime_type and extension of the given movie file. - */ - static function get_file_metadata($file_path) { - $ffmpeg = movie::find_ffmpeg(); - if (empty($ffmpeg)) { - // BEGIN rWatcher Edit. - $pi = pathinfo($file_path); - $extension = isset($pi["extension"]) ? $pi["extension"] : "flv"; // No extension? Assume FLV. - $mime_type = in_array(strtolower($extension), array("mp4", "m4v")) ? - "video/mp4" : "video/x-flv"; - $vid_width = 320; - $vid_height = 240; - if (strtolower($extension) == "flv") { - $flvinfo = new FLVMetaData($file_path); - $info = $flvinfo->getMetaData(); - if (($info["width"] != "") && ($info["height"] != "")) { - $vid_width = $info["width"]; - $vid_height = $info["height"]; - } - } - return array($vid_width, $vid_height, $mime_type, $extension); - //throw new Exception("@todo MISSING_FFMPEG"); - // END rWatcher Edit. - } - - $cmd = escapeshellcmd($ffmpeg) . " -i " . escapeshellarg($file_path) . " 2>&1"; - $result = `$cmd`; - if (preg_match("/Stream.*?Video:.*?(\d+)x(\d+)/", $result, $regs)) { - list ($width, $height) = array($regs[1], $regs[2]); - } else { - list ($width, $height) = array(0, 0); - } - - $pi = pathinfo($file_path); - $extension = isset($pi["extension"]) ? $pi["extension"] : "flv"; // No extension? Assume FLV. - $mime_type = in_array(strtolower($extension), array("mp4", "m4v")) ? - "video/mp4" : "video/x-flv"; - - return array($width, $height, $mime_type, $extension); - } - -} \ No newline at end of file diff --git a/3.1/modules/noffmpeg/images/missing_movie.png b/3.1/modules/noffmpeg/images/missing_movie.png deleted file mode 100644 index fdc97779..00000000 Binary files a/3.1/modules/noffmpeg/images/missing_movie.png and /dev/null differ diff --git a/3.1/modules/noffmpeg/libraries/FLVMetaData.php b/3.1/modules/noffmpeg/libraries/FLVMetaData.php deleted file mode 100644 index bfd8e435..00000000 --- a/3.1/modules/noffmpeg/libraries/FLVMetaData.php +++ /dev/null @@ -1,194 +0,0 @@ -. - * - * @author Amin Saeedi, - * @copyright Copyright (c) 2009, Amin Saeedi - * @version 1.0 - * - */ -class FLVMetaData { - private $buffer; - private $metaData; - private $fileName; - private $typeFlagsAudio; - private $typeFlagsVideo; - - public $VCidMap = array( - 2=>"Sorenson H.263", - 3=>"Screen Video", - 4=>"VP6", - 5=>"VP6 with Alpha channel", - ); //Video Codec ID(s) - - public $ACidMap = array( - "Linear PCM, platform endian", - "ADPCM", - "MP3", - "Linear PCM, little endian", - "Nellymoser 16-kHz Mono", - "Nellymoser 8-kHz Mono", - "Nellymoser", - "G.711 A-law logarithmic PCM", - "G.711 mu-law logarithmic PCM", - "reserved", - "AAC", - "Speex", - 14=>"MP3 8-Khz", - 15=>"Device-specific sound" - ); //Audio Codec ID(s) - -/** - * CONSTRUCTOR : initialize class members - * - * @param string $flv : flv file path - */ - public function __construct($flv) { - $this->fileName = $flv; - $this->metaData = array( - "duration"=>null, - "size"=>null, - "framerate"=>null, - "width"=>null, - "height"=>null, - "videodatarate"=>null, - "audiodatarate"=>null, - "audiodelay"=>null, - "audiosamplesize"=>null, - "audiosamplerate"=>null, - "audiocodecid"=>null, - "videocodecid"=>null, - "version"=>null, - "headersize"=>0 - ); - } - -/** - * Gets metadata of FLV file - * - * @return array $this->metaData : matadata of FLV - */ - public function getMetaData(){ - if(!file_exists($this->fileName)){ - echo "Error! {$this->fileName} does not exist.
    "; - return false; - } - if(!is_readable($this->fileName)){ - echo "Error! Could not read the file. Check the file permissions.
    "; - return false; - } - $f = @fopen($this->fileName,"rb"); - if(!$f){ - echo "Unknown Error! Could not read the file.
    "; - return; - } - $signature = fread($f,3); - if($signature != "FLV"){ - echo "Error! Wrong file format."; - return false; - } - $this->metaData["version"] = ord(fread($f,1)); - $this->metaData["size"] = filesize($this->fileName); - - $flags = ord(fread($f,1)); - $flags = sprintf("%'04b", $flags); - $this->typeFlagsAudio = substr($flags, 1, 1); - $this->typeFlagsVideo = substr($flags, 3, 1); - - for ($i=0; $i < 4; $i++) { - $this->metaData["headersize"] += ord(fread($f,1)) ; - } - - $this->buffer = fread($f, 400); - fclose($f); - if(strpos($this->buffer, "onMetaData") === false){ - echo "Error! No MetaData Exists."; - return false; - } - - foreach($this->metaData as $k=>$v){ - $this->parseBuffer($k); - } - return $this->metaData; - } - -/** - * Takes a field name of metadata, retrieve it's value and set it in $this->metaData - * - * @param string $fieldName : matadata field name - */ - private function parseBuffer($fieldName){ - $fieldPos = strpos($this->buffer, $fieldName); //get the field position - if($fieldPos !== false){ - $pos = $fieldPos + strlen($fieldName) + 1; - $buffer = substr($this->buffer,$pos); - - $d = ""; - for($i=0; $i < 8;$i++){ - $d .= sprintf("%08b", ord(substr($buffer,$i,1))); - } - - $total = self::bin2Double($d); - $this->metaData[$fieldName] = $total; - } - } - -/** - * Calculates double-precision value of given binary string - * (IEEE Standard 754 - Floating Point Numbers) - * - * @param string binary data $strBin - * @return Float calculated double-precision number - */ - public static function bin2Double($strBin){ - $sb = substr($strBin, 0, 1); // first bit is sign bit - $exponent = substr($strBin, 1, 11); // 11 bits exponent - $fraction = "1".substr($strBin, 12, 52); //52 bits fraction (1.F) - - $s = pow(-1, bindec($sb)); - $dec = pow(2, (bindec($exponent) - 1023)); //Decode exponent - - if($dec == 2047){ - if($fraction == 0){ - if($s==0){ - echo "Infinity"; - }else{ - echo "-Infinity"; - } - }else{ - echo "NaN"; - } - } - - if($dec > 0 && $dec < 2047){ - $t = 1; - for($i=1 ; $i <= 53; $i++){ - $t += ((int)substr($fraction, $i, 1)) * pow(2, -$i); //decode significand - } - $total = $s * $t * $dec ; - return $total; - } - return false; - } -} -?> diff --git a/3.1/modules/noffmpeg/module.info b/3.1/modules/noffmpeg/module.info deleted file mode 100644 index fe6b0ec3..00000000 --- a/3.1/modules/noffmpeg/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "NoFFMPEG" -description = "Allow video uploads on systems without FFMPEG." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:noffmpeg" -discuss_url = "http://gallery.menalto.com/forum_module_noffmpeg" diff --git a/3.1/modules/noffmpeg/views/form_uploadify.html.php b/3.1/modules/noffmpeg/views/form_uploadify.html.php deleted file mode 100644 index 911e02d5..00000000 --- a/3.1/modules/noffmpeg/views/form_uploadify.html.php +++ /dev/null @@ -1,164 +0,0 @@ - - - - - -
    - admin && !$movies_allowed)): ?> -
    - -

    - suhosin.session.encrypt setting from Suhosin. You must disable this setting to upload photos.", - array("encrypt_url" => "http://www.hardened-php.net/suhosin/configuration.html#suhosin.session.encrypt", - "suhosin_url" => "http://www.hardened-php.net/suhosin/")) ?> -

    - - - admin && !$movies_allowed): ?> -

    - ffmpeg on your system. Movie uploading disabled. Help!", array("help_url" => "http://codex.gallery2.org/Gallery3:FAQ#Why_does_it_say_I.27m_missing_ffmpeg.3F")) ?> -

    - -
    - - -
    -

    - -

    -
      - parents() as $i => $parent): ?> - > title) ?> - -
    • title) ?>
    • -
    -
    - -
    - - -
    -
    -
      -
    -
    -
    - - \ No newline at end of file diff --git a/3.1/modules/pages/controllers/admin_pages.php b/3.1/modules/pages/controllers/admin_pages.php deleted file mode 100644 index cbf8ce6e..00000000 --- a/3.1/modules/pages/controllers/admin_pages.php +++ /dev/null @@ -1,271 +0,0 @@ -page_title = t("Manage pages"); - $view->content = new View("admin_pages.html"); - $query = ORM::factory("static_page"); - $view->content->pages = $query->order_by("name", "ASC")->find_all(); - $view->content->form = $this->get_prefs_form(); - print $view; - } - - public function createpage() { - // Display a form for creating a new page. - $view = new Admin_View("admin.html"); - $view->page_title = t("Create page"); - $view->content = new View("admin_pages_new.html"); - $view->content->form = $this->get_new_page_form(); - print $view; - } - - public function editpage($id) { - // Display a form for editing an existing page. - $existing_page = ORM::factory("static_page", $id); - $view = new Admin_View("admin.html"); - $view->page_title = t("Edit page"); - $view->content = new View("admin_pages_new.html"); - $view->content->form = $this->get_edit_page_form($existing_page); - print $view; - } - - public function savepage() { - // Save a page to the database. - - access::verify_csrf(); - - // Store form values into variables. - $page_id = Input::instance()->post("page_id"); - $page_name = urlencode(trim(Input::instance()->post("page_name"))); - $page_title = Input::instance()->post("page_title"); - $page_code = Input::instance()->post("page_code"); - $display_menu = Input::instance()->post("display_menu"); - - // If $page_id is set, update an existing page. - if (isset($page_id)) { - $update_page = ORM::factory("static_page", $page_id); - $update_page->title = $page_title; - $update_page->html_code = $page_code; - $update_page->display_menu = $display_menu; - $update_page->save(); - message::success(t("Page %page_name updated", array("page_name" => $update_page->name))); - log::success("pages", t("Page %page_name updated", array("page_name" => $update_page->name))); - url::redirect("admin/pages"); - } else { - - // If $page_id is not set, we are dealing with a new page. - // Check and make sure a page with the same names doesn't already exist. - $existing_page = ORM::factory("static_page") - ->where("name", "=", $page_name) - ->find_all(); - - // If the page doesn't exist, save it to the database. - if (count($existing_page) == 0) { - $new_page = ORM::factory("static_page"); - $new_page->name = $page_name; - $new_page->title = $page_title; - $new_page->html_code = $page_code; - $new_page->display_menu = $display_menu; - $new_page->save(); - message::success(t("Page %page_name created", array("page_name" => $page_name))); - log::success("pages", t("Page %page_name created", array("page_name" => $page_name))); - url::redirect("admin/pages"); - } else { - - // If the page does exist, ask the user if they want to overwrite the old page with the new one. - message::error(t("Page %page_name already exists, press Save again to overwrite.", array("page_name" => $page_name))); - $view = new Admin_View("admin.html"); - $view->page_title = t("Edit page"); - $view->content = new View("admin_pages_new.html"); - $view->content->form = $this->get_overwrite_page_form($existing_page[0]->id, $page_name, $page_title, $page_code, $display_menu); - print $view; - } - } - } - - public function form_delete($id) { - // Display a form asking the user if they want to delete a page. - $one_page = ORM::factory("static_page", $id); - if ($one_page->loaded()) { - print $this->get_delete_form($one_page); - } - } - - public function delete($id) { - // Delete the specified page. - - access::verify_csrf(); - - // Make sure $id belongs to an actual page. - $one_page = ORM::factory("static_page", $id); - if (!$one_page->loaded()) { - throw new Kohana_404_Exception(); - } - - // If the form validates, delete the specified page. - $form = $this->get_delete_form($one_page); - if ($form->validate()) { - $name = $one_page->name; - $one_page->delete(); - message::success(t("Deleted page %page_name", array("page_name" => $name))); - log::success("pages", t("Deleted page %page_name", array("page_name" => $name))); - json::reply(array("result" => "success", "location" => url::site("admin/pages"))); - } else { - print $form; - } - } - - public function form_rename($id) { - // Display a form to allow the user to rename a page. - $one_page = ORM::factory("static_page", $id); - if ($one_page->loaded()) { - print InPlaceEdit::factory(urldecode($one_page->name)) - ->action("admin/pages/rename/$id") - ->render(); - } - } - - public function rename($id) { - // Rename an existing page. - access::verify_csrf(); - - // Make sure the page specified by $id exists. - $one_page = ORM::factory("static_page", $id); - if (!$one_page->loaded()) { - throw new Kohana_404_Exception(); - } - - $in_place_edit = InPlaceEdit::factory($one_page->name) - ->action("admin/pages/rename/$one_page->id") - ->rules(array("required", "length[1,64]")); - - // If the form validates, and if the new name doesn't already exist, rename the page. - if ($in_place_edit->validate()) { - $old_name = $one_page->name; - $new_name = urlencode(trim($in_place_edit->value())); - $new_name_exists = ORM::factory("static_page")->where("name", "=", $new_name)->find_all(); - if (count($new_name_exists) == 0) { - $one_page->name = $new_name; - $one_page->save(); - $message = t("Renamed page %old_name to %new_name", - array("old_name" => $old_name, "new_name" => $new_name)); - message::success($message); - log::success("pages", $message); - json::reply(array("result" => "success", "location" => url::site("admin/pages"))); - } else { - json::reply(array("result" => "error", "form" => (string)$in_place_edit->render())); - } - } else { - json::reply(array("result" => "error", "form" => (string)$in_place_edit->render())); - } - } - - static function get_delete_form($one_page) { - // Generate a new form asking the user if they want to delete a page. - $form = new Forge("admin/pages/delete/$one_page->id", "", "post", array("id" => "g-delete-pages-form")); - $group = $form->group("delete_page") - ->label(t("Really delete page %page_name?", array("page_name" => $one_page->name))); - $group->submit("")->value(t("Delete Page")); - return $form; - } - - private function get_new_page_form() { - // Generate a form for creating a new page. - $form = new Forge("admin/pages/savepage", "", "post", - array("id" => "g-pages-admin-form")); - - $pages_group = $form->group("new_page"); - $pages_group->input("page_name") - ->label(t("Name")); - $pages_group->input("page_title") - ->label(t("Title")); - $pages_group->textarea("page_code") - ->label(t("HTML Code")); - $pages_group->checkbox("display_menu") - ->label(t("Display in menu?")) - ->checked(false); - $pages_group->submit("save_page") - ->value(t("Save")); - - return $form; - } - - private function get_overwrite_page_form($id, $name, $title, $html_code, $display_menu) { - // Generate a form for overwriting an existing page. - $form = new Forge("admin/pages/savepage", "", "post", - array("id" => "g-pages-admin-form")); - - $pages_group = $form->group("new_page"); - $pages_group->hidden("page_id") - ->value($id); - $pages_group->input("page_name") - ->label(t("Name")) - ->readonly() - ->value($name); - $pages_group->input("page_title") - ->label(t("Title")) - ->value($title); - $pages_group->textarea("page_code") - ->label(t("HTML Code")) - ->value($html_code); - $pages_group->checkbox("display_menu") - ->label(t("Display in menu?")) - ->checked($display_menu); - $pages_group->submit("save_page") - ->value(t("Save")); - - return $form; - } - - private function get_edit_page_form($existing_page) { - // Generate a form for editing an existing page. Reuse the overwrite form for as it's basically the same thing. - return ($this->get_overwrite_page_form($existing_page->id, $existing_page->name, $existing_page->title, $existing_page->html_code, $existing_page->display_menu)); - } - - private function get_prefs_form() { - // Generate a form for global preferences. - $form = new Forge("admin/pages/saveprefs", "", "post", - array("id" => "g-pages-admin-form")); - - $pages_group = $form->group("preferences")->label(t("Settings")); - $pages_group->checkbox("display_sidebar") - ->label(t("Hide sidebar on Pages?")) - ->checked(module::get_var("pages", "show_sidebar")); - $pages_group->submit("save_prefs") - ->value(t("Save")); - - return $form; - } - - public function saveprefs() { - // Save a preferences to the database. - - access::verify_csrf(); - - // Save form variables. - module::set_var("pages", "show_sidebar", Input::instance()->post("display_sidebar")); - - // Display message and load main pages admin screen. - message::success(t("Your settings have been saved.")); - url::redirect("admin/pages"); - } -} diff --git a/3.1/modules/pages/controllers/pages.php b/3.1/modules/pages/controllers/pages.php deleted file mode 100644 index d567af47..00000000 --- a/3.1/modules/pages/controllers/pages.php +++ /dev/null @@ -1,42 +0,0 @@ -where("name", "=", $page_name) - ->find_all(); - - // If it doesn't exist, display a 404 error. - if (count($existing_page) == 0) { - throw new Kohana_404_Exception(); - } - - // Display the page. - $template = new Theme_View("page.html", "other", "Pages"); - $template->page_title = t("Gallery :: ") . t($existing_page[0]->title); - $template->content = new View("pages_display.html"); - $template->content->title = $existing_page[0]->title; - $template->content->body = $existing_page[0]->html_code; - print $template; - } -} diff --git a/3.1/modules/pages/css/jHtmlArea.css b/3.1/modules/pages/css/jHtmlArea.css deleted file mode 100644 index 641ea291..00000000 --- a/3.1/modules/pages/css/jHtmlArea.css +++ /dev/null @@ -1,48 +0,0 @@ -div.jHtmlArea { display: inline block; border: solid 1px #ccc; } -div.jHtmlArea div { padding: 0px; margin: 0px; } -div.jHtmlArea .ToolBar { } -div.jHtmlArea .ToolBar ul { border: solid 0px #ccc; margin: 1px; padding: 1px; position:relative; display: inline; background: #fff url(../images/jHtmlArea_Toolbar_Group_BG.png) repeat-x;} -div.jHtmlArea .ToolBar ul li { list-style-type: none; float: left; border: none; padding: 1px; margin: 1px; } -div.jHtmlArea .ToolBar ul li:hover { border: solid 1px #ccc; background: #ddd url(../images/jHtmlArea_Toolbar_Group__Btn_Select_BG.png); padding: 0; } -div.jHtmlArea .ToolBar ul li a { display: block; width: 16px; height: 16px; background: url(../images/jHtmlArea.png) no-repeat -16px -500px; border: none; cursor: pointer; padding: 0px; } -div.jHtmlArea .ToolBar ul li a.highlighted { border: solid 1px #aaa; background-color: #bbb; padding: 0; } -div.jHtmlArea .ToolBar ul li.separator {height: 16px; margin: 0 2px 0 3px; border-left: 1px solid #ccc;} -div.jHtmlArea .ToolBar ul li.separator:hover { padding: 1px; background-color: #fff; border-top:none; border-bottom:none; border-right:none;} - -div.jHtmlArea .ToolBar ul li a:hover { } -div.jHtmlArea .ToolBar ul li a.bold { background-position: 0 0; } -div.jHtmlArea .ToolBar ul li a.italic { background-position: -16px 0; } -div.jHtmlArea .ToolBar ul li a.underline { background-position: -32px 0; } -div.jHtmlArea .ToolBar ul li a.strikethrough { background-position: -48px 0; } -div.jHtmlArea .ToolBar ul li a.link { background-position: -64px 0; } -div.jHtmlArea .ToolBar ul li a.unlink { background-position: -80px 0; } -div.jHtmlArea .ToolBar ul li a.orderedlist { background-position: -96px 0; } -div.jHtmlArea .ToolBar ul li a.unorderedlist { background-position: -112px 0; } -div.jHtmlArea .ToolBar ul li a.image { background-position: -128px 0; } -div.jHtmlArea .ToolBar ul li a.cut { background-position: -144px 0; } -div.jHtmlArea .ToolBar ul li a.copy { background-position: -160px 0; } -div.jHtmlArea .ToolBar ul li a.paste { background-position: -176px 0; } - -div.jHtmlArea .ToolBar ul li a.html { background-position: -192px 0; opacity:0.6; filter:alpha(opacity=60);} -div.jHtmlArea .ToolBar ul li a.html.highlighted { opacity:1.0; filter:alpha(opacity=100);} - -div.jHtmlArea .ToolBar ul li a.h1 { background-position: 0 -16px;} -div.jHtmlArea .ToolBar ul li a.h2 { background-position: -16px -16px;} -div.jHtmlArea .ToolBar ul li a.h3 { background-position: -32px -16px;} -div.jHtmlArea .ToolBar ul li a.h4 { background-position: -48px -16px;} -div.jHtmlArea .ToolBar ul li a.h5 { background-position: -64px -16px;} -div.jHtmlArea .ToolBar ul li a.h6 { background-position: -80px -16px;} -div.jHtmlArea .ToolBar ul li a.subscript { background-position: -96px -16px;} -div.jHtmlArea .ToolBar ul li a.superscript { background-position: -112px -16px;} -div.jHtmlArea .ToolBar ul li a.indent { background-position: -128px -16px;} -div.jHtmlArea .ToolBar ul li a.outdent { background-position: -144px -16px;} -div.jHtmlArea .ToolBar ul li a.horizontalrule { background-position: -160px -16px;} -div.jHtmlArea .ToolBar ul li a.p { background-position: -176px -16px;} - - -div.jHtmlArea .ToolBar ul li a.justifyleft { background-position: 0 -32px;} -div.jHtmlArea .ToolBar ul li a.justifycenter { background-position: -16px -32px;} -div.jHtmlArea .ToolBar ul li a.justifyright { background-position: -32px -32px;} -div.jHtmlArea .ToolBar ul li a.increasefontsize { background-position: -48px -32px;} -div.jHtmlArea .ToolBar ul li a.decreasefontsize { background-position: -64px -32px;} -div.jHtmlArea .ToolBar ul li a.forecolor { background-position: -80px -32px;} \ No newline at end of file diff --git a/3.1/modules/pages/helpers/pages_block.php b/3.1/modules/pages/helpers/pages_block.php deleted file mode 100644 index 2eae8861..00000000 --- a/3.1/modules/pages/helpers/pages_block.php +++ /dev/null @@ -1,57 +0,0 @@ - t("Pages Links")); - } - - static function get($block_id, $theme) { - $block = ""; - - switch ($block_id) { - case "pages_block": - - // Create a new block with a list of all Pages and their links. - - // Query the database for all existing pages. - // If at least one page exists, display the sidebar block. - $query = ORM::factory("static_page"); - $pages = $query->order_by("title", "ASC")->find_all(); - if (count($pages) > 0) { - - // Loop through each page and generate an HTML list of their links and titles. - $content = ""; - - // Make a new sidebar block. - $block = new Block(); - $block->css_id = "g-pages"; - $block->title = t("Pages"); - $block->content = new View("pages_sidebar.html"); - $block->content->links = $content; - } - break; - } - return $block; - } -} diff --git a/3.1/modules/pages/helpers/pages_event.php b/3.1/modules/pages/helpers/pages_event.php deleted file mode 100644 index 3cb37d0b..00000000 --- a/3.1/modules/pages/helpers/pages_event.php +++ /dev/null @@ -1,44 +0,0 @@ -get("content_menu") - ->append(Menu::factory("link") - ->id("pages") - ->label(t("Pages Settings")) - ->url(url::site("admin/pages"))); - } - - static function site_menu($menu, $theme) { - $menu_pages = ORM::factory("static_page") - ->where("display_menu", "=", true) - ->order_by("title", "DESC") - ->find_all(); - if (count($menu_pages) > 0) { - foreach ($menu_pages as $one_page) { - $menu->add_after("home", Menu::factory("link") - ->id("pages-" . $one_page->id) - ->label(t($one_page->title)) - ->url(url::site("pages/show/" . $one_page->name))); - } - } - } -} diff --git a/3.1/modules/pages/helpers/pages_installer.php b/3.1/modules/pages/helpers/pages_installer.php deleted file mode 100644 index cd1f1546..00000000 --- a/3.1/modules/pages/helpers/pages_installer.php +++ /dev/null @@ -1,44 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {static_pages} ( - `id` int(9) NOT NULL auto_increment, - `name` varchar(255) default NULL, - `title` varchar(255) default NULL, - `html_code` text default NULL, - `display_menu` boolean default 0, - PRIMARY KEY (`id`), - UNIQUE KEY(`name`)) - DEFAULT CHARSET=utf8;"); - - // Set the module version number. - module::set_version("pages", 2); - } - static function upgrade($version) { - $db = Database::instance(); - if ($version == 1) { - $db->query("ALTER TABLE {static_pages} ADD COLUMN `display_menu` boolean default 0"); - module::set_version("pages", $version = 2); - } - } -} diff --git a/3.1/modules/pages/helpers/pages_theme.php b/3.1/modules/pages/helpers/pages_theme.php deleted file mode 100644 index ec57a2ce..00000000 --- a/3.1/modules/pages/helpers/pages_theme.php +++ /dev/null @@ -1,27 +0,0 @@ -script("jHtmlArea-0.7.0.js") . - $theme->css("jHtmlArea.css"); - } -} - \ No newline at end of file diff --git a/3.1/modules/pages/images/jHtmlArea.png b/3.1/modules/pages/images/jHtmlArea.png deleted file mode 100644 index 54c66a10..00000000 Binary files a/3.1/modules/pages/images/jHtmlArea.png and /dev/null differ diff --git a/3.1/modules/pages/images/jHtmlArea_Toolbar_Group_BG.png b/3.1/modules/pages/images/jHtmlArea_Toolbar_Group_BG.png deleted file mode 100644 index bcfb0545..00000000 Binary files a/3.1/modules/pages/images/jHtmlArea_Toolbar_Group_BG.png and /dev/null differ diff --git a/3.1/modules/pages/images/jHtmlArea_Toolbar_Group__Btn_Select_BG.png b/3.1/modules/pages/images/jHtmlArea_Toolbar_Group__Btn_Select_BG.png deleted file mode 100644 index 4287b5b8..00000000 Binary files a/3.1/modules/pages/images/jHtmlArea_Toolbar_Group__Btn_Select_BG.png and /dev/null differ diff --git a/3.1/modules/pages/js/jHtmlArea-0.7.0.js b/3.1/modules/pages/js/jHtmlArea-0.7.0.js deleted file mode 100644 index d1e360c4..00000000 --- a/3.1/modules/pages/js/jHtmlArea-0.7.0.js +++ /dev/null @@ -1,403 +0,0 @@ -/* -* jHtmlArea 0.7.0 - WYSIWYG Html Editor jQuery Plugin -* Copyright (c) 2009 Chris Pietschmann -* http://jhtmlarea.codeplex.com -* Licensed under the Microsoft Reciprocal License (Ms-RL) -* http://jhtmlarea.codeplex.com/license -*/ -(function($) { - $.fn.htmlarea = function(opts) { - if (opts && typeof (opts) === "string") { - var args = []; - for (var i = 1; i < arguments.length; i++) { args.push(arguments[i]); } - var htmlarea = jHtmlArea(this[0]); - var f = htmlarea[opts]; - if (f) { return f.apply(htmlarea, args); } - } - return this.each(function() { jHtmlArea(this, opts); }); - }; - var jHtmlArea = window.jHtmlArea = function(elem, options) { - if (elem.jquery) { - return jHtmlArea(elem[0]); - } - if (elem.jhtmlareaObject) { - return elem.jhtmlareaObject; - } else { - return new jHtmlArea.fn.init(elem, options); - } - }; - jHtmlArea.fn = jHtmlArea.prototype = { - - // The current version of jHtmlArea being used - jhtmlarea: "0.7.0", - - init: function(elem, options) { - if (elem.nodeName.toLowerCase() === "textarea") { - var opts = $.extend({}, jHtmlArea.defaultOptions, options); - elem.jhtmlareaObject = this; - - var textarea = this.textarea = $(elem); - var container = this.container = $("
    ").addClass("jHtmlArea").width(textarea.width()).insertAfter(textarea); - - var toolbar = this.toolbar = $("
    ").addClass("ToolBar").appendTo(container); - priv.initToolBar.call(this, opts); - - var iframe = this.iframe = $("', ifrWidth, ifrHeight); - - } else { - $.get(href, function(data) { - _set_content( '
    ' + data + '
    ', opts.frameWidth, opts.frameHeight ); - }); - } - }; - - function _proceed_image() { - if (opts.imageScale) { - var w = $.fn.fancybox.getViewport(); - - var r = Math.min(Math.min(w[0] - 36, imagePreloader.width) / imagePreloader.width, Math.min(w[1] - 60, imagePreloader.height) / imagePreloader.height); - - var width = Math.round(r * imagePreloader.width); - var height = Math.round(r * imagePreloader.height); - - } else { - var width = imagePreloader.width; - var height = imagePreloader.height; - } - - _set_content('', width, height); - }; - - function _preload_neighbor_images() { - if ((opts.itemArray.length -1) > opts.itemCurrent) { - var href = opts.itemArray[opts.itemCurrent + 1].href; - $("'); - $("#fancy_close, .fancy_bg, .fancy_title, .fancy_modules, .fancy_ico").fixPNG(); - } - }; - - $.fn.fancybox.defaults = { - padding : 10, - imageScale : true, - zoomOpacity : false, - zoomSpeedIn : 0, - zoomSpeedOut : 0, - zoomSpeedChange : 300, - easingIn : 'swing', - easingOut : 'swing', - easingChange : 'swing', - frameWidth : 425, - frameHeight : 355, - overlayShow : true, - overlayOpacity : 0.8, - hideOnContentClick : false, - centerOnScroll : true, - itemArray : [], - callbackOnStart : null, - callbackOnShow : null, - callbackOnClose : null - }; - - $(document).ready(function() { - $.fn.fancybox.build(); - }); - -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* -// ************************************************************************************************************************************* - - var modelem, modopts, modbusy = false, imagePreloader = new Image, loadingTimer, loadingFrame = 1, imageRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i; - - $.fn.modbox = function(settings) { - settings = $.extend({}, $.fn.modbox.defaults, settings); - - var matchedGroup = this; - - function _initialize() { - modelem = this; - modopts = settings; - - _start(); - - return false; - }; - - function _start() { - if (modbusy) return; - - if ($.isFunction(modopts.callbackOnStart)) { - modopts.callbackOnStart(); - } - - modopts.itemArray = []; - modopts.itemCurrent = 0; - - if (settings.itemArray.length > 0) { - modopts.itemArray = settings.itemArray; - - } else { - var item = {}; - - if (!modelem.rel || modelem.rel == '') { - var item = {href: modelem.href, title: modelem.title}; - - if ($(modelem).children("img:first").length) { - item.orig = $(modelem).children("img:first"); - } - - modopts.itemArray.push( item ); - - } else { - - var subGroup = $(matchedGroup).filter("a[rel=" + modelem.rel + "]"); - - var item = {}; - - for (var i = 0; i < subGroup.length; i++) { - item = {href: subGroup[i].href, title: subGroup[i].title}; - - if ($(subGroup[i]).children("img:first").length) { - item.orig = $(subGroup[i]).children("img:first"); - } - - modopts.itemArray.push( item ); - } - - while ( modopts.itemArray[ modopts.itemCurrent ].href != modelem.href ) { - modopts.itemCurrent++; - } - } - } - - if (modopts.overlayShow) { - if (isIE) { - $('embed, object, select').css('visibility', 'hidden'); - } - - $("#mod_overlay").css('opacity', modopts.overlayOpacity).show(); - } - - _change_item(); - }; - - function _change_item() { - $("#mod_right, #mod_left, #mod_close, #mod_title").hide(); - - var href = modopts.itemArray[ modopts.itemCurrent ].href; - - if (href.match(/#/)) { - var target = window.location.href.split('#')[0]; target = href.replace(target, ''); target = target.substr(target.indexOf('#')); - - _set_content('
    ' + $(target).html() + '
    ', modopts.frameWidth, modopts.frameHeight); - - } else if (href.match(imageRegExp)) { - imagePreloader = new Image; imagePreloader.src = href; - - if (imagePreloader.complete) { - _proceed_image(); - - } else { - $.fn.modbox.showLoading(); - - $(imagePreloader).unbind().bind('load', function() { - $(".mod_loading").hide(); - - _proceed_image(); - }); - } - - } else if (href.match("iframe") || modelem.className.indexOf("iframe") >= 0) { - _set_content('', modopts.frameWidth, modopts.frameHeight); - - } else { - $.get(href, function(data) { - _set_content( '
    ' + data + '
    ', modopts.frameWidth, modopts.frameHeight ); - }); - } - }; - - function _proceed_image() { - if (modopts.imageScale) { - var w = $.fn.modbox.getViewport(); - - var r = Math.min(Math.min(w[0] - 36, imagePreloader.width) / imagePreloader.width, Math.min(w[1] - 60, imagePreloader.height) / imagePreloader.height); - - var width = Math.round(r * imagePreloader.width); - var height = Math.round(r * imagePreloader.height); - - } else { - var width = imagePreloader.width; - var height = imagePreloader.height; - } - - _set_content('', width, height); - }; - - function _preload_neighbor_images() { - if ((modopts.itemArray.length -1) > modopts.itemCurrent) { - var href = modopts.itemArray[modopts.itemCurrent + 1].href; - - if (href.match(imageRegExp)) { - objNext = new Image(); - objNext.src = href; - } - } - - if (modopts.itemCurrent > 0) { - var href = modopts.itemArray[modopts.itemCurrent -1].href; - - if (href.match(imageRegExp)) { - objNext = new Image(); - objNext.src = href; - } - } - }; - - function _set_content(value, width, height) { - modbusy = true; - - var pad = modopts.padding; - - if (isIE) { - $("#mod_content")[0].style.removeExpression("height"); - $("#mod_content")[0].style.removeExpression("width"); - } - - if (pad > 0) { - width += pad * 2; - height += pad * 2; - - $("#mod_content").css({ - 'top' : pad + 'px', - 'right' : pad + 'px', - 'bottom' : pad + 'px', - 'left' : pad + 'px', - 'width' : 'auto', - 'height' : 'auto' - }); - - if (isIE) { - $("#mod_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - 20)'); - $("#mod_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - 20)'); - } - - } else { - $("#mod_content").css({ - 'top' : 0, - 'right' : 0, - 'bottom' : 0, - 'left' : 0, - 'width' : '100%', - 'height' : '100%' - }); - } - - if ($("#mod_outer").is(":visible") && width == $("#mod_outer").width() && height == $("#mod_outer").height()) { - $("#mod_content").fadeOut("fast", function() { - $("#mod_content").empty().append($(value)).fadeIn("normal", function() { - _finish(); - }); - }); - - return; - } - - var w = $.fn.modbox.getViewport(); - - var itemLeft = (width + 36) > w[0] ? w[2] : (w[2] + Math.round((w[0] - width - 36) / 2)); - var itemTop = (height + 50) > w[1] ? w[3] : (w[3] + Math.round((w[1] - height - 50) / 2)); - - var itemOpts = { - 'left': itemLeft, - 'top': itemTop, - 'width': width + 'px', - 'height': height + 'px' - }; - - if ($("#mod_outer").is(":visible")) { - $("#mod_content").fadeOut("normal", function() { - $("#mod_content").empty(); - $("#mod_outer").animate(itemOpts, modopts.zoomSpeedChange, modopts.easingChange, function() { - $("#mod_content").append($(value)).fadeIn("normal", function() { - _finish(); - }); - }); - }); - - } else { - - if (modopts.zoomSpeedIn > 0 && modopts.itemArray[modopts.itemCurrent].orig !== undefined) { - $("#mod_content").empty().append($(value)); - - var orig_item = modopts.itemArray[modopts.itemCurrent].orig; - var orig_pos = $.fn.modbox.getPosition(orig_item); - - $("#mod_outer").css({ - 'left': (orig_pos.left - 18) + 'px', - 'top': (orig_pos.top - 18) + 'px', - 'width': $(orig_item).width(), - 'height': $(orig_item).height() - }); - - if (modopts.zoomOpacity) { - itemOpts.opacity = 'show'; - } - - $("#mod_outer").animate(itemOpts, modopts.zoomSpeedIn, modopts.easingIn, function() { - _finish(); - }); - - } else { - - $("#mod_content").hide().empty().append($(value)).show(); - $("#mod_outer").css(itemOpts).fadeIn("normal", function() { - _finish(); - }); - } - } - }; - - function _set_navigation() { - if (modopts.itemCurrent != 0) { - $("#mod_left, #mod_left_ico").unbind().bind("click", function(e) { - e.stopPropagation(); - - modopts.itemCurrent--; - _change_item(); - - return false; - }); - - $("#mod_left").show(); - } - - if (modopts.itemCurrent != ( modopts.itemArray.length -1)) { - $("#mod_right, #mod_right_ico").unbind().bind("click", function(e) { - e.stopPropagation(); - - modopts.itemCurrent++; - _change_item(); - - return false; - }); - - $("#mod_right").show(); - } - }; - - function _finish() { - _set_navigation(); - - _preload_neighbor_images(); - - $(document).keydown(function(e) { - if (e.keyCode == 27) { - $.fn.modbox.close(); - $(document).unbind("keydown"); - - } else if(e.keyCode == 37 && modopts.itemCurrent != 0) { - modopts.itemCurrent--; - _change_item(); - $(document).unbind("keydown"); - - } else if(e.keyCode == 39 && modopts.itemCurrent != (modopts.itemArray.length - 1)) { - modopts.itemCurrent++; - _change_item(); - $(document).unbind("keydown"); - } - }); - - if (modopts.centerOnScroll) { - $(window).bind("resize scroll", $.fn.modbox.scrollBox); - } else { - $("div#mod_outer").css("position", "absolute"); - } - - if (modopts.hideOnContentClick) { - $("#mod_wrap").click($.fn.modbox.close); - } - - $("#mod_overlay, #mod_close").bind("click", $.fn.modbox.close); - - $("#mod_close").show(); - - if (modopts.itemArray[ modopts.itemCurrent ].title !== undefined && modopts.itemArray[ modopts.itemCurrent ].title.length > 0) { - $('#mod_title div').html(modopts.itemArray[ modopts.itemCurrent ].title); - $('#mod_title').show(); - } - - if (modopts.overlayShow && isIE) { - $('embed, object, select', $('#mod_content')).css('visibility', 'visible'); - } - - if ($.isFunction(modopts.callbackOnShow)) { - modopts.callbackOnShow(); - } - - modbusy = false; - }; - - return this.unbind('click').click(_initialize); - }; - - $.fn.modbox.scrollBox = function() { - var pos = $.fn.modbox.getViewport(); - - $("#mod_outer").css('left', (($("#mod_outer").width() + 36) > pos[0] ? pos[2] : pos[2] + Math.round((pos[0] - $("#mod_outer").width() - 36) / 2))); - $("#mod_outer").css('top', (($("#mod_outer").height() + 50) > pos[1] ? pos[3] : pos[3] + Math.round((pos[1] - $("#mod_outer").height() - 50) / 2))); - }; - - $.fn.modbox.getNumeric = function(el, prop) { - return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0; - }; - - $.fn.modbox.getPosition = function(el) { - var pos = el.offset(); - - pos.top += $.fn.modbox.getNumeric(el, 'paddingTop'); - pos.top += $.fn.modbox.getNumeric(el, 'borderTopWidth'); - - pos.left += $.fn.modbox.getNumeric(el, 'paddingLeft'); - pos.left += $.fn.modbox.getNumeric(el, 'borderLeftWidth'); - - return pos; - }; - - $.fn.modbox.showIframe = function() { - $(".mod_loading").hide(); - $("#mod_frame").show(); - }; - - $.fn.modbox.getViewport = function() { - return [$(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ]; - }; - - $.fn.modbox.animateLoading = function() { - if (!$("#mod_loading").is(':visible')){ - clearInterval(loadingTimer); - return; - } - - $("#mod_loading > div").css('top', (loadingFrame * -40) + 'px'); - - loadingFrame = (loadingFrame + 1) % 12; - }; - - $.fn.modbox.showLoading = function() { - clearInterval(loadingTimer); - - var pos = $.fn.modbox.getViewport(); - - $("#mod_loading").css({'left': ((pos[0] - 40) / 2 + pos[2]), 'top': ((pos[1] - 40) / 2 + pos[3])}).show(); - $("#mod_loading").bind('click', $.fn.modbox.close); - - loadingTimer = setInterval($.fn.modbox.animateLoading, 66); - }; - - $.fn.modbox.close = function() { - modbusy = true; - - $(imagePreloader).unbind(); - - $("#mod_overlay, #mod_close").unbind(); - - if (modopts.hideOnContentClick) { - $("#mod_wrap").unbind(); - } - - $("#mod_close, .mod_loading, #mod_left, #mod_right, #mod_title").hide(); - - if (modopts.centerOnScroll) { - $(window).unbind("resize scroll"); - } - - __cleanup = function() { - $("#mod_overlay, #mod_outer").hide(); - - if (modopts.centerOnScroll) { - $(window).unbind("resize scroll"); - } - - if (isIE) { - $('embed, object, select').css('visibility', 'visible'); - } - - if ($.isFunction(modopts.callbackOnClose)) { - modopts.callbackOnClose(); - } - - modbusy = false; - }; - - if ($("#mod_outer").is(":visible") !== false) { - if (modopts.zoomSpeedOut > 0 && modopts.itemArray[modopts.itemCurrent].orig !== undefined) { - var orig_item = modopts.itemArray[modopts.itemCurrent].orig; - var orig_pos = $.fn.modbox.getPosition(orig_item); - - var itemOpts = { - 'left': (orig_pos.left - 18) + 'px', - 'top': (orig_pos.top - 18) + 'px', - 'width': $(orig_item).width(), - 'height': $(orig_item).height() - }; - - if (modopts.zoomOpacity) { - itemOpts.opacity = 'hide'; - } - - $("#mod_outer").stop(false, true).animate(itemOpts, modopts.zoomSpeedOut, modopts.easingOut, __cleanup); - - } else { - $("#mod_outer").stop(false, true).fadeOut("fast", __cleanup); - } - - } else { - __cleanup(); - } - - return false; - }; - - $.fn.modbox.build = function() { - var html = ''; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += ''; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - html += '
    '; - - $(html).appendTo("body"); - - $('
    ').appendTo('#mod_title'); - - if (isIE) { - $("#mod_inner").prepend(''); - $("#mod_close, .mod_bg, .mod_title, .mod_ico").fixPNG(); - } - }; - - $.fn.modbox.defaults = { - padding : 0, - imageScale : true, - zoomOpacity : false, - zoomSpeedIn : 0, - zoomSpeedOut : 0, - zoomSpeedChange : 300, - easingIn : 'swing', - easingOut : 'swing', - easingChange : 'swing', - frameWidth : 400, - frameHeight : 400, - overlayShow : true, - overlayOpacity : 0.3, - hideOnContentClick : false, - centerOnScroll : true, - itemArray : [], - callbackOnStart : null, - callbackOnShow : null, - callbackOnClose : null - }; - - $(document).ready(function() { - $.fn.modbox.build(); - }); - -})(jQuery); \ No newline at end of file diff --git a/3.1/themes/three_nids/js/ui.init.js b/3.1/themes/three_nids/js/ui.init.js deleted file mode 100644 index 88139e22..00000000 --- a/3.1/themes/three_nids/js/ui.init.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Initialize jQuery UI and Gallery Plugin elements - */ - -$(document).ready(function() { - $(".fancyclass").fancybox(); - - // Initialize Superfish menus - $("ul.g-menu").addClass("sf-menu"); - $('ul.sf-menu').superfish({ - delay: 500, - animation: { - opacity:'show', - height:'show' - }, - speed: 'fast' - }); - $("#g-site-menu").css("display", "block"); - - // Initialize short forms - $(".g-short-form").gallery_short_form(); - - - // Initialize status message effects - $("#g-action-status li").gallery_show_message(); - - // Initialize dialogs - $("#g-login-link").addClass("g-dialog-link"); - $(".g-dialog-link").gallery_dialog(); - - // Initialize view menu - 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 button css to submit inputs - $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); - - // Apply styles and icon classes to g-context-menu - 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(""); - $(".g-context-menu a span").each(function() { - var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString(); - $(this).addClass(iconClass); - }); - } - - // Album view only - 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(); - $(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"); - $("#g-place-holder").remove(); - $(".fancyclass").fancybox(); - } - ); - } - - // Photo/Item item view lightbox - if ($("#g-item-box").length) { - $(this).gallery_context_menu(); - } - - - // Photo/Item item view - if ($("#g-item").length) { - // Ensure the resized image fits within its container - $("#g-item").gallery_fit_photo(); - - // Initialize context menus - var resize = $("#g-item").gallery_get_photo(); - $(resize).hover(function(){ - $(this).gallery_context_menu(); - }); - - // Add scroll effect for links to named anchors - $.localScroll({ - queue: true, - duration: 1000, - hash: true - }); - } - - // Initialize button hover effect - $.fn.gallery_hover_init(); - -}); diff --git a/3.1/themes/three_nids/theme.info b/3.1/themes/three_nids/theme.info deleted file mode 100644 index 4fb28616..00000000 --- a/3.1/themes/three_nids/theme.info +++ /dev/null @@ -1,10 +0,0 @@ -name = "3nids theme" -description = "Default theme modified using jquery lightbox slideshow." -version = 2 -author = "3nids" -site = 1 -admin = 0 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Themes:three_nids" -discuss_url = "http://gallery.menalto.com/forum_theme_three_nids" diff --git a/3.1/themes/three_nids/thumbnail.png b/3.1/themes/three_nids/thumbnail.png deleted file mode 100644 index 3b7bcfec..00000000 Binary files a/3.1/themes/three_nids/thumbnail.png and /dev/null differ diff --git a/3.1/themes/three_nids/views/album.html.php b/3.1/themes/three_nids/views/album.html.php deleted file mode 100644 index ab67f100..00000000 --- a/3.1/themes/three_nids/views/album.html.php +++ /dev/null @@ -1,51 +0,0 @@ - - -
    - album_top() ?> -

    title) ?>

    -
    description)) ?>
    -
    -viewable()->children(); -$theme->pagination = new Pagination(); -$theme->pagination->initialize( - array("query_string" => "page", "total_items" => $children_count, "items_per_page" => $page_size, "style" => "classic")); -$children_offset = ($theme->pagination->current_page -1) * $page_size ; -?> -
      - - - - - - - $child): ?> - - is_album()): ?> - - -
    • - thumb_top($child) ?> - - thumb_bottom($child) ?> - context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?> -
    • - - - - - - - - admin || access::can("add", $item)): ?> - id") ?> -
    • Add some.", - array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?>
    • - -
    • - - -
    -album_bottom() ?> - -paginator() ?> diff --git a/3.1/themes/three_nids/views/block.html.php b/3.1/themes/three_nids/views/block.html.php deleted file mode 100644 index 699d7c22..00000000 --- a/3.1/themes/three_nids/views/block.html.php +++ /dev/null @@ -1,10 +0,0 @@ - - - - -
    -

    -
    - -
    -
    diff --git a/3.1/themes/three_nids/views/comments.html.php b/3.1/themes/three_nids/views/comments.html.php deleted file mode 100644 index 5086aceb..00000000 --- a/3.1/themes/three_nids/views/comments.html.php +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("gallery.common.css") ?> - css("jquery.fancybox.css") ?> - css("screen.css") ?> - css("three_nids.css") ?> - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - script("jquery.easing.js") ?> - script("jquery.fancybox.js") ?> - script("ui.init.js") ?> - head() ?> - - -
    - thumb_img() ?> -
    - id}") ?>" id="g-admin-comment-button" - class="g-button ui-corner-all ui-icon-left ui-state-default right"> - - - -
    - count()): ?> -

    - -

    - -
      - -
    • - %name %date: ', - array("date" => date(module::get_var("gallery", "date_time_format", "Y-M-d H:i:s"), $comment->created), - "name" => html::clean($comment->author_name()))); ?> -
      - text)) ?> -
      -
    • - -
    -
    - - diff --git a/3.1/themes/three_nids/views/dynamic.html.php b/3.1/themes/three_nids/views/dynamic.html.php deleted file mode 100644 index 7c0e7131..00000000 --- a/3.1/themes/three_nids/views/dynamic.html.php +++ /dev/null @@ -1,37 +0,0 @@ - -
    -
    - dynamic_top() ?> -
    -

    -
    -items(); - $theme->pagination = new Pagination(); - $theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic")); - $children_offset = ($theme->pagination->current_page -1) * $page_size ; ?> - - -
      - - - - - - $child): ?> - - -
    • - thumb_top($child) ?> - - thumb_bottom($child) ?> - context_menu($child, "#g-ItemId-{$child->id} .g-Thumbnail") ?> -
    • - -
    - - - - -dynamic_bottom() ?> - -paginator() ?> diff --git a/3.1/themes/three_nids/views/exif_dialog.html.php b/3.1/themes/three_nids/views/exif_dialog.html.php deleted file mode 100644 index 8ce20cc3..00000000 --- a/3.1/themes/three_nids/views/exif_dialog.html.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - -
    -
    - - - - - - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - diff --git a/3.1/themes/three_nids/views/image_block_block.html.php b/3.1/themes/three_nids/views/image_block_block.html.php deleted file mode 100644 index 0b56af20..00000000 --- a/3.1/themes/three_nids/views/image_block_block.html.php +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/3.1/themes/three_nids/views/movie.html.php b/3.1/themes/three_nids/views/movie.html.php deleted file mode 100644 index 3ebe0632..00000000 --- a/3.1/themes/three_nids/views/movie.html.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("gallery.common.css") ?> - css("jquery.fancybox.css") ?> - css("screen.css") ?> - css("three_nids.css") ?> - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - script("jquery.easing.js") ?> - script("jquery.fancybox.js") ?> - script("ui.init.js") ?> - script("flowplayer.js") ?> - head() ?> - - -
    -
    - movie_img( - array("class" => "g-movie", "id" => "g-movie-id-{$item->id}", - "style" => "display:block;width:{$item->width}px;height:{$item->height}px")) ?> - context_menu($item, "#g-movie-id-{$item->id}") ?> -
    -

    title) ?>

    -
    description)) ?>
    -
    -
    - - diff --git a/3.1/themes/three_nids/views/no_sidebar.html.php b/3.1/themes/three_nids/views/no_sidebar.html.php deleted file mode 100644 index 378bd971..00000000 --- a/3.1/themes/three_nids/views/no_sidebar.html.php +++ /dev/null @@ -1,6 +0,0 @@ - -
      -
    • - Add blocks", - array("url" => html::mark_clean(url::site("admin/sidebar")))) ?>
    • -
    diff --git a/3.1/themes/three_nids/views/page.html.php b/3.1/themes/three_nids/views/page.html.php deleted file mode 100644 index ae0e1b16..00000000 --- a/3.1/themes/three_nids/views/page.html.php +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - <? if ($page_title): ?> - <?= $page_title ?> - <? else: ?> - <? if ($theme->item()): ?> - <? if ($theme->item()->is_album()): ?> - <?= t("Gallery :: %album_title", array("album_title" => $theme->item()->title)) ?> - <? elseif ($theme->item()->is_photo()): ?> - <?= t("Gallery :: %photo_title", array("photo_title" => $theme->item()->title)) ?> - <? else: ?> - <?= t("Gallery :: %movie_title", array("movie_title" => $theme->item()->title)) ?> - <? endif ?> - <? elseif ($theme->tag()): ?> - <?= t("Gallery :: %tag_title", array("tag_title" => $theme->tag()->name)) ?> - <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> - <?= t("Gallery") ?> - <? endif ?> - <? endif ?> - - " type="image/x-icon" /> - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("jquery.fancybox.css") ?> - css("screen.css") ?> - css("three_nids.css") ?> - - page_type == 'collection'): ?> - - - - - - - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - script("jquery.easing.js") ?> - script("jquery.fancybox.js") ?> - script("ui.init.js") ?> - - head() they get combined */ ?> - page_subtype == "photo"): ?> - script("jquery.scrollTo.js") ?> - script("gallery.show_full_size.js") ?> - page_subtype == "movie"): ?> - script("flowplayer.js") ?> - - - head() ?> - - - body_attributes() ?>> - page_top() ?> -
    - site_status() ?> -
    -
    - user_menu() ?> - header_top() ?> - - - - - -
    - admin): ?> - site_menu("#g-item-img") ?> - -
    - header_bottom() ?> -
    - - - - tag()): ?> -
      -
    • - - - -
    • -
    • tag()->name) ?>
    • -
    - - - - - - - -
    -
    -
    -
    -
    - messages() ?> - -
    -
    -
    -
    - page_subtype != "login"): ?> - - -
    -
    - -
    - page_bottom() ?> - - diff --git a/3.1/themes/three_nids/views/paginator.html.php b/3.1/themes/three_nids/views/paginator.html.php deleted file mode 100644 index 5034c965..00000000 --- a/3.1/themes/three_nids/views/paginator.html.php +++ /dev/null @@ -1,87 +0,0 @@ - - - -
      -
    • - - - - - - - - - - - - - - - - - -
    • - -
    • - - - $first_visible_position, - "to_number" => $last_visible_position, - "count" => $total)) ?> - - $position, "total" => $total)) ?> - - - - -
    • - -
    • - - - - - - - - - - - - - - - - - -
    • -
    diff --git a/3.1/themes/three_nids/views/photo.html.php b/3.1/themes/three_nids/views/photo.html.php deleted file mode 100644 index 80a499b6..00000000 --- a/3.1/themes/three_nids/views/photo.html.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("gallery.common.css") ?> - css("jquery.fancybox.css") ?> - css("screen.css") ?> - css("three_nids.css") ?> - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - script("jquery.easing.js") ?> - script("jquery.fancybox.js") ?> - script("ui.init.js") ?> - head() ?> - - -
    - - - - - - - context_menu($item, "#g-item-id-{$item->id}") ?> -
    - - diff --git a/3.1/themes/three_nids/views/search.html.php b/3.1/themes/three_nids/views/search.html.php deleted file mode 100644 index 0699decd..00000000 --- a/3.1/themes/three_nids/views/search.html.php +++ /dev/null @@ -1,39 +0,0 @@ - - - -pagination = new Pagination(); - $theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count_true,"items_per_page" => $page_size,"style" => "classic")); - $children_offset = ($theme->pagination->current_page -1) * $page_size ; ?> - -
    -

    %term", array("term" => $q)) ?>

    - - -
      - - - - - -
    • - thumb_top($child) ?> - - thumb_bottom($child) ?> - context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?> -
    • - - - - - -
    - paginator() ?> - - -

    - %term", array("term" => $q)) ?> -

    - - -
    diff --git a/3.1/themes/three_nids/views/sidebar.html.php b/3.1/themes/three_nids/views/sidebar.html.php deleted file mode 100644 index 54f1d00d..00000000 --- a/3.1/themes/three_nids/views/sidebar.html.php +++ /dev/null @@ -1,18 +0,0 @@ - -sidebar_top() ?> -
    -
    - - album_menu() ?> - - photo_menu() ?> - - movie_menu() ?> - - tag_menu() ?> - -
    -
    - -sidebar_blocks() ?> -sidebar_bottom() ?>