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/calendarview/helpers/calendarview_theme.php b/3.0/modules/arrow_nav/helpers/arrow_nav_theme.php similarity index 80% rename from 3.1/modules/calendarview/helpers/calendarview_theme.php rename to 3.0/modules/arrow_nav/helpers/arrow_nav_theme.php index fa8002ea..529046ef 100644 --- a/3.1/modules/calendarview/helpers/calendarview_theme.php +++ b/3.0/modules/arrow_nav/helpers/arrow_nav_theme.php @@ -1,26 +1,26 @@ -css("calendarview_menu.css"); - return $theme->css("calendarview_calendar.css"); - } -} +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..aa1c8c4e --- /dev/null +++ b/3.0/modules/arrow_nav/js/arrow_nav.js @@ -0,0 +1,16 @@ +$(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 @@ set_global("calendar_user", $display_user); + $root = item::root(); + $template = new Theme_View("page.html", "other", "CalendarView"); + $template->set_global( + array("calendar_user" => $display_user, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance($display_year, url::site("calendarview/calendar/" . $display_year))->set_last()))); $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(); + // Set up default search conditions for retrieving all photos from the specified day. + $where = array(array("type", "!=", "album")); + if ($display_user != "-1") { + $where[] = array("owner_id", "=", $display_user); } + $where[] = array("captured", ">=", mktime(0, 0, 0, $display_month, $display_day, $display_year)); + $where[] = array("captured", "<", mktime(0, 0, 0, $display_month, ($display_day + 1), $display_year)); + + // Figure out the total number of photos to display. + $day_count = calendarview::get_items_count($where); // Figure out paging stuff. $page_size = module::get_var("gallery", "page_size", 9); @@ -81,70 +68,67 @@ class CalendarView_Controller extends Controller { 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)); - } + $children = calendarview::get_items($page_size, $offset, $where); - // 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); + // Create and display the page. + $root = item::root(); + $template = new Theme_View("page.html", "collection", "CalendarDayView"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $children, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)), + Breadcrumb::instance(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month)), + Breadcrumb::instance($display_day, url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month . "/" . $display_day))->set_last()), + "children_count" => $day_count)); + $template->page_title = t("Gallery :: Calendar"); $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; + + // Set breadcrumbs on the photo pages to point back to the calendar day view. + item::set_display_context_callback("CalendarView_Controller::get_display_day_context", $display_user, $display_year, $display_month, $display_day); + } + + static function get_display_day_context($item, $display_user, $display_year, $display_month, $display_day) { + // Set up default search conditions for retrieving all photos from the specified day. + $where = array(array("type", "!=", "album")); + if ($display_user != "-1") { + $where[] = array("owner_id", "=", $display_user); + } + $where[] = array("captured", ">=", mktime(0, 0, 0, $display_month, $display_day, $display_year)); + $where[] = array("captured", "<", mktime(0, 0, 0, $display_month, ($display_day + 1), $display_year)); + + // Generate breadcrumbs for the photo page. + $root = item::root(); + $breadcrumbs = array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)), + Breadcrumb::instance(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month)), + Breadcrumb::instance($display_day, url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month . "/" . $display_day)), + Breadcrumb::instance($item->title, $item->url())->set_last() + ); + + return CalendarView_Controller::get_display_context($item, $where, $breadcrumbs); } 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(); + // Set up default search conditions for retrieving all photos from the specified month. + $where = array(array("type", "!=", "album")); + if ($display_user != "-1") { + $where[] = array("owner_id", "=", $display_user); } + $where[] = array("captured", ">=", mktime(0, 0, 0, $display_month, 1, $display_year)); + $where[] = array("captured", "<", mktime(0, 0, 0, $display_month+1, 1, $display_year)); + + // Figure out the total number of photos to display. + $day_count = calendarview::get_items_count($where); // Figure out paging stuff. $page_size = module::get_var("gallery", "page_size", 9); @@ -157,44 +141,73 @@ class CalendarView_Controller extends Controller { 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)); - } + $children = calendarview::get_items($page_size, $offset, $where); - // 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); + // Create and display the page. + $root = item::root(); + $template = new Theme_View("page.html", "collection", "CalendarMonthView"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)), + Breadcrumb::instance(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month))->set_last()), + "children" => $children, + "children_count" => $day_count)); + $template->page_title = t("Gallery :: Calendar"); $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; + + // Set up breadcrumbs for the photo pages to point back to the calendar month view. + item::set_display_context_callback("CalendarView_Controller::get_display_month_context", $display_user, $display_year, $display_month); + } + + static function get_display_month_context($item, $display_user, $display_year, $display_month) { + // Set up default search conditions for retrieving all photos from the specified month. + $where = array(array("type", "!=", "album")); + if ($display_user != "-1") { + $where[] = array("owner_id", "=", $display_user); + } + $where[] = array("captured", ">=", mktime(0, 0, 0, $display_month, 1, $display_year)); + $where[] = array("captured", "<", mktime(0, 0, 0, $display_month+1, 1, $display_year)); + + // Generate breadcrumbs for the photo page. + $root = item::root(); + $breadcrumbs = array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)), + Breadcrumb::instance(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month)), + Breadcrumb::instance($item->title, $item->url())->set_last() + ); + + return CalendarView_Controller::get_display_context($item, $where, $breadcrumbs); + } + + private function get_display_context($item, $where=array(), $breadcrumbs=array()) { + // Set up previous / next / breadcrumbs / etc to point to CalendarView instead of the album. + + // Figure out the photo's position. + $position = calendarview::get_position($item, $where); + + // Figure out the previous and next items. + if ($position > 1) { + list ($previous_item, $ignore, $next_item) = calendarview::get_items(3, $position - 2, $where); + } else { + list ($next_item) = calendarview::get_items(1, $position, $where); + } + + // Figure out the total number of photos. + $sibling_count = calendarview::get_items_count($where); + + return array("position" => $position, + "previous_item" => $previous_item, + "next_item" => $next_item, + "sibling_count" => $sibling_count, + "breadcrumbs" => $breadcrumbs); } private function _get_calenderprefs_form($display_year, $display_user) { @@ -221,17 +234,31 @@ class CalendarView_Controller extends Controller { // 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++; + if ($display_user == -1) { + $all_photos = ORM::factory("item") + ->viewable() + ->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++; + } + } else { + $all_photos = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->where("captured", "!=", "") + ->where("owner_id", "=", $display_user) + ->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. @@ -266,4 +293,4 @@ class CalendarView_Controller extends Controller { // 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.0/modules/calendarview/css/calendarview_calendar.css b/3.0/modules/calendarview/css/calendarview_calendar.css index 53807042..82dfaa9f 100644 --- a/3.0/modules/calendarview/css/calendarview_calendar.css +++ b/3.0/modules/calendarview/css/calendarview_calendar.css @@ -8,6 +8,15 @@ margin: 10px 10px 10px 10px; } +#g-calendar-profile-grid { + position: relative; + align: center; + float: left; + width: 200px; + height: 145px; + margin: 10px 10px 10px 10px; +} + /* Search form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #cal_user { top: 0px; diff --git a/3.0/modules/calendarview/helpers/calendarview.php b/3.0/modules/calendarview/helpers/calendarview.php new file mode 100644 index 00000000..4406ed7f --- /dev/null +++ b/3.0/modules/calendarview/helpers/calendarview.php @@ -0,0 +1,48 @@ +viewable() + ->merge_where($where) + ->order_by("captured", "ASC") + ->count_all(); + } + + static function get_items($limit=null, $offset=null, $where=array()) { + // Returns the items identified by $where, up to $limit, and starting at $offset. + return ORM::factory("item") + ->viewable() + ->merge_where($where) + ->order_by("captured", "ASC") + ->find_all($limit, $offset); + } + + static function get_position($item, $where=array()) { + // Get's $item's position within $where. + return ORM::factory("item") + ->viewable() + ->merge_where($where) + ->where("items.id", "<=", $item->id) + ->order_by("captured", "ASC") + ->count_all(); + } +} diff --git a/3.0/modules/calendarview/helpers/calendarview_event.php b/3.0/modules/calendarview/helpers/calendarview_event.php index 731a662a..cb410b01 100644 --- a/3.0/modules/calendarview/helpers/calendarview_event.php +++ b/3.0/modules/calendarview/helpers/calendarview_event.php @@ -1,7 +1,7 @@ user_id = $data->user->id; + + // Figure out what month the users newest photo was taken it. + // Make that the last month to display. + // If a user hasn't uploaded anything, make the current month + // the last to be displayed. + $latest_photo = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->where("captured", "!=", "") + ->where("owner_id", "=", $data->user->id) + ->order_by("captured", "DESC") + ->find_all(1); + if (count($latest_photo) > 0) { + $v->user_year = date('Y', $latest_photo[0]->captured); + $v->user_month = date('n', $latest_photo[0]->captured); + } else { + $v->user_year = date('Y'); + $v->user_month = date('n'); + } + + $data->content[] = (object) array("title" => t("User calendar"), "view" => $v); + } +} diff --git a/3.0/modules/calendarview/helpers/calendarview_theme.php b/3.0/modules/calendarview/helpers/calendarview_theme.php index fa8002ea..5c571525 100644 --- a/3.0/modules/calendarview/helpers/calendarview_theme.php +++ b/3.0/modules/calendarview/helpers/calendarview_theme.php @@ -1,7 +1,7 @@ css("calendarview_menu.css"); - return $theme->css("calendarview_calendar.css"); + return $theme->css("calendarview_calendar.css") . + $theme->css("calendarview_menu.css"); } } diff --git a/3.0/modules/calendarview/views/calpage.html.php b/3.0/modules/calendarview/views/calpage.html.php deleted file mode 100644 index 3dab5fc0..00000000 --- a/3.0/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() ?> -
    - - - - - - - - - - -
    -
    -
    -
    -
    - messages() ?> - -
    -
    -
    -
    - page_subtype != "login"): ?> - - -
    -
    - -
    - page_bottom() ?> - - \ No newline at end of file diff --git a/3.0/modules/calendarview/views/user_profile_calendarview.html.php b/3.0/modules/calendarview/views/user_profile_calendarview.html.php new file mode 100644 index 00000000..4d9d68a9 --- /dev/null +++ b/3.0/modules/calendarview/views/user_profile_calendarview.html.php @@ -0,0 +1,86 @@ + +viewable() + ->where("owner_id", "=", $user_id) + ->where("type", "!=", "album") + ->where("captured", ">=", mktime(0, 0, 0, $user_month-2, 1, $user_year)) + ->where("captured", "<", mktime(0, 0, 0, $user_month+1, 1, ($user_year))) + ->order_by("captured") + ->find_all(); + + // Set up some initial variables. + $calendar_year = $user_year; + $counter_months = $user_month - 2; + if ($counter_months < 1) { + $counter_months += 12; + $calendar_year--; + } + $counter_days = 0; + $counter = 0; + + // Print the first month. + print "
    "; + if ((count($items) > 0) && (date("n", $items[$counter]->captured) == $counter_months)) { + $month_url = url::site("calendarview/month/" . $calendar_year . "/" . $user_id . "/" . $counter_months . "/"); + } else { + $month_url = ""; + } + $calendar = new PHPCalendar($counter_months, $calendar_year, $month_url); + + // Loop through each photo taken during the 3 month time frame, and see what month and day they were taken on. + // Make the corresponding dates on the calendars into clickable links. + while ($counter < (count($items))) { + + // Check and see if we've switched to a new month. + // If so, render the current calendar and set up a new one. + // Continue printing empty months until we reach the next photo or the last month. + while (date("n", $items[$counter]->captured) != $counter_months) { + echo $calendar->render(); + print "
    "; + $counter_months++; + if ($counter_months == 13) { + $counter_months = 1; + $calendar_year++; + } + $counter_days = 0; + print "
    "; + if (date("n", $items[$counter]->captured) == $counter_months) { + $month_url = url::site("calendarview/month/" . $calendar_year . "/" . $user_id . "/" . $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[$counter]->captured) > $counter_days) { + $counter_days = date("j", $items[$counter]->captured); + $calendar->event($counter_days, url::site("calendarview/day/" . $calendar_year . "/" . $user_id . "/" . $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 the final month, + // then print out a few empty months to fill the remaining space. + while ($counter_months < $user_month + 1) { + print "
    "; + $month_url = ""; + $calendar = new PHPCalendar($counter_months, $calendar_year, $month_url); + echo $calendar->render(); + print "
    "; + $counter_months++; + } + +?> +


    +
    "> >>
    diff --git a/3.0/modules/captionator/controllers/captionator.php b/3.0/modules/captionator/controllers/captionator.php index 8b380f66..ee494648 100644 --- a/3.0/modules/captionator/controllers/captionator.php +++ b/3.0/modules/captionator/controllers/captionator.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..fc563975 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 @@ _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", "markercluster_gridsize", $form->markercluster->markercluster_gridsize->value); + module::set_var("exif_gps", "markercluster_maxzoom", $form->markercluster->markercluster_maxzoom->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); + module::set_var("exif_gps", "toolbar_map_album", $form->Global->toolbar_map_album->value); + module::set_var("exif_gps", "toolbar_map_user", $form->Global->toolbar_map_user->value); + module::set_var("exif_gps", "restrict_maps", $form->Global->restrict_maps->value); // Display a success message and redirect back to the TagsMap admin page. message::success(t("Your settings have been saved.")); @@ -81,18 +70,29 @@ class Admin_EXIF_GPS_Controller extends Admin_Controller { $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"); + ->label(t("Google APIs Console key (optional):")) + ->value(module::get_var("exif_gps", "googlemap_api_key")); $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); + $gps_global_group->checkbox("toolbar_map_album")->label(t("Show \"Map this album\" icon?")) + ->checked(module::get_var("exif_gps", "toolbar_map_album", false)); + $gps_global_group->checkbox("toolbar_map_user")->label(t("Show \"Map this user\" icon?")) + ->checked(module::get_var("exif_gps", "toolbar_map_user", false)); + $gps_global_group->checkbox("restrict_maps")->label(t("Restrict maps to registered users?")) + ->checked(module::get_var("exif_gps", "restrict_maps", false)); + + // Create a group for marker cluster settings + $gps_markercluster = $form->group("markercluster") + ->label(t("Marker Cluster Settings")); + $gps_markercluster->input("markercluster_gridsize") + ->label(t("Grid Size")) + ->value(module::get_var("exif_gps", "markercluster_gridsize")) + ->rules("required"); + $gps_markercluster->input("markercluster_maxzoom") + ->label(t("Max Zoom")) + ->value(module::get_var("exif_gps", "markercluster_maxzoom")) + ->rules("required"); // Create a group for sidebar settings $gps_sidebar = $form->group("Sidebar") diff --git a/3.0/modules/exif_gps/controllers/exif_gps.php b/3.0/modules/exif_gps/controllers/exif_gps.php index 52b94b9d..23ae186b 100644 --- a/3.0/modules/exif_gps/controllers/exif_gps.php +++ b/3.0/modules/exif_gps/controllers/exif_gps.php @@ -1,7 +1,7 @@ abs_url()); + } + + public function xml($query_type, $query_id, $offset) { + // Generate an xml output of the photos to be mapped. + // $query_type can be either "album" or "user", $query_id is the id# of the album or user to map. + + // If the user can't view maps, don't let them view the xml. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + throw new Kohana_404_Exception(); + } + + $items = ""; + if ($query_type == "user") { + $items = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $query_id) + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->find_all(EXIF_GPS_Controller::$xml_records_limit, $offset); + } elseif ($query_type == "album") { + $items = ORM::factory("item", $query_id) ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") ->viewable() ->order_by("exif_coordinates.latitude", "ASC") - ->descendants(); + ->descendants(EXIF_GPS_Controller::$xml_records_limit, $offset); + } + + $v = new View("exif_gps_coordinates_xml.html"); + $v->items = $items; + header("Content-type: text/xml; charset=utf-8"); + print $v; + } + + public function map($map_type, $type_id) { + // Map all items in the specified album or user. + // Valid values for $map_type are "album" or "user", $type_id is either an + // album id# or a user id#. + + // If the user can't view maps, throw a 404 error. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + throw new Kohana_404_Exception(); + } + + // Figure out what to display for the page title and how many items to display. + $map_title = ""; + $items_count = 0; + if ($map_type == "album") { $curr_album = ORM::factory("item")->where("id", "=", $type_id)->find_all(); $map_title = $curr_album[0]->title; + $items_count = ORM::factory("item", $type_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->descendants_count(); } 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") + $curr_user = ORM::factory("user")->where("id", "=", $type_id)->find_all(); + $map_title = $curr_user[0]->full_name . "'s " . t("Photos"); + $items_count = 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"); + ->count_all(); } - // Make a new page. - $template = new Theme_View("page.html", "other", "EXIFMap"); + // Set up breadcrumbs. + $breadcrumbs = array(); + if ($map_type == "album") { + $counter = 0; + $breadcrumbs[] = Breadcrumb::instance(t("Map"), url::site("exif_gps/map/album/{$type_id}"))->set_last(); + $parent_item = ORM::factory("item", $type_id); + while ($parent_item->id != 1) { + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $breadcrumbs = array_reverse($breadcrumbs, true); + } else { + $root = item::root(); + $breadcrumbs[] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[] = Breadcrumb::instance(t("Photo Map"), url::site("exif_gps/map/{$map_type}/{$type_id}"))->set_last(); + } + + // Set up and display the actual page. + $template = new Theme_View("page.html", "other", "EXIF_GPS_MAP"); $template->page_title = t("Gallery :: Map"); + $template->set_global(array("breadcrumbs" => $breadcrumbs)); $template->content = new View("exif_gps_map.html"); if ($map_title == "") { $template->content->title = t("Map"); @@ -59,17 +122,18 @@ class EXIF_GPS_Controller extends Controller { // 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; + if ($int_map_type == 0) $map_display_type = "ROADMAP"; + if ($int_map_type == 1) $map_display_type = "SATELLITE"; + if ($int_map_type == 2) $map_display_type = "HYBRID"; + if ($int_map_type == 3) $map_display_type = "TERRAIN"; + $template->content->map_type = $map_display_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}"); + // These are used to set up the URL to the xml file. + $template->content->query_type = $map_type; + $template->content->query_id = $type_id; + $template->content->items_count = $items_count; // Load in module preferences. - $template->content->items = $items; $template->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); // Display the page. diff --git a/3.0/modules/exif_gps/helpers/exif_gps.php b/3.0/modules/exif_gps/helpers/exif_gps.php index 823b4b29..c706519f 100644 --- a/3.0/modules/exif_gps/helpers/exif_gps.php +++ b/3.0/modules/exif_gps/helpers/exif_gps.php @@ -1,7 +1,7 @@ guest)) { + return; + } + 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 = ""; + $user_name = ""; $item = $theme->item; if ($item->is_album()) { $album_id = $item->id; @@ -39,20 +45,22 @@ class exif_gps_block_Core { $album_id = $item->parent_id; } $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); - $user_name = $curr_user[0]->full_name; + if (count($curr_user) > 0) { + $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(); + ->descendants_count(1); $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(); + ->count_all(1); if (($album_items_count > 0) || ($user_items_count > 0)) { $block = new Block(); @@ -115,6 +123,7 @@ class exif_gps_block_Core { 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_count = 1; } 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"; @@ -126,21 +135,24 @@ class exif_gps_block_Core { $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) + $items_count = 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) { + ->descendants_count(); + if ($items_count > 0) { $block = new Block(); $block->css_id = "g-exif-gps-location"; $block->title = t("Location"); - $block->content = new View("exif_gps_dynamic2_sidebar.html"); + $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"; - $block->content->items = $items; + $block->content->album_id = $theme->item->id; + $block->content->latitude = 0; + $block->content->longitude = 0; + $block->content->items_count = $items_count; $block->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); } } diff --git a/3.0/modules/exif_gps/helpers/exif_gps_event.php b/3.0/modules/exif_gps/helpers/exif_gps_event.php index 9ee59df9..1c19a941 100644 --- a/3.0/modules/exif_gps/helpers/exif_gps_event.php +++ b/3.0/modules/exif_gps/helpers/exif_gps_event.php @@ -1,7 +1,7 @@ guest)) { + return; + } + $album_id = ""; $item = $theme->item; if ($item->is_album()) { @@ -139,6 +146,13 @@ class exif_gps_event_Core { } static function movie_menu($menu, $theme) { + // Adds album and user map icons to movie pages. + + // Do not display icons if the user can't view the page. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + $album_id = ""; $item = $theme->item; if ($item->is_album()) { @@ -177,8 +191,15 @@ class exif_gps_event_Core { ->css_id("g-exif-gps-user-link")); } } - + static function album_menu($menu, $theme) { + // Adds album and user map icons to album pages. + + // Do not display icons if the user can't view the page. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + $album_id = ""; $item = $theme->item; if ($item->is_album()) { @@ -217,4 +238,37 @@ class exif_gps_event_Core { ->css_id("g-exif-gps-user-link")); } } + + static function show_user_profile($data) { + // Display a map on the user profile pages. + + // Make sure the user can view maps before displaying one. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + + // If there's nothing to map, hide the map. + $items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $data->user->id) + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->count_all(); + if ($items_count == 0) { + return; + } + + // Display the map block. + $v = new View("user_profile_exif_gps.html"); + $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"; + $v->map_type = $map_type; + $v->user_id = $data->user->id; + $v->items_count = $items_count; + $v->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); + $data->content[] = (object) array("title" => t("Photo Map"), "view" => $v); + } } diff --git a/3.0/modules/exif_gps/helpers/exif_gps_installer.php b/3.0/modules/exif_gps/helpers/exif_gps_installer.php index 9dc77968..4f346b4c 100644 --- a/3.0/modules/exif_gps/helpers/exif_gps_installer.php +++ b/3.0/modules/exif_gps/helpers/exif_gps_installer.php @@ -1,7 +1,7 @@ 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. diff --git a/3.0/modules/exif_gps/helpers/exif_gps_theme.php b/3.0/modules/exif_gps/helpers/exif_gps_theme.php index 90431195..8a6bfd0c 100644 --- a/3.0/modules/exif_gps/helpers/exif_gps_theme.php +++ b/3.0/modules/exif_gps/helpers/exif_gps_theme.php @@ -1,7 +1,7 @@ css("exif_gps_menu.css"); + return $theme->css("exif_gps_menu.css") . + $theme->script("markerclusterer_compiled.js"); } } diff --git a/3.0/modules/exif_gps/images/exif_gps-loading-map-large.gif b/3.0/modules/exif_gps/images/exif_gps-loading-map-large.gif new file mode 100644 index 00000000..a259e22f Binary files /dev/null and b/3.0/modules/exif_gps/images/exif_gps-loading-map-large.gif differ diff --git a/3.0/modules/exif_gps/js/markerclusterer_compiled.js b/3.0/modules/exif_gps/js/markerclusterer_compiled.js new file mode 100644 index 00000000..4ddf3045 --- /dev/null +++ b/3.0/modules/exif_gps/js/markerclusterer_compiled.js @@ -0,0 +1,21 @@ +(function(){var d=null;function e(a){return function(b){this[a]=b}}function h(a){return function(){return this[a]}}var j; +function k(a,b,c){this.extend(k,google.maps.OverlayView);this.c=a;this.a=[];this.f=[];this.ca=[53,56,66,78,90];this.j=[];this.A=!1;c=c||{};this.g=c.gridSize||60;this.l=c.minimumClusterSize||2;this.J=c.maxZoom||d;this.j=c.styles||[];this.X=c.imagePath||this.Q;this.W=c.imageExtension||this.P;this.O=!0;if(c.zoomOnClick!=void 0)this.O=c.zoomOnClick;this.r=!1;if(c.averageCenter!=void 0)this.r=c.averageCenter;l(this);this.setMap(a);this.K=this.c.getZoom();var f=this;google.maps.event.addListener(this.c, +"zoom_changed",function(){var a=f.c.getZoom();if(f.K!=a)f.K=a,f.m()});google.maps.event.addListener(this.c,"idle",function(){f.i()});b&&b.length&&this.C(b,!1)}j=k.prototype;j.Q="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m";j.P="png";j.extend=function(a,b){return function(a){for(var b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])};j.onAdd=function(){if(!this.A)this.A=!0,n(this)};j.draw=function(){}; +function l(a){if(!a.j.length)for(var b=0,c;c=a.ca[b];b++)a.j.push({url:a.X+(b+1)+"."+a.W,height:c,width:c})}j.S=function(){for(var a=this.o(),b=new google.maps.LatLngBounds,c=0,f;f=a[c];c++)b.extend(f.getPosition());this.c.fitBounds(b)};j.z=h("j");j.o=h("a");j.V=function(){return this.a.length};j.ba=e("J");j.I=h("J");j.G=function(a,b){for(var c=0,f=a.length,g=f;g!==0;)g=parseInt(g/10,10),c++;c=Math.min(c,b);return{text:f,index:c}};j.$=e("G");j.H=h("G"); +j.C=function(a,b){for(var c=0,f;f=a[c];c++)q(this,f);b||this.i()};function q(a,b){b.s=!1;b.draggable&&google.maps.event.addListener(b,"dragend",function(){b.s=!1;a.L()});a.a.push(b)}j.q=function(a,b){q(this,a);b||this.i()};function r(a,b){var c=-1;if(a.a.indexOf)c=a.a.indexOf(b);else for(var f=0,g;g=a.a[f];f++)if(g==b){c=f;break}if(c==-1)return!1;b.setMap(d);a.a.splice(c,1);return!0}j.Y=function(a,b){var c=r(this,a);return!b&&c?(this.m(),this.i(),!0):!1}; +j.Z=function(a,b){for(var c=!1,f=0,g;g=a[f];f++)g=r(this,g),c=c||g;if(!b&&c)return this.m(),this.i(),!0};j.U=function(){return this.f.length};j.getMap=h("c");j.setMap=e("c");j.w=h("g");j.aa=e("g"); +j.v=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),f=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng()),c=b.fromLatLngToDivPixel(c);c.x+=this.g;c.y-=this.g;f=b.fromLatLngToDivPixel(f);f.x-=this.g;f.y+=this.g;c=b.fromDivPixelToLatLng(c);b=b.fromDivPixelToLatLng(f);a.extend(c);a.extend(b);return a};j.R=function(){this.m(!0);this.a=[]}; +j.m=function(a){for(var b=0,c;c=this.f[b];b++)c.remove();for(b=0;c=this.a[b];b++)c.s=!1,a&&c.setMap(d);this.f=[]};j.L=function(){var a=this.f.slice();this.f.length=0;this.m();this.i();window.setTimeout(function(){for(var b=0,c;c=a[b];b++)c.remove()},0)};j.i=function(){n(this)}; +function n(a){if(a.A)for(var b=a.v(new google.maps.LatLngBounds(a.c.getBounds().getSouthWest(),a.c.getBounds().getNorthEast())),c=0,f;f=a.a[c];c++)if(!f.s&&b.contains(f.getPosition())){for(var g=a,u=4E4,o=d,v=0,m=void 0;m=g.f[v];v++){var i=m.getCenter();if(i){var p=f.getPosition();if(!i||!p)i=0;else var w=(p.lat()-i.lat())*Math.PI/180,x=(p.lng()-i.lng())*Math.PI/180,i=Math.sin(w/2)*Math.sin(w/2)+Math.cos(i.lat()*Math.PI/180)*Math.cos(p.lat()*Math.PI/180)*Math.sin(x/2)*Math.sin(x/2),i=6371*2*Math.atan2(Math.sqrt(i), +Math.sqrt(1-i));i=this.l&&a.setMap(d); +a=this.c.getZoom();if((b=this.k.I())&&a>b)for(a=0;b=this.a[a];a++)b.setMap(this.c);else if(this.a.length0&&a.e[0]0&&a.e[1] diff --git a/3.0/modules/exif_gps/views/exif_gps_coordinates_xml.html.php b/3.0/modules/exif_gps/views/exif_gps_coordinates_xml.html.php new file mode 100644 index 00000000..c858a236 --- /dev/null +++ b/3.0/modules/exif_gps/views/exif_gps_coordinates_xml.html.php @@ -0,0 +1,13 @@ + +\n"; ?> + + +where("item_id", "=", $item->id)->find(); ?> +thumb_img(array("class" => "g-exif-gps-thumbnail"))); ?> + + +", ">", $str_thumb_html); ?> + + id}"); ?>" thumb="" /> + + diff --git a/3.0/modules/exif_gps/views/exif_gps_dynamic2_sidebar.html.php b/3.0/modules/exif_gps/views/exif_gps_dynamic2_sidebar.html.php deleted file mode 100644 index f4f95799..00000000 --- a/3.0/modules/exif_gps/views/exif_gps_dynamic2_sidebar.html.php +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - diff --git a/3.0/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php b/3.0/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php index ff28e101..d8465d4a 100644 --- a/3.0/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php +++ b/3.0/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php @@ -1,22 +1,169 @@ - + - + + + +
    +
    +
    +

    +

    + " style="vertical-align: middle;"> +

    +
    +
    diff --git a/3.0/modules/exif_gps/views/exif_gps_map.html.php b/3.0/modules/exif_gps/views/exif_gps_map.html.php index 95f6221c..458c0d88 100644 --- a/3.0/modules/exif_gps/views/exif_gps_map.html.php +++ b/3.0/modules/exif_gps/views/exif_gps_map.html.php @@ -1,66 +1,135 @@ - + + +
    dynamic_top() ?> @@ -89,8 +177,13 @@


    -
    - -
    - +
    +
    +
    +

    +

    + " style="vertical-align: middle;"> +

    +
    +
    dynamic_bottom() ?> diff --git a/3.0/modules/exif_gps/views/exif_gps_maps_sidebar.html.php b/3.0/modules/exif_gps/views/exif_gps_maps_sidebar.html.php index 495554ac..7425bf45 100644 --- a/3.0/modules/exif_gps/views/exif_gps_maps_sidebar.html.php +++ b/3.0/modules/exif_gps/views/exif_gps_maps_sidebar.html.php @@ -1,9 +1,9 @@
      - 0): ?> + 0)): ?>
    • ">
    • - 0): ?> + 0)): ?>
    • ">
    diff --git a/3.0/modules/exif_gps/views/exif_gps_static_sidebar.html.php b/3.0/modules/exif_gps/views/exif_gps_static_sidebar.html.php index 11d80c74..39c4918a 100644 --- a/3.0/modules/exif_gps/views/exif_gps_static_sidebar.html.php +++ b/3.0/modules/exif_gps/views/exif_gps_static_sidebar.html.php @@ -1,2 +1,8 @@ -&size=205x214&maptype=&markers=color:red|color:red|,&sensor=false"> + +&size=205x214&maptype=&markers=color:red|color:red|,&sensor=false"> diff --git a/3.0/modules/exif_gps/views/user_profile_exif_gps.html.php b/3.0/modules/exif_gps/views/user_profile_exif_gps.html.php new file mode 100644 index 00000000..ebb9e33f --- /dev/null +++ b/3.0/modules/exif_gps/views/user_profile_exif_gps.html.php @@ -0,0 +1,181 @@ + + + + + + +
    +
    +
    +

    +

    + " style="vertical-align: middle;"> +

    +
    +
    diff --git a/3.0/modules/export_facebook/controllers/export_facebook.php b/3.0/modules/export_facebook/controllers/export_facebook.php index e40f9a40..d8b81a8d 100644 --- a/3.0/modules/export_facebook/controllers/export_facebook.php +++ b/3.0/modules/export_facebook/controllers/export_facebook.php @@ -1,7 +1,7 @@ page_title = t("Fotomoto"); + $view->content = new View("admin_fotomotorw.html"); + + // Generate a form to allow the user to choose which links to display under photos. + $form = new Forge("admin/fotomotorw/savedisplay", "", "post", + array("id" => "g-fotomotorw-admin-display-prefs")); + + $display_links_group = $form->group("fotomoto_display_links_group"); + $link_options["fotomoto_buy_prints"] = array(t("Buy Prints"), module::get_var("fotomotorw", "fotomoto_buy_prints")); + $link_options["fotomoto_buy_cards"] = array(t("Buy Cards"), module::get_var("fotomotorw", "fotomoto_buy_cards")); + $link_options["fotomoto_buy_download"] = array(t("Download"), module::get_var("fotomotorw", "fotomoto_buy_download")); + $link_options["fotomoto_share_ecard"] = array(t("Send eCard"), module::get_var("fotomotorw", "fotomoto_share_ecard")); + $link_options["fotomoto_share_facebook"] = array(t("Share on Facebook"), module::get_var("fotomotorw", "fotomoto_share_facebook")); + $link_options["fotomoto_share_twitter"] = array(t("Share on Twitter"), module::get_var("fotomotorw", "fotomoto_share_twitter")); + $link_options["fotomoto_share_digg"] = array(t("Share on Digg"), module::get_var("fotomotorw", "fotomoto_share_digg")); + + // Turn the array into a series of checkboxes. + $display_links_group->checklist("fotomoto_display_links") + ->options($link_options); + + // Add a save button to the form. + $form->submit("SaveSettings")->value(t("Save")); + + $view->content->display_form = $form; + print $view; + } + + public function reset_private_key() { + // Generate a new (random) private key. + module::set_var("fotomotorw", "fotomoto_private_key", md5(random::hash() . access::private_key())); + message::success(t("Your Photomoto private key has been reset.")); + url::redirect("admin/fotomotorw"); + } + + public function savedisplay() { + // Save the admin's preferences for which fotomoto links to display under each photo. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Figure out which boxes where checked + $linkOptions_array = Input::instance()->post("fotomoto_display_links"); + $buy_prints = false; + $buy_cards = false; + $buy_download = false; + $share_ecard = false; + $share_facebook = false; + $share_twitter = false; + $share_digg = false; + for ($i = 0; $i < count($linkOptions_array); $i++) { + if ($linkOptions_array[$i] == "fotomoto_buy_prints") { + $buy_prints = true; + } + if ($linkOptions_array[$i] == "fotomoto_buy_cards") { + $buy_cards = true; + } + if ($linkOptions_array[$i] == "fotomoto_buy_download") { + $buy_download = true; + } + if ($linkOptions_array[$i] == "fotomoto_share_ecard") { + $share_ecard = true; + } + if ($linkOptions_array[$i] == "fotomoto_share_facebook") { + $share_facebook = true; + } + if ($linkOptions_array[$i] == "fotomoto_share_twitter") { + $share_twitter = true; + } + if ($linkOptions_array[$i] == "fotomoto_share_digg") { + $share_digg = true; + } + } + + // Save Settings. + module::set_var("fotomotorw", "fotomoto_buy_prints", $buy_prints); + module::set_var("fotomotorw", "fotomoto_buy_cards", $buy_cards); + module::set_var("fotomotorw", "fotomoto_buy_download", $buy_download); + module::set_var("fotomotorw", "fotomoto_share_ecard", $share_ecard); + module::set_var("fotomotorw", "fotomoto_share_facebook", $share_facebook); + module::set_var("fotomotorw", "fotomoto_share_twitter", $share_twitter); + module::set_var("fotomotorw", "fotomoto_share_digg", $share_digg); + + // Display a success message and reload the admin page. + message::success(t("Your Settings Have Been Saved.")); + url::redirect("admin/fotomotorw"); + } +} diff --git a/3.0/modules/fotomotorw/controllers/fotomotorw.php b/3.0/modules/fotomotorw/controllers/fotomotorw.php new file mode 100644 index 00000000..aa7de2d6 --- /dev/null +++ b/3.0/modules/fotomotorw/controllers/fotomotorw.php @@ -0,0 +1,81 @@ +loaded()) { + throw new Kohana_404_Exception(); + } + + // Make sure checksum matches, if not, throw a 404 error. + if ($str_checksum != md5($item->created)) { + throw new Kohana_404_Exception(); + } + + // If the resize file doesn't exist for some reason, display a 404 error. + if (!file_exists($item->resize_path())) { + throw new Kohana_404_Exception(); + } + + // Display the image. + header("Content-Type: {$item->mime_type}"); + Kohana::close_buffers(false); + $fd = fopen($item->resize_path(), "rb"); + fpassthru($fd); + fclose($fd); + } + + public function print_proxy($site_key, $file_id) { + // This function retrieves the full-sized image for fotomoto. + // As this function by-passes normal Gallery security, a private + // site-key is used to try and prevent people other then fotomoto + // from finding the URL. + + // If the site key doesn't match, display a 404 error. + if ($site_key != module::get_var("fotomotorw", "fotomoto_private_key")) { + throw new Kohana_404_Exception(); + } + + // Load the photo from the provided id. If the id# is invalid, display a 404 error. + $item = ORM::factory("item", $file_id); + if (!$item->loaded()) { + throw new Kohana_404_Exception(); + } + + // If the image file doesn't exist for some reason, display a 404 error. + if (!file_exists($item->file_path())) { + throw new Kohana_404_Exception(); + } + + // Display the image. + header("Content-Type: {$item->mime_type}"); + Kohana::close_buffers(false); + $fd = fopen($item->file_path(), "rb"); + fpassthru($fd); + fclose($fd); + } +} diff --git a/3.1/modules/iptc/helpers/iptc_event.php b/3.0/modules/fotomotorw/helpers/fotomotorw_event.php similarity index 56% rename from 3.1/modules/iptc/helpers/iptc_event.php rename to 3.0/modules/fotomotorw/helpers/fotomotorw_event.php index c7b4a6cc..9e58b9d0 100644 --- a/3.1/modules/iptc/helpers/iptc_event.php +++ b/3.0/modules/fotomotorw/helpers/fotomotorw_event.php @@ -1,7 +1,7 @@ is_photo()) { - iptc::extract($item); - } - } - static function item_deleted($item) { - db::build() - ->delete("iptc_records") - ->where("item_id", "=", $item->id) - ->execute(); - } - +class fotomotorw_event_Core { static function admin_menu($menu, $theme) { - // Add a link to the admin page to the Settings menu. + // Display an option under the admin Settings menu. $menu->get("settings_menu") ->append(Menu::factory("link") - ->id("iptc") - ->label(t("IPTC Settings")) - ->url(url::site("admin/iptc"))); + ->id("fotomotorw_menu") + ->label(t("Fotomoto")) + ->url(url::site("admin/fotomotorw"))); + } + + static function context_menu($menu, $theme, $item) { + // Add a "Buy Prints" option to the photo's thumbnail menu. + if ($item->type == "photo") { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("fotomotorw") + ->label(t("Buy Prints")) + ->url("javascript:showFotomotoDialog(100, '" . url::abs_site("fotomotorw/resize/" . md5($item->created) . "/{$item->id}") . "');") + ->css_class("g-print-fotomotorw-link ui-icon-print")); + } } } diff --git a/3.1/modules/calendarview/helpers/calendarview_installer.php b/3.0/modules/fotomotorw/helpers/fotomotorw_installer.php similarity index 54% rename from 3.1/modules/calendarview/helpers/calendarview_installer.php rename to 3.0/modules/fotomotorw/helpers/fotomotorw_installer.php index b7d5828d..b949b61a 100644 --- a/3.1/modules/calendarview/helpers/calendarview_installer.php +++ b/3.0/modules/fotomotorw/helpers/fotomotorw_installer.php @@ -1,7 +1,7 @@ page_subtype == "photo") || ($theme->page_subtype == "album")) { + return html::script('http://widget.fotomoto.com/stores/script/' . module::get_var("fotomotorw", "fotomoto_site_key") . '.js?api=true'); + } + } + + static function resize_bottom($theme) { + // Create a new block to use to display Fotomoto buy links below the photo. + $block = new Block; + $block->css_id = "g-fotomoto"; + $block->anchor = "fotomoto"; + + // Generate an array of links to display below photos. + $link_array = array(); + $counter = 0; + if (module::get_var("fotomotorw", "fotomoto_buy_prints")) { + $link_array[$counter] = array("100", "Buy Prints"); + $counter++; + } + if (module::get_var("fotomotorw", "fotomoto_buy_cards")) { + $link_array[$counter] = array("300", "Buy Cards"); + $counter++; + } + if (module::get_var("fotomotorw", "fotomoto_buy_download")) { + $link_array[$counter] = array("400", "Download"); + $counter++; + } + if (module::get_var("fotomotorw", "fotomoto_share_ecard")) { + $link_array[$counter] = array("200", "Send eCard"); + $counter++; + } + if (module::get_var("fotomotorw", "fotomoto_share_facebook")) { + $link_array[$counter] = array("201", "Share on Facebook"); + $counter++; + } + if (module::get_var("fotomotorw", "fotomoto_share_twitter")) { + $link_array[$counter] = array("202", "Share on Twitter"); + $counter++; + } + if (module::get_var("fotomotorw", "fotomoto_share_digg")) { + $link_array[$counter] = array("203", "Share on Digg"); + $counter++; + } + + $view = new View("fotomotorw_photo_block.html"); + $view->details = $link_array; + $block->content = $view; + return $block; + } + + static function album_bottom($theme) { + // Add some javascript to the bottom of album pages. + $block = new Block; + $block->css_id = "g-fotomoto"; + $block->anchor = "fotomoto"; + $view = new View("fotomotorw_album_block.html"); + $block->content = $view; + return $block; + } +} diff --git a/3.0/modules/fotomotorw/module.info b/3.0/modules/fotomotorw/module.info new file mode 100644 index 00000000..593ab7e3 --- /dev/null +++ b/3.0/modules/fotomotorw/module.info @@ -0,0 +1,7 @@ +name = "Fotomoto (rWatcher)" +description = "Sell photos on your site through Fotomoto" +version = 1 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" +info_url = "http://codex.gallery2.org/Gallery3:Modules:fotomotorw" +discuss_url = "http://gallery.menalto.com/node/106765" diff --git a/3.0/modules/fotomotorw/views/admin_fotomotorw.html.php b/3.0/modules/fotomotorw/views/admin_fotomotorw.html.php new file mode 100644 index 00000000..b8175472 --- /dev/null +++ b/3.0/modules/fotomotorw/views/admin_fotomotorw.html.php @@ -0,0 +1,64 @@ + + +
    +

    +
    + + + + + + + + +
    + " class="g-dialog-link"> + + + + + + +
    +

    (Log in to the Fotomoto Dashboard to get your Site Key.)

    + + + + + + + + +
    + +
    + + + + + + + + +
    + (">)
    +
    +
    +
    + +
    +

    + + Auto Pickup, or click here."); ?>
    +
    +
    + "
    +
    +
    + + +
    diff --git a/3.0/modules/fotomotorw/views/fotomotorw_album_block.html.php b/3.0/modules/fotomotorw/views/fotomotorw_album_block.html.php new file mode 100644 index 00000000..77bf2f2b --- /dev/null +++ b/3.0/modules/fotomotorw/views/fotomotorw_album_block.html.php @@ -0,0 +1,6 @@ + + diff --git a/3.0/modules/fotomotorw/views/fotomotorw_photo_block.html.php b/3.0/modules/fotomotorw/views/fotomotorw_photo_block.html.php new file mode 100644 index 00000000..a3209822 --- /dev/null +++ b/3.0/modules/fotomotorw/views/fotomotorw_photo_block.html.php @@ -0,0 +1,15 @@ + +
    + 0): ?> + + + | + + + +
    + diff --git a/3.0/modules/google_analytics/controllers/admin_google_analytics.php b/3.0/modules/google_analytics/controllers/admin_google_analytics.php index 4a28ad8d..328e294a 100644 --- a/3.0/modules/google_analytics/controllers/admin_google_analytics.php +++ b/3.0/modules/google_analytics/controllers/admin_google_analytics.php @@ -1,53 +1,62 @@ -_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - module::set_var( - "google_analytics", "code", $form->google_analytics_code->analytics_code->value); - url::redirect("admin/google_analytics"); - } - - print $this->_get_view($form); - } - - private function _get_view($form=null) { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_google_analytics.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - $form = new Forge("admin/google_analytics/handler", "", "post", array("id" => "g-admin-form")); - $group = $form->group("google_analytics_code"); - $group->input("analytics_code")->label(t('Enter the Web-Property-ID given by Google.'))->rules("required")->value(module::get_var("google_analytics", "code")); - $group->submit("submit")->value(t("Save")); - - return $form; - } +_get_view(); + } + + public function handler() + { + access::verify_csrf(); + + $form = $this->_get_form(); + + if ($form->validate()) + { + module::set_var("google_analytics", "code", $form->google_analytics_code->inputs["analytics_code"]->value); + module::set_var("google_analytics", "owneradmin_hidden", $form->google_analytics_code->inputs["analytics_owneradmin_hidden"]->value); + url::redirect("admin/google_analytics"); + } + + print $this->_get_view($form); + } + + private function _get_view($form=null) + { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_google_analytics.html"); + $v->content->form = empty($form) ? $this->_get_form() : $form; + return $v; + } + + private function _get_form() + { + $form = new Forge("admin/google_analytics/handler", "", "post", + array("id" => "gAdminForm")); + $group = $form->group("google_analytics_code"); + $group->input("analytics_code")->label(t('Enter the Web-Property-ID given by Google.'))->rules("required")->value(module::get_var("google_analytics", "code")); + $group->checkbox("analytics_owneradmin_hidden")->label(t("Omit code for owner and admin")) + ->checked(module::get_var("google_analytics", "owneradmin_hidden", false) == 1); + $group->submit("submit")->value(t("Save")); + + return $form; + } } \ No newline at end of file diff --git a/3.0/modules/google_analytics/helpers/google_analytics_event.php b/3.0/modules/google_analytics/helpers/google_analytics_event.php index 0672cf73..1cef1b08 100644 --- a/3.0/modules/google_analytics/helpers/google_analytics_event.php +++ b/3.0/modules/google_analytics/helpers/google_analytics_event.php @@ -1,28 +1,28 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("google_analytics_menu") - ->label(t("Google Analytics")) - ->url(url::site("admin/google_analytics"))); - } -} +get("settings_menu") + ->append(Menu::factory("link") + ->id("google_analytics_menu") + ->label(t("Google Analytics")) + ->url(url::site("admin/google_analytics"))); + } +} diff --git a/3.1/modules/themeroller/helpers/themeroller_installer.php b/3.0/modules/google_analytics/helpers/google_analytics_installer.php similarity index 53% rename from 3.1/modules/themeroller/helpers/themeroller_installer.php rename to 3.0/modules/google_analytics/helpers/google_analytics_installer.php index a2d5688d..0e52c059 100644 --- a/3.1/modules/themeroller/helpers/themeroller_installer.php +++ b/3.0/modules/google_analytics/helpers/google_analytics_installer.php @@ -1,44 +1,45 @@ - "zip", "zlib" => "zlib")); - } - return $messages; - } -} + - - - '; - - return $google_code; - } -} +item->owner_id != identity::active_user()->id) && (identity::active_user()->admin == 0) ) { + $u_o = 0; + } + + if ( $u_o == 0 || ( ($u_o == 1) && (module::get_var("google_analytics", "owneradmin_hidden") == 0) ) ) { + $google_code = ' + + + '; + + return $google_code; + } + + } + +} + + diff --git a/3.0/modules/google_analytics/module.info b/3.0/modules/google_analytics/module.info index ca5a51e3..b49b147b 100644 --- a/3.0/modules/google_analytics/module.info +++ b/3.0/modules/google_analytics/module.info @@ -1,7 +1,7 @@ -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" +name = Google Analytics +description = Renders the Google Analytics Code in the head of the page. +version = 4 +author_name = "" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:google_analytics" +discuss_url = "http://gallery.menalto.com/node/88884" diff --git a/3.0/modules/google_analytics/views/admin_google_analytics.html.php b/3.0/modules/google_analytics/views/admin_google_analytics.html.php index e516f35a..9abc3c39 100644 --- a/3.0/modules/google_analytics/views/admin_google_analytics.html.php +++ b/3.0/modules/google_analytics/views/admin_google_analytics.html.php @@ -1,6 +1,6 @@ - -
    -

    -

    - -
    + +
    +

    +

    + +
    diff --git a/3.0/modules/gwtorganize/controllers/admin_gwtorganise.php b/3.0/modules/gwtorganize/controllers/admin_gwtorganise.php index 0c2b0486..4f4ea8ec 100644 --- a/3.0/modules/gwtorganize/controllers/admin_gwtorganise.php +++ b/3.0/modules/gwtorganize/controllers/admin_gwtorganise.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 @@ loaded()) { + throw new Kohana_404_Exception(); + } + + // Grab the first 10 items for the specified display type. + // Default to "popular" if display type is invalid. + $template = new View("latestupdates_user_profile_carousel.html"); + $template->items = latestupdates_Controller::items($str_display_type, $user_id, 10); + + // Figure out the text for the "View more" link. + if ($str_display_type == "recent") { + $template->str_view_more_title = t("View all recent uploads"); + } elseif ($str_display_type == "albums") { + $template->str_view_more_title = t("View all recent albums"); + } else { + $template->str_view_more_title = t("View more popular uploads"); + } + + // Set up a "View more" url. + $template->str_view_more_url = url::site("latestupdates/users/{$str_display_type}/{$user_id}"); + + // Display the page. + print $template; + + // Make item links in the carousel load as virtual albums for the view type instead of the regular album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + $str_display_type, $user_id); + return ; + } + + public function users($str_display_type, $user_id) { + // Generate a dynamic page with items uploaded by a specific user ($user_id). + + // Make sure user_id is valid. + $current_user = ORM::factory("user", $user_id); + if (!$current_user->loaded()) { + throw new Kohana_404_Exception(); + } + + // 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/users/{$str_display_type}/{$user_id}"); + } + + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = latestupdates_Controller::_get_position($child, $str_display_type, $user_id); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect("latestupdates/users/{$str_display_type}/{$user_id}"); + } else { + url::redirect("latestupdates/users/{$str_display_type}/{$user_id}?page=$page"); + } + } + } + + // First item to display. + $offset = ($page - 1) * $page_size; + + // Determine the total number of items, + // for page numbering purposes. + $count = latestupdates_Controller::items_count($str_display_type, $user_id); + + // 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/users/{$str_display_type}/{$user_id}?page=$max_pages"); + } + + // Figure out which items to display on this page. + $children = latestupdates_Controller::items($str_display_type, $user_id, $page_size, $offset); + + // Figure out the page title. + $str_page_title = ""; + if ($str_display_type == "recent") { + $str_page_title = t("Recent Uploads"); + } elseif ($str_display_type == "albums") { + $str_page_title = t("Recent Albums"); + } else { + $str_page_title = t("Most Viewed"); + } + + // Set up the previous and next page buttons. + if ($page > 1) { + $previous_page = $page - 1; + $view->previous_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$previous_page}"); + } + if ($page < $max_pages) { + $next_page = $page + 1; + $view->next_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$next_page}"); + } + + // Set up and display the actual page. + $root = item::root(); + $template = new Theme_View("page.html", "collection", "LatestUpdates"); + $template->page_title = t("Gallery :: Latest Updates"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $children, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance(t("User profile: %name", array("name" => $current_user->display_name())), + url::site("user_profile/show/{$user_id}")), + Breadcrumb::instance($str_page_title, + url::site("latestupdates/users/{$str_display_type}/{$user_id}"))->set_last()), + "children_count" => $count)); + $template->content = new View("dynamic.html"); + $template->content->title = $str_page_title; + + // Display the page. + print $template; + + // Set up the callback so links within the photo page will lead to photos within the virtual album + // instead of the actual album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + $str_display_type, $user_id); + } public function albums($id) { // Figure out how many items to display on each page. $page_size = module::get_var("gallery", "page_size", 9); + // Load the parent album. + $item = ORM::factory("item", $id); + // 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); @@ -30,18 +165,27 @@ class latestupdates_Controller extends Controller { url::redirect("latestupdates/albums/{$item->id}"); } + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = latestupdates_Controller::_get_position($child, "descendants", $item->id); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect("latestupdates/albums/{$item->id}"); + } else { + url::redirect("latestupdates/albums/{$item->id}?page=$page"); + } + } + } + // 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(); + $count = latestupdates_Controller::items_count("descendants", $item->id); // Figure out what the highest page number is. $max_pages = ceil($count / $page_size); @@ -52,11 +196,7 @@ class latestupdates_Controller extends Controller { } // Figure out which items to display on this page. - $children = $item - ->viewable() - ->where("type", "!=", "album") - ->order_by("created", "DESC") - ->descendants($page_size, $offset); + $children = latestupdates_Controller::items("descendants", $item->id, $page_size, $offset); // Set up the previous and next page buttons. if ($page > 1) { @@ -68,40 +208,73 @@ class latestupdates_Controller extends Controller { $view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}"); } + // Set up breadcrumbs. + $breadcrumbs = array(); + $counter = 0; + $breadcrumbs[] = Breadcrumb::instance(t("Recent Uploads"), url::site("latestupdates/albums/{$item->id}"))->set_last(); + $parent_item = $item; + while ($parent_item->id != 1) { + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $breadcrumbs = array_reverse($breadcrumbs, true); + // Set up and display the actual page. + $root = item::root(); $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->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $children, + "breadcrumbs" => $breadcrumbs, + "children_count" => $count)); $template->content = new View("dynamic.html"); - $template->content->title = t("Latest Updates"); + $template->content->title = t("Recent Uploads"); + + // Display the page. print $template; + + // Set up the callback so links within the photo page will lead to photos within the virtual album + // instead of the actual album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + "descendants", $item->id); } public function updates() { - // Figure out how many items to display on each page. - $page_size = module::get_var("gallery", "page_size", 9); + // 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); + // 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"); } + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = latestupdates_Controller::_get_position($child, "recent", 0); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect("latestupdates/updates"); + } else { + url::redirect("latestupdates/updates?page=$page"); + } + } + } + // 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(); + $count = latestupdates_Controller::items_count("recent", 0); // Figure out what the highest page number is. $max_pages = ceil($count / $page_size); @@ -112,11 +285,7 @@ class latestupdates_Controller extends Controller { } // 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); + $items = latestupdates_Controller::items("recent", 0, $page_size, $offset); // Set up the previous and next page buttons. if ($page > 1) { @@ -129,16 +298,298 @@ class latestupdates_Controller extends Controller { } // Set up and display the actual page. + $root = item::root(); $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"); + $template->page_title = t("Gallery :: Latest Updates"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $items, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance(t("Recent Uploads"), + url::site("latestupdates/updates"))->set_last()), + "children_count" => $count)); + $template->content = new View("dynamic.html"); + $template->content->title = t("Recent Uploads"); + + // Display the page. print $template; + + // Set up the callback so links within the photo page will lead to photos within the virtual album + // instead of the actual album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + "recent", 0); } -} \ No newline at end of file + static function get_display_context($item, $str_display_type, $user_id) { + // Set up display elements on the photo page to link to the virtual album. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // Figure out page title. + $str_page_title = ""; + if ($str_display_type == "recent") { + $str_page_title = t("Recent Uploads"); + } elseif ($str_display_type == "albums") { + $str_page_title = t("Recent Albums"); + } elseif ($str_display_type == "descendants") { + $str_page_title = t("Recent Uploads"); + } else { + $str_page_title = t("Most Viewed"); + } + + // Figure out item position. + $position = latestupdates_Controller::_get_position($item, $str_display_type, $user_id); + + // Figure out which items are the previous and next items with the virtual album. + if ($position > 1) { + list ($previous_item, $ignore, $next_item) = + latestupdates_Controller::items($str_display_type, $user_id, 3, $position - 2); + } else { + $previous_item = null; + list ($next_item) = latestupdates_Controller::items($str_display_type, $user_id, 1, $position); + } + + // Figure out total number of items (excluding albums). + $count = latestupdates_Controller::items_count($str_display_type, $user_id); + + // Set up breadcrumbs. + $root = item::root(); + $breadcrumbs = array(); + if ($user_id == 0) { + $breadcrumbs[0] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[1] = Breadcrumb::instance($str_page_title, + url::site("latestupdates/updates?show={$item->id}")); + $breadcrumbs[2] = Breadcrumb::instance($item->title, $item->url())->set_last(); + } else { + if ($str_display_type == "descendants") { + $counter = 0; + $breadcrumbs[] = Breadcrumb::instance($item->title, $item->url())->set_last(); + $breadcrumbs[] = Breadcrumb::instance(t("Recent Uploads"), url::site("latestupdates/albums/{$user_id}?show={$item->id}")); + $parent_item = ORM::factory("item", $user_id); + while ($parent_item->id != 1) { + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $breadcrumbs = array_reverse($breadcrumbs, true); + } else { + $current_user = ORM::factory("user", $user_id); + $breadcrumbs[0] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[1] = Breadcrumb::instance(t("User profile: %name", array("name" => $current_user->display_name())), + url::site("user_profile/show/{$user_id}")); + $breadcrumbs[2] = Breadcrumb::instance($str_page_title, + url::site("latestupdates/users/{$str_display_type}/{$user_id}?show={$item->id}")); + $breadcrumbs[3] = Breadcrumb::instance($item->title, $item->url())->set_last(); + } + } + + // Return the display elements. + return array("position" => $position, + "previous_item" => $previous_item, + "next_item" => $next_item, + "sibling_count" => $count, + "breadcrumbs" => $breadcrumbs + ); + } + + static function items_count($str_display_type, $user_id) { + // Figure out the total number of items. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // If $str_display_type is albums, then we only want albums. + // If it's not, then we want everything except albums. + if ($str_display_type == "albums") { + // This is only used for user profiles, so we always want + // results from a specific user. + $count = ORM::factory("item") + ->viewable() + ->where("type", "=", "album") + ->where("owner_id", "=", $user_id) + ->count_all(); + } else { + + // If $user_id is not 0 we only want results from a specific user, + // Or else we want results from any user. + if ($user_id == 0) { + $count = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->count_all(); + } else { + + // If type is descendants, then user_id is actually an item id#. + if ($str_display_type == "descendants") { + $item = ORM::factory("item", $user_id); + $count = $item + ->viewable() + ->where("type", "!=", "album") + ->order_by("created", "DESC") + ->descendants_count(); + } else { + $count = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->where("owner_id", "=", $user_id) + ->count_all(); + } + } + } + + return $count; + } + + static function items($str_display_type, $user_id, $limit=null, $offset=null) { + // Query the database for a list of items to display in the virtual album. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // Figure out search parameters based on $str_display_type. + $str_where = array(); + $str_orderby_field = ""; + if ($str_display_type == "recent") { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "created"; + } elseif ($str_display_type == "albums") { + $str_where = array(array("type", "=", "album")); + $str_orderby_field = "created"; + } else { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "view_count"; + } + + // Search the database for matching items. + + // Searching for descendants of a parent album is significantly + // different from the other query types, so we're doing this one + // seperately. + if ($str_display_type == "descendants") { + $item = ORM::factory("item", $user_id); + return $item + ->viewable() + ->where("type", "!=", "album") + ->order_by("created", "DESC") + ->descendants($limit, $offset); + } + + // If $user_id is greater then 0, limit results + // to a specific user. + if ($user_id == 0) { + return ORM::factory("item") + ->viewable() + ->merge_where($str_where) + ->order_by($str_orderby_field, "DESC") + ->find_all($limit, $offset); + } else { + return ORM::factory("item") + ->viewable() + ->merge_where($str_where) + ->where("owner_id", "=", $user_id) + ->order_by($str_orderby_field, "DESC") + ->find_all($limit, $offset); + } + } + + private function _get_position($item, $str_display_type, $user_id) { + // Figure out the item's position within the virtual album. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // Figure out search conditions. + $str_where = array(); + $str_orderby_field = ""; + if ($str_display_type == "recent") { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "created"; + } elseif ($str_display_type == "albums") { + $str_where = array(array("type", "=", "album")); + $str_orderby_field = "created"; + } else { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "view_count"; + } + + // Count the number of records that have a higher orderby_field value then + // the item we're looking for. + $position = 0; + if ($user_id == 0) { + $position = ORM::factory("item") + ->viewable() + ->merge_where($str_where) + ->where($str_orderby_field, ">", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC") + ->count_all(); + } else { + if ($str_display_type == "descendants") { + $album_item = ORM::factory("item", $user_id); + $position = $album_item + ->viewable() + ->where("type", "!=", "album") + ->where("created", ">", $item->created) + ->order_by("created", "DESC") + ->descendants_count(); + } else { + $position = ORM::factory("item") + ->viewable() + ->where("owner_id", "=", $user_id) + ->merge_where($str_where) + ->where($str_orderby_field, ">", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC") + ->count_all(); + } + } + + // Set up a db query for all records with the same orderby field value + // as the item we're looking for. + $items = ORM::factory("item"); + if ($user_id == 0) { + $items->viewable() + ->merge_where($str_where) + ->where($str_orderby_field, "=", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC"); + } else { + if ($str_display_type == "descendants") { + $item_album = ORM::factory("item", $user_id); + $items = $item_album + ->viewable() + ->where("type", "!=", "album") + ->where("created", "=", $item->created) + ->order_by("created", "DESC"); + } else { + $items->viewable() + ->where("owner_id", "=", $user_id) + ->merge_where($str_where) + ->where($str_orderby_field, "=", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC"); + } + } + + // Loop through each remaining match, increasing position by 1 each time + // until we find a match. + if ($str_display_type == "descendants") { + foreach ($items->descendants() as $row) { + $position++; + if ($row->id == $item->id) { + break; + } + } + } else { + foreach ($items->find_all() as $row) { + $position++; + if ($row->id == $item->id) { + break; + } + } + } + + // Return the result. + return $position; + } +} diff --git a/3.0/modules/latestupdates/css/latestupdates_jcarousel.css b/3.0/modules/latestupdates/css/latestupdates_jcarousel.css new file mode 100644 index 00000000..f123143d --- /dev/null +++ b/3.0/modules/latestupdates/css/latestupdates_jcarousel.css @@ -0,0 +1,95 @@ +#jCarouselLite .carousel { + padding: 10px 0 0 0; + margin: 0 0 20px 10px; + position: relative; +} + +#jCarouselLite .digg { + position: absolute; + left: 610px; + top: 110px; +} + +#jCarouselLite .main { + margin-left: 0px; +} + +#jCarouselLite .demo em { + color: #FF3300; + font-weight: bold; + font-size: 60%; + font-style: normal; +} + +#jCarouselLite .carousel a.prev, #jCarouselLite .carousel a.next { + display: block; + float: left; + width: 30px; + height: 90px; + text-decoration: none; + background: url("../images/imageNavLeft.gif") left 60px no-repeat; +} + +#jCarouselLite .carousel a.next { + background: url("../images/imageNavRight.gif") right 60px no-repeat; +} + +#jCarouselLite .carousel a.next:hover { + background-image: url("../images/imageNavRightHover.gif"); +} + +#jCarouselLite .carousel a.prev:hover { + background-image: url("../images/imageNavLeftHover.gif"); +} + +#jCarouselLite .carousel a:hover, #jCarouselLite .carousel a:active { + border: none; + outline: none; +} + +#jCarouselLite .carousel .jCarouselLite { + border: 1px solid black; + float: left; + background-color: #dfdfdf; + + /* Needed for rendering without flicker */ + position: relative; + visibility: hidden; + left: -5000px; +} + +#jCarouselLite .carousel ul { + margin: 0; +} + +#jCarouselLite .carousel li img, +#jCarouselLite .carousel li p { + background-color: #fff; + margin: 10px; +} + +#jCarouselLite .widget img { + cursor: pointer; +} + +#jCarouselLite .mid { + margin-left: 80px; + width: 400px; + height: 300px; +} + +#jCarouselLite .vertical { + margin-left: 90px; +} + +#jCarouselLite .vertical .jCarouselLite { /* so that in IE 6, the carousel div doesnt expand to fill the space */ + width: 90px; +} + +#jCarouselLite .imageSlider li img, +#jCarouselLite .imageSlider li p, +#jCarouselLite .imageSliderExt li img , +#jCarouselLite .imageSliderExt li p { + width: 400px; + height: 300px; +} diff --git a/3.0/modules/latestupdates/helpers/latestupdates_block.php b/3.0/modules/latestupdates/helpers/latestupdates_block.php index 4af70f06..158ffa96 100644 --- a/3.0/modules/latestupdates/helpers/latestupdates_block.php +++ b/3.0/modules/latestupdates/helpers/latestupdates_block.php @@ -1,7 +1,7 @@ title = $new_title; - $this->url = $new_url; +class latestupdates_event_Core { + static function show_user_profile($data) { + // Display links on the user profile pages for recent photos/albums + // and most popular photos from the specified user. + $v = new View("latestupdates_user_profile_info.html"); + $v->user_id = $data->user->id; + $data->content[] = (object) array("title" => t("Latest Updates"), "view" => $v); } } diff --git a/3.1/modules/downloadalbum/helpers/downloadalbum_theme.php b/3.0/modules/latestupdates/helpers/latestupdates_theme.php similarity index 79% rename from 3.1/modules/downloadalbum/helpers/downloadalbum_theme.php rename to 3.0/modules/latestupdates/helpers/latestupdates_theme.php index 8cda59fc..1de3116f 100644 --- a/3.1/modules/downloadalbum/helpers/downloadalbum_theme.php +++ b/3.0/modules/latestupdates/helpers/latestupdates_theme.php @@ -1,7 +1,7 @@ css("downloadalbum_menu.css"); + // Load CSS and JS for jCarouselLite. + return $theme->script("jcarousellite_1.0.1.js") . + $theme->css("latestupdates_jcarousel.css"); } } diff --git a/3.0/modules/latestupdates/images/imageNavLeft.gif b/3.0/modules/latestupdates/images/imageNavLeft.gif new file mode 100644 index 00000000..9c0e5af3 Binary files /dev/null and b/3.0/modules/latestupdates/images/imageNavLeft.gif differ diff --git a/3.0/modules/latestupdates/images/imageNavLeftHover.gif b/3.0/modules/latestupdates/images/imageNavLeftHover.gif new file mode 100644 index 00000000..0945b9eb Binary files /dev/null and b/3.0/modules/latestupdates/images/imageNavLeftHover.gif differ diff --git a/3.0/modules/latestupdates/images/imageNavRight.gif b/3.0/modules/latestupdates/images/imageNavRight.gif new file mode 100644 index 00000000..ad4bb007 Binary files /dev/null and b/3.0/modules/latestupdates/images/imageNavRight.gif differ diff --git a/3.0/modules/latestupdates/images/imageNavRightHover.gif b/3.0/modules/latestupdates/images/imageNavRightHover.gif new file mode 100644 index 00000000..a5abcc99 Binary files /dev/null and b/3.0/modules/latestupdates/images/imageNavRightHover.gif differ diff --git a/3.0/modules/latestupdates/js/jcarousellite_1.0.1.js b/3.0/modules/latestupdates/js/jcarousellite_1.0.1.js new file mode 100644 index 00000000..07b82a6d --- /dev/null +++ b/3.0/modules/latestupdates/js/jcarousellite_1.0.1.js @@ -0,0 +1,341 @@ +/** + * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget. + * @requires jQuery v1.2 or above + * + * http://gmarwaha.com/jquery/jcarousellite/ + * + * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 1.0.1 + * Note: Requires jquery 1.2 or above from version 1.0.1 + */ + +/** + * Creates a carousel-style navigation widget for images/any-content from a simple HTML markup. + * + * The HTML markup that is used to build the carousel can be as simple as... + * + * + * + * As you can see, this snippet is nothing but a simple div containing an unordered list of images. + * You don't need any special "class" attribute, or a special "css" file for this plugin. + * I am using a class attribute just for the sake of explanation here. + * + * To navigate the elements of the carousel, you need some kind of navigation buttons. + * For example, you will need a "previous" button to go backward, and a "next" button to go forward. + * This need not be part of the carousel "div" itself. It can be any element in your page. + * Lets assume that the following elements in your document can be used as next, and prev buttons... + * + * + * + * + * Now, all you need to do is call the carousel component on the div element that represents it, and pass in the + * navigation buttons as options. + * + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev" + * }); + * + * That's it, you would have now converted your raw div, into a magnificient carousel. + * + * There are quite a few other options that you can use to customize it though. + * Each will be explained with an example below. + * + * @param an options object - You can specify all the options shown below as an options object param. + * + * @option btnPrev, btnNext : string - no defaults + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev" + * }); + * @desc Creates a basic carousel. Clicking "btnPrev" navigates backwards and "btnNext" navigates forward. + * + * @option btnGo - array - no defaults + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * btnGo: [".0", ".1", ".2"] + * }); + * @desc If you don't want next and previous buttons for navigation, instead you prefer custom navigation based on + * the item number within the carousel, you can use this option. Just supply an array of selectors for each element + * in the carousel. The index of the array represents the index of the element. What i mean is, if the + * first element in the array is ".0", it means that when the element represented by ".0" is clicked, the carousel + * will slide to the first element and so on and so forth. This feature is very powerful. For example, i made a tabbed + * interface out of it by making my navigation elements styled like tabs in css. As the carousel is capable of holding + * any content, not just images, you can have a very simple tabbed navigation in minutes without using any other plugin. + * The best part is that, the tab will "slide" based on the provided effect. :-) + * + * @option mouseWheel : boolean - default is false + * @example + * $(".carousel").jCarouselLite({ + * mouseWheel: true + * }); + * @desc The carousel can also be navigated using the mouse wheel interface of a scroll mouse instead of using buttons. + * To get this feature working, you have to do 2 things. First, you have to include the mouse-wheel plugin from brandon. + * Second, you will have to set the option "mouseWheel" to true. That's it, now you will be able to navigate your carousel + * using the mouse wheel. Using buttons and mouseWheel or not mutually exclusive. You can still have buttons for navigation + * as well. They complement each other. To use both together, just supply the options required for both as shown below. + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * mouseWheel: true + * }); + * + * @option auto : number - default is null, meaning autoscroll is disabled by default + * @example + * $(".carousel").jCarouselLite({ + * auto: 800, + * speed: 500 + * }); + * @desc You can make your carousel auto-navigate itself by specfying a millisecond value in this option. + * The value you specify is the amount of time between 2 slides. The default is null, and that disables auto scrolling. + * Specify this value and magically your carousel will start auto scrolling. + * + * @option speed : number - 200 is default + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * speed: 800 + * }); + * @desc Specifying a speed will slow-down or speed-up the sliding speed of your carousel. Try it out with + * different speeds like 800, 600, 1500 etc. Providing 0, will remove the slide effect. + * + * @option easing : string - no easing effects by default. + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * easing: "bounceout" + * }); + * @desc You can specify any easing effect. Note: You need easing plugin for that. Once specified, + * the carousel will slide based on the provided easing effect. + * + * @option vertical : boolean - default is false + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * vertical: true + * }); + * @desc Determines the direction of the carousel. true, means the carousel will display vertically. The next and + * prev buttons will slide the items vertically as well. The default is false, which means that the carousel will + * display horizontally. The next and prev items will slide the items from left-right in this case. + * + * @option circular : boolean - default is true + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * circular: false + * }); + * @desc Setting it to true enables circular navigation. This means, if you click "next" after you reach the last + * element, you will automatically slide to the first element and vice versa. If you set circular to false, then + * if you click on the "next" button after you reach the last element, you will stay in the last element itself + * and similarly for "previous" button and first element. + * + * @option visible : number - default is 3 + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * visible: 4 + * }); + * @desc This specifies the number of items visible at all times within the carousel. The default is 3. + * You are even free to experiment with real numbers. Eg: "3.5" will have 3 items fully visible and the + * last item half visible. This gives you the effect of showing the user that there are more images to the right. + * + * @option start : number - default is 0 + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * start: 2 + * }); + * @desc You can specify from which item the carousel should start. Remember, the first item in the carousel + * has a start of 0, and so on. + * + * @option scrool : number - default is 1 + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * scroll: 2 + * }); + * @desc The number of items that should scroll/slide when you click the next/prev navigation buttons. By + * default, only one item is scrolled, but you may set it to any number. Eg: setting it to "2" will scroll + * 2 items when you click the next or previous buttons. + * + * @option beforeStart, afterEnd : function - callbacks + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * beforeStart: function(a) { + * alert("Before animation starts:" + a); + * }, + * afterEnd: function(a) { + * alert("After animation ends:" + a); + * } + * }); + * @desc If you wanted to do some logic in your page before the slide starts and after the slide ends, you can + * register these 2 callbacks. The functions will be passed an argument that represents an array of elements that + * are visible at the time of callback. + * + * + * @cat Plugins/Image Gallery + * @author Ganeshji Marwaha/ganeshread@gmail.com + */ + +(function($) { // Compliant with jquery.noConflict() +$.fn.jCarouselLite = function(o) { + o = $.extend({ + btnPrev: null, + btnNext: null, + btnGo: null, + mouseWheel: false, + auto: null, + + speed: 200, + easing: null, + + vertical: false, + circular: true, + visible: 3, + start: 0, + scroll: 1, + + beforeStart: null, + afterEnd: null + }, o || {}); + + return this.each(function() { // Returns the element collection. Chainable. + + var running = false, animCss=o.vertical?"top":"left", sizeCss=o.vertical?"height":"width"; + var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible; + + if(o.circular) { + ul.prepend(tLi.slice(tl-v-1+1).clone()) + .append(tLi.slice(0,v).clone()); + o.start += v; + } + + var li = $("li", ul), itemLength = li.size(), curr = o.start; + div.css("visibility", "visible"); + + li.css({overflow: "hidden", float: o.vertical ? "none" : "left"}); + ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); + div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"}); + + var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation + var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items) + var divSize = liSize * v; // size of entire div(total length for just the visible items) + + li.css({width: li.width(), height: li.height()}); + ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize)); + + div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images + + if(o.btnPrev) + $(o.btnPrev).click(function() { + return go(curr-o.scroll); + }); + + if(o.btnNext) + $(o.btnNext).click(function() { + return go(curr+o.scroll); + }); + + if(o.btnGo) + $.each(o.btnGo, function(i, val) { + $(val).click(function() { + return go(o.circular ? o.visible+i : i); + }); + }); + + if(o.mouseWheel && div.mousewheel) + div.mousewheel(function(e, d) { + return d>0 ? go(curr-o.scroll) : go(curr+o.scroll); + }); + + if(o.auto) + setInterval(function() { + go(curr+o.scroll); + }, o.auto+o.speed); + + function vis() { + return li.slice(curr).slice(0,v); + }; + + function go(to) { + if(!running) { + + if(o.beforeStart) + o.beforeStart.call(this, vis()); + + if(o.circular) { // If circular we are in first or last, then goto the other end + if(to<=o.start-v-1) { // If first, then goto last + ul.css(animCss, -((itemLength-(v*2))*liSize)+"px"); + // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements. + curr = to==o.start-v-1 ? itemLength-(v*2)-1 : itemLength-(v*2)-o.scroll; + } else if(to>=itemLength-v+1) { // If last, then goto first + ul.css(animCss, -( (v) * liSize ) + "px" ); + // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements. + curr = to==itemLength-v+1 ? v+1 : v+o.scroll; + } else curr = to; + } else { // If non-circular and to points to first or last, we just return. + if(to<0 || to>itemLength-v) return; + else curr = to; + } // If neither overrides it, the curr will still be "to" and we can proceed. + + running = true; + + ul.animate( + animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing, + function() { + if(o.afterEnd) + o.afterEnd.call(this, vis()); + running = false; + } + ); + // Disable buttons when the carousel reaches the last/first, and enable when not + if(!o.circular) { + $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); + $( (curr-o.scroll<0 && o.btnPrev) + || + (curr+o.scroll > itemLength-v && o.btnNext) + || + [] + ).addClass("disabled"); + } + + } + return false; + }; + }); +}; + +function css(el, prop) { + return parseInt($.css(el[0], prop)) || 0; +}; +function width(el) { + return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); +}; +function height(el) { + return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom'); +}; + +})(jQuery); \ No newline at end of file diff --git a/3.0/modules/latestupdates/module.info b/3.0/modules/latestupdates/module.info index a4916cd6..95aba927 100644 --- a/3.0/modules/latestupdates/module.info +++ b/3.0/modules/latestupdates/module.info @@ -1,7 +1,7 @@ name = "LatestUpdates" description = "Display recently uploaded photos and videos." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:latestupdates" -discuss_url = "http://gallery.menalto.com/forum_module_latestupdates" +discuss_url = "http://gallery.menalto.com/node/88936" diff --git a/3.0/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php b/3.0/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php new file mode 100644 index 00000000..1a3ada22 --- /dev/null +++ b/3.0/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php @@ -0,0 +1,37 @@ + + +
    + + + +
    + + diff --git a/3.0/modules/latestupdates/views/latestupdates_user_profile_info.html.php b/3.0/modules/latestupdates/views/latestupdates_user_profile_info.html.php new file mode 100644 index 00000000..175d1376 --- /dev/null +++ b/3.0/modules/latestupdates/views/latestupdates_user_profile_info.html.php @@ -0,0 +1,14 @@ + + +
    + diff --git a/3.0/modules/ldap/config/identity.php b/3.0/modules/ldap/config/identity.php index 8c4136b2..343e3af8 100644 --- a/3.0/modules/ldap/config/identity.php +++ b/3.0/modules/ldap/config/identity.php @@ -34,10 +34,12 @@ $config["ldap"] = array( "driver" => "ldap", "allow_updates" => false, "params" => array( + "guest_user" => "Guest", "groups" => array("engineering", "everybody", "guest"), "everybody_group" => "guest", "registered_users_group" => "everybody", "admins" => array("alice", "bob"), + "admin_mail" => "unknown@unknown.com", "url" => "ldaps://ldap.mycompany.com/", "group_domain" => "ou=Posix,ou=Groups,dc=ymcompany,dc=com", "user_domain" => "ou=People,dc=MyCompany,dc=com", diff --git a/3.0/modules/ldap/helpers/ldap_installer.php b/3.0/modules/ldap/helpers/ldap_installer.php index d9bdbfd4..ae33fd7c 100644 --- a/3.0/modules/ldap/helpers/ldap_installer.php +++ b/3.0/modules/ldap/helpers/ldap_installer.php @@ -1,7 +1,7 @@ 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; + return self::lookup_user_by_name(self::$_params["guest_user"]); } /** @@ -86,8 +84,8 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { * @see IdentityProvider_Driver::lookup_user. */ public function lookup_user($id) { - if ($id == 0) { - return $this->guest(); + if ($id == LDAP_GUEST_ID) { + return self::lookup_user_by_name(self::$_params["guest_user"]); } $result = ldap_search(self::$_connection, self::$_params["user_domain"], "uidNumber=$id"); $entries = ldap_get_entries(self::$_connection, $result); @@ -109,6 +107,19 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { if ($entries["count"] > 0) { return new Ldap_User($entries[0]); } + if ($name == self::$_params["guest_user"]) { + if (empty(self::$_guest_user)) { + self::$_guest_user = new Ldap_User(); + self::$_guest_user->id = LDAP_GUEST_ID; + self::$_guest_user->name = "$name"; + self::$_guest_user->full_name = "$name"; + self::$_guest_user->guest = true; + self::$_guest_user->admin = false; + self::$_guest_user->locale = null; + self::$_guest_user->email = null; + } + return self::$_guest_user; + } return null; } @@ -137,13 +148,20 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { * @see IdentityProvider_Driver::lookup_group. */ public function lookup_group($id) { + if ($id = LDAP_EVERYBODY_GROUP_ID) { + return self::lookup_group_by_name(self::$_params["everybody_group"]); + } else if ($id = LDAP_REGISTERED_USERS_ID) { + return self::lookup_group_by_name(self::$_params["registered_users_group"]); + } $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]); + if (in_array($cn_entry, self::$_params["groups"])) { + return new Ldap_Group($gid_number_entry[0], $cn_entry[0]); + } } return null; } @@ -160,7 +178,21 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { 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]); + if (in_array($cn_entry, self::$_params["groups"])) { + return new Ldap_Group($gid_number_entry[0], $cn_entry[0]); + } + } + if ($name == self::$_params["everybody_group"]) { + if (!self::$_everybody_group) { + self::$_everybody_group = new Ldap_Group(LDAP_EVERYBODY_ID, $name); + } + return self::$_everybody_group; + } + if ($name == self::$_params["registered_users_group"]) { + if (!self::$_registered_users_group) { + self::$_registered_users_group = new Ldap_Group(LDAP_REGISTERED_USERS_ID, $name); + } + return self::$_registered_users_group; } return null; } @@ -171,7 +203,9 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { public function get_user_list($ids) { $users = array(); foreach ($ids as $id) { - $users[] = $this->lookup_user($id); + if ($user = $this->lookup_user($id)) { + $users[] = $user; + } } return $users; } @@ -182,21 +216,21 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { public function groups() { $groups = array(); foreach (self::$_params["groups"] as $group_name) { - $groups[] = $this->lookup_group_by_name($group_name); + if ($group = $this->lookup_group_by_name($group_name)) { + $groups[] = $group; + } } 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(); + $in_everybody_group = false; + $in_registered_users_group = false; for ($entry_id = ldap_first_entry(self::$_connection, $result); $entry_id != false; $entry_id = ldap_next_entry(self::$_connection, $entry_id)) { @@ -205,6 +239,18 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { if (in_array($group_name[0], $associated_groups)) { $groups[] = new Ldap_Group($group_id[0], $group_name[0]); } + if ($group_name[0] == self::$_params["everybody_group"]) { + $in_everybody_group = true; + } + if ($group_name[0] == self::$_params["registered_users_group"]) { + $in_registered_users_group = true; + } + } + if (!$in_everybody_group) { + $groups[] = self::lookup_group_by_name(self::$_params["everybody_group"]); + } + if (!$user->guest && !$in_registered_users_group) { + $groups[] = self::lookup_group_by_name(self::$_params["registered_users_group"]); } return $groups; } @@ -235,7 +281,7 @@ class Ldap_User implements User_Definition { if (!empty($this->ldap_entry["displayname"][0])) { return $this->ldap_entry["displayname"][0]; } - return $this->ldap_entry["cn"][0]; + return $this->full_name; } public function __get($key) { @@ -257,10 +303,20 @@ class Ldap_User implements User_Definition { IdentityProvider_Ldap_Driver::$_params["admins"]); case "email": - return $this->ldap_entry["mail"][0]; + if (isset($this->ldap_entry["mail"])) { + return $this->ldap_entry["mail"][0]; + } else if ($this->admin) { + IdentityProvider_Ldap_Driver::$_params["admin_mail"]; + } else { + return null; + } case "full_name": - return $this->ldap_entry["cn"][0]; + if (isset($this->ldap_entry["cn"])) { + return $this->ldap_entry["cn"][0]; + } else { + return $this->name; + } case "dn": return $this->ldap_entry["dn"]; @@ -281,6 +337,12 @@ class Ldap_User implements User_Definition { return sprintf("http://www.gravatar.com/avatar/%s.jpg?s=%d&r=pg%s", md5($this->email), $size, $default ? "&d=" . urlencode($default) : ""); } + + // Called e.g. by user_profile.php:_can_view_profile_pages() + // We don't have "empty" users, so just return true + public function loaded() { + return true; + } } class Ldap_Group implements Group_Definition { diff --git a/3.0/modules/metadescription/helpers/metadescription_event.php b/3.0/modules/metadescription/helpers/metadescription_event.php index 7e773d7e..579d7d43 100644 --- a/3.0/modules/metadescription/helpers/metadescription_event.php +++ b/3.0/modules/metadescription/helpers/metadescription_event.php @@ -1,7 +1,7 @@ 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")); + 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) { diff --git a/3.0/modules/minislideshow/helpers/minislideshow_installer.php b/3.0/modules/minislideshow/helpers/minislideshow_installer.php index 3edcf98a..6ff23dcf 100644 --- a/3.0/modules/minislideshow/helpers/minislideshow_installer.php +++ b/3.0/modules/minislideshow/helpers/minislideshow_installer.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/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,11 @@ 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.")); } + + if(is_file('gm.ini')) + unlink('gm.ini'); + if(is_file('gm_core.ini')) + unlink('gm_core.ini'); $view->content->vars = $cache; $view->content->update_time = $cache_updates['date']; @@ -243,7 +262,6 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { return $font_color; } - /** * Parses the known GitHub repositories for new versions of modules. * @@ -252,7 +270,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 +284,69 @@ 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_exists('gm_core.ini')) { + $file = 1; + } if ($file != null) { + $gm_core_array = parse_ini_file('gm_core.ini',true); $server = '(G)'; } } - catch (Exception $e) { + 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_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) { + //Search in the GM listing + if ($server_location == "GH"){ + //Search if this is a Gallery 3.0 module + if(array_key_exists($module_name,$gm_array)){ + if(array_key_exists('g3',$gm_array[$module_name])){ + $version = $gm_array[$module_name]['g3']; + } + if($version == ''){ + if(array_key_exists('g31',$gm_array[$module_name])){ + $version = $gm_array[$module_name]['g31']; } } - } - fclose ($file); + if($version == ''){ + if(array_key_exists('codex',$gm_array[$module_name])){ + $version = $gm_array[$module_name]['codex']; + } + } + } else { //Module not found + $version = ''; + } + //Search in the Core listing + } else { + if(array_key_exists($module_name,$gm_core_array)){ + $version = $gm_core_array[$module_name]['version']; + } else { //Module not found + $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", 11); //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..cf66ddd7 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 = 11 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 @@ id", "", "post", array("id" => "g-edit-movie-form")); @@ -62,86 +58,38 @@ class movie_Core { } 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"); - } - } + // rWatcher Edit: Just copy the generic thumb instead of extracting a frame. + copy(MODPATH . "noffmpeg/images/missing_movie.png", $output_file); } /** * 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; + // rWatcher Edit: Return true to trick the system into thinking ffmpeg is present. + return true; } /** * 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); - } - + // rWatcher Edit: Use FLVMetaData lib instead of ffmpeg for .flv files. + // For other files, just set a 320x240 default video resolution. $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); + $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); } - -} \ No newline at end of file +} diff --git a/3.0/modules/noffmpeg/module.info b/3.0/modules/noffmpeg/module.info index fe6b0ec3..8412eb77 100644 --- a/3.0/modules/noffmpeg/module.info +++ b/3.0/modules/noffmpeg/module.info @@ -4,4 +4,4 @@ version = 1 author_name = "" author_url = "" info_url = "http://codex.gallery2.org/Gallery3:Modules:noffmpeg" -discuss_url = "http://gallery.menalto.com/forum_module_noffmpeg" +discuss_url = "http://gallery.menalto.com/node/97978" diff --git a/3.0/modules/noffmpeg/views/form_uploadify.html.php b/3.0/modules/noffmpeg/views/form_uploadify.html.php deleted file mode 100644 index 911e02d5..00000000 --- a/3.0/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.0/modules/pages/controllers/admin_pages.php b/3.0/modules/pages/controllers/admin_pages.php index cbf8ce6e..1d695776 100644 --- a/3.0/modules/pages/controllers/admin_pages.php +++ b/3.0/modules/pages/controllers/admin_pages.php @@ -1,7 +1,7 @@ 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"); + $page_code = stripslashes($_REQUEST["page_code"]); // access var directly to get around xss filtering. $display_menu = Input::instance()->post("display_menu"); // If $page_id is set, update an existing page. @@ -240,7 +240,7 @@ class Admin_Pages_Controller extends Admin_Controller { // 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", @@ -250,12 +250,15 @@ class Admin_Pages_Controller extends Admin_Controller { $pages_group->checkbox("display_sidebar") ->label(t("Hide sidebar on Pages?")) ->checked(module::get_var("pages", "show_sidebar")); + $pages_group->checkbox("disable_rich_editor") + ->label(t("Disable rich text editor?")) + ->checked(module::get_var("pages", "disable_rte")); $pages_group->submit("save_prefs") ->value(t("Save")); return $form; } - + public function saveprefs() { // Save a preferences to the database. @@ -263,6 +266,7 @@ class Admin_Pages_Controller extends Admin_Controller { // Save form variables. module::set_var("pages", "show_sidebar", Input::instance()->post("display_sidebar")); + module::set_var("pages", "disable_rte", Input::instance()->post("disable_rich_editor")); // Display message and load main pages admin screen. message::success(t("Your settings have been saved.")); diff --git a/3.0/modules/pages/controllers/pages.php b/3.0/modules/pages/controllers/pages.php index d567af47..3fc638f7 100644 --- a/3.0/modules/pages/controllers/pages.php +++ b/3.0/modules/pages/controllers/pages.php @@ -1,7 +1,7 @@ title, $root->url())->set_first(); + $breadcrumbs[] = Breadcrumb::instance(t($existing_page[0]->title), url::site("pages/show/{$page_name}"))->set_last(); + // Display the page. $template = new Theme_View("page.html", "other", "Pages"); + $template->set_global(array("breadcrumbs" => $breadcrumbs)); $template->page_title = t("Gallery :: ") . t($existing_page[0]->title); $template->content = new View("pages_display.html"); $template->content->title = $existing_page[0]->title; diff --git a/3.0/modules/pages/helpers/pages_block.php b/3.0/modules/pages/helpers/pages_block.php index 2eae8861..90e42b3a 100644 --- a/3.0/modules/pages/helpers/pages_block.php +++ b/3.0/modules/pages/helpers/pages_block.php @@ -1,7 +1,7 @@ query("ALTER TABLE {static_pages} ADD COLUMN `display_menu` boolean default 0"); module::set_version("pages", $version = 2); } + if ($version == 2) { + module::set_var("pages", "disable_rte", false); + module::set_version("pages", $version = 3); + } } } diff --git a/3.0/modules/pages/helpers/pages_theme.php b/3.0/modules/pages/helpers/pages_theme.php index ec57a2ce..52f905ae 100644 --- a/3.0/modules/pages/helpers/pages_theme.php +++ b/3.0/modules/pages/helpers/pages_theme.php @@ -1,7 +1,7 @@ script("jHtmlArea-0.7.0.js") . - $theme->css("jHtmlArea.css"); + if (module::get_var("pages", "disable_rte", false) == false) { + return $theme->script("jHtmlArea-0.7.0.js") . + $theme->css("jHtmlArea.css"); + } } } - \ No newline at end of file diff --git a/3.0/modules/pages/models/static_page.php b/3.0/modules/pages/models/static_page.php index b5519123..37c11c97 100644 --- a/3.0/modules/pages/models/static_page.php +++ b/3.0/modules/pages/models/static_page.php @@ -1,7 +1,7 @@ is_album()) { + throw new Kohana_Exception('container is not an album: '.$container->relative_path()); + } + + $pdfname = (empty($container->name)) + ? 'Gallery.pdf' // @todo purified_version_of($container->title).'.pdf' + : $container->name.'.pdf'; + $headerText = $container->title; + $headerLink = $container->abs_url(); + 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); + } + + $pdfname = $container->name.'.pdf'; + $headerText = $container->name; + $headerLink = $container->abs_url(); + break; + + default: + throw new Kohana_Exception('unhandled container type: '.$container_type); + } + $files = $this->getFilesList($container); + + /** + * Configure PDF file. These are all of the parameters that are used to + * format the proof sheet. If you'd like to tweak the formatting, here's + * where to do it. + */ + switch($page_type) { + case "ltr": + // Setup for LTR 8.5" x 11" paper (215.9mm x 279.4mm) + $cfg = array( + 'pageW' => 215.9, // mm + 'pageH' => 279.4, // mm + 'imageNumW' => 5, // integer number + 'imageNumH' => 5, // integer number + 'imageSizeW' => 36, // mm + 'imageSizeH' => 36, // mm + 'marginL' => 10, // mm + 'marginR' => 10, // mm + 'marginT' => 21, // mm (header goes in here) + 'marginB' => 20, // mm (footer goes in here) + 'headerSpace' => 2, // mm (header to top row of images and to link icon) + 'footerSpace' => 2, // mm (bottom row of captions to footer) + 'captionSpace' => 1, // mm (bottom of image to caption) + 'headerFont' => array( + 'name' => 'Arial', // included are Arial/Helvetica, Courier, Times, Symbol, ZapfDingbats + 'size' => 14, // pt + 'style' => 'B', // combo of B, I, U + 'posn' => 'L', // combo of L, C, R + 'r' => 0, // Red 0-255 + 'g' => 0, // Green 0-255 + 'b' => 0),// Blue 0-255 + 'footerFont' => array( + 'name' => 'Arial', // included are Arial/Helvetica, Courier, Times, Symbol, ZapfDingbats + 'size' => 12, // pt + 'style' => 'B', // combo of B, I, U + 'posn' => 'R', // combo of L, C, R + 'r' => 0, // Red 0-255 + 'g' => 0, // Green 0-255 + 'b' => 0),// Blue 0-255 + 'captionFont' => array( + 'name' => 'Arial', // included are Arial/Helvetica, Courier, Times, Symbol, ZapfDingbats + 'size' => 8, // pt + 'style' => 'U', // combo of B, I, U + 'posn' => 'C', // combo of L, C, R + 'r' => 0, // Red 0-255 + 'g' => 0, // Green 0-255 + 'b' => 255),// Blue 0-255 + ); + break; + case "a4": + // Setup for A4 210mm x 297mm paper (8.27" x 11.69") + $cfg = array( + 'pageW' => 210, // mm + 'pageH' => 297, // mm + 'imageNumW' => 5, // integer number + 'imageNumH' => 6, // integer number + 'imageSizeW' => 36, // mm + 'imageSizeH' => 36, // mm + 'marginL' => 8, // mm + 'marginR' => 8, // mm + 'marginT' => 19, // mm (header goes in here) + 'marginB' => 18, // mm (footer goes in here) + 'headerSpace' => 2, // mm (header to top row of images and to link icon) + 'footerSpace' => 2, // mm (bottom row of captions to footer) + 'captionSpace' => 1, // mm (bottom of image to caption) + 'headerFont' => array( + 'name' => 'Arial', // included are Arial/Helvetica, Courier, Times, Symbol, ZapfDingbats + 'size' => 14, // pt + 'style' => 'B', // combo of B, I, U + 'posn' => 'L', // combo of L, C, R + 'r' => 0, // Red 0-255 + 'g' => 0, // Green 0-255 + 'b' => 0),// Blue 0-255 + 'footerFont' => array( + 'name' => 'Arial', // included are Arial/Helvetica, Courier, Times, Symbol, ZapfDingbats + 'size' => 12, // pt + 'style' => 'B', // combo of B, I, U + 'posn' => 'R', // combo of L, C, R + 'r' => 0, // Red 0-255 + 'g' => 0, // Green 0-255 + 'b' => 0),// Blue 0-255 + 'captionFont' => array( + 'name' => 'Arial', // included are Arial/Helvetica, Courier, Times, Symbol, ZapfDingbats + 'size' => 8, // pt + 'style' => 'U', // combo of B, I, U + 'posn' => 'C', // combo of L, C, R + 'r' => 0, // Red 0-255 + 'g' => 0, // Green 0-255 + 'b' => 255),// Blue 0-255 + ); + break; + default: + throw new Kohana_Exception('unhandled page type: '.$page_type); + } + + // Here are some other parameters that need defining + $cfg['footerTextPage'] = 'Page '; // Note that this text isn't autofixed by translate module + $cfg['footerTextSlash'] = ' / '; + $cfg['headerLinkIconPath'] = MODPATH . 'proofsheet/images/ico-link.png'; + $cfgImageMissing['iconPath'] = MODPATH . 'proofsheet/images/image_missing.png'; + $cfgImageMissing['iconType'] = 'PNG'; // PNG or JPG is most robust, GIF okay only if GD is installed + $pt2mm = 25.4/72; // 25.4mm=1in=72pt + + // Derive a bunch more parameters. These are all dependent on the above stuff. + $cfg['headerH'] = $pt2mm * $cfg['headerFont']['size']; + $cfg['footerH'] = $pt2mm * $cfg['footerFont']['size']; + $cfg['captionH'] = $pt2mm * $cfg['captionFont']['size']; + $cfg['imageSpaceW'] = ($cfg['pageW']-$cfg['marginL']-$cfg['marginR']-$cfg['imageNumW']*$cfg['imageSizeW']) / ($cfg['imageNumW']-1); + $cfg['imageSpaceH'] = ($cfg['pageH']-$cfg['marginT']-$cfg['marginB']-$cfg['imageNumH']*$cfg['imageSizeH']-$cfg['captionH']-$cfg['captionSpace']) / ($cfg['imageNumH']-1); + $linkInfo = getimagesize($cfg['headerLinkIconPath']); + $cfg['headerLinkH'] = $cfg['headerH']; // I'm defining this to be the same as the text, but you can change it here. + $cfg['headerLinkW'] = $linkInfo[0] / $linkInfo[1] * $cfg['headerLinkH']; + $cfg['headerW'] = $cfg['pageW']-$cfg['marginL']-$cfg['marginR']-$cfg['headerLinkW']-$cfg['headerSpace']; + $cfg['footerW'] = $cfg['pageW']-$cfg['marginL']-$cfg['marginR']; + $cfg['captionW'] = $cfg['imageSizeW']; // I'm defining this to be the same as the image, but you can change it here. + $cfg['headerX'] = $cfg['marginL']; + $cfg['headerLinkX'] = $cfg['marginL']+$cfg['headerW']; + $cfg['footerX'] = $cfg['marginL']; + $cfg['headerY'] = $cfg['marginT']-$cfg['headerH']-$cfg['headerSpace']; + $cfg['headerLinkY'] = $cfg['marginT']-$cfg['headerLinkH']-$cfg['headerSpace']; + $cfg['footerY'] = $cfg['pageH']-$cfg['marginB']+$cfg['footerSpace']; + $cfg['imageNum'] = $cfg['imageNumW']*$cfg['imageNumH']; + $cfgImageMissing['iconInfo'] = getimagesize($cfgImageMissing['iconPath']); + $cfgImageMissing['GDflag'] = graphics::detect_toolkits()->gd>installed; // FPDF uses GD to convert GIFs + + /** + * Initialize and build PDF... the main routine. Note that almost all of the + * useful configuration parameters are already defined above. + */ + + // Initialize PDF, disable automatic margins and page breaks + $pdf = new proofsheet_PDF('P', 'mm', array($cfg['pageW'],$cfg['pageH']) ); + $pdf->SetMargins(0,0); + $pdf->SetAutoPageBreak(0); + + // Build the PDF + $numpages = floor(count($files)/$cfg['imageNum'])+1; + $i = 0; + foreach($files as $f_path => $f_info) { + // Initialize new pages, add header and footer + if (($i % $cfg['imageNum'])==0) { + $pdf->AddPage(); + $pdf->printText($headerText, $cfg['headerFont'], $cfg['headerX'], $cfg['headerY'], $cfg['headerW'], $cfg['headerH']); + $pdf->printImage($cfg['headerLinkIconPath'], $cfg['headerLinkX'], $cfg['headerLinkY'], $cfg['headerLinkW'], $cfg['headerLinkH'], $headerLink, $cfgImageMissing); + $footerText = $cfg['footerTextPage'] . strval(floor($i/$cfg['imageNum'])+1) . $cfg['footerTextSlash'] . strval($numpages); + $pdf->printText($footerText, $cfg['footerFont'], $cfg['footerX'], $cfg['footerY'], $cfg['footerW'], $cfg['footerH']); + } + // Add thumbnail and caption + $x = $cfg['marginL'] + ($cfg['imageSizeW']+$cfg['imageSpaceW']) * ( $i % $cfg['imageNumW']); + $y = $cfg['marginT'] + ($cfg['imageSizeH']+$cfg['imageSpaceH']) * (floor($i/$cfg['imageNumW']) % $cfg['imageNumH']); + $pdf->printImage($f_path, $x, $y, $cfg['imageSizeW'], $cfg['imageSizeH'], null, $cfgImageMissing); + $pdf->printText($f_info['name'], $cfg['captionFont'], $x, $y+$cfg['imageSizeH']+$cfg['captionSpace'], $cfg['captionW'], $cfg['captionH'], $f_info['url']); + // Increment index and loop + $i++; + } + + /** + * Output the PDF file. I wrote it in two versions (one should always be commented out). + */ + // Using a method similar to downloadalbum + $pdfstring = $pdf->Output('','S'); + $this->prepareOutput(); + $this->sendHeaders($pdfname, strlen($pdfstring)); + echo $pdfstring; + + // Using FPDF directly + //$pdf->Output($pdfname,'I'); + + } + + /** + * Return the files that must be included in the archive. + * This is largely borrowed from downloadalbum, but does have + * significant modifications. + */ + private function getFilesList($container) { + $files = array(); + + if( $container instanceof Item_Model && $container->is_album() ) { + $items = $container->viewable() + ->descendants(null, null, array(array("type", "<>", "album"))); + + foreach($items as $i) { + if (!access::can('view_full', $i)) { + continue; + } + + $thumb_realpath = realpath($i->thumb_path()); + if (!is_readable($thumb_realpath)) { + continue; + } + + $files[$thumb_realpath] = array('url' => $i->abs_url(), 'name' => $i->title); + } + + } 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_info) { + $files[$f_name] = $f_info; + } + + } else { + $thumb_realpath = realpath($i->thumb_path()); + if (!is_readable($thumb_realpath)) { + continue; + } + + $files[$thumb_realpath] = array('url' => $i->abs_url(), 'name' => $i->title); + + } + } + } + + if (count($files) === 0) { + throw new Kohana_Exception('no thumb files in ['.$container->name.']'); + } + + return $files; + } + + + /** + * See system/helpers/download.php + * This is borrowed from downloadalbum without changes. + */ + 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 + * This is borrowed from downloadalbum without changes. + */ + 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); + } +} + +class proofsheet_PDF extends FPDF { + + /** + * Print text (header, footer, or caption) with link, formatted as in cfg. + * It converts UTF-8 back to CP1252, which is used by FPDF. + * This will trim formatted text to fit and add ellipsis if needed. + */ + function printText($text, $font, $x, $y, $w, $h, $link = null) { + $ellipsis = '…'; // ASCII character 133 + // Convert from UTF-8 back to CP1252 + $text = iconv('utf-8','cp1252',$text); + // Set color, font, and position + $this->SetTextColor($font['r'],$font['g'],$font['b']); + $this->SetFont($font['name'],$font['style'],$font['size']); + $this->SetXY($x, $y); + // Trim text if needed + if (($this->GetStringWidth($text)) > $w) { + // Keep trimming until the size, with ellipsis, is small enough + while (($this->GetStringWidth($text.$ellipsis)) > $w) { + $text = substr($text,0,strlen($text)-1); + } + // Add the ellipsis to the shortened text + $text = $text.$ellipsis; + } + // Create text cell + $this->Cell($w,$h,$text,0,0,$font['posn'],false,$link); + } + + /** + * Print image. This is basically a wrapper around the FPDF image function, + * except that it determines the file type independent of the file extension + * and automatically resizes to main aspect ratio within the defined space. + * Note that this provides robustness for images with incorrect filenames, such + * as missing_movie.png being called a jpg when copied as a thumbnail in v3.0.2. + */ + function printImage($imagePath, $x, $y, $w, $h, $link = null, $cfgImageMissing) { + $imageInfo = getimagesize($imagePath); // [0]=w, [1]=h, [2]=type (1=GIF, 2=JPG, 3=PNG) + // Figure out the filetype + switch($imageInfo[2]) { + case 3: + $imageType = 'PNG'; + break; + case 2: + $imageType = 'JPG'; + break; + case 1: + if ($cfgImageMissing['GDflag']) { + $imageType = 'GIF'; + break; + } + default: + // use the missing image icon instead + $imagePath = $cfgImageMissing['iconPath']; + $imageType = $cfgImageMissing['iconType']; + $imageInfo = $cfgImageMissing['iconInfo']; + } + // Determine image orientation and create image + $ratioWH = ($imageInfo[0]/$w) / ($imageInfo[1]/$h); + if ($ratioWH>1) { + $this->image($imagePath, $x, $y+(1-1/$ratioWH)*$h/2, $w, 0, $imageType, $link); + } else { + $this->image($imagePath, $x+(1-$ratioWH)*$w/2, $y, 0, $h, $imageType, $link); + } + } +} diff --git a/3.0/modules/proofsheet/css/proofsheet_menu.css b/3.0/modules/proofsheet/css/proofsheet_menu.css new file mode 100644 index 00000000..5f51ef3e --- /dev/null +++ b/3.0/modules/proofsheet/css/proofsheet_menu.css @@ -0,0 +1,2 @@ +#g-view-menu #g-proofsheet-a4-link { background-image: url('../images/ico-view-proofsheet-a4.png'); } +#g-view-menu #g-proofsheet-ltr-link { background-image: url('../images/ico-view-proofsheet-ltr.png'); } \ No newline at end of file diff --git a/3.0/modules/proofsheet/helpers/proofsheet_event.php b/3.0/modules/proofsheet/helpers/proofsheet_event.php new file mode 100644 index 00000000..3b772515 --- /dev/null +++ b/3.0/modules/proofsheet/helpers/proofsheet_event.php @@ -0,0 +1,89 @@ +item->id}"); + $menu + ->append(Menu::factory("link") + ->id("proofsheetA4") + ->label(t("A4 Proof Sheet")) + ->url($proofsheetA4Link) + ->css_id("g-proofsheet-a4-link")); + $proofsheetLTRLink = url::site("proofsheet/makepdf/ltr/album/{$theme->item->id}"); + $menu + ->append(Menu::factory("link") + ->id("proofsheetLTR") + ->label(t("LTR Proof Sheet")) + ->url($proofsheetLTRLink) + ->css_id("g-proofsheet-ltr-link")); + } + + /** + * This adds the buttons for the case of a tag. If you want to disable + * either the A4 or LTR part, do so here *and* above for albums. + */ + static function tag_menu($menu, $theme) { + $proofsheetA4Link = url::site("proofsheet/makepdf/a4/tag/{$theme->tag()->id}"); + $menu + ->append(Menu::factory("link") + ->id("proofsheetA4") + ->label(t("A4 Proof Sheet")) + ->url($proofsheetA4Link) + ->css_id("g-proofsheet-a4-link")); + $proofsheetLTRLink = url::site("proofsheet/makepdf/ltr/tag/{$theme->tag()->id}"); + $menu + ->append(Menu::factory("link") + ->id("proofsheetLTR") + ->label(t("LTR Proof Sheet")) + ->url($proofsheetLTRLink) + ->css_id("g-proofsheet-ltr-link")); + } +} diff --git a/3.1/modules/bitly/helpers/bitly_theme.php b/3.0/modules/proofsheet/helpers/proofsheet_theme.php similarity index 86% rename from 3.1/modules/bitly/helpers/bitly_theme.php rename to 3.0/modules/proofsheet/helpers/proofsheet_theme.php index 392d2c48..5cfd568e 100644 --- a/3.1/modules/bitly/helpers/bitly_theme.php +++ b/3.0/modules/proofsheet/helpers/proofsheet_theme.php @@ -1,24 +1,24 @@ -script("bitly.js"); - } -} +css("proofsheet_menu.css"); + } +} diff --git a/3.0/modules/proofsheet/images/ico-link.png b/3.0/modules/proofsheet/images/ico-link.png new file mode 100644 index 00000000..ccb2820d Binary files /dev/null and b/3.0/modules/proofsheet/images/ico-link.png differ diff --git a/3.0/modules/proofsheet/images/ico-view-proofsheet-a4.png b/3.0/modules/proofsheet/images/ico-view-proofsheet-a4.png new file mode 100644 index 00000000..a041f8e6 Binary files /dev/null and b/3.0/modules/proofsheet/images/ico-view-proofsheet-a4.png differ diff --git a/3.0/modules/proofsheet/images/ico-view-proofsheet-ltr.png b/3.0/modules/proofsheet/images/ico-view-proofsheet-ltr.png new file mode 100644 index 00000000..b1cb1933 Binary files /dev/null and b/3.0/modules/proofsheet/images/ico-view-proofsheet-ltr.png differ diff --git a/3.0/modules/proofsheet/images/image_missing.png b/3.0/modules/proofsheet/images/image_missing.png new file mode 100644 index 00000000..f5ced6c9 Binary files /dev/null and b/3.0/modules/proofsheet/images/image_missing.png differ diff --git a/3.0/modules/proofsheet/images/unused-a4-notext.png b/3.0/modules/proofsheet/images/unused-a4-notext.png new file mode 100644 index 00000000..b0c8f7e2 Binary files /dev/null and b/3.0/modules/proofsheet/images/unused-a4-notext.png differ diff --git a/3.0/modules/proofsheet/images/unused-ltr-notext.png b/3.0/modules/proofsheet/images/unused-ltr-notext.png new file mode 100644 index 00000000..85763616 Binary files /dev/null and b/3.0/modules/proofsheet/images/unused-ltr-notext.png differ diff --git a/3.0/modules/proofsheet/lib/fpdf/FAQ.htm b/3.0/modules/proofsheet/lib/fpdf/FAQ.htm new file mode 100644 index 00000000..05d85c6e --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/FAQ.htm @@ -0,0 +1,341 @@ + + + + +FAQ + + + + +

    FAQ

    + + +
      +
    • +

      1. What's exactly the license of FPDF? Are there any usage restrictions?

      +FPDF is released under a permissive license: there is no usage restriction. You may embed it +freely in your application (commercial or not), with or without modifications. +
    • + +
    • +

      2. When I try to create a PDF, a lot of weird characters show on the screen. Why?

      +These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of +IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly +without launching Acrobat. This happens frequently during the development stage: on the least +script error, an HTML page is sent, and after correction, the PDF arrives. +
      +To solve the problem, simply quit and restart IE. You can also go to another URL and come +back. +
      +To avoid this kind of inconvenience during the development, you can generate the PDF directly +to a file and open it through the explorer. +
    • + +
    • +

      3. I try to generate a PDF and IE displays a blank page. What happens?

      +First of all, check that you send nothing to the browser after the PDF (not even a space or a +carriage return). You can put an exit statement just after the call to the Output() method to +be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE +used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems +in a reliable manner, two main techniques exist: +
      +
      +- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go +to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next +time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck +the option "Always ask before opening this type of file" and choose Open. From now on, PDF files +will open automatically in an external Acrobat window. +
      +The drawback of the method is that you need to alter the client configuration, which you can do +in an intranet environment but not for the Internet. +
      +
      +- Use a redirection technique. It consists in generating the PDF in a temporary file on the server +and redirect the client to it. For example, at the end of the script, you can put the following: +
      +
      //Determine a temporary file name in the current directory
      +$file = basename(tempnam('.', 'tmp'));
      +rename($file, $file.'.pdf');
      +$file .= '.pdf';
      +//Save PDF to file
      +$pdf->Output($file, 'F');
      +//Redirect
      +header('Location: '.$file);
      +
      +This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do +some cleaning in order to delete the temporary files. For example: +
      +
      function CleanFiles($dir)
      +{
      +    //Delete temporary files
      +    $t = time();
      +    $h = opendir($dir);
      +    while($file=readdir($h))
      +    {
      +        if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
      +        {
      +            $path = $dir.'/'.$file;
      +            if($t-filemtime($path)>3600)
      +                @unlink($path);
      +        }
      +    }
      +    closedir($h);
      +}
      +
      +This function deletes all files of the form tmp*.pdf older than an hour in the specified +directory. You may call it where you want, for example in the script which generates the PDF. +
    • + +
    • +

      4. I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.

      +You have to enclose your string with double quotes, not single ones. +
    • + +
    • +

      5. I try to display a variable in the Header method but nothing prints.

      +You have to use the global keyword to access global variables, for example: +
      +
      function Header()
      +{
      +    global $title;
      +
      +    $this->SetFont('Arial', 'B', 15);
      +    $this->Cell(0, 10, $title, 1, 1, 'C');
      +}
      +
      +$title = 'My title';
      +
      +Alternatively, you can use an object property: +
      +
      function Header()
      +{
      +    $this->SetFont('Arial', 'B', 15);
      +    $this->Cell(0, 10, $this->title, 1, 1, 'C');
      +}
      +
      +$pdf->title = 'My title';
      +
      +
    • + +
    • +

      6. I defined the Header and Footer methods in my PDF class but nothing appears.

      +You have to create an object from the PDF class, not FPDF: +
      +
      $pdf = new PDF();
      +
      +
    • + +
    • +

      7. Accented characters are replaced by some strange characters like é.

      +Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252. +It is possible to perform a conversion to ISO-8859-1 with utf8_decode(): +
      +
      $str = utf8_decode($str);
      +
      +But some characters such as Euro won't be translated correctly. If the iconv extension is available, the +right way to do it is the following: +
      +
      $str = iconv('UTF-8', 'windows-1252', $str);
      +
      +
    • + +
    • +

      8. I try to display the Euro symbol but it doesn't work.

      +The standard fonts have the Euro character at position 128. You can define a constant like this +for convenience: +
      +
      define('EURO', chr(128));
      +
      +
    • + +
    • +

      9. I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file

      +You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common +case is having extra blank at the end of an included script file.
      +If you can't figure out where the problem comes from, this other message appearing just before can help you:
      +
      +Warning: Cannot modify header information - headers already sent by (output started at script.php:X)
      +
      +It means that script.php outputs something at line X. Go to this line and fix it. +In case the message doesn't show, first check that you didn't disable warnings, then add this at the very +beginning of your script: +
      +
      ob_end_clean();
      +
      +If you still don't see it, disable zlib.output_compression in your php.ini and it should appear. +
    • + +
    • +

      10. I draw a frame with very precise dimensions, but when printed I notice some differences.

      +To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box. +
    • + +
    • +

      11. I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?

      +Printers have physical margins (different depending on the models); it is therefore impossible to remove +them and print on the whole surface of the paper. +
    • + +
    • +

      12. How can I put a background in my PDF?

      +For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect(). +
    • + +
    • +

      13. How can I set a specific header or footer on the first page?

      +Simply test the page number: +
      +
      function Header()
      +{
      +    if($this->PageNo()==1)
      +    {
      +        //First page
      +        ...
      +    }
      +    else
      +    {
      +        //Other pages
      +        ...
      +    }
      +}
      +
      +
    • + +
    • +

      14. I'd like to use extensions provided by different scripts. How can I combine them?

      +Use an inheritance chain. If you have two classes, say A in a.php: +
      +
      require('fpdf.php');
      +
      +class A extends FPDF
      +{
      +...
      +}
      +
      +and B in b.php: +
      +
      require('fpdf.php');
      +
      +class B extends FPDF
      +{
      +...
      +}
      +
      +then make B extend A: +
      +
      require('a.php');
      +
      +class B extends A
      +{
      +...
      +}
      +
      +and make your own class extend B: +
      +
      require('b.php');
      +
      +class PDF extends B
      +{
      +...
      +}
      +
      +$pdf = new PDF();
      +
      +
    • + +
    • +

      15. How can I send the PDF by email?

      +As any other file, but an easy way is to use PHPMailer and +its in-memory attachment: +
      +
      $mail = new PHPMailer();
      +...
      +$doc = $pdf->Output('', 'S');
      +$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
      +$mail->Send();
      +
      +
    • + +
    • +

      16. What's the limit of the file sizes I can generate with FPDF?

      +There is no particular limit. There are some constraints, however: +
      +
      +- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents, +especially with images, this limit may be reached (the file being built into memory). The +parameter is configured in the php.ini file. +
      +
      +- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily +reached. It is configured in php.ini and may be altered dynamically with set_time_limit(). +
      +
      +- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and +reach the limit, it will be lost. It is therefore advised for very big documents to +generate them in a file, and to send some data to the browser from time to time (with a call +to flush() to force the output). When the document is finished, you can send a redirection to +it or create a link. +
      +Remark: even if the browser times out, the script may continue to run on the server. +
    • + +
    • +

      17. Can I modify a PDF with FPDF?

      +It is possible to import pages from an existing PDF document thanks to the FPDI extension:
      +
      +http://www.setasign.de/products/pdf-php-solutions/fpdi/
      +
      +You can then add some content to them. +
    • + +
    • +

      18. I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?

      +No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from +a PDF. It is provided with the Xpdf package:
      +
      +http://www.foolabs.com/xpdf/ +
    • + +
    • +

      19. Can I convert an HTML page to PDF with FPDF?

      +Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:
      +
      +http://www.htmldoc.org +
    • + +
    • +

      20. Can I concatenate PDF files with FPDF?

      +Not directly, but it is possible to use FPDI +to perform this task. Some free command-line tools also exist:
      +
      +mbtPdfAsm
      +pdftk +
    • +
    + + diff --git a/3.0/modules/proofsheet/lib/fpdf/changelog.htm b/3.0/modules/proofsheet/lib/fpdf/changelog.htm new file mode 100644 index 00000000..2549c38a --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/changelog.htm @@ -0,0 +1,146 @@ + + + + +Changelog + + + + +

    Changelog

    +
    +
    v1.7 (2011-06-18)
    +
    +- The MakeFont utility has been completely rewritten and doesn't depend on ttf2pt1 anymore.
    +- Alpha channel is now supported for PNGs.
    +- When inserting an image, it's now possible to specify its resolution.
    +- Default resolution for images was increased from 72 to 96 dpi.
    +- When inserting a GIF image, no temporary file is used anymore if the PHP version is 5.1 or higher.
    +- When output buffering is enabled and the PDF is about to be sent, the buffer is now cleared if it contains only a UTF-8 BOM and/or whitespace (instead of throwing an error).
    +- Symbol and ZapfDingbats fonts now support underline style.
    +- Custom page sizes are now checked to ensure that width is smaller than height.
    +- Standard font files were changed to use the same format as user fonts.
    +- A bug in the embedding of Type1 fonts was fixed.
    +- A bug related to SetDisplayMode() and the current locale was fixed.
    +- A display issue occurring with the Adobe Reader X plug-in was fixed.
    +- An issue related to transparency with some versions of Adobe Reader was fixed.
    +- The Content-Length header was removed because it caused an issue when the HTTP server applies compression.
    +
    +
    v1.6 (2008-08-03)
    +
    +- PHP 4.3.10 or higher is now required.
    +- GIF image support.
    +- Images can now trigger page breaks.
    +- Possibility to have different page formats in a single document.
    +- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.
    +- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.
    +- An automatic page break in Header() doesn't cause an infinite loop any more.
    +- Removed some warning messages appearing with recent PHP versions.
    +- Added HTTP headers to reduce problems with IE.
    +
    +
    v1.53 (2004-12-31)
    +
    +- When the font subdirectory is in the same directory as fpdf.php, it's no longer necessary to define the FPDF_FONTPATH constant.
    +- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.
    +- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.
    +- The file name sent to the browser could not contain a space character.
    +- The Cell() method could not print the number 0 (you had to pass the string '0').
    +
    +
    v1.52 (2003-12-30)
    +
    +- Image() now displays the image at 72 dpi if no dimension is given.
    +- Output() takes a string as second parameter to indicate destination.
    +- Open() is now called automatically by AddPage().
    +- Inserting remote JPEG images doesn't generate an error any longer.
    +- Decimal separator is forced to dot in the constructor.
    +- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).
    +- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.
    +- No more error message about already sent headers when outputting the PDF to the standard output from the command line.
    +- The underlining was going too far for text containing characters \, ( or ).
    +- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.
    +
    +
    v1.51 (2002-08-03)
    +
    +- Type1 font support.
    +- Added Baltic encoding.
    +- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :
      * The line thickness was too large when printed under Windows 98 SE and ME.
      * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.
    +- It's no longer necessary to set the decimal separator as dot to produce valid documents.
    +- The clickable area in a cell was always on the left independently from the text alignment.
    +- JPEG images in CMYK mode appeared in inverted colors.
    +- Transparent PNG images in grayscale or true color mode were incorrectly handled.
    +- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.
    +
    +
    v1.5 (2002-05-28)
    +
    +- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).
    +- Added Write() method.
    +- Added underlined style.
    +- Internal and external link support (AddLink(), SetLink(), Link()).
    +- Added right margin management and methods SetRightMargin(), SetTopMargin().
    +- Modification of SetDisplayMode() to select page layout.
    +- The border parameter of MultiCell() now lets choose borders to draw as Cell().
    +- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.
    +
    +
    v1.41 (2002-03-13)
    +
    +- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).
    +
    +
    v1.4 (2002-03-02)
    +
    +- PHP3 is no longer supported.
    +- Page compression (SetCompression()).
    +- Choice of page format and possibility to change orientation inside document.
    +- Added AcceptPageBreak() method.
    +- Ability to print the total number of pages (AliasNbPages()).
    +- Choice of cell borders to draw.
    +- New mode for Cell(): the current position can now move under the cell.
    +- Ability to include an image by specifying height only (width is calculated automatically).
    +- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.
    +
    +
    v1.31 (2002-01-12)
    +
    +- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.
    +- Removed Expires HTTP header (gives trouble in some situations).
    +- Added Content-disposition HTTP header (seems to help in some situations).
    +
    +
    v1.3 (2001-12-03)
    +
    +- Line break and text justification support (MultiCell()).
    +- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.
    +- A cell whose width is declared null extends up to the right margin of the page.
    +- Line width is now retained from page to page and defaults to 0.2 mm.
    +- Added SetXY() method.
    +- Fixed a passing by reference done in a deprecated manner for PHP4.
    +
    +
    v1.2 (2001-11-11)
    +
    +- Added font metric files and GetStringWidth() method.
    +- Centering and right-aligning text in cells.
    +- Display mode control (SetDisplayMode()).
    +- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).
    +- Possibility to force PDF download by browser.
    +- Added SetX() and GetX() methods.
    +- During automatic page break, current abscissa is now retained.
    +
    +
    v1.11 (2001-10-20)
    +
    +- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.
    +- Image insertion now works correctly even with magic_quotes_runtime option set to on.
    +
    +
    v1.1 (2001-10-07)
    +
    +- JPEG and PNG image support.
    +
    +
    v1.01 (2001-10-03)
    +
    +- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.
    +
    +
    v1.0 (2001-09-17)
    +
    +- First version.
    +
    +
    + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/acceptpagebreak.htm b/3.0/modules/proofsheet/lib/fpdf/doc/acceptpagebreak.htm new file mode 100644 index 00000000..810aabdf --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/acceptpagebreak.htm @@ -0,0 +1,63 @@ + + + + +AcceptPageBreak + + + +

    AcceptPageBreak

    +boolean AcceptPageBreak() +

    Description

    +Whenever a page break condition is met, the method is called, and the break is issued or not +depending on the returned value. The default implementation returns a value according to the +mode selected by SetAutoPageBreak(). +
    +This method is called automatically and should not be called directly by the application. +

    Example

    +The method is overriden in an inherited class in order to obtain a 3 column layout: +
    +
    class PDF extends FPDF
    +{
    +var $col = 0;
    +
    +function SetCol($col)
    +{
    +    // Move position to a column
    +    $this->col = $col;
    +    $x = 10+$col*65;
    +    $this->SetLeftMargin($x);
    +    $this->SetX($x);
    +}
    +
    +function AcceptPageBreak()
    +{
    +    if($this->col<2)
    +    {
    +        // Go to next column
    +        $this->SetCol($this->col+1);
    +        $this->SetY(10);
    +        return false;
    +    }
    +    else
    +    {
    +        // Go back to first column and issue page break
    +        $this->SetCol(0);
    +        return true;
    +    }
    +}
    +}
    +
    +$pdf = new PDF();
    +$pdf->AddPage();
    +$pdf->SetFont('Arial','',12);
    +for($i=1;$i<=300;$i++)
    +    $pdf->Cell(0,5,"Line $i",0,1);
    +$pdf->Output();
    +
    +

    See also

    +SetAutoPageBreak(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/addfont.htm b/3.0/modules/proofsheet/lib/fpdf/doc/addfont.htm new file mode 100644 index 00000000..90dc3613 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/addfont.htm @@ -0,0 +1,55 @@ + + + + +AddFont + + + +

    AddFont

    +AddFont(string family [, string style [, string file]]) +

    Description

    +Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font +definition file first with the MakeFont utility. +
    +The definition file (and the font file itself when embedding) must be present in the font directory. +If it is not found, the error "Could not include font definition file" is raised. +

    Parameters

    +
    +
    family
    +
    +Font family. The name can be chosen arbitrarily. If it is a standard family name, it will +override the corresponding font. +
    +
    style
    +
    +Font style. Possible values are (case insensitive): +
      +
    • empty string: regular
    • +
    • B: bold
    • +
    • I: italic
    • +
    • BI or IB: bold italic
    • +
    +The default value is regular. +
    +
    file
    +
    +The font definition file. +
    +By default, the name is built from the family and style, in lower case with no space. +
    +
    +

    Example

    +
    +
    $pdf->AddFont('Comic','I');
    +
    +is equivalent to: +
    +
    $pdf->AddFont('Comic','I','comici.php');
    +
    +

    See also

    +SetFont(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/addlink.htm b/3.0/modules/proofsheet/lib/fpdf/doc/addlink.htm new file mode 100644 index 00000000..5681d588 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/addlink.htm @@ -0,0 +1,26 @@ + + + + +AddLink + + + +

    AddLink

    +int AddLink() +

    Description

    +Creates a new internal link and returns its identifier. An internal link is a clickable area +which directs to another place within the document. +
    +The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is +defined with SetLink(). +

    See also

    +Cell(), +Write(), +Image(), +Link(), +SetLink(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/addpage.htm b/3.0/modules/proofsheet/lib/fpdf/doc/addpage.htm new file mode 100644 index 00000000..fde79aa8 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/addpage.htm @@ -0,0 +1,56 @@ + + + + +AddPage + + + +

    AddPage

    +AddPage([string orientation [, mixed size]]) +

    Description

    +Adds a new page to the document. If a page is already present, the Footer() method is called +first to output the footer. Then the page is added, the current position set to the top-left +corner according to the left and top margins, and Header() is called to display the header. +
    +The font which was set before calling is automatically restored. There is no need to call +SetFont() again if you want to continue with the same font. The same is true for colors and +line width. +
    +The origin of the coordinate system is at the top-left corner and increasing ordinates go +downwards. +

    Parameters

    +
    +
    orientation
    +
    +Page orientation. Possible values are (case insensitive): +
      +
    • P or Portrait
    • +
    • L or Landscape
    • +
    +The default value is the one passed to the constructor. +
    +
    size
    +
    +Page size. It can be either one of the following values (case insensitive): +
      +
    • A3
    • +
    • A4
    • +
    • A5
    • +
    • Letter
    • +
    • Legal
    • +
    +or an array containing the width and the height (expressed in user unit).
    +
    +The default value is the one passed to the constructor. +
    +
    +

    See also

    +FPDF(), +Header(), +Footer(), +SetMargins(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/aliasnbpages.htm b/3.0/modules/proofsheet/lib/fpdf/doc/aliasnbpages.htm new file mode 100644 index 00000000..53fdf683 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/aliasnbpages.htm @@ -0,0 +1,45 @@ + + + + +AliasNbPages + + + +

    AliasNbPages

    +AliasNbPages([string alias]) +

    Description

    +Defines an alias for the total number of pages. It will be substituted as the document is +closed. +

    Parameters

    +
    +
    alias
    +
    +The alias. Default value: {nb}. +
    +
    +

    Example

    +
    +
    class PDF extends FPDF
    +{
    +function Footer()
    +{
    +    // Go to 1.5 cm from bottom
    +    $this->SetY(-15);
    +    // Select Arial italic 8
    +    $this->SetFont('Arial','I',8);
    +    // Print current and total page numbers
    +    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
    +}
    +}
    +
    +$pdf = new PDF();
    +$pdf->AliasNbPages();
    +
    +

    See also

    +PageNo(), +Footer(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/cell.htm b/3.0/modules/proofsheet/lib/fpdf/doc/cell.htm new file mode 100644 index 00000000..74802667 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/cell.htm @@ -0,0 +1,104 @@ + + + + +Cell + + + +

    Cell

    +Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) +

    Description

    +Prints a cell (rectangular area) with optional borders, background color and character string. +The upper-left corner of the cell corresponds to the current position. The text can be aligned +or centered. After the call, the current position moves to the right or to the next line. It is +possible to put a link on the text. +
    +If automatic page breaking is enabled and the cell goes beyond the limit, a page break is +done before outputting. +

    Parameters

    +
    +
    w
    +
    +Cell width. If 0, the cell extends up to the right margin. +
    +
    h
    +
    +Cell height. +Default value: 0. +
    +
    txt
    +
    +String to print. +Default value: empty string. +
    +
    border
    +
    +Indicates if borders must be drawn around the cell. The value can be either a number: +
      +
    • 0: no border
    • +
    • 1: frame
    • +
    +or a string containing some or all of the following characters (in any order): +
      +
    • L: left
    • +
    • T: top
    • +
    • R: right
    • +
    • B: bottom
    • +
    +Default value: 0. +
    +
    ln
    +
    +Indicates where the current position should go after the call. Possible values are: +
      +
    • 0: to the right
    • +
    • 1: to the beginning of the next line
    • +
    • 2: below
    • +
    +Putting 1 is equivalent to putting 0 and calling Ln() just after. +Default value: 0. +
    +
    align
    +
    +Allows to center or align the text. Possible values are: +
      +
    • L or empty string: left align (default value)
    • +
    • C: center
    • +
    • R: right align
    • +
    +
    +
    fill
    +
    +Indicates if the cell background must be painted (true) or transparent (false). +Default value: false. +
    +
    link
    +
    +URL or identifier returned by AddLink(). +
    +
    +

    Example

    +
    +
    // Set font
    +$pdf->SetFont('Arial','B',16);
    +// Move to 8 cm to the right
    +$pdf->Cell(80);
    +// Centered text in a framed 20*10 mm cell and line break
    +$pdf->Cell(20,10,'Title',1,1,'C');
    +
    +

    See also

    +SetFont(), +SetDrawColor(), +SetFillColor(), +SetTextColor(), +SetLineWidth(), +AddLink(), +Ln(), +MultiCell(), +Write(), +SetAutoPageBreak(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/close.htm b/3.0/modules/proofsheet/lib/fpdf/doc/close.htm new file mode 100644 index 00000000..6d8c1924 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/close.htm @@ -0,0 +1,21 @@ + + + + +Close + + + +

    Close

    +Close() +

    Description

    +Terminates the PDF document. It is not necessary to call this method explicitly because Output() +does it automatically. +
    +If the document contains no page, AddPage() is called to prevent from getting an invalid document. +

    See also

    +Output(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/error.htm b/3.0/modules/proofsheet/lib/fpdf/doc/error.htm new file mode 100644 index 00000000..49b6083c --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/error.htm @@ -0,0 +1,25 @@ + + + + +Error + + + +

    Error

    +Error(string msg) +

    Description

    +This method is automatically called in case of fatal error; it simply outputs the message +and halts the execution. An inherited class may override it to customize the error handling +but should always halt the script, or the resulting document would probably be invalid. +

    Parameters

    +
    +
    msg
    +
    +The error message. +
    +
    +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/footer.htm b/3.0/modules/proofsheet/lib/fpdf/doc/footer.htm new file mode 100644 index 00000000..1e4b3ad9 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/footer.htm @@ -0,0 +1,35 @@ + + + + +Footer + + + +

    Footer

    +Footer() +

    Description

    +This method is used to render the page footer. It is automatically called by AddPage() and +Close() and should not be called directly by the application. The implementation in FPDF is +empty, so you have to subclass it and override the method if you want a specific processing. +

    Example

    +
    +
    class PDF extends FPDF
    +{
    +function Footer()
    +{
    +    // Go to 1.5 cm from bottom
    +    $this->SetY(-15);
    +    // Select Arial italic 8
    +    $this->SetFont('Arial','I',8);
    +    // Print centered page number
    +    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
    +}
    +}
    +
    +

    See also

    +Header(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/fpdf.htm b/3.0/modules/proofsheet/lib/fpdf/doc/fpdf.htm new file mode 100644 index 00000000..af3a4631 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/fpdf.htm @@ -0,0 +1,63 @@ + + + + +FPDF + + + +

    FPDF

    +FPDF([string orientation [, string unit [, mixed size]]]) +

    Description

    +This is the class constructor. It allows to set up the page size, the orientation and the +unit of measure used in all methods (except for font sizes). +

    Parameters

    +
    +
    orientation
    +
    +Default page orientation. Possible values are (case insensitive): +
      +
    • P or Portrait
    • +
    • L or Landscape
    • +
    +Default value is P. +
    +
    unit
    +
    +User unit. Possible values are: +
      +
    • pt: point
    • +
    • mm: millimeter
    • +
    • cm: centimeter
    • +
    • in: inch
    • +
    +A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This +is a very common unit in typography; font sizes are expressed in that unit. +
    +
    +Default value is mm. +
    +
    size
    +
    +The size used for pages. It can be either one of the following values (case insensitive): +
      +
    • A3
    • +
    • A4
    • +
    • A5
    • +
    • Letter
    • +
    • Legal
    • +
    +or an array containing the width and the height (expressed in the unit given by unit).
    +
    +Default value is A4. +
    +
    +

    Example

    +Example with a custom 100x150 mm page size: +
    +
    $pdf = new FPDF('P','mm',array(100,150));
    +
    +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/getstringwidth.htm b/3.0/modules/proofsheet/lib/fpdf/doc/getstringwidth.htm new file mode 100644 index 00000000..7cb1119b --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/getstringwidth.htm @@ -0,0 +1,23 @@ + + + + +GetStringWidth + + + +

    GetStringWidth

    +float GetStringWidth(string s) +

    Description

    +Returns the length of a string in user unit. A font must be selected. +

    Parameters

    +
    +
    s
    +
    +The string whose length is to be computed. +
    +
    +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/getx.htm b/3.0/modules/proofsheet/lib/fpdf/doc/getx.htm new file mode 100644 index 00000000..1d1310ca --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/getx.htm @@ -0,0 +1,20 @@ + + + + +GetX + + + +

    GetX

    +float GetX() +

    Description

    +Returns the abscissa of the current position. +

    See also

    +SetX(), +GetY(), +SetY(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/gety.htm b/3.0/modules/proofsheet/lib/fpdf/doc/gety.htm new file mode 100644 index 00000000..e8ce6cf0 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/gety.htm @@ -0,0 +1,20 @@ + + + + +GetY + + + +

    GetY

    +float GetY() +

    Description

    +Returns the ordinate of the current position. +

    See also

    +SetY(), +GetX(), +SetX(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/header.htm b/3.0/modules/proofsheet/lib/fpdf/doc/header.htm new file mode 100644 index 00000000..b7cd1f80 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/header.htm @@ -0,0 +1,37 @@ + + + + +Header + + + +

    Header

    +Header() +

    Description

    +This method is used to render the page header. It is automatically called by AddPage() and +should not be called directly by the application. The implementation in FPDF is empty, so +you have to subclass it and override the method if you want a specific processing. +

    Example

    +
    +
    class PDF extends FPDF
    +{
    +function Header()
    +{
    +    // Select Arial bold 15
    +    $this->SetFont('Arial','B',15);
    +    // Move to the right
    +    $this->Cell(80);
    +    // Framed title
    +    $this->Cell(30,10,'Title',1,0,'C');
    +    // Line break
    +    $this->Ln(20);
    +}
    +}
    +
    +

    See also

    +Footer(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/image.htm b/3.0/modules/proofsheet/lib/fpdf/doc/image.htm new file mode 100644 index 00000000..66a35eea --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/image.htm @@ -0,0 +1,99 @@ + + + + +Image + + + +

    Image

    +Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) +

    Description

    +Puts an image. The size it will take on the page can be specified in different ways: +
      +
    • explicit width and height (expressed in user unit or dpi)
    • +
    • one explicit dimension, the other being calculated automatically in order to keep the original proportions
    • +
    • no explicit dimension, in which case the image is put at 96 dpi
    • +
    +Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF. +
    +
    +For JPEGs, all flavors are allowed: +
      +
    • gray scales
    • +
    • true colors (24 bits)
    • +
    • CMYK (32 bits)
    • +
    +For PNGs, are allowed: +
      +
    • gray scales on at most 8 bits (256 levels)
    • +
    • indexed colors
    • +
    • true colors (24 bits)
    • +
    +For GIFs: in case of an animated GIF, only the first frame is displayed.
    +
    +Transparency is supported.
    +
    +The format can be specified explicitly or inferred from the file extension.
    +
    +It is possible to put a link on the image.
    +
    +Remark: if an image is used several times, only one copy is embedded in the file. +

    Parameters

    +
    +
    file
    +
    +Path or URL of the image. +
    +
    x
    +
    +Abscissa of the upper-left corner. If not specified or equal to null, the current abscissa +is used. +
    +
    y
    +
    +Ordinate of the upper-left corner. If not specified or equal to null, the current ordinate +is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled) +and, after the call, the current ordinate is moved to the bottom of the image. +
    +
    w
    +
    +Width of the image in the page. There are three cases: +
      +
    • If the value is positive, it represents the width in user unit
    • +
    • If the value is negative, the absolute value represents the horizontal resolution in dpi
    • +
    • If the value is not specified or equal to zero, it is automatically calculated
    • +
    +
    +
    h
    +
    +Height of the image in the page. There are three cases: +
      +
    • If the value is positive, it represents the height in user unit
    • +
    • If the value is negative, the absolute value represents the vertical resolution in dpi
    • +
    • If the value is not specified or equal to zero, it is automatically calculated
    • +
    +
    +
    type
    +
    +Image format. Possible values are (case insensitive): JPG, JPEG, PNG and GIF. +If not specified, the type is inferred from the file extension. +
    +
    link
    +
    +URL or identifier returned by AddLink(). +
    +
    +

    Example

    +
    +
    // Insert a logo in the top-left corner at 300 dpi
    +$pdf->Image('logo.png',10,10,-300);
    +// Insert a dynamic image from a URL
    +$pdf->Image('http://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World',60,30,90,0,'PNG');
    +
    +

    See also

    +AddLink(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/index.htm b/3.0/modules/proofsheet/lib/fpdf/doc/index.htm new file mode 100644 index 00000000..6c270661 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/index.htm @@ -0,0 +1,57 @@ + + + + +FPDF 1.7 Reference Manual + + + +

    FPDF 1.7 Reference Manual

    +AcceptPageBreak - accept or not automatic page break
    +AddFont - add a new font
    +AddLink - create an internal link
    +AddPage - add a new page
    +AliasNbPages - define an alias for number of pages
    +Cell - print a cell
    +Close - terminate the document
    +Error - fatal error
    +Footer - page footer
    +FPDF - constructor
    +GetStringWidth - compute string length
    +GetX - get current x position
    +GetY - get current y position
    +Header - page header
    +Image - output an image
    +Line - draw a line
    +Link - put a link
    +Ln - line break
    +MultiCell - print text with line breaks
    +Output - save or send the document
    +PageNo - page number
    +Rect - draw a rectangle
    +SetAuthor - set the document author
    +SetAutoPageBreak - set the automatic page breaking mode
    +SetCompression - turn compression on or off
    +SetCreator - set document creator
    +SetDisplayMode - set display mode
    +SetDrawColor - set drawing color
    +SetFillColor - set filling color
    +SetFont - set font
    +SetFontSize - set font size
    +SetKeywords - associate keywords with document
    +SetLeftMargin - set left margin
    +SetLineWidth - set line width
    +SetLink - set internal link destination
    +SetMargins - set margins
    +SetRightMargin - set right margin
    +SetSubject - set document subject
    +SetTextColor - set text color
    +SetTitle - set document title
    +SetTopMargin - set top margin
    +SetX - set current x position
    +SetXY - set current x and y positions
    +SetY - set current y position
    +Text - print a string
    +Write - print flowing text
    + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/line.htm b/3.0/modules/proofsheet/lib/fpdf/doc/line.htm new file mode 100644 index 00000000..a9c5194c --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/line.htm @@ -0,0 +1,38 @@ + + + + +Line + + + +

    Line

    +Line(float x1, float y1, float x2, float y2) +

    Description

    +Draws a line between two points. +

    Parameters

    +
    +
    x1
    +
    +Abscissa of first point. +
    +
    y1
    +
    +Ordinate of first point. +
    +
    x2
    +
    +Abscissa of second point. +
    +
    y2
    +
    +Ordinate of second point. +
    +
    +

    See also

    +SetLineWidth(), +SetDrawColor(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/link.htm b/3.0/modules/proofsheet/lib/fpdf/doc/link.htm new file mode 100644 index 00000000..d6c728c7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/link.htm @@ -0,0 +1,46 @@ + + + + +Link + + + +

    Link

    +Link(float x, float y, float w, float h, mixed link) +

    Description

    +Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(), +Write() or Image(), but this method can be useful for instance to define a clickable area inside +an image. +

    Parameters

    +
    +
    x
    +
    +Abscissa of the upper-left corner of the rectangle. +
    +
    y
    +
    +Ordinate of the upper-left corner of the rectangle. +
    +
    w
    +
    +Width of the rectangle. +
    +
    h
    +
    +Height of the rectangle. +
    +
    link
    +
    +URL or identifier returned by AddLink(). +
    +
    +

    See also

    +AddLink(), +Cell(), +Write(), +Image(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/ln.htm b/3.0/modules/proofsheet/lib/fpdf/doc/ln.htm new file mode 100644 index 00000000..0b91b001 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/ln.htm @@ -0,0 +1,28 @@ + + + + +Ln + + + +

    Ln

    +Ln([float h]) +

    Description

    +Performs a line break. The current abscissa goes back to the left margin and the ordinate +increases by the amount passed in parameter. +

    Parameters

    +
    +
    h
    +
    +The height of the break. +
    +By default, the value equals the height of the last printed cell. +
    +
    +

    See also

    +Cell(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/multicell.htm b/3.0/modules/proofsheet/lib/fpdf/doc/multicell.htm new file mode 100644 index 00000000..c41bbd70 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/multicell.htm @@ -0,0 +1,76 @@ + + + + +MultiCell + + + +

    MultiCell

    +MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]]) +

    Description

    +This method allows printing text with line breaks. They can be automatic (as soon as the +text reaches the right border of the cell) or explicit (via the \n character). As many cells +as necessary are output, one below the other. +
    +Text can be aligned, centered or justified. The cell block can be framed and the background +painted. +

    Parameters

    +
    +
    w
    +
    +Width of cells. If 0, they extend up to the right margin of the page. +
    +
    h
    +
    +Height of cells. +
    +
    txt
    +
    +String to print. +
    +
    border
    +
    +Indicates if borders must be drawn around the cell block. The value can be either a number: +
      +
    • 0: no border
    • +
    • 1: frame
    • +
    +or a string containing some or all of the following characters (in any order): +
      +
    • L: left
    • +
    • T: top
    • +
    • R: right
    • +
    • B: bottom
    • +
    +Default value: 0. +
    +
    align
    +
    +Sets the text alignment. Possible values are: +
      +
    • L: left alignment
    • +
    • C: center
    • +
    • R: right alignment
    • +
    • J: justification (default value)
    • +
    +
    +
    fill
    +
    +Indicates if the cell background must be painted (true) or transparent (false). +Default value: false. +
    +
    +

    See also

    +SetFont(), +SetDrawColor(), +SetFillColor(), +SetTextColor(), +SetLineWidth(), +Cell(), +Write(), +SetAutoPageBreak(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/output.htm b/3.0/modules/proofsheet/lib/fpdf/doc/output.htm new file mode 100644 index 00000000..b62291c0 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/output.htm @@ -0,0 +1,42 @@ + + + + +Output + + + +

    Output

    +string Output([string name, string dest]) +

    Description

    +Send the document to a given destination: browser, file or string. In the case of browser, the +plug-in may be used (if present) or a download ("Save as" dialog box) may be forced. +
    +The method first calls Close() if necessary to terminate the document. +

    Parameters

    +
    +
    name
    +
    +The name of the file. If not specified, the document will be sent to the browser +(destination I) with the name doc.pdf. +
    +
    dest
    +
    +Destination where to send the document. It can take one of the following values: +
      +
    • I: send the file inline to the browser. The plug-in is used if available. +The name given by name is used when one selects the "Save as" option on the +link generating the PDF.
    • +
    • D: send to the browser and force a file download with the name given by +name.
    • +
    • F: save to a local file with the name given by name (may include a path).
    • +
    • S: return the document as a string. name is ignored.
    • +
    +
    +
    +

    See also

    +Close(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/pageno.htm b/3.0/modules/proofsheet/lib/fpdf/doc/pageno.htm new file mode 100644 index 00000000..84e0f224 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/pageno.htm @@ -0,0 +1,18 @@ + + + + +PageNo + + + +

    PageNo

    +int PageNo() +

    Description

    +Returns the current page number. +

    See also

    +AliasNbPages(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/rect.htm b/3.0/modules/proofsheet/lib/fpdf/doc/rect.htm new file mode 100644 index 00000000..fa71375b --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/rect.htm @@ -0,0 +1,48 @@ + + + + +Rect + + + +

    Rect

    +Rect(float x, float y, float w, float h [, string style]) +

    Description

    +Outputs a rectangle. It can be drawn (border only), filled (with no border) or both. +

    Parameters

    +
    +
    x
    +
    +Abscissa of upper-left corner. +
    +
    y
    +
    +Ordinate of upper-left corner. +
    +
    w
    +
    +Width. +
    +
    h
    +
    +Height. +
    +
    style
    +
    +Style of rendering. Possible values are: +
      +
    • D or empty string: draw. This is the default value.
    • +
    • F: fill
    • +
    • DF or FD: draw and fill
    • +
    +
    +
    +

    See also

    +SetLineWidth(), +SetDrawColor(), +SetFillColor(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setauthor.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setauthor.htm new file mode 100644 index 00000000..60d3b7c7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setauthor.htm @@ -0,0 +1,33 @@ + + + + +SetAuthor + + + +

    SetAuthor

    +SetAuthor(string author [, boolean isUTF8]) +

    Description

    +Defines the author of the document. +

    Parameters

    +
    +
    author
    +
    +The name of the author. +
    +
    isUTF8
    +
    +Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
    +Default value: false. +
    +
    +

    See also

    +SetCreator(), +SetKeywords(), +SetSubject(), +SetTitle(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setautopagebreak.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setautopagebreak.htm new file mode 100644 index 00000000..71dec89f --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setautopagebreak.htm @@ -0,0 +1,33 @@ + + + + +SetAutoPageBreak + + + +

    SetAutoPageBreak

    +SetAutoPageBreak(boolean auto [, float margin]) +

    Description

    +Enables or disables the automatic page breaking mode. When enabling, the second parameter is +the distance from the bottom of the page that defines the triggering limit. By default, the +mode is on and the margin is 2 cm. +

    Parameters

    +
    +
    auto
    +
    +Boolean indicating if mode should be on or off. +
    +
    margin
    +
    +Distance from the bottom of the page. +
    +
    +

    See also

    +Cell(), +MultiCell(), +AcceptPageBreak(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setcompression.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setcompression.htm new file mode 100644 index 00000000..3f81ab08 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setcompression.htm @@ -0,0 +1,31 @@ + + + + +SetCompression + + + +

    SetCompression

    +SetCompression(boolean compress) +

    Description

    +Activates or deactivates page compression. When activated, the internal representation of +each page is compressed, which leads to a compression ratio of about 2 for the resulting +document. +
    +Compression is on by default. +
    +
    +Note: the Zlib extension is required for this feature. If not present, compression +will be turned off. +

    Parameters

    +
    +
    compress
    +
    +Boolean indicating if compression must be enabled. +
    +
    +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setcreator.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setcreator.htm new file mode 100644 index 00000000..2c0db3c1 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setcreator.htm @@ -0,0 +1,34 @@ + + + + +SetCreator + + + +

    SetCreator

    +SetCreator(string creator [, boolean isUTF8]) +

    Description

    +Defines the creator of the document. This is typically the name of the application that +generates the PDF. +

    Parameters

    +
    +
    creator
    +
    +The name of the creator. +
    +
    isUTF8
    +
    +Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
    +Default value: false. +
    +
    +

    See also

    +SetAuthor(), +SetKeywords(), +SetSubject(), +SetTitle(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setdisplaymode.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setdisplaymode.htm new file mode 100644 index 00000000..b8da44f7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setdisplaymode.htm @@ -0,0 +1,45 @@ + + + + +SetDisplayMode + + + +

    SetDisplayMode

    +SetDisplayMode(mixed zoom [, string layout]) +

    Description

    +Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be +displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a +specific zooming factor or use viewer default (configured in the Preferences menu of Adobe Reader). +The page layout can be specified too: single at once, continuous display, two columns or viewer +default. +

    Parameters

    +
    +
    zoom
    +
    +The zoom to use. It can be one of the following string values: +
      +
    • fullpage: displays the entire page on screen
    • +
    • fullwidth: uses maximum width of window
    • +
    • real: uses real size (equivalent to 100% zoom)
    • +
    • default: uses viewer default mode
    • +
    +or a number indicating the zooming factor to use. +
    +
    layout
    +
    +The page layout. Possible values are: +
      +
    • single: displays one page at once
    • +
    • continuous: displays pages continuously
    • +
    • two: displays two pages on two columns
    • +
    • default: uses viewer default mode
    • +
    +Default value is default. +
    +
    +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setdrawcolor.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setdrawcolor.htm new file mode 100644 index 00000000..6be79c56 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setdrawcolor.htm @@ -0,0 +1,41 @@ + + + + +SetDrawColor + + + +

    SetDrawColor

    +SetDrawColor(int r [, int g, int b]) +

    Description

    +Defines the color used for all drawing operations (lines, rectangles and cell borders). It +can be expressed in RGB components or gray scale. The method can be called before the first +page is created and the value is retained from page to page. +

    Parameters

    +
    +
    r
    +
    +If g et b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
    +
    g
    +
    +Green component (between 0 and 255). +
    +
    b
    +
    +Blue component (between 0 and 255). +
    +
    +

    See also

    +SetFillColor(), +SetTextColor(), +Line(), +Rect(), +Cell(), +MultiCell(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setfillcolor.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setfillcolor.htm new file mode 100644 index 00000000..64f66d3d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setfillcolor.htm @@ -0,0 +1,40 @@ + + + + +SetFillColor + + + +

    SetFillColor

    +SetFillColor(int r [, int g, int b]) +

    Description

    +Defines the color used for all filling operations (filled rectangles and cell backgrounds). +It can be expressed in RGB components or gray scale. The method can be called before the first +page is created and the value is retained from page to page. +

    Parameters

    +
    +
    r
    +
    +If g and b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
    +
    g
    +
    +Green component (between 0 and 255). +
    +
    b
    +
    +Blue component (between 0 and 255). +
    +
    +

    See also

    +SetDrawColor(), +SetTextColor(), +Rect(), +Cell(), +MultiCell(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setfont.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setfont.htm new file mode 100644 index 00000000..1cbae91d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setfont.htm @@ -0,0 +1,92 @@ + + + + +SetFont + + + +

    SetFont

    +SetFont(string family [, string style [, float size]]) +

    Description

    +Sets the font used to print character strings. It is mandatory to call this method +at least once before printing text or the resulting document would not be valid. +
    +The font can be either a standard one or a font added via the AddFont() method. Standard fonts +use the Windows encoding cp1252 (Western Europe). +
    +The method can be called before the first page is created and the font is kept from page +to page. +
    +If you just wish to change the current font size, it is simpler to call SetFontSize(). +
    +
    +Note: the font definition files must be accessible. They are searched successively in: +
      +
    • The directory defined by the FPDF_FONTPATH constant (if this constant is defined)
    • +
    • The font directory located in the same directory as fpdf.php (if it exists)
    • +
    • The directories accessible through include()
    • +
    +Example using FPDF_FONTPATH: +
    +
    define('FPDF_FONTPATH','/home/www/font');
    +require('fpdf.php');
    +
    +If the file corresponding to the requested font is not found, the error "Could not include font +definition file" is raised. +

    Parameters

    +
    +
    family
    +
    +Family font. It can be either a name defined by AddFont() or one of the standard families (case +insensitive): +
      +
    • Courier (fixed-width)
    • +
    • Helvetica or Arial (synonymous; sans serif)
    • +
    • Times (serif)
    • +
    • Symbol (symbolic)
    • +
    • ZapfDingbats (symbolic)
    • +
    +It is also possible to pass an empty string. In that case, the current family is kept. +
    +
    style
    +
    +Font style. Possible values are (case insensitive): +
      +
    • empty string: regular
    • +
    • B: bold
    • +
    • I: italic
    • +
    • U: underline
    • +
    +or any combination. The default value is regular. +Bold and italic styles do not apply to Symbol and ZapfDingbats. +
    +
    size
    +
    +Font size in points. +
    +The default value is the current size. If no size has been specified since the beginning of +the document, the value taken is 12. +
    +
    +

    Example

    +
    +
    // Times regular 12
    +$pdf->SetFont('Times');
    +// Arial bold 14
    +$pdf->SetFont('Arial','B',14);
    +// Removes bold
    +$pdf->SetFont('');
    +// Times bold, italic and underlined 14
    +$pdf->SetFont('Times','BIU');
    +
    +

    See also

    +AddFont(), +SetFontSize(), +Cell(), +MultiCell(), +Write(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setfontsize.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setfontsize.htm new file mode 100644 index 00000000..20b35cdf --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setfontsize.htm @@ -0,0 +1,25 @@ + + + + +SetFontSize + + + +

    SetFontSize

    +SetFontSize(float size) +

    Description

    +Defines the size of the current font. +

    Parameters

    +
    +
    size
    +
    +The size (in points). +
    +
    +

    See also

    +SetFont(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setkeywords.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setkeywords.htm new file mode 100644 index 00000000..8b8897e7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setkeywords.htm @@ -0,0 +1,33 @@ + + + + +SetKeywords + + + +

    SetKeywords

    +SetKeywords(string keywords [, boolean isUTF8]) +

    Description

    +Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. +

    Parameters

    +
    +
    keywords
    +
    +The list of keywords. +
    +
    isUTF8
    +
    +Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
    +Default value: false. +
    +
    +

    See also

    +SetAuthor(), +SetCreator(), +SetSubject(), +SetTitle(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setleftmargin.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setleftmargin.htm new file mode 100644 index 00000000..dde7a7cf --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setleftmargin.htm @@ -0,0 +1,30 @@ + + + + +SetLeftMargin + + + +

    SetLeftMargin

    +SetLeftMargin(float margin) +

    Description

    +Defines the left margin. The method can be called before creating the first page. +
    +If the current abscissa gets out of page, it is brought back to the margin. +

    Parameters

    +
    +
    margin
    +
    +The margin. +
    +
    +

    See also

    +SetTopMargin(), +SetRightMargin(), +SetAutoPageBreak(), +SetMargins(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setlinewidth.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setlinewidth.htm new file mode 100644 index 00000000..11e417c0 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setlinewidth.htm @@ -0,0 +1,29 @@ + + + + +SetLineWidth + + + +

    SetLineWidth

    +SetLineWidth(float width) +

    Description

    +Defines the line width. By default, the value equals 0.2 mm. The method can be called before +the first page is created and the value is retained from page to page. +

    Parameters

    +
    +
    width
    +
    +The width. +
    +
    +

    See also

    +Line(), +Rect(), +Cell(), +MultiCell(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setlink.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setlink.htm new file mode 100644 index 00000000..b524525f --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setlink.htm @@ -0,0 +1,34 @@ + + + + +SetLink + + + +

    SetLink

    +SetLink(int link [, float y [, int page]]) +

    Description

    +Defines the page and position a link points to. +

    Parameters

    +
    +
    link
    +
    +The link identifier returned by AddLink(). +
    +
    y
    +
    +Ordinate of target position; -1 indicates the current position. +The default value is 0 (top of page). +
    +
    page
    +
    +Number of target page; -1 indicates the current page. This is the default value. +
    +
    +

    See also

    +AddLink(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setmargins.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setmargins.htm new file mode 100644 index 00000000..7cc8c6d1 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setmargins.htm @@ -0,0 +1,37 @@ + + + + +SetMargins + + + +

    SetMargins

    +SetMargins(float left, float top [, float right]) +

    Description

    +Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change +them. +

    Parameters

    +
    +
    left
    +
    +Left margin. +
    +
    top
    +
    +Top margin. +
    +
    right
    +
    +Right margin. Default value is the left one. +
    +
    +

    See also

    +SetLeftMargin(), +SetTopMargin(), +SetRightMargin(), +SetAutoPageBreak(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setrightmargin.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setrightmargin.htm new file mode 100644 index 00000000..79156476 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setrightmargin.htm @@ -0,0 +1,28 @@ + + + + +SetRightMargin + + + +

    SetRightMargin

    +SetRightMargin(float margin) +

    Description

    +Defines the right margin. The method can be called before creating the first page. +

    Parameters

    +
    +
    margin
    +
    +The margin. +
    +
    +

    See also

    +SetLeftMargin(), +SetTopMargin(), +SetAutoPageBreak(), +SetMargins(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setsubject.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setsubject.htm new file mode 100644 index 00000000..e8c628ca --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setsubject.htm @@ -0,0 +1,33 @@ + + + + +SetSubject + + + +

    SetSubject

    +SetSubject(string subject [, boolean isUTF8]) +

    Description

    +Defines the subject of the document. +

    Parameters

    +
    +
    subject
    +
    +The subject. +
    +
    isUTF8
    +
    +Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
    +Default value: false. +
    +
    +

    See also

    +SetAuthor(), +SetCreator(), +SetKeywords(), +SetTitle(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/settextcolor.htm b/3.0/modules/proofsheet/lib/fpdf/doc/settextcolor.htm new file mode 100644 index 00000000..cb12fecc --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/settextcolor.htm @@ -0,0 +1,40 @@ + + + + +SetTextColor + + + +

    SetTextColor

    +SetTextColor(int r [, int g, int b]) +

    Description

    +Defines the color used for text. It can be expressed in RGB components or gray scale. The +method can be called before the first page is created and the value is retained from page to +page. +

    Parameters

    +
    +
    r
    +
    +If g et b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
    +
    g
    +
    +Green component (between 0 and 255). +
    +
    b
    +
    +Blue component (between 0 and 255). +
    +
    +

    See also

    +SetDrawColor(), +SetFillColor(), +Text(), +Cell(), +MultiCell(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/settitle.htm b/3.0/modules/proofsheet/lib/fpdf/doc/settitle.htm new file mode 100644 index 00000000..3bc0fe8d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/settitle.htm @@ -0,0 +1,33 @@ + + + + +SetTitle + + + +

    SetTitle

    +SetTitle(string title [, boolean isUTF8]) +

    Description

    +Defines the title of the document. +

    Parameters

    +
    +
    title
    +
    +The title. +
    +
    isUTF8
    +
    +Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
    +Default value: false. +
    +
    +

    See also

    +SetAuthor(), +SetCreator(), +SetKeywords(), +SetSubject(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/settopmargin.htm b/3.0/modules/proofsheet/lib/fpdf/doc/settopmargin.htm new file mode 100644 index 00000000..65a4b7d4 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/settopmargin.htm @@ -0,0 +1,28 @@ + + + + +SetTopMargin + + + +

    SetTopMargin

    +SetTopMargin(float margin) +

    Description

    +Defines the top margin. The method can be called before creating the first page. +

    Parameters

    +
    +
    margin
    +
    +The margin. +
    +
    +

    See also

    +SetLeftMargin(), +SetRightMargin(), +SetAutoPageBreak(), +SetMargins(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setx.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setx.htm new file mode 100644 index 00000000..7c92465c --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setx.htm @@ -0,0 +1,29 @@ + + + + +SetX + + + +

    SetX

    +SetX(float x) +

    Description

    +Defines the abscissa of the current position. If the passed value is negative, it is relative +to the right of the page. +

    Parameters

    +
    +
    x
    +
    +The value of the abscissa. +
    +
    +

    See also

    +GetX(), +GetY(), +SetY(), +SetXY(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/setxy.htm b/3.0/modules/proofsheet/lib/fpdf/doc/setxy.htm new file mode 100644 index 00000000..c0602e5f --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/setxy.htm @@ -0,0 +1,31 @@ + + + + +SetXY + + + +

    SetXY

    +SetXY(float x, float y) +

    Description

    +Defines the abscissa and ordinate of the current position. If the passed values are negative, +they are relative respectively to the right and bottom of the page. +

    Parameters

    +
    +
    x
    +
    +The value of the abscissa. +
    +
    y
    +
    +The value of the ordinate. +
    +
    +

    See also

    +SetX(), +SetY(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/sety.htm b/3.0/modules/proofsheet/lib/fpdf/doc/sety.htm new file mode 100644 index 00000000..e9afe116 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/sety.htm @@ -0,0 +1,29 @@ + + + + +SetY + + + +

    SetY

    +SetY(float y) +

    Description

    +Moves the current abscissa back to the left margin and sets the ordinate. If the passed value +is negative, it is relative to the bottom of the page. +

    Parameters

    +
    +
    y
    +
    +The value of the ordinate. +
    +
    +

    See also

    +GetX(), +GetY(), +SetX(), +SetXY(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/text.htm b/3.0/modules/proofsheet/lib/fpdf/doc/text.htm new file mode 100644 index 00000000..ccd86eb9 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/text.htm @@ -0,0 +1,39 @@ + + + + +Text + + + +

    Text

    +Text(float x, float y, string txt) +

    Description

    +Prints a character string. The origin is on the left of the first character, on the baseline. +This method allows to place a string precisely on the page, but it is usually easier to use +Cell(), MultiCell() or Write() which are the standard methods to print text. +

    Parameters

    +
    +
    x
    +
    +Abscissa of the origin. +
    +
    y
    +
    +Ordinate of the origin. +
    +
    txt
    +
    +String to print. +
    +
    +

    See also

    +SetFont(), +SetTextColor(), +Cell(), +MultiCell(), +Write(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/doc/write.htm b/3.0/modules/proofsheet/lib/fpdf/doc/write.htm new file mode 100644 index 00000000..162476be --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/doc/write.htm @@ -0,0 +1,51 @@ + + + + +Write + + + +

    Write

    +Write(float h, string txt [, mixed link]) +

    Description

    +This method prints text from the current position. When the right margin is reached (or the \n +character is met) a line break occurs and text continues from the left margin. Upon method exit, +the current position is left just at the end of the text. +
    +It is possible to put a link on the text. +

    Parameters

    +
    +
    h
    +
    +Line height. +
    +
    txt
    +
    +String to print. +
    +
    link
    +
    +URL or identifier returned by AddLink(). +
    +
    +

    Example

    +
    +
    // Begin with regular font
    +$pdf->SetFont('Arial','',14);
    +$pdf->Write(5,'Visit ');
    +// Then put a blue underlined link
    +$pdf->SetTextColor(0,0,255);
    +$pdf->SetFont('','U');
    +$pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');
    +
    +

    See also

    +SetFont(), +SetTextColor(), +AddLink(), +MultiCell(), +SetAutoPageBreak(). +
    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/font/courier.php b/3.0/modules/proofsheet/lib/fpdf/font/courier.php new file mode 100644 index 00000000..213bf35a --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/courier.php @@ -0,0 +1,8 @@ + diff --git a/3.0/modules/proofsheet/lib/fpdf/font/courierb.php b/3.0/modules/proofsheet/lib/fpdf/font/courierb.php new file mode 100644 index 00000000..3fc69a5d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/courierb.php @@ -0,0 +1,8 @@ + diff --git a/3.0/modules/proofsheet/lib/fpdf/font/courierbi.php b/3.0/modules/proofsheet/lib/fpdf/font/courierbi.php new file mode 100644 index 00000000..a49f2ae1 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/courierbi.php @@ -0,0 +1,8 @@ + diff --git a/3.0/modules/proofsheet/lib/fpdf/font/courieri.php b/3.0/modules/proofsheet/lib/fpdf/font/courieri.php new file mode 100644 index 00000000..9c1c2cfa --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/courieri.php @@ -0,0 +1,8 @@ + diff --git a/3.0/modules/proofsheet/lib/fpdf/font/helvetica.php b/3.0/modules/proofsheet/lib/fpdf/font/helvetica.php new file mode 100644 index 00000000..7e20c3a7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/helvetica.php @@ -0,0 +1,19 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/helveticab.php b/3.0/modules/proofsheet/lib/fpdf/font/helveticab.php new file mode 100644 index 00000000..452e0ac2 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/helveticab.php @@ -0,0 +1,19 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/helveticabi.php b/3.0/modules/proofsheet/lib/fpdf/font/helveticabi.php new file mode 100644 index 00000000..ea5c56fc --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/helveticabi.php @@ -0,0 +1,19 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/helveticai.php b/3.0/modules/proofsheet/lib/fpdf/font/helveticai.php new file mode 100644 index 00000000..e3c638a5 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/helveticai.php @@ -0,0 +1,19 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/symbol.php b/3.0/modules/proofsheet/lib/fpdf/font/symbol.php new file mode 100644 index 00000000..b980b07b --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/symbol.php @@ -0,0 +1,19 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, + ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, + 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, + 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, + 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, + chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, + chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, + chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, + chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/times.php b/3.0/modules/proofsheet/lib/fpdf/font/times.php new file mode 100644 index 00000000..d3ea8087 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/times.php @@ -0,0 +1,19 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, + 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, + 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/timesb.php b/3.0/modules/proofsheet/lib/fpdf/font/timesb.php new file mode 100644 index 00000000..1c198f0a --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/timesb.php @@ -0,0 +1,19 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, + 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, + 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/timesbi.php b/3.0/modules/proofsheet/lib/fpdf/font/timesbi.php new file mode 100644 index 00000000..a6034b26 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/timesbi.php @@ -0,0 +1,19 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, + 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, + 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/timesi.php b/3.0/modules/proofsheet/lib/fpdf/font/timesi.php new file mode 100644 index 00000000..bd9e0d9e --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/timesi.php @@ -0,0 +1,19 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, + 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, + 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/font/zapfdingbats.php b/3.0/modules/proofsheet/lib/fpdf/font/zapfdingbats.php new file mode 100644 index 00000000..afef4d32 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/font/zapfdingbats.php @@ -0,0 +1,19 @@ +0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, + chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, + ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, + 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, + 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, + 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, + chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, + chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, + chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, + chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, + chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/fpdf.css b/3.0/modules/proofsheet/lib/fpdf/fpdf.css new file mode 100644 index 00000000..5db33774 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/fpdf.css @@ -0,0 +1,21 @@ +body {font-family:"Times New Roman",serif} +h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em} +h2 {font:bold 100% Arial,sans-serif; color:#900000; margin-top:1.5em} +dl.param dt {text-decoration:underline} +dl.param dd {margin-top:1em; margin-bottom:1em} +dl.param ul {margin-top:1em; margin-bottom:1em} +tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%} +div.source {margin-top:1.4em; margin-bottom:1.3em} +div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000} +div.doc-source {margin-top:1.4em; margin-bottom:1.3em} +div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.doc-source code {display:block; background-color:#E0E0E0; padding:4px} +.kw {color:#000080; font-weight:bold} +.str {color:#CC0000} +.cmt {color:#008000} +p.demo {text-align:center; margin-top:-0.9em} +a.demo {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF} +a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF} diff --git a/3.0/modules/proofsheet/lib/fpdf/fpdf.php b/3.0/modules/proofsheet/lib/fpdf/fpdf.php new file mode 100644 index 00000000..0dd1cb62 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/fpdf.php @@ -0,0 +1,1804 @@ +_dochecks(); + // Initialization of properties + $this->page = 0; + $this->n = 2; + $this->buffer = ''; + $this->pages = array(); + $this->PageSizes = array(); + $this->state = 0; + $this->fonts = array(); + $this->FontFiles = array(); + $this->diffs = array(); + $this->images = array(); + $this->links = array(); + $this->InHeader = false; + $this->InFooter = false; + $this->lasth = 0; + $this->FontFamily = ''; + $this->FontStyle = ''; + $this->FontSizePt = 12; + $this->underline = false; + $this->DrawColor = '0 G'; + $this->FillColor = '0 g'; + $this->TextColor = '0 g'; + $this->ColorFlag = false; + $this->ws = 0; + // Font path + if(defined('FPDF_FONTPATH')) + { + $this->fontpath = FPDF_FONTPATH; + if(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\') + $this->fontpath .= '/'; + } + elseif(is_dir(dirname(__FILE__).'/font')) + $this->fontpath = dirname(__FILE__).'/font/'; + else + $this->fontpath = ''; + // Core fonts + $this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats'); + // Scale factor + if($unit=='pt') + $this->k = 1; + elseif($unit=='mm') + $this->k = 72/25.4; + elseif($unit=='cm') + $this->k = 72/2.54; + elseif($unit=='in') + $this->k = 72; + else + $this->Error('Incorrect unit: '.$unit); + // Page sizes + $this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), + 'letter'=>array(612,792), 'legal'=>array(612,1008)); + $size = $this->_getpagesize($size); + $this->DefPageSize = $size; + $this->CurPageSize = $size; + // Page orientation + $orientation = strtolower($orientation); + if($orientation=='p' || $orientation=='portrait') + { + $this->DefOrientation = 'P'; + $this->w = $size[0]; + $this->h = $size[1]; + } + elseif($orientation=='l' || $orientation=='landscape') + { + $this->DefOrientation = 'L'; + $this->w = $size[1]; + $this->h = $size[0]; + } + else + $this->Error('Incorrect orientation: '.$orientation); + $this->CurOrientation = $this->DefOrientation; + $this->wPt = $this->w*$this->k; + $this->hPt = $this->h*$this->k; + // Page margins (1 cm) + $margin = 28.35/$this->k; + $this->SetMargins($margin,$margin); + // Interior cell margin (1 mm) + $this->cMargin = $margin/10; + // Line width (0.2 mm) + $this->LineWidth = .567/$this->k; + // Automatic page break + $this->SetAutoPageBreak(true,2*$margin); + // Default display mode + $this->SetDisplayMode('default'); + // Enable compression + $this->SetCompression(true); + // Set default PDF version number + $this->PDFVersion = '1.3'; +} + +function SetMargins($left, $top, $right=null) +{ + // Set left, top and right margins + $this->lMargin = $left; + $this->tMargin = $top; + if($right===null) + $right = $left; + $this->rMargin = $right; +} + +function SetLeftMargin($margin) +{ + // Set left margin + $this->lMargin = $margin; + if($this->page>0 && $this->x<$margin) + $this->x = $margin; +} + +function SetTopMargin($margin) +{ + // Set top margin + $this->tMargin = $margin; +} + +function SetRightMargin($margin) +{ + // Set right margin + $this->rMargin = $margin; +} + +function SetAutoPageBreak($auto, $margin=0) +{ + // Set auto page break mode and triggering margin + $this->AutoPageBreak = $auto; + $this->bMargin = $margin; + $this->PageBreakTrigger = $this->h-$margin; +} + +function SetDisplayMode($zoom, $layout='default') +{ + // Set display mode in viewer + if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) + $this->ZoomMode = $zoom; + else + $this->Error('Incorrect zoom display mode: '.$zoom); + if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') + $this->LayoutMode = $layout; + else + $this->Error('Incorrect layout display mode: '.$layout); +} + +function SetCompression($compress) +{ + // Set page compression + if(function_exists('gzcompress')) + $this->compress = $compress; + else + $this->compress = false; +} + +function SetTitle($title, $isUTF8=false) +{ + // Title of document + if($isUTF8) + $title = $this->_UTF8toUTF16($title); + $this->title = $title; +} + +function SetSubject($subject, $isUTF8=false) +{ + // Subject of document + if($isUTF8) + $subject = $this->_UTF8toUTF16($subject); + $this->subject = $subject; +} + +function SetAuthor($author, $isUTF8=false) +{ + // Author of document + if($isUTF8) + $author = $this->_UTF8toUTF16($author); + $this->author = $author; +} + +function SetKeywords($keywords, $isUTF8=false) +{ + // Keywords of document + if($isUTF8) + $keywords = $this->_UTF8toUTF16($keywords); + $this->keywords = $keywords; +} + +function SetCreator($creator, $isUTF8=false) +{ + // Creator of document + if($isUTF8) + $creator = $this->_UTF8toUTF16($creator); + $this->creator = $creator; +} + +function AliasNbPages($alias='{nb}') +{ + // Define an alias for total number of pages + $this->AliasNbPages = $alias; +} + +function Error($msg) +{ + // Fatal error + die('FPDF error: '.$msg); +} + +function Open() +{ + // Begin document + $this->state = 1; +} + +function Close() +{ + // Terminate document + if($this->state==3) + return; + if($this->page==0) + $this->AddPage(); + // Page footer + $this->InFooter = true; + $this->Footer(); + $this->InFooter = false; + // Close page + $this->_endpage(); + // Close document + $this->_enddoc(); +} + +function AddPage($orientation='', $size='') +{ + // Start a new page + if($this->state==0) + $this->Open(); + $family = $this->FontFamily; + $style = $this->FontStyle.($this->underline ? 'U' : ''); + $fontsize = $this->FontSizePt; + $lw = $this->LineWidth; + $dc = $this->DrawColor; + $fc = $this->FillColor; + $tc = $this->TextColor; + $cf = $this->ColorFlag; + if($this->page>0) + { + // Page footer + $this->InFooter = true; + $this->Footer(); + $this->InFooter = false; + // Close page + $this->_endpage(); + } + // Start new page + $this->_beginpage($orientation,$size); + // Set line cap style to square + $this->_out('2 J'); + // Set line width + $this->LineWidth = $lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + // Set font + if($family) + $this->SetFont($family,$style,$fontsize); + // Set colors + $this->DrawColor = $dc; + if($dc!='0 G') + $this->_out($dc); + $this->FillColor = $fc; + if($fc!='0 g') + $this->_out($fc); + $this->TextColor = $tc; + $this->ColorFlag = $cf; + // Page header + $this->InHeader = true; + $this->Header(); + $this->InHeader = false; + // Restore line width + if($this->LineWidth!=$lw) + { + $this->LineWidth = $lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + } + // Restore font + if($family) + $this->SetFont($family,$style,$fontsize); + // Restore colors + if($this->DrawColor!=$dc) + { + $this->DrawColor = $dc; + $this->_out($dc); + } + if($this->FillColor!=$fc) + { + $this->FillColor = $fc; + $this->_out($fc); + } + $this->TextColor = $tc; + $this->ColorFlag = $cf; +} + +function Header() +{ + // To be implemented in your own inherited class +} + +function Footer() +{ + // To be implemented in your own inherited class +} + +function PageNo() +{ + // Get current page number + return $this->page; +} + +function SetDrawColor($r, $g=null, $b=null) +{ + // Set color for all stroking operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->DrawColor = sprintf('%.3F G',$r/255); + else + $this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); + if($this->page>0) + $this->_out($this->DrawColor); +} + +function SetFillColor($r, $g=null, $b=null) +{ + // Set color for all filling operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->FillColor = sprintf('%.3F g',$r/255); + else + $this->FillColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag = ($this->FillColor!=$this->TextColor); + if($this->page>0) + $this->_out($this->FillColor); +} + +function SetTextColor($r, $g=null, $b=null) +{ + // Set color for text + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->TextColor = sprintf('%.3F g',$r/255); + else + $this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag = ($this->FillColor!=$this->TextColor); +} + +function GetStringWidth($s) +{ + // Get width of a string in the current font + $s = (string)$s; + $cw = &$this->CurrentFont['cw']; + $w = 0; + $l = strlen($s); + for($i=0;$i<$l;$i++) + $w += $cw[$s[$i]]; + return $w*$this->FontSize/1000; +} + +function SetLineWidth($width) +{ + // Set line width + $this->LineWidth = $width; + if($this->page>0) + $this->_out(sprintf('%.2F w',$width*$this->k)); +} + +function Line($x1, $y1, $x2, $y2) +{ + // Draw a line + $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); +} + +function Rect($x, $y, $w, $h, $style='') +{ + // Draw a rectangle + if($style=='F') + $op = 'f'; + elseif($style=='FD' || $style=='DF') + $op = 'B'; + else + $op = 'S'; + $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); +} + +function AddFont($family, $style='', $file='') +{ + // Add a TrueType, OpenType or Type1 font + $family = strtolower($family); + if($file=='') + $file = str_replace(' ','',$family).strtolower($style).'.php'; + $style = strtoupper($style); + if($style=='IB') + $style = 'BI'; + $fontkey = $family.$style; + if(isset($this->fonts[$fontkey])) + return; + $info = $this->_loadfont($file); + $info['i'] = count($this->fonts)+1; + if(!empty($info['diff'])) + { + // Search existing encodings + $n = array_search($info['diff'],$this->diffs); + if(!$n) + { + $n = count($this->diffs)+1; + $this->diffs[$n] = $info['diff']; + } + $info['diffn'] = $n; + } + if(!empty($info['file'])) + { + // Embedded font + if($info['type']=='TrueType') + $this->FontFiles[$info['file']] = array('length1'=>$info['originalsize']); + else + $this->FontFiles[$info['file']] = array('length1'=>$info['size1'], 'length2'=>$info['size2']); + } + $this->fonts[$fontkey] = $info; +} + +function SetFont($family, $style='', $size=0) +{ + // Select a font; size given in points + if($family=='') + $family = $this->FontFamily; + else + $family = strtolower($family); + $style = strtoupper($style); + if(strpos($style,'U')!==false) + { + $this->underline = true; + $style = str_replace('U','',$style); + } + else + $this->underline = false; + if($style=='IB') + $style = 'BI'; + if($size==0) + $size = $this->FontSizePt; + // Test if font is already selected + if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) + return; + // Test if font is already loaded + $fontkey = $family.$style; + if(!isset($this->fonts[$fontkey])) + { + // Test if one of the core fonts + if($family=='arial') + $family = 'helvetica'; + if(in_array($family,$this->CoreFonts)) + { + if($family=='symbol' || $family=='zapfdingbats') + $style = ''; + $fontkey = $family.$style; + if(!isset($this->fonts[$fontkey])) + $this->AddFont($family,$style); + } + else + $this->Error('Undefined font: '.$family.' '.$style); + } + // Select it + $this->FontFamily = $family; + $this->FontStyle = $style; + $this->FontSizePt = $size; + $this->FontSize = $size/$this->k; + $this->CurrentFont = &$this->fonts[$fontkey]; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function SetFontSize($size) +{ + // Set font size in points + if($this->FontSizePt==$size) + return; + $this->FontSizePt = $size; + $this->FontSize = $size/$this->k; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function AddLink() +{ + // Create a new internal link + $n = count($this->links)+1; + $this->links[$n] = array(0, 0); + return $n; +} + +function SetLink($link, $y=0, $page=-1) +{ + // Set destination of internal link + if($y==-1) + $y = $this->y; + if($page==-1) + $page = $this->page; + $this->links[$link] = array($page, $y); +} + +function Link($x, $y, $w, $h, $link) +{ + // Put a link on the page + $this->PageLinks[$this->page][] = array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); +} + +function Text($x, $y, $txt) +{ + // Output a string + $s = sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); + if($this->underline && $txt!='') + $s .= ' '.$this->_dounderline($x,$y,$txt); + if($this->ColorFlag) + $s = 'q '.$this->TextColor.' '.$s.' Q'; + $this->_out($s); +} + +function AcceptPageBreak() +{ + // Accept automatic page break or not + return $this->AutoPageBreak; +} + +function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') +{ + // Output a cell + $k = $this->k; + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + // Automatic page break + $x = $this->x; + $ws = $this->ws; + if($ws>0) + { + $this->ws = 0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation,$this->CurPageSize); + $this->x = $x; + if($ws>0) + { + $this->ws = $ws; + $this->_out(sprintf('%.3F Tw',$ws*$k)); + } + } + if($w==0) + $w = $this->w-$this->rMargin-$this->x; + $s = ''; + if($fill || $border==1) + { + if($fill) + $op = ($border==1) ? 'B' : 'f'; + else + $op = 'S'; + $s = sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); + } + if(is_string($border)) + { + $x = $this->x; + $y = $this->y; + if(strpos($border,'L')!==false) + $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); + if(strpos($border,'T')!==false) + $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); + if(strpos($border,'R')!==false) + $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + if(strpos($border,'B')!==false) + $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + } + if($txt!=='') + { + if($align=='R') + $dx = $w-$this->cMargin-$this->GetStringWidth($txt); + elseif($align=='C') + $dx = ($w-$this->GetStringWidth($txt))/2; + else + $dx = $this->cMargin; + if($this->ColorFlag) + $s .= 'q '.$this->TextColor.' '; + $txt2 = str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); + $s .= sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); + if($this->underline) + $s .= ' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + if($this->ColorFlag) + $s .= ' Q'; + if($link) + $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); + } + if($s) + $this->_out($s); + $this->lasth = $h; + if($ln>0) + { + // Go to next line + $this->y += $h; + if($ln==1) + $this->x = $this->lMargin; + } + else + $this->x += $w; +} + +function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) +{ + // Output text with automatic or explicit line breaks + $cw = &$this->CurrentFont['cw']; + if($w==0) + $w = $this->w-$this->rMargin-$this->x; + $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; + $s = str_replace("\r",'',$txt); + $nb = strlen($s); + if($nb>0 && $s[$nb-1]=="\n") + $nb--; + $b = 0; + if($border) + { + if($border==1) + { + $border = 'LTRB'; + $b = 'LRT'; + $b2 = 'LR'; + } + else + { + $b2 = ''; + if(strpos($border,'L')!==false) + $b2 .= 'L'; + if(strpos($border,'R')!==false) + $b2 .= 'R'; + $b = (strpos($border,'T')!==false) ? $b2.'T' : $b2; + } + } + $sep = -1; + $i = 0; + $j = 0; + $l = 0; + $ns = 0; + $nl = 1; + while($i<$nb) + { + // Get next character + $c = $s[$i]; + if($c=="\n") + { + // Explicit line break + if($this->ws>0) + { + $this->ws = 0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $i++; + $sep = -1; + $j = $i; + $l = 0; + $ns = 0; + $nl++; + if($border && $nl==2) + $b = $b2; + continue; + } + if($c==' ') + { + $sep = $i; + $ls = $l; + $ns++; + } + $l += $cw[$c]; + if($l>$wmax) + { + // Automatic line break + if($sep==-1) + { + if($i==$j) + $i++; + if($this->ws>0) + { + $this->ws = 0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + } + else + { + if($align=='J') + { + $this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); + } + $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); + $i = $sep+1; + } + $sep = -1; + $j = $i; + $l = 0; + $ns = 0; + $nl++; + if($border && $nl==2) + $b = $b2; + } + else + $i++; + } + // Last chunk + if($this->ws>0) + { + $this->ws = 0; + $this->_out('0 Tw'); + } + if($border && strpos($border,'B')!==false) + $b .= 'B'; + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $this->x = $this->lMargin; +} + +function Write($h, $txt, $link='') +{ + // Output text in flowing mode + $cw = &$this->CurrentFont['cw']; + $w = $this->w-$this->rMargin-$this->x; + $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; + $s = str_replace("\r",'',$txt); + $nb = strlen($s); + $sep = -1; + $i = 0; + $j = 0; + $l = 0; + $nl = 1; + while($i<$nb) + { + // Get next character + $c = $s[$i]; + if($c=="\n") + { + // Explicit line break + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + $i++; + $sep = -1; + $j = $i; + $l = 0; + if($nl==1) + { + $this->x = $this->lMargin; + $w = $this->w-$this->rMargin-$this->x; + $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + continue; + } + if($c==' ') + $sep = $i; + $l += $cw[$c]; + if($l>$wmax) + { + // Automatic line break + if($sep==-1) + { + if($this->x>$this->lMargin) + { + // Move to next line + $this->x = $this->lMargin; + $this->y += $h; + $w = $this->w-$this->rMargin-$this->x; + $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; + $i++; + $nl++; + continue; + } + if($i==$j) + $i++; + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + } + else + { + $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); + $i = $sep+1; + } + $sep = -1; + $j = $i; + $l = 0; + if($nl==1) + { + $this->x = $this->lMargin; + $w = $this->w-$this->rMargin-$this->x; + $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + } + else + $i++; + } + // Last chunk + if($i!=$j) + $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); +} + +function Ln($h=null) +{ + // Line feed; default value is last cell height + $this->x = $this->lMargin; + if($h===null) + $this->y += $this->lasth; + else + $this->y += $h; +} + +function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') +{ + // Put an image on the page + if(!isset($this->images[$file])) + { + // First use of this image, get info + if($type=='') + { + $pos = strrpos($file,'.'); + if(!$pos) + $this->Error('Image file has no extension and no type was specified: '.$file); + $type = substr($file,$pos+1); + } + $type = strtolower($type); + if($type=='jpeg') + $type = 'jpg'; + $mtd = '_parse'.$type; + if(!method_exists($this,$mtd)) + $this->Error('Unsupported image type: '.$type); + $info = $this->$mtd($file); + $info['i'] = count($this->images)+1; + $this->images[$file] = $info; + } + else + $info = $this->images[$file]; + + // Automatic width and height calculation if needed + if($w==0 && $h==0) + { + // Put image at 96 dpi + $w = -96; + $h = -96; + } + if($w<0) + $w = -$info['w']*72/$w/$this->k; + if($h<0) + $h = -$info['h']*72/$h/$this->k; + if($w==0) + $w = $h*$info['w']/$info['h']; + if($h==0) + $h = $w*$info['h']/$info['w']; + + // Flowing mode + if($y===null) + { + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + // Automatic page break + $x2 = $this->x; + $this->AddPage($this->CurOrientation,$this->CurPageSize); + $this->x = $x2; + } + $y = $this->y; + $this->y += $h; + } + + if($x===null) + $x = $this->x; + $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); + if($link) + $this->Link($x,$y,$w,$h,$link); +} + +function GetX() +{ + // Get x position + return $this->x; +} + +function SetX($x) +{ + // Set x position + if($x>=0) + $this->x = $x; + else + $this->x = $this->w+$x; +} + +function GetY() +{ + // Get y position + return $this->y; +} + +function SetY($y) +{ + // Set y position and reset x + $this->x = $this->lMargin; + if($y>=0) + $this->y = $y; + else + $this->y = $this->h+$y; +} + +function SetXY($x, $y) +{ + // Set x and y positions + $this->SetY($y); + $this->SetX($x); +} + +function Output($name='', $dest='') +{ + // Output PDF to some destination + if($this->state<3) + $this->Close(); + $dest = strtoupper($dest); + if($dest=='') + { + if($name=='') + { + $name = 'doc.pdf'; + $dest = 'I'; + } + else + $dest = 'F'; + } + switch($dest) + { + case 'I': + // Send to standard output + $this->_checkoutput(); + if(PHP_SAPI!='cli') + { + // We send to a browser + header('Content-Type: application/pdf'); + header('Content-Disposition: inline; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + } + echo $this->buffer; + break; + case 'D': + // Download file + $this->_checkoutput(); + header('Content-Type: application/x-download'); + header('Content-Disposition: attachment; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + echo $this->buffer; + break; + case 'F': + // Save to local file + $f = fopen($name,'wb'); + if(!$f) + $this->Error('Unable to create output file: '.$name); + fwrite($f,$this->buffer,strlen($this->buffer)); + fclose($f); + break; + case 'S': + // Return as a string + return $this->buffer; + default: + $this->Error('Incorrect output destination: '.$dest); + } + return ''; +} + +/******************************************************************************* +* * +* Protected methods * +* * +*******************************************************************************/ +function _dochecks() +{ + // Check availability of %F + if(sprintf('%.1F',1.0)!='1.0') + $this->Error('This version of PHP is not supported'); + // Check mbstring overloading + if(ini_get('mbstring.func_overload') & 2) + $this->Error('mbstring overloading must be disabled'); + // Ensure runtime magic quotes are disabled + if(get_magic_quotes_runtime()) + @set_magic_quotes_runtime(0); +} + +function _checkoutput() +{ + if(PHP_SAPI!='cli') + { + if(headers_sent($file,$line)) + $this->Error("Some data has already been output, can't send PDF file (output started at $file:$line)"); + } + if(ob_get_length()) + { + // The output buffer is not empty + if(preg_match('/^(\xEF\xBB\xBF)?\s*$/',ob_get_contents())) + { + // It contains only a UTF-8 BOM and/or whitespace, let's clean it + ob_clean(); + } + else + $this->Error("Some data has already been output, can't send PDF file"); + } +} + +function _getpagesize($size) +{ + if(is_string($size)) + { + $size = strtolower($size); + if(!isset($this->StdPageSizes[$size])) + $this->Error('Unknown page size: '.$size); + $a = $this->StdPageSizes[$size]; + return array($a[0]/$this->k, $a[1]/$this->k); + } + else + { + if($size[0]>$size[1]) + return array($size[1], $size[0]); + else + return $size; + } +} + +function _beginpage($orientation, $size) +{ + $this->page++; + $this->pages[$this->page] = ''; + $this->state = 2; + $this->x = $this->lMargin; + $this->y = $this->tMargin; + $this->FontFamily = ''; + // Check page size and orientation + if($orientation=='') + $orientation = $this->DefOrientation; + else + $orientation = strtoupper($orientation[0]); + if($size=='') + $size = $this->DefPageSize; + else + $size = $this->_getpagesize($size); + if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1]) + { + // New size or orientation + if($orientation=='P') + { + $this->w = $size[0]; + $this->h = $size[1]; + } + else + { + $this->w = $size[1]; + $this->h = $size[0]; + } + $this->wPt = $this->w*$this->k; + $this->hPt = $this->h*$this->k; + $this->PageBreakTrigger = $this->h-$this->bMargin; + $this->CurOrientation = $orientation; + $this->CurPageSize = $size; + } + if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1]) + $this->PageSizes[$this->page] = array($this->wPt, $this->hPt); +} + +function _endpage() +{ + $this->state = 1; +} + +function _loadfont($font) +{ + // Load a font definition file from the font directory + include($this->fontpath.$font); + $a = get_defined_vars(); + if(!isset($a['name'])) + $this->Error('Could not include font definition file'); + return $a; +} + +function _escape($s) +{ + // Escape special characters in strings + $s = str_replace('\\','\\\\',$s); + $s = str_replace('(','\\(',$s); + $s = str_replace(')','\\)',$s); + $s = str_replace("\r",'\\r',$s); + return $s; +} + +function _textstring($s) +{ + // Format a text string + return '('.$this->_escape($s).')'; +} + +function _UTF8toUTF16($s) +{ + // Convert UTF-8 to UTF-16BE with BOM + $res = "\xFE\xFF"; + $nb = strlen($s); + $i = 0; + while($i<$nb) + { + $c1 = ord($s[$i++]); + if($c1>=224) + { + // 3-byte character + $c2 = ord($s[$i++]); + $c3 = ord($s[$i++]); + $res .= chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); + $res .= chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); + } + elseif($c1>=192) + { + // 2-byte character + $c2 = ord($s[$i++]); + $res .= chr(($c1 & 0x1C)>>2); + $res .= chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); + } + else + { + // Single-byte character + $res .= "\0".chr($c1); + } + } + return $res; +} + +function _dounderline($x, $y, $txt) +{ + // Underline text + $up = $this->CurrentFont['up']; + $ut = $this->CurrentFont['ut']; + $w = $this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); + return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); +} + +function _parsejpg($file) +{ + // Extract info from a JPEG file + $a = getimagesize($file); + if(!$a) + $this->Error('Missing or incorrect image file: '.$file); + if($a[2]!=2) + $this->Error('Not a JPEG file: '.$file); + if(!isset($a['channels']) || $a['channels']==3) + $colspace = 'DeviceRGB'; + elseif($a['channels']==4) + $colspace = 'DeviceCMYK'; + else + $colspace = 'DeviceGray'; + $bpc = isset($a['bits']) ? $a['bits'] : 8; + $data = file_get_contents($file); + return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); +} + +function _parsepng($file) +{ + // Extract info from a PNG file + $f = fopen($file,'rb'); + if(!$f) + $this->Error('Can\'t open image file: '.$file); + $info = $this->_parsepngstream($f,$file); + fclose($f); + return $info; +} + +function _parsepngstream($f, $file) +{ + // Check signature + if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) + $this->Error('Not a PNG file: '.$file); + + // Read header chunk + $this->_readstream($f,4); + if($this->_readstream($f,4)!='IHDR') + $this->Error('Incorrect PNG file: '.$file); + $w = $this->_readint($f); + $h = $this->_readint($f); + $bpc = ord($this->_readstream($f,1)); + if($bpc>8) + $this->Error('16-bit depth not supported: '.$file); + $ct = ord($this->_readstream($f,1)); + if($ct==0 || $ct==4) + $colspace = 'DeviceGray'; + elseif($ct==2 || $ct==6) + $colspace = 'DeviceRGB'; + elseif($ct==3) + $colspace = 'Indexed'; + else + $this->Error('Unknown color type: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown compression method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown filter method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Interlacing not supported: '.$file); + $this->_readstream($f,4); + $dp = '/Predictor 15 /Colors '.($colspace=='DeviceRGB' ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w; + + // Scan chunks looking for palette, transparency and image data + $pal = ''; + $trns = ''; + $data = ''; + do + { + $n = $this->_readint($f); + $type = $this->_readstream($f,4); + if($type=='PLTE') + { + // Read palette + $pal = $this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='tRNS') + { + // Read transparency info + $t = $this->_readstream($f,$n); + if($ct==0) + $trns = array(ord(substr($t,1,1))); + elseif($ct==2) + $trns = array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); + else + { + $pos = strpos($t,chr(0)); + if($pos!==false) + $trns = array($pos); + } + $this->_readstream($f,4); + } + elseif($type=='IDAT') + { + // Read image data block + $data .= $this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='IEND') + break; + else + $this->_readstream($f,$n+4); + } + while($n); + + if($colspace=='Indexed' && empty($pal)) + $this->Error('Missing palette in '.$file); + $info = array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'dp'=>$dp, 'pal'=>$pal, 'trns'=>$trns); + if($ct>=4) + { + // Extract alpha channel + if(!function_exists('gzuncompress')) + $this->Error('Zlib not available, can\'t handle alpha channel: '.$file); + $data = gzuncompress($data); + $color = ''; + $alpha = ''; + if($ct==4) + { + // Gray image + $len = 2*$w; + for($i=0;$i<$h;$i++) + { + $pos = (1+$len)*$i; + $color .= $data[$pos]; + $alpha .= $data[$pos]; + $line = substr($data,$pos+1,$len); + $color .= preg_replace('/(.)./s','$1',$line); + $alpha .= preg_replace('/.(.)/s','$1',$line); + } + } + else + { + // RGB image + $len = 4*$w; + for($i=0;$i<$h;$i++) + { + $pos = (1+$len)*$i; + $color .= $data[$pos]; + $alpha .= $data[$pos]; + $line = substr($data,$pos+1,$len); + $color .= preg_replace('/(.{3})./s','$1',$line); + $alpha .= preg_replace('/.{3}(.)/s','$1',$line); + } + } + unset($data); + $data = gzcompress($color); + $info['smask'] = gzcompress($alpha); + if($this->PDFVersion<'1.4') + $this->PDFVersion = '1.4'; + } + $info['data'] = $data; + return $info; +} + +function _readstream($f, $n) +{ + // Read n bytes from stream + $res = ''; + while($n>0 && !feof($f)) + { + $s = fread($f,$n); + if($s===false) + $this->Error('Error while reading stream'); + $n -= strlen($s); + $res .= $s; + } + if($n>0) + $this->Error('Unexpected end of stream'); + return $res; +} + +function _readint($f) +{ + // Read a 4-byte integer from stream + $a = unpack('Ni',$this->_readstream($f,4)); + return $a['i']; +} + +function _parsegif($file) +{ + // Extract info from a GIF file (via PNG conversion) + if(!function_exists('imagepng')) + $this->Error('GD extension is required for GIF support'); + if(!function_exists('imagecreatefromgif')) + $this->Error('GD has no GIF read support'); + $im = imagecreatefromgif($file); + if(!$im) + $this->Error('Missing or incorrect image file: '.$file); + imageinterlace($im,0); + $f = @fopen('php://temp','rb+'); + if($f) + { + // Perform conversion in memory + ob_start(); + imagepng($im); + $data = ob_get_clean(); + imagedestroy($im); + fwrite($f,$data); + rewind($f); + $info = $this->_parsepngstream($f,$file); + fclose($f); + } + else + { + // Use temporary file + $tmp = tempnam('.','gif'); + if(!$tmp) + $this->Error('Unable to create a temporary file'); + if(!imagepng($im,$tmp)) + $this->Error('Error while saving to temporary file'); + imagedestroy($im); + $info = $this->_parsepng($tmp); + unlink($tmp); + } + return $info; +} + +function _newobj() +{ + // Begin a new object + $this->n++; + $this->offsets[$this->n] = strlen($this->buffer); + $this->_out($this->n.' 0 obj'); +} + +function _putstream($s) +{ + $this->_out('stream'); + $this->_out($s); + $this->_out('endstream'); +} + +function _out($s) +{ + // Add a line to the document + if($this->state==2) + $this->pages[$this->page] .= $s."\n"; + else + $this->buffer .= $s."\n"; +} + +function _putpages() +{ + $nb = $this->page; + if(!empty($this->AliasNbPages)) + { + // Replace number of pages + for($n=1;$n<=$nb;$n++) + $this->pages[$n] = str_replace($this->AliasNbPages,$nb,$this->pages[$n]); + } + if($this->DefOrientation=='P') + { + $wPt = $this->DefPageSize[0]*$this->k; + $hPt = $this->DefPageSize[1]*$this->k; + } + else + { + $wPt = $this->DefPageSize[1]*$this->k; + $hPt = $this->DefPageSize[0]*$this->k; + } + $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; + for($n=1;$n<=$nb;$n++) + { + // Page + $this->_newobj(); + $this->_out('<_out('/Parent 1 0 R'); + if(isset($this->PageSizes[$n])) + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); + $this->_out('/Resources 2 0 R'); + if(isset($this->PageLinks[$n])) + { + // Links + $annots = '/Annots ['; + foreach($this->PageLinks[$n] as $pl) + { + $rect = sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); + $annots .= '<_textstring($pl[4]).'>>>>'; + else + { + $l = $this->links[$pl[4]]; + $h = isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; + $annots .= sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); + } + } + $this->_out($annots.']'); + } + if($this->PDFVersion>'1.3') + $this->_out('/Group <>'); + $this->_out('/Contents '.($this->n+1).' 0 R>>'); + $this->_out('endobj'); + // Page content + $p = ($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; + $this->_newobj(); + $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); + $this->_putstream($p); + $this->_out('endobj'); + } + // Pages root + $this->offsets[1] = strlen($this->buffer); + $this->_out('1 0 obj'); + $this->_out('<_out($kids.']'); + $this->_out('/Count '.$nb); + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putfonts() +{ + $nf = $this->n; + foreach($this->diffs as $diff) + { + // Encodings + $this->_newobj(); + $this->_out('<>'); + $this->_out('endobj'); + } + foreach($this->FontFiles as $file=>$info) + { + // Font file embedding + $this->_newobj(); + $this->FontFiles[$file]['n'] = $this->n; + $font = file_get_contents($this->fontpath.$file,true); + if(!$font) + $this->Error('Font file not found: '.$file); + $compressed = (substr($file,-2)=='.z'); + if(!$compressed && isset($info['length2'])) + $font = substr($font,6,$info['length1']).substr($font,6+$info['length1']+6,$info['length2']); + $this->_out('<_out('/Filter /FlateDecode'); + $this->_out('/Length1 '.$info['length1']); + if(isset($info['length2'])) + $this->_out('/Length2 '.$info['length2'].' /Length3 0'); + $this->_out('>>'); + $this->_putstream($font); + $this->_out('endobj'); + } + foreach($this->fonts as $k=>$font) + { + // Font objects + $this->fonts[$k]['n'] = $this->n+1; + $type = $font['type']; + $name = $font['name']; + if($type=='Core') + { + // Core font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /Type1'); + if($name!='Symbol' && $name!='ZapfDingbats') + $this->_out('/Encoding /WinAnsiEncoding'); + $this->_out('>>'); + $this->_out('endobj'); + } + elseif($type=='Type1' || $type=='TrueType') + { + // Additional Type1 or TrueType/OpenType font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /'.$type); + $this->_out('/FirstChar 32 /LastChar 255'); + $this->_out('/Widths '.($this->n+1).' 0 R'); + $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); + if(isset($font['diffn'])) + $this->_out('/Encoding '.($nf+$font['diffn']).' 0 R'); + else + $this->_out('/Encoding /WinAnsiEncoding'); + $this->_out('>>'); + $this->_out('endobj'); + // Widths + $this->_newobj(); + $cw = &$font['cw']; + $s = '['; + for($i=32;$i<=255;$i++) + $s .= $cw[chr($i)].' '; + $this->_out($s.']'); + $this->_out('endobj'); + // Descriptor + $this->_newobj(); + $s = '<$v) + $s .= ' /'.$k.' '.$v; + if(!empty($font['file'])) + $s .= ' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R'; + $this->_out($s.'>>'); + $this->_out('endobj'); + } + else + { + // Allow for additional types + $mtd = '_put'.strtolower($type); + if(!method_exists($this,$mtd)) + $this->Error('Unsupported font type: '.$type); + $this->$mtd($font); + } + } +} + +function _putimages() +{ + foreach(array_keys($this->images) as $file) + { + $this->_putimage($this->images[$file]); + unset($this->images[$file]['data']); + unset($this->images[$file]['smask']); + } +} + +function _putimage(&$info) +{ + $this->_newobj(); + $info['n'] = $this->n; + $this->_out('<_out('/Subtype /Image'); + $this->_out('/Width '.$info['w']); + $this->_out('/Height '.$info['h']); + if($info['cs']=='Indexed') + $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); + else + { + $this->_out('/ColorSpace /'.$info['cs']); + if($info['cs']=='DeviceCMYK') + $this->_out('/Decode [1 0 1 0 1 0 1 0]'); + } + $this->_out('/BitsPerComponent '.$info['bpc']); + if(isset($info['f'])) + $this->_out('/Filter /'.$info['f']); + if(isset($info['dp'])) + $this->_out('/DecodeParms <<'.$info['dp'].'>>'); + if(isset($info['trns']) && is_array($info['trns'])) + { + $trns = ''; + for($i=0;$i_out('/Mask ['.$trns.']'); + } + if(isset($info['smask'])) + $this->_out('/SMask '.($this->n+1).' 0 R'); + $this->_out('/Length '.strlen($info['data']).'>>'); + $this->_putstream($info['data']); + $this->_out('endobj'); + // Soft mask + if(isset($info['smask'])) + { + $dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns '.$info['w']; + $smask = array('w'=>$info['w'], 'h'=>$info['h'], 'cs'=>'DeviceGray', 'bpc'=>8, 'f'=>$info['f'], 'dp'=>$dp, 'data'=>$info['smask']); + $this->_putimage($smask); + } + // Palette + if($info['cs']=='Indexed') + { + $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; + $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal']; + $this->_newobj(); + $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); + $this->_putstream($pal); + $this->_out('endobj'); + } +} + +function _putxobjectdict() +{ + foreach($this->images as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); +} + +function _putresourcedict() +{ + $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); + $this->_out('/Font <<'); + foreach($this->fonts as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + $this->_out('/XObject <<'); + $this->_putxobjectdict(); + $this->_out('>>'); +} + +function _putresources() +{ + $this->_putfonts(); + $this->_putimages(); + // Resource dictionary + $this->offsets[2] = strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<<'); + $this->_putresourcedict(); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putinfo() +{ + $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); + if(!empty($this->title)) + $this->_out('/Title '.$this->_textstring($this->title)); + if(!empty($this->subject)) + $this->_out('/Subject '.$this->_textstring($this->subject)); + if(!empty($this->author)) + $this->_out('/Author '.$this->_textstring($this->author)); + if(!empty($this->keywords)) + $this->_out('/Keywords '.$this->_textstring($this->keywords)); + if(!empty($this->creator)) + $this->_out('/Creator '.$this->_textstring($this->creator)); + $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); +} + +function _putcatalog() +{ + $this->_out('/Type /Catalog'); + $this->_out('/Pages 1 0 R'); + if($this->ZoomMode=='fullpage') + $this->_out('/OpenAction [3 0 R /Fit]'); + elseif($this->ZoomMode=='fullwidth') + $this->_out('/OpenAction [3 0 R /FitH null]'); + elseif($this->ZoomMode=='real') + $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); + elseif(!is_string($this->ZoomMode)) + $this->_out('/OpenAction [3 0 R /XYZ null null '.sprintf('%.2F',$this->ZoomMode/100).']'); + if($this->LayoutMode=='single') + $this->_out('/PageLayout /SinglePage'); + elseif($this->LayoutMode=='continuous') + $this->_out('/PageLayout /OneColumn'); + elseif($this->LayoutMode=='two') + $this->_out('/PageLayout /TwoColumnLeft'); +} + +function _putheader() +{ + $this->_out('%PDF-'.$this->PDFVersion); +} + +function _puttrailer() +{ + $this->_out('/Size '.($this->n+1)); + $this->_out('/Root '.$this->n.' 0 R'); + $this->_out('/Info '.($this->n-1).' 0 R'); +} + +function _enddoc() +{ + $this->_putheader(); + $this->_putpages(); + $this->_putresources(); + // Info + $this->_newobj(); + $this->_out('<<'); + $this->_putinfo(); + $this->_out('>>'); + $this->_out('endobj'); + // Catalog + $this->_newobj(); + $this->_out('<<'); + $this->_putcatalog(); + $this->_out('>>'); + $this->_out('endobj'); + // Cross-ref + $o = strlen($this->buffer); + $this->_out('xref'); + $this->_out('0 '.($this->n+1)); + $this->_out('0000000000 65535 f '); + for($i=1;$i<=$this->n;$i++) + $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); + // Trailer + $this->_out('trailer'); + $this->_out('<<'); + $this->_puttrailer(); + $this->_out('>>'); + $this->_out('startxref'); + $this->_out($o); + $this->_out('%%EOF'); + $this->state = 3; +} +// End of class +} + +// Handle special IE contype request +if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') +{ + header('Content-Type: application/pdf'); + exit; +} + +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/install.txt b/3.0/modules/proofsheet/lib/fpdf/install.txt new file mode 100644 index 00000000..73ded644 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/install.txt @@ -0,0 +1,15 @@ +The FPDF library is made up of the following elements: + +- the main file, fpdf.php, which contains the class +- the font definition files located in the font directory + +The font definition files are necessary as soon as you want to output some text in a document. +If they are not accessible, the SetFont() method will produce the following error: + +FPDF error: Could not include font definition file + + +Remarks: + +- Only the files corresponding to the fonts actually used are necessary +- The tutorials provided in this package are ready to be executed diff --git a/3.0/modules/proofsheet/lib/fpdf/license.txt b/3.0/modules/proofsheet/lib/fpdf/license.txt new file mode 100644 index 00000000..fd811c6f --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/license.txt @@ -0,0 +1,6 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software to use, copy, modify, distribute, sublicense, and/or sell +copies of the software, and to permit persons to whom the software is furnished +to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. \ No newline at end of file diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1250.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1250.map new file mode 100644 index 00000000..ec110af0 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1250.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+015A Sacute +!8D U+0164 Tcaron +!8E U+017D Zcaron +!8F U+0179 Zacute +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+015B sacute +!9D U+0165 tcaron +!9E U+017E zcaron +!9F U+017A zacute +!A0 U+00A0 space +!A1 U+02C7 caron +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+0104 Aogonek +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+015E Scedilla +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+0105 aogonek +!BA U+015F scedilla +!BB U+00BB guillemotright +!BC U+013D Lcaron +!BD U+02DD hungarumlaut +!BE U+013E lcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1251.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1251.map new file mode 100644 index 00000000..de6a198d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1251.map @@ -0,0 +1,255 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0402 afii10051 +!81 U+0403 afii10052 +!82 U+201A quotesinglbase +!83 U+0453 afii10100 +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+20AC Euro +!89 U+2030 perthousand +!8A U+0409 afii10058 +!8B U+2039 guilsinglleft +!8C U+040A afii10059 +!8D U+040C afii10061 +!8E U+040B afii10060 +!8F U+040F afii10145 +!90 U+0452 afii10099 +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0459 afii10106 +!9B U+203A guilsinglright +!9C U+045A afii10107 +!9D U+045C afii10109 +!9E U+045B afii10108 +!9F U+045F afii10193 +!A0 U+00A0 space +!A1 U+040E afii10062 +!A2 U+045E afii10110 +!A3 U+0408 afii10057 +!A4 U+00A4 currency +!A5 U+0490 afii10050 +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+0401 afii10023 +!A9 U+00A9 copyright +!AA U+0404 afii10053 +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+0407 afii10056 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+0406 afii10055 +!B3 U+0456 afii10103 +!B4 U+0491 afii10098 +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0451 afii10071 +!B9 U+2116 afii61352 +!BA U+0454 afii10101 +!BB U+00BB guillemotright +!BC U+0458 afii10105 +!BD U+0405 afii10054 +!BE U+0455 afii10102 +!BF U+0457 afii10104 +!C0 U+0410 afii10017 +!C1 U+0411 afii10018 +!C2 U+0412 afii10019 +!C3 U+0413 afii10020 +!C4 U+0414 afii10021 +!C5 U+0415 afii10022 +!C6 U+0416 afii10024 +!C7 U+0417 afii10025 +!C8 U+0418 afii10026 +!C9 U+0419 afii10027 +!CA U+041A afii10028 +!CB U+041B afii10029 +!CC U+041C afii10030 +!CD U+041D afii10031 +!CE U+041E afii10032 +!CF U+041F afii10033 +!D0 U+0420 afii10034 +!D1 U+0421 afii10035 +!D2 U+0422 afii10036 +!D3 U+0423 afii10037 +!D4 U+0424 afii10038 +!D5 U+0425 afii10039 +!D6 U+0426 afii10040 +!D7 U+0427 afii10041 +!D8 U+0428 afii10042 +!D9 U+0429 afii10043 +!DA U+042A afii10044 +!DB U+042B afii10045 +!DC U+042C afii10046 +!DD U+042D afii10047 +!DE U+042E afii10048 +!DF U+042F afii10049 +!E0 U+0430 afii10065 +!E1 U+0431 afii10066 +!E2 U+0432 afii10067 +!E3 U+0433 afii10068 +!E4 U+0434 afii10069 +!E5 U+0435 afii10070 +!E6 U+0436 afii10072 +!E7 U+0437 afii10073 +!E8 U+0438 afii10074 +!E9 U+0439 afii10075 +!EA U+043A afii10076 +!EB U+043B afii10077 +!EC U+043C afii10078 +!ED U+043D afii10079 +!EE U+043E afii10080 +!EF U+043F afii10081 +!F0 U+0440 afii10082 +!F1 U+0441 afii10083 +!F2 U+0442 afii10084 +!F3 U+0443 afii10085 +!F4 U+0444 afii10086 +!F5 U+0445 afii10087 +!F6 U+0446 afii10088 +!F7 U+0447 afii10089 +!F8 U+0448 afii10090 +!F9 U+0449 afii10091 +!FA U+044A afii10092 +!FB U+044B afii10093 +!FC U+044C afii10094 +!FD U+044D afii10095 +!FE U+044E afii10096 +!FF U+044F afii10097 diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1252.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1252.map new file mode 100644 index 00000000..dd490e59 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1252.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!8E U+017D Zcaron +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9E U+017E zcaron +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1253.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1253.map new file mode 100644 index 00000000..4bd826fb --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1253.map @@ -0,0 +1,239 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+0385 dieresistonos +!A2 U+0386 Alphatonos +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1254.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1254.map new file mode 100644 index 00000000..829473b2 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1254.map @@ -0,0 +1,249 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1255.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1255.map new file mode 100644 index 00000000..079e10c6 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1255.map @@ -0,0 +1,233 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AA afii57636 +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00D7 multiply +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD sfthyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 middot +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00F7 divide +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+05B0 afii57799 +!C1 U+05B1 afii57801 +!C2 U+05B2 afii57800 +!C3 U+05B3 afii57802 +!C4 U+05B4 afii57793 +!C5 U+05B5 afii57794 +!C6 U+05B6 afii57795 +!C7 U+05B7 afii57798 +!C8 U+05B8 afii57797 +!C9 U+05B9 afii57806 +!CB U+05BB afii57796 +!CC U+05BC afii57807 +!CD U+05BD afii57839 +!CE U+05BE afii57645 +!CF U+05BF afii57841 +!D0 U+05C0 afii57842 +!D1 U+05C1 afii57804 +!D2 U+05C2 afii57803 +!D3 U+05C3 afii57658 +!D4 U+05F0 afii57716 +!D5 U+05F1 afii57717 +!D6 U+05F2 afii57718 +!D7 U+05F3 gereshhebrew +!D8 U+05F4 gershayimhebrew +!E0 U+05D0 afii57664 +!E1 U+05D1 afii57665 +!E2 U+05D2 afii57666 +!E3 U+05D3 afii57667 +!E4 U+05D4 afii57668 +!E5 U+05D5 afii57669 +!E6 U+05D6 afii57670 +!E7 U+05D7 afii57671 +!E8 U+05D8 afii57672 +!E9 U+05D9 afii57673 +!EA U+05DA afii57674 +!EB U+05DB afii57675 +!EC U+05DC afii57676 +!ED U+05DD afii57677 +!EE U+05DE afii57678 +!EF U+05DF afii57679 +!F0 U+05E0 afii57680 +!F1 U+05E1 afii57681 +!F2 U+05E2 afii57682 +!F3 U+05E3 afii57683 +!F4 U+05E4 afii57684 +!F5 U+05E5 afii57685 +!F6 U+05E6 afii57686 +!F7 U+05E7 afii57687 +!F8 U+05E8 afii57688 +!F9 U+05E9 afii57689 +!FA U+05EA afii57690 +!FD U+200E afii299 +!FE U+200F afii300 diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1257.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1257.map new file mode 100644 index 00000000..2f2ecfa2 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1257.map @@ -0,0 +1,244 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8D U+00A8 dieresis +!8E U+02C7 caron +!8F U+00B8 cedilla +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!9D U+00AF macron +!9E U+02DB ogonek +!A0 U+00A0 space +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00D8 Oslash +!A9 U+00A9 copyright +!AA U+0156 Rcommaaccent +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00C6 AE +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00F8 oslash +!B9 U+00B9 onesuperior +!BA U+0157 rcommaaccent +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00E6 ae +!C0 U+0104 Aogonek +!C1 U+012E Iogonek +!C2 U+0100 Amacron +!C3 U+0106 Cacute +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+0118 Eogonek +!C7 U+0112 Emacron +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0179 Zacute +!CB U+0116 Edotaccent +!CC U+0122 Gcommaaccent +!CD U+0136 Kcommaaccent +!CE U+012A Imacron +!CF U+013B Lcommaaccent +!D0 U+0160 Scaron +!D1 U+0143 Nacute +!D2 U+0145 Ncommaaccent +!D3 U+00D3 Oacute +!D4 U+014C Omacron +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0172 Uogonek +!D9 U+0141 Lslash +!DA U+015A Sacute +!DB U+016A Umacron +!DC U+00DC Udieresis +!DD U+017B Zdotaccent +!DE U+017D Zcaron +!DF U+00DF germandbls +!E0 U+0105 aogonek +!E1 U+012F iogonek +!E2 U+0101 amacron +!E3 U+0107 cacute +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+0119 eogonek +!E7 U+0113 emacron +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+017A zacute +!EB U+0117 edotaccent +!EC U+0123 gcommaaccent +!ED U+0137 kcommaaccent +!EE U+012B imacron +!EF U+013C lcommaaccent +!F0 U+0161 scaron +!F1 U+0144 nacute +!F2 U+0146 ncommaaccent +!F3 U+00F3 oacute +!F4 U+014D omacron +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0173 uogonek +!F9 U+0142 lslash +!FA U+015B sacute +!FB U+016B umacron +!FC U+00FC udieresis +!FD U+017C zdotaccent +!FE U+017E zcaron +!FF U+02D9 dotaccent diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp1258.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1258.map new file mode 100644 index 00000000..fed915f7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp1258.map @@ -0,0 +1,247 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+0300 gravecomb +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+00D1 Ntilde +!D2 U+0309 hookabovecomb +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+01A0 Ohorn +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+01AF Uhorn +!DE U+0303 tildecomb +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+0301 acutecomb +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+00F1 ntilde +!F2 U+0323 dotbelowcomb +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+01A1 ohorn +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+01B0 uhorn +!FE U+20AB dong +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/cp874.map b/3.0/modules/proofsheet/lib/fpdf/makefont/cp874.map new file mode 100644 index 00000000..1006e6b1 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/cp874.map @@ -0,0 +1,225 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!85 U+2026 ellipsis +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-1.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-1.map new file mode 100644 index 00000000..61740a38 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-1.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-11.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-11.map new file mode 100644 index 00000000..91688120 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-11.map @@ -0,0 +1,248 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-15.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-15.map new file mode 100644 index 00000000..6c2b5712 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-15.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AC Euro +!A5 U+00A5 yen +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+017D Zcaron +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-16.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-16.map new file mode 100644 index 00000000..202c8fe5 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-16.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0105 aogonek +!A3 U+0141 Lslash +!A4 U+20AC Euro +!A5 U+201E quotedblbase +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+0218 Scommaaccent +!AB U+00AB guillemotleft +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017A zacute +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+010C Ccaron +!B3 U+0142 lslash +!B4 U+017D Zcaron +!B5 U+201D quotedblright +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+010D ccaron +!BA U+0219 scommaaccent +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+017C zdotaccent +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0106 Cacute +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+015A Sacute +!D8 U+0170 Uhungarumlaut +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0118 Eogonek +!DE U+021A Tcommaaccent +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+0107 cacute +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+015B sacute +!F8 U+0171 uhungarumlaut +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0119 eogonek +!FE U+021B tcommaaccent +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-2.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-2.map new file mode 100644 index 00000000..65ae09f9 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-2.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+013D Lcaron +!A6 U+015A Sacute +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+015E Scedilla +!AB U+0164 Tcaron +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+013E lcaron +!B6 U+015B sacute +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+015F scedilla +!BB U+0165 tcaron +!BC U+017A zacute +!BD U+02DD hungarumlaut +!BE U+017E zcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-4.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-4.map new file mode 100644 index 00000000..a7d87bf3 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-4.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0138 kgreenlandic +!A3 U+0156 Rcommaaccent +!A4 U+00A4 currency +!A5 U+0128 Itilde +!A6 U+013B Lcommaaccent +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+0112 Emacron +!AB U+0122 Gcommaaccent +!AC U+0166 Tbar +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0157 rcommaaccent +!B4 U+00B4 acute +!B5 U+0129 itilde +!B6 U+013C lcommaaccent +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+0113 emacron +!BB U+0123 gcommaaccent +!BC U+0167 tbar +!BD U+014A Eng +!BE U+017E zcaron +!BF U+014B eng +!C0 U+0100 Amacron +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+012E Iogonek +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+0116 Edotaccent +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+012A Imacron +!D0 U+0110 Dcroat +!D1 U+0145 Ncommaaccent +!D2 U+014C Omacron +!D3 U+0136 Kcommaaccent +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+0172 Uogonek +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0168 Utilde +!DE U+016A Umacron +!DF U+00DF germandbls +!E0 U+0101 amacron +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+012F iogonek +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+0117 edotaccent +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+012B imacron +!F0 U+0111 dcroat +!F1 U+0146 ncommaaccent +!F2 U+014D omacron +!F3 U+0137 kcommaaccent +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+0173 uogonek +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0169 utilde +!FE U+016B umacron +!FF U+02D9 dotaccent diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-5.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-5.map new file mode 100644 index 00000000..f9cd4edc --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-5.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0401 afii10023 +!A2 U+0402 afii10051 +!A3 U+0403 afii10052 +!A4 U+0404 afii10053 +!A5 U+0405 afii10054 +!A6 U+0406 afii10055 +!A7 U+0407 afii10056 +!A8 U+0408 afii10057 +!A9 U+0409 afii10058 +!AA U+040A afii10059 +!AB U+040B afii10060 +!AC U+040C afii10061 +!AD U+00AD hyphen +!AE U+040E afii10062 +!AF U+040F afii10145 +!B0 U+0410 afii10017 +!B1 U+0411 afii10018 +!B2 U+0412 afii10019 +!B3 U+0413 afii10020 +!B4 U+0414 afii10021 +!B5 U+0415 afii10022 +!B6 U+0416 afii10024 +!B7 U+0417 afii10025 +!B8 U+0418 afii10026 +!B9 U+0419 afii10027 +!BA U+041A afii10028 +!BB U+041B afii10029 +!BC U+041C afii10030 +!BD U+041D afii10031 +!BE U+041E afii10032 +!BF U+041F afii10033 +!C0 U+0420 afii10034 +!C1 U+0421 afii10035 +!C2 U+0422 afii10036 +!C3 U+0423 afii10037 +!C4 U+0424 afii10038 +!C5 U+0425 afii10039 +!C6 U+0426 afii10040 +!C7 U+0427 afii10041 +!C8 U+0428 afii10042 +!C9 U+0429 afii10043 +!CA U+042A afii10044 +!CB U+042B afii10045 +!CC U+042C afii10046 +!CD U+042D afii10047 +!CE U+042E afii10048 +!CF U+042F afii10049 +!D0 U+0430 afii10065 +!D1 U+0431 afii10066 +!D2 U+0432 afii10067 +!D3 U+0433 afii10068 +!D4 U+0434 afii10069 +!D5 U+0435 afii10070 +!D6 U+0436 afii10072 +!D7 U+0437 afii10073 +!D8 U+0438 afii10074 +!D9 U+0439 afii10075 +!DA U+043A afii10076 +!DB U+043B afii10077 +!DC U+043C afii10078 +!DD U+043D afii10079 +!DE U+043E afii10080 +!DF U+043F afii10081 +!E0 U+0440 afii10082 +!E1 U+0441 afii10083 +!E2 U+0442 afii10084 +!E3 U+0443 afii10085 +!E4 U+0444 afii10086 +!E5 U+0445 afii10087 +!E6 U+0446 afii10088 +!E7 U+0447 afii10089 +!E8 U+0448 afii10090 +!E9 U+0449 afii10091 +!EA U+044A afii10092 +!EB U+044B afii10093 +!EC U+044C afii10094 +!ED U+044D afii10095 +!EE U+044E afii10096 +!EF U+044F afii10097 +!F0 U+2116 afii61352 +!F1 U+0451 afii10071 +!F2 U+0452 afii10099 +!F3 U+0453 afii10100 +!F4 U+0454 afii10101 +!F5 U+0455 afii10102 +!F6 U+0456 afii10103 +!F7 U+0457 afii10104 +!F8 U+0458 afii10105 +!F9 U+0459 afii10106 +!FA U+045A afii10107 +!FB U+045B afii10108 +!FC U+045C afii10109 +!FD U+00A7 section +!FE U+045E afii10110 +!FF U+045F afii10193 diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-7.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-7.map new file mode 100644 index 00000000..e163796b --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-7.map @@ -0,0 +1,250 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+2018 quoteleft +!A2 U+2019 quoteright +!A3 U+00A3 sterling +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+0385 dieresistonos +!B6 U+0386 Alphatonos +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-9.map b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-9.map new file mode 100644 index 00000000..48c123ae --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/iso-8859-9.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/koi8-r.map b/3.0/modules/proofsheet/lib/fpdf/makefont/koi8-r.map new file mode 100644 index 00000000..6ad5d05d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/koi8-r.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2219 periodcentered +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+2553 SF520000 +!A5 U+2554 SF390000 +!A6 U+2555 SF220000 +!A7 U+2556 SF210000 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+255C SF270000 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+2562 SF200000 +!B5 U+2563 SF230000 +!B6 U+2564 SF470000 +!B7 U+2565 SF480000 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+256B SF530000 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/koi8-u.map b/3.0/modules/proofsheet/lib/fpdf/makefont/koi8-u.map new file mode 100644 index 00000000..40a7e4fd --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/koi8-u.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2022 bullet +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+0454 afii10101 +!A5 U+2554 SF390000 +!A6 U+0456 afii10103 +!A7 U+0457 afii10104 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+0491 afii10098 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+0404 afii10053 +!B5 U+2563 SF230000 +!B6 U+0406 afii10055 +!B7 U+0407 afii10056 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+0490 afii10050 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/makefont.php b/3.0/modules/proofsheet/lib/fpdf/makefont/makefont.php new file mode 100644 index 00000000..78db0aa6 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/makefont.php @@ -0,0 +1,373 @@ +$severity: "; + echo "$txt
    "; + } +} + +function Notice($txt) +{ + Message($txt, 'Notice'); +} + +function Warning($txt) +{ + Message($txt, 'Warning'); +} + +function Error($txt) +{ + Message($txt, 'Error'); + exit; +} + +function LoadMap($enc) +{ + $file = dirname(__FILE__).'/'.strtolower($enc).'.map'; + $a = file($file); + if(empty($a)) + Error('Encoding not found: '.$enc); + $map = array_fill(0, 256, array('uv'=>-1, 'name'=>'.notdef')); + foreach($a as $line) + { + $e = explode(' ', rtrim($line)); + $c = hexdec(substr($e[0],1)); + $uv = hexdec(substr($e[1],2)); + $name = $e[2]; + $map[$c] = array('uv'=>$uv, 'name'=>$name); + } + return $map; +} + +function GetInfoFromTrueType($file, $embed, $map) +{ + // Return informations from a TrueType font + $ttf = new TTFParser(); + $ttf->Parse($file); + if($embed) + { + if(!$ttf->Embeddable) + Error('Font license does not allow embedding'); + $info['Data'] = file_get_contents($file); + $info['OriginalSize'] = filesize($file); + } + $k = 1000/$ttf->unitsPerEm; + $info['FontName'] = $ttf->postScriptName; + $info['Bold'] = $ttf->Bold; + $info['ItalicAngle'] = $ttf->italicAngle; + $info['IsFixedPitch'] = $ttf->isFixedPitch; + $info['Ascender'] = round($k*$ttf->typoAscender); + $info['Descender'] = round($k*$ttf->typoDescender); + $info['UnderlineThickness'] = round($k*$ttf->underlineThickness); + $info['UnderlinePosition'] = round($k*$ttf->underlinePosition); + $info['FontBBox'] = array(round($k*$ttf->xMin), round($k*$ttf->yMin), round($k*$ttf->xMax), round($k*$ttf->yMax)); + $info['CapHeight'] = round($k*$ttf->capHeight); + $info['MissingWidth'] = round($k*$ttf->widths[0]); + $widths = array_fill(0, 256, $info['MissingWidth']); + for($c=0;$c<=255;$c++) + { + if($map[$c]['name']!='.notdef') + { + $uv = $map[$c]['uv']; + if(isset($ttf->chars[$uv])) + { + $w = $ttf->widths[$ttf->chars[$uv]]; + $widths[$c] = round($k*$w); + } + else + Warning('Character '.$map[$c]['name'].' is missing'); + } + } + $info['Widths'] = $widths; + return $info; +} + +function GetInfoFromType1($file, $embed, $map) +{ + // Return informations from a Type1 font + if($embed) + { + $f = fopen($file, 'rb'); + if(!$f) + Error('Can\'t open font file'); + // Read first segment + $a = unpack('Cmarker/Ctype/Vsize', fread($f,6)); + if($a['marker']!=128) + Error('Font file is not a valid binary Type1'); + $size1 = $a['size']; + $data = fread($f, $size1); + // Read second segment + $a = unpack('Cmarker/Ctype/Vsize', fread($f,6)); + if($a['marker']!=128) + Error('Font file is not a valid binary Type1'); + $size2 = $a['size']; + $data .= fread($f, $size2); + fclose($f); + $info['Data'] = $data; + $info['Size1'] = $size1; + $info['Size2'] = $size2; + } + + $afm = substr($file, 0, -3).'afm'; + if(!file_exists($afm)) + Error('AFM font file not found: '.$afm); + $a = file($afm); + if(empty($a)) + Error('AFM file empty or not readable'); + foreach($a as $line) + { + $e = explode(' ', rtrim($line)); + if(count($e)<2) + continue; + $entry = $e[0]; + if($entry=='C') + { + $w = $e[4]; + $name = $e[7]; + $cw[$name] = $w; + } + elseif($entry=='FontName') + $info['FontName'] = $e[1]; + elseif($entry=='Weight') + $info['Weight'] = $e[1]; + elseif($entry=='ItalicAngle') + $info['ItalicAngle'] = (int)$e[1]; + elseif($entry=='Ascender') + $info['Ascender'] = (int)$e[1]; + elseif($entry=='Descender') + $info['Descender'] = (int)$e[1]; + elseif($entry=='UnderlineThickness') + $info['UnderlineThickness'] = (int)$e[1]; + elseif($entry=='UnderlinePosition') + $info['UnderlinePosition'] = (int)$e[1]; + elseif($entry=='IsFixedPitch') + $info['IsFixedPitch'] = ($e[1]=='true'); + elseif($entry=='FontBBox') + $info['FontBBox'] = array((int)$e[1], (int)$e[2], (int)$e[3], (int)$e[4]); + elseif($entry=='CapHeight') + $info['CapHeight'] = (int)$e[1]; + elseif($entry=='StdVW') + $info['StdVW'] = (int)$e[1]; + } + + if(!isset($info['FontName'])) + Error('FontName missing in AFM file'); + $info['Bold'] = isset($info['Weight']) && preg_match('/bold|black/i', $info['Weight']); + if(isset($cw['.notdef'])) + $info['MissingWidth'] = $cw['.notdef']; + else + $info['MissingWidth'] = 0; + $widths = array_fill(0, 256, $info['MissingWidth']); + for($c=0;$c<=255;$c++) + { + $name = $map[$c]['name']; + if($name!='.notdef') + { + if(isset($cw[$name])) + $widths[$c] = $cw[$name]; + else + Warning('Character '.$name.' is missing'); + } + } + $info['Widths'] = $widths; + return $info; +} + +function MakeFontDescriptor($info) +{ + // Ascent + $fd = "array('Ascent'=>".$info['Ascender']; + // Descent + $fd .= ",'Descent'=>".$info['Descender']; + // CapHeight + if(!empty($info['CapHeight'])) + $fd .= ",'CapHeight'=>".$info['CapHeight']; + else + $fd .= ",'CapHeight'=>".$info['Ascender']; + // Flags + $flags = 0; + if($info['IsFixedPitch']) + $flags += 1<<0; + $flags += 1<<5; + if($info['ItalicAngle']!=0) + $flags += 1<<6; + $fd .= ",'Flags'=>".$flags; + // FontBBox + $fbb = $info['FontBBox']; + $fd .= ",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; + // ItalicAngle + $fd .= ",'ItalicAngle'=>".$info['ItalicAngle']; + // StemV + if(isset($info['StdVW'])) + $stemv = $info['StdVW']; + elseif($info['Bold']) + $stemv = 120; + else + $stemv = 70; + $fd .= ",'StemV'=>".$stemv; + // MissingWidth + $fd .= ",'MissingWidth'=>".$info['MissingWidth'].')'; + return $fd; +} + +function MakeWidthArray($widths) +{ + $s = "array(\n\t"; + for($c=0;$c<=255;$c++) + { + if(chr($c)=="'") + $s .= "'\\''"; + elseif(chr($c)=="\\") + $s .= "'\\\\'"; + elseif($c>=32 && $c<=126) + $s .= "'".chr($c)."'"; + else + $s .= "chr($c)"; + $s .= '=>'.$widths[$c]; + if($c<255) + $s .= ','; + if(($c+1)%22==0) + $s .= "\n\t"; + } + $s .= ')'; + return $s; +} + +function MakeFontEncoding($map) +{ + // Build differences from reference encoding + $ref = LoadMap('cp1252'); + $s = ''; + $last = 0; + for($c=32;$c<=255;$c++) + { + if($map[$c]['name']!=$ref[$c]['name']) + { + if($c!=$last+1) + $s .= $c.' '; + $last = $c; + $s .= '/'.$map[$c]['name'].' '; + } + } + return rtrim($s); +} + +function SaveToFile($file, $s, $mode) +{ + $f = fopen($file, 'w'.$mode); + if(!$f) + Error('Can\'t write to file '.$file); + fwrite($f, $s, strlen($s)); + fclose($f); +} + +function MakeDefinitionFile($file, $type, $enc, $embed, $map, $info) +{ + $s = "\n"; + SaveToFile($file, $s, 't'); +} + +function MakeFont($fontfile, $enc='cp1252', $embed=true) +{ + // Generate a font definition file + if(get_magic_quotes_runtime()) + @set_magic_quotes_runtime(0); + ini_set('auto_detect_line_endings', '1'); + + if(!file_exists($fontfile)) + Error('Font file not found: '.$fontfile); + $ext = strtolower(substr($fontfile,-3)); + if($ext=='ttf' || $ext=='otf') + $type = 'TrueType'; + elseif($ext=='pfb') + $type = 'Type1'; + else + Error('Unrecognized font file extension: '.$ext); + + $map = LoadMap($enc); + + if($type=='TrueType') + $info = GetInfoFromTrueType($fontfile, $embed, $map); + else + $info = GetInfoFromType1($fontfile, $embed, $map); + + $basename = substr(basename($fontfile), 0, -4); + if($embed) + { + if(function_exists('gzcompress')) + { + $file = $basename.'.z'; + SaveToFile($file, gzcompress($info['Data']), 'b'); + $info['File'] = $file; + Message('Font file compressed: '.$file); + } + else + { + $info['File'] = basename($fontfile); + Notice('Font file could not be compressed (zlib extension not available)'); + } + } + + MakeDefinitionFile($basename.'.php', $type, $enc, $embed, $map, $info); + Message('Font definition file generated: '.$basename.'.php'); +} + +if(PHP_SAPI=='cli') +{ + // Command-line interface + if($argc==1) + die("Usage: php makefont.php fontfile [enc] [embed]\n"); + $fontfile = $argv[1]; + if($argc>=3) + $enc = $argv[2]; + else + $enc = 'cp1252'; + if($argc>=4) + $embed = ($argv[3]=='true' || $argv[3]=='1'); + else + $embed = true; + MakeFont($fontfile, $enc, $embed); +} +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/makefont/ttfparser.php b/3.0/modules/proofsheet/lib/fpdf/makefont/ttfparser.php new file mode 100644 index 00000000..602a543c --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/makefont/ttfparser.php @@ -0,0 +1,289 @@ +f = fopen($file, 'rb'); + if(!$this->f) + $this->Error('Can\'t open file: '.$file); + + $version = $this->Read(4); + if($version=='OTTO') + $this->Error('OpenType fonts based on PostScript outlines are not supported'); + if($version!="\x00\x01\x00\x00") + $this->Error('Unrecognized file format'); + $numTables = $this->ReadUShort(); + $this->Skip(3*2); // searchRange, entrySelector, rangeShift + $this->tables = array(); + for($i=0;$i<$numTables;$i++) + { + $tag = $this->Read(4); + $this->Skip(4); // checkSum + $offset = $this->ReadULong(); + $this->Skip(4); // length + $this->tables[$tag] = $offset; + } + + $this->ParseHead(); + $this->ParseHhea(); + $this->ParseMaxp(); + $this->ParseHmtx(); + $this->ParseCmap(); + $this->ParseName(); + $this->ParseOS2(); + $this->ParsePost(); + + fclose($this->f); + } + + function ParseHead() + { + $this->Seek('head'); + $this->Skip(3*4); // version, fontRevision, checkSumAdjustment + $magicNumber = $this->ReadULong(); + if($magicNumber!=0x5F0F3CF5) + $this->Error('Incorrect magic number'); + $this->Skip(2); // flags + $this->unitsPerEm = $this->ReadUShort(); + $this->Skip(2*8); // created, modified + $this->xMin = $this->ReadShort(); + $this->yMin = $this->ReadShort(); + $this->xMax = $this->ReadShort(); + $this->yMax = $this->ReadShort(); + } + + function ParseHhea() + { + $this->Seek('hhea'); + $this->Skip(4+15*2); + $this->numberOfHMetrics = $this->ReadUShort(); + } + + function ParseMaxp() + { + $this->Seek('maxp'); + $this->Skip(4); + $this->numGlyphs = $this->ReadUShort(); + } + + function ParseHmtx() + { + $this->Seek('hmtx'); + $this->widths = array(); + for($i=0;$i<$this->numberOfHMetrics;$i++) + { + $advanceWidth = $this->ReadUShort(); + $this->Skip(2); // lsb + $this->widths[$i] = $advanceWidth; + } + if($this->numberOfHMetrics<$this->numGlyphs) + { + $lastWidth = $this->widths[$this->numberOfHMetrics-1]; + $this->widths = array_pad($this->widths, $this->numGlyphs, $lastWidth); + } + } + + function ParseCmap() + { + $this->Seek('cmap'); + $this->Skip(2); // version + $numTables = $this->ReadUShort(); + $offset31 = 0; + for($i=0;$i<$numTables;$i++) + { + $platformID = $this->ReadUShort(); + $encodingID = $this->ReadUShort(); + $offset = $this->ReadULong(); + if($platformID==3 && $encodingID==1) + $offset31 = $offset; + } + if($offset31==0) + $this->Error('No Unicode encoding found'); + + $startCount = array(); + $endCount = array(); + $idDelta = array(); + $idRangeOffset = array(); + $this->chars = array(); + fseek($this->f, $this->tables['cmap']+$offset31, SEEK_SET); + $format = $this->ReadUShort(); + if($format!=4) + $this->Error('Unexpected subtable format: '.$format); + $this->Skip(2*2); // length, language + $segCount = $this->ReadUShort()/2; + $this->Skip(3*2); // searchRange, entrySelector, rangeShift + for($i=0;$i<$segCount;$i++) + $endCount[$i] = $this->ReadUShort(); + $this->Skip(2); // reservedPad + for($i=0;$i<$segCount;$i++) + $startCount[$i] = $this->ReadUShort(); + for($i=0;$i<$segCount;$i++) + $idDelta[$i] = $this->ReadShort(); + $offset = ftell($this->f); + for($i=0;$i<$segCount;$i++) + $idRangeOffset[$i] = $this->ReadUShort(); + + for($i=0;$i<$segCount;$i++) + { + $c1 = $startCount[$i]; + $c2 = $endCount[$i]; + $d = $idDelta[$i]; + $ro = $idRangeOffset[$i]; + if($ro>0) + fseek($this->f, $offset+2*$i+$ro, SEEK_SET); + for($c=$c1;$c<=$c2;$c++) + { + if($c==0xFFFF) + break; + if($ro>0) + { + $gid = $this->ReadUShort(); + if($gid>0) + $gid += $d; + } + else + $gid = $c+$d; + if($gid>=65536) + $gid -= 65536; + if($gid>0) + $this->chars[$c] = $gid; + } + } + } + + function ParseName() + { + $this->Seek('name'); + $tableOffset = ftell($this->f); + $this->postScriptName = ''; + $this->Skip(2); // format + $count = $this->ReadUShort(); + $stringOffset = $this->ReadUShort(); + for($i=0;$i<$count;$i++) + { + $this->Skip(3*2); // platformID, encodingID, languageID + $nameID = $this->ReadUShort(); + $length = $this->ReadUShort(); + $offset = $this->ReadUShort(); + if($nameID==6) + { + // PostScript name + fseek($this->f, $tableOffset+$stringOffset+$offset, SEEK_SET); + $s = $this->Read($length); + $s = str_replace(chr(0), '', $s); + $s = preg_replace('|[ \[\](){}<>/%]|', '', $s); + $this->postScriptName = $s; + break; + } + } + if($this->postScriptName=='') + $this->Error('PostScript name not found'); + } + + function ParseOS2() + { + $this->Seek('OS/2'); + $version = $this->ReadUShort(); + $this->Skip(3*2); // xAvgCharWidth, usWeightClass, usWidthClass + $fsType = $this->ReadUShort(); + $this->Embeddable = ($fsType!=2) && ($fsType & 0x200)==0; + $this->Skip(11*2+10+4*4+4); + $fsSelection = $this->ReadUShort(); + $this->Bold = ($fsSelection & 32)!=0; + $this->Skip(2*2); // usFirstCharIndex, usLastCharIndex + $this->typoAscender = $this->ReadShort(); + $this->typoDescender = $this->ReadShort(); + if($version>=2) + { + $this->Skip(3*2+2*4+2); + $this->capHeight = $this->ReadShort(); + } + else + $this->capHeight = 0; + } + + function ParsePost() + { + $this->Seek('post'); + $this->Skip(4); // version + $this->italicAngle = $this->ReadShort(); + $this->Skip(2); // Skip decimal part + $this->underlinePosition = $this->ReadShort(); + $this->underlineThickness = $this->ReadShort(); + $this->isFixedPitch = ($this->ReadULong()!=0); + } + + function Error($msg) + { + if(PHP_SAPI=='cli') + die("Error: $msg\n"); + else + die("Error: $msg"); + } + + function Seek($tag) + { + if(!isset($this->tables[$tag])) + $this->Error('Table not found: '.$tag); + fseek($this->f, $this->tables[$tag], SEEK_SET); + } + + function Skip($n) + { + fseek($this->f, $n, SEEK_CUR); + } + + function Read($n) + { + return fread($this->f, $n); + } + + function ReadUShort() + { + $a = unpack('nn', fread($this->f,2)); + return $a['n']; + } + + function ReadShort() + { + $a = unpack('nn', fread($this->f,2)); + $v = $a['n']; + if($v>=0x8000) + $v -= 65536; + return $v; + } + + function ReadULong() + { + $a = unpack('NN', fread($this->f,4)); + return $a['N']; + } +} +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/20k_c1.txt b/3.0/modules/proofsheet/lib/fpdf/tutorial/20k_c1.txt new file mode 100644 index 00000000..0b09f265 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/20k_c1.txt @@ -0,0 +1,10 @@ +The year 1866 was marked by a bizarre development, an unexplained and downright inexplicable phenomenon that surely no one has forgotten. Without getting into those rumors that upset civilians in the seaports and deranged the public mind even far inland, it must be said that professional seamen were especially alarmed. Traders, shipowners, captains of vessels, skippers, and master mariners from Europe and America, naval officers from every country, and at their heels the various national governments on these two continents, were all extremely disturbed by the business. +In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale. +The relevant data on this apparition, as recorded in various logbooks, agreed pretty closely as to the structure of the object or creature in question, its unprecedented speed of movement, its startling locomotive power, and the unique vitality with which it seemed to be gifted. If it was a cetacean, it exceeded in bulk any whale previously classified by science. No naturalist, neither Cuvier nor Lacépède, neither Professor Dumeril nor Professor de Quatrefages, would have accepted the existence of such a monster sight unseen -- specifically, unseen by their own scientific eyes. +Striking an average of observations taken at different times -- rejecting those timid estimates that gave the object a length of 200 feet, and ignoring those exaggerated views that saw it as a mile wide and three long--you could still assert that this phenomenal creature greatly exceeded the dimensions of anything then known to ichthyologists, if it existed at all. +Now then, it did exist, this was an undeniable fact; and since the human mind dotes on objects of wonder, you can understand the worldwide excitement caused by this unearthly apparition. As for relegating it to the realm of fiction, that charge had to be dropped. +In essence, on July 20, 1866, the steamer Governor Higginson, from the Calcutta & Burnach Steam Navigation Co., encountered this moving mass five miles off the eastern shores of Australia. Captain Baker at first thought he was in the presence of an unknown reef; he was even about to fix its exact position when two waterspouts shot out of this inexplicable object and sprang hissing into the air some 150 feet. So, unless this reef was subject to the intermittent eruptions of a geyser, the Governor Higginson had fair and honest dealings with some aquatic mammal, until then unknown, that could spurt from its blowholes waterspouts mixed with air and steam. +Similar events were likewise observed in Pacific seas, on July 23 of the same year, by the Christopher Columbus from the West India & Pacific Steam Navigation Co. Consequently, this extraordinary cetacean could transfer itself from one locality to another with startling swiftness, since within an interval of just three days, the Governor Higginson and the Christopher Columbus had observed it at two positions on the charts separated by a distance of more than 700 nautical leagues. +Fifteen days later and 2,000 leagues farther, the Helvetia from the Compagnie Nationale and the Shannon from the Royal Mail line, running on opposite tacks in that part of the Atlantic lying between the United States and Europe, respectively signaled each other that the monster had been sighted in latitude 42 degrees 15' north and longitude 60 degrees 35' west of the meridian of Greenwich. From their simultaneous observations, they were able to estimate the mammal's minimum length at more than 350 English feet; this was because both the Shannon and the Helvetia were of smaller dimensions, although each measured 100 meters stem to stern. Now then, the biggest whales, those rorqual whales that frequent the waterways of the Aleutian Islands, have never exceeded a length of 56 meters--if they reach even that. +One after another, reports arrived that would profoundly affect public opinion: new observations taken by the transatlantic liner Pereire, the Inman line's Etna running afoul of the monster, an official report drawn up by officers on the French frigate Normandy, dead-earnest reckonings obtained by the general staff of Commodore Fitz-James aboard the Lord Clyde. In lighthearted countries, people joked about this phenomenon, but such serious, practical countries as England, America, and Germany were deeply concerned. +In every big city the monster was the latest rage; they sang about it in the coffee houses, they ridiculed it in the newspapers, they dramatized it in the theaters. The tabloids found it a fine opportunity for hatching all sorts of hoaxes. In those newspapers short of copy, you saw the reappearance of every gigantic imaginary creature, from "Moby Dick," that dreadful white whale from the High Arctic regions, to the stupendous kraken whose tentacles could entwine a 500-ton craft and drag it into the ocean depths. They even reprinted reports from ancient times: the views of Aristotle and Pliny accepting the existence of such monsters, then the Norwegian stories of Bishop Pontoppidan, the narratives of Paul Egede, and finally the reports of Captain Harrington -- whose good faith is above suspicion--in which he claims he saw, while aboard the Castilian in 1857, one of those enormous serpents that, until then, had frequented only the seas of France's old extremist newspaper, The Constitutionalist. diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/20k_c2.txt b/3.0/modules/proofsheet/lib/fpdf/tutorial/20k_c2.txt new file mode 100644 index 00000000..096dbd19 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/20k_c2.txt @@ -0,0 +1,23 @@ +During the period in which these developments were occurring, I had returned from a scientific undertaking organized to explore the Nebraska badlands in the United States. In my capacity as Assistant Professor at the Paris Museum of Natural History, I had been attached to this expedition by the French government. After spending six months in Nebraska, I arrived in New York laden with valuable collections near the end of March. My departure for France was set for early May. In the meantime, then, I was busy classifying my mineralogical, botanical, and zoological treasures when that incident took place with the Scotia. +I was perfectly abreast of this question, which was the big news of the day, and how could I not have been? I had read and reread every American and European newspaper without being any farther along. This mystery puzzled me. Finding it impossible to form any views, I drifted from one extreme to the other. Something was out there, that much was certain, and any doubting Thomas was invited to place his finger on the Scotia's wound. +When I arrived in New York, the question was at the boiling point. The hypothesis of a drifting islet or an elusive reef, put forward by people not quite in their right minds, was completely eliminated. And indeed, unless this reef had an engine in its belly, how could it move about with such prodigious speed? +Also discredited was the idea of a floating hull or some other enormous wreckage, and again because of this speed of movement. +So only two possible solutions to the question were left, creating two very distinct groups of supporters: on one side, those favoring a monster of colossal strength; on the other, those favoring an "underwater boat" of tremendous motor power. +Now then, although the latter hypothesis was completely admissible, it couldn't stand up to inquiries conducted in both the New World and the Old. That a private individual had such a mechanism at his disposal was less than probable. Where and when had he built it, and how could he have built it in secret? +Only some government could own such an engine of destruction, and in these disaster-filled times, when men tax their ingenuity to build increasingly powerful aggressive weapons, it was possible that, unknown to the rest of the world, some nation could have been testing such a fearsome machine. The Chassepot rifle led to the torpedo, and the torpedo has led to this underwater battering ram, which in turn will lead to the world putting its foot down. At least I hope it will. +But this hypothesis of a war machine collapsed in the face of formal denials from the various governments. Since the public interest was at stake and transoceanic travel was suffering, the sincerity of these governments could not be doubted. Besides, how could the assembly of this underwater boat have escaped public notice? Keeping a secret under such circumstances would be difficult enough for an individual, and certainly impossible for a nation whose every move is under constant surveillance by rival powers. +So, after inquiries conducted in England, France, Russia, Prussia, Spain, Italy, America, and even Turkey, the hypothesis of an underwater Monitor was ultimately rejected. +After I arrived in New York, several people did me the honor of consulting me on the phenomenon in question. In France I had published a two-volume work, in quarto, entitled The Mysteries of the Great Ocean Depths. Well received in scholarly circles, this book had established me as a specialist in this pretty obscure field of natural history. My views were in demand. As long as I could deny the reality of the business, I confined myself to a flat "no comment." But soon, pinned to the wall, I had to explain myself straight out. And in this vein, "the honorable Pierre Aronnax, Professor at the Paris Museum," was summoned by The New York Herald to formulate his views no matter what. +I complied. Since I could no longer hold my tongue, I let it wag. I discussed the question in its every aspect, both political and scientific, and this is an excerpt from the well-padded article I published in the issue of April 30. + +"Therefore," I wrote, "after examining these different hypotheses one by one, we are forced, every other supposition having been refuted, to accept the existence of an extremely powerful marine animal. +"The deepest parts of the ocean are totally unknown to us. No soundings have been able to reach them. What goes on in those distant depths? What creatures inhabit, or could inhabit, those regions twelve or fifteen miles beneath the surface of the water? What is the constitution of these animals? It's almost beyond conjecture. +"However, the solution to this problem submitted to me can take the form of a choice between two alternatives. +"Either we know every variety of creature populating our planet, or we do not. +"If we do not know every one of them, if nature still keeps ichthyological secrets from us, nothing is more admissible than to accept the existence of fish or cetaceans of new species or even new genera, animals with a basically 'cast-iron' constitution that inhabit strata beyond the reach of our soundings, and which some development or other, an urge or a whim if you prefer, can bring to the upper level of the ocean for long intervals. +"If, on the other hand, we do know every living species, we must look for the animal in question among those marine creatures already cataloged, and in this event I would be inclined to accept the existence of a giant narwhale. +"The common narwhale, or sea unicorn, often reaches a length of sixty feet. Increase its dimensions fivefold or even tenfold, then give this cetacean a strength in proportion to its size while enlarging its offensive weapons, and you have the animal we're looking for. It would have the proportions determined by the officers of the Shannon, the instrument needed to perforate the Scotia, and the power to pierce a steamer's hull. +"In essence, the narwhale is armed with a sort of ivory sword, or lance, as certain naturalists have expressed it. It's a king-sized tooth as hard as steel. Some of these teeth have been found buried in the bodies of baleen whales, which the narwhale attacks with invariable success. Others have been wrenched, not without difficulty, from the undersides of vessels that narwhales have pierced clean through, as a gimlet pierces a wine barrel. The museum at the Faculty of Medicine in Paris owns one of these tusks with a length of 2.25 meters and a width at its base of forty-eight centimeters! +"All right then! Imagine this weapon to be ten times stronger and the animal ten times more powerful, launch it at a speed of twenty miles per hour, multiply its mass times its velocity, and you get just the collision we need to cause the specified catastrophe. +"So, until information becomes more abundant, I plump for a sea unicorn of colossal dimensions, no longer armed with a mere lance but with an actual spur, like ironclad frigates or those warships called 'rams,' whose mass and motor power it would possess simultaneously. +"This inexplicable phenomenon is thus explained away--unless it's something else entirely, which, despite everything that has been sighted, studied, explored and experienced, is still possible!" diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.php new file mode 100644 index 00000000..baf8a3a5 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.php @@ -0,0 +1,23 @@ +899,'Descent'=>-234,'CapHeight'=>899,'Flags'=>32,'FontBBox'=>'[-173 -234 1328 899]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>800); +$up = -200; +$ut = 20; +$cw = array( + chr(0)=>800,chr(1)=>800,chr(2)=>800,chr(3)=>800,chr(4)=>800,chr(5)=>800,chr(6)=>800,chr(7)=>800,chr(8)=>800,chr(9)=>800,chr(10)=>800,chr(11)=>800,chr(12)=>800,chr(13)=>800,chr(14)=>800,chr(15)=>800,chr(16)=>800,chr(17)=>800,chr(18)=>800,chr(19)=>800,chr(20)=>800,chr(21)=>800, + chr(22)=>800,chr(23)=>800,chr(24)=>800,chr(25)=>800,chr(26)=>800,chr(27)=>800,chr(28)=>800,chr(29)=>800,chr(30)=>800,chr(31)=>800,' '=>282,'!'=>324,'"'=>405,'#'=>584,'$'=>632,'%'=>980,'&'=>776,'\''=>259,'('=>299,')'=>299,'*'=>377,'+'=>600, + ','=>259,'-'=>432,'.'=>254,'/'=>597,'0'=>529,'1'=>298,'2'=>451,'3'=>359,'4'=>525,'5'=>423,'6'=>464,'7'=>417,'8'=>457,'9'=>479,':'=>275,';'=>282,'<'=>600,'='=>600,'>'=>600,'?'=>501,'@'=>800,'A'=>743, + 'B'=>636,'C'=>598,'D'=>712,'E'=>608,'F'=>562,'G'=>680,'H'=>756,'I'=>308,'J'=>314,'K'=>676,'L'=>552,'M'=>1041,'N'=>817,'O'=>729,'P'=>569,'Q'=>698,'R'=>674,'S'=>618,'T'=>673,'U'=>805,'V'=>753,'W'=>1238, + 'X'=>716,'Y'=>754,'Z'=>599,'['=>315,'\\'=>463,']'=>315,'^'=>600,'_'=>547,'`'=>278,'a'=>581,'b'=>564,'c'=>440,'d'=>571,'e'=>450,'f'=>347,'g'=>628,'h'=>611,'i'=>283,'j'=>283,'k'=>560,'l'=>252,'m'=>976, + 'n'=>595,'o'=>508,'p'=>549,'q'=>540,'r'=>395,'s'=>441,'t'=>307,'u'=>614,'v'=>556,'w'=>915,'x'=>559,'y'=>597,'z'=>452,'{'=>315,'|'=>222,'}'=>315,'~'=>600,chr(127)=>800,chr(128)=>800,chr(129)=>800,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>780,chr(134)=>0,chr(135)=>0,chr(136)=>278,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>1064,chr(141)=>800,chr(142)=>0,chr(143)=>800,chr(144)=>800,chr(145)=>259,chr(146)=>259,chr(147)=>470,chr(148)=>470,chr(149)=>500,chr(150)=>300,chr(151)=>600,chr(152)=>278,chr(153)=>990, + chr(154)=>0,chr(155)=>0,chr(156)=>790,chr(157)=>800,chr(158)=>800,chr(159)=>754,chr(160)=>282,chr(161)=>324,chr(162)=>450,chr(163)=>640,chr(164)=>518,chr(165)=>603,chr(166)=>0,chr(167)=>519,chr(168)=>254,chr(169)=>800,chr(170)=>349,chr(171)=>0,chr(172)=>0,chr(173)=>432,chr(174)=>800,chr(175)=>278, + chr(176)=>0,chr(177)=>0,chr(178)=>0,chr(179)=>0,chr(180)=>278,chr(181)=>614,chr(182)=>0,chr(183)=>254,chr(184)=>278,chr(185)=>0,chr(186)=>305,chr(187)=>0,chr(188)=>0,chr(189)=>0,chr(190)=>0,chr(191)=>501,chr(192)=>743,chr(193)=>743,chr(194)=>743,chr(195)=>743,chr(196)=>743,chr(197)=>743, + chr(198)=>1060,chr(199)=>598,chr(200)=>608,chr(201)=>608,chr(202)=>608,chr(203)=>608,chr(204)=>308,chr(205)=>308,chr(206)=>308,chr(207)=>308,chr(208)=>0,chr(209)=>817,chr(210)=>729,chr(211)=>729,chr(212)=>729,chr(213)=>729,chr(214)=>729,chr(215)=>0,chr(216)=>729,chr(217)=>805,chr(218)=>805,chr(219)=>805, + chr(220)=>805,chr(221)=>0,chr(222)=>0,chr(223)=>688,chr(224)=>581,chr(225)=>581,chr(226)=>581,chr(227)=>581,chr(228)=>581,chr(229)=>581,chr(230)=>792,chr(231)=>440,chr(232)=>450,chr(233)=>450,chr(234)=>450,chr(235)=>450,chr(236)=>283,chr(237)=>283,chr(238)=>283,chr(239)=>283,chr(240)=>0,chr(241)=>595, + chr(242)=>508,chr(243)=>508,chr(244)=>508,chr(245)=>508,chr(246)=>508,chr(247)=>0,chr(248)=>508,chr(249)=>614,chr(250)=>614,chr(251)=>614,chr(252)=>614,chr(253)=>0,chr(254)=>0,chr(255)=>597); +$enc = 'cp1252'; +$file = 'calligra.z'; +$originalsize = 40120; +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.ttf b/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.ttf new file mode 100644 index 00000000..9713c468 Binary files /dev/null and b/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.ttf differ diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.z b/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.z new file mode 100644 index 00000000..1c0bebd2 Binary files /dev/null and b/3.0/modules/proofsheet/lib/fpdf/tutorial/calligra.z differ diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/countries.txt b/3.0/modules/proofsheet/lib/fpdf/tutorial/countries.txt new file mode 100644 index 00000000..aa8886cc --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/countries.txt @@ -0,0 +1,15 @@ +Austria;Vienna;83859;8075 +Belgium;Brussels;30518;10192 +Denmark;Copenhagen;43094;5295 +Finland;Helsinki;304529;5147 +France;Paris;543965;58728 +Germany;Berlin;357022;82057 +Greece;Athens;131625;10511 +Ireland;Dublin;70723;3694 +Italy;Roma;301316;57563 +Luxembourg;Luxembourg;2586;424 +Netherlands;Amsterdam;41526;15654 +Portugal;Lisbon;91906;9957 +Spain;Madrid;504790;39348 +Sweden;Stockholm;410934;8839 +United Kingdom;London;243820;58862 diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/index.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/index.htm new file mode 100644 index 00000000..44dba25d --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/index.htm @@ -0,0 +1,20 @@ + + + + +Tutorials + + + +

    Tutorials

    + + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/logo.png b/3.0/modules/proofsheet/lib/fpdf/tutorial/logo.png new file mode 100644 index 00000000..284a0071 Binary files /dev/null and b/3.0/modules/proofsheet/lib/fpdf/tutorial/logo.png differ diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/makefont.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/makefont.php new file mode 100644 index 00000000..285f27cd --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/makefont.php @@ -0,0 +1,6 @@ + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto1.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto1.htm new file mode 100644 index 00000000..a26e29ae --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto1.htm @@ -0,0 +1,76 @@ + + + + +Minimal example + + + +

    Minimal example

    +Let's start with the classic example: +
    +
    <?php
    +require('fpdf.php');
    +
    +$pdf = new FPDF();
    +$pdf->AddPage();
    +$pdf->SetFont('Arial','B',16);
    +$pdf->Cell(40,10,'Hello World!');
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    +After including the library file, we create an FPDF object. +The FPDF() constructor is used here with the default values: pages are in A4 portrait and +the unit of measure is millimeter. It could have been specified explicitly with: +
    +
    $pdf = new FPDF('P','mm','A4');
    +
    +
    +It's possible to use landscape (L), other page sizes (such as Letter and +Legal) and units (pt, cm, in). +
    +
    +There's no page at the moment, so we have to add one with AddPage(). The origin +is at the upper-left corner and the current position is by default set at 1 cm from the +borders; the margins can be changed with SetMargins(). +
    +
    +Before we can print text, it's mandatory to select a font with SetFont(), otherwise the +document would be invalid. We choose Arial bold 16: +
    +
    $pdf->SetFont('Arial','B',16);
    +
    +
    +We could have specified italics with I, underlined with U or a regular font with an empty string +(or any combination). Note that the font size is given in points, not millimeters (or another user +unit); it's the only exception. The other standard fonts are Times, Courier, Symbol and ZapfDingbats. +
    +
    +We can now print a cell with Cell(). A cell is a rectangular area, possibly framed, +which contains a line of text. It is output at the current position. We specify its dimensions, +its text (centered or aligned), if borders should be drawn, and where the current position +moves after it (to the right, below or to the beginning of the next line). To add a frame, we would do this: +
    +
    $pdf->Cell(40,10,'Hello World !',1);
    +
    +
    +To add a new cell next to it with centered text and go to the next line, we would do: +
    +
    $pdf->Cell(60,10,'Powered by FPDF.',0,1,'C');
    +
    +
    +Remark: the line break can also be done with Ln(). This method additionnaly allows to specify +the height of the break. +
    +
    +Finally, the document is closed and sent to the browser with Output(). We could have saved +it to a file by passing the desired file name. +
    +
    +Caution: in case when the PDF is sent to the browser, nothing else must be output by the +script, neither before nor after (no HTML, not even a space or a carriage return). If you send something +before, you will get the error message: "Some data has already been output, can't send PDF file". If you +send something after, the document might not display. + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto1.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto1.php new file mode 100644 index 00000000..14a05046 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto1.php @@ -0,0 +1,9 @@ +AddPage(); +$pdf->SetFont('Arial','B',16); +$pdf->Cell(40,10,'Hello World!'); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto2.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto2.htm new file mode 100644 index 00000000..b892d1d9 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto2.htm @@ -0,0 +1,80 @@ + + + + +Header, footer, page break and image + + + +

    Header, footer, page break and image

    +Here's a two page example with header, footer and logo: +
    +
    <?php
    +require('fpdf.php');
    +
    +class PDF extends FPDF
    +{
    +// Page header
    +function Header()
    +{
    +    // Logo
    +    $this->Image('logo.png',10,6,30);
    +    // Arial bold 15
    +    $this->SetFont('Arial','B',15);
    +    // Move to the right
    +    $this->Cell(80);
    +    // Title
    +    $this->Cell(30,10,'Title',1,0,'C');
    +    // Line break
    +    $this->Ln(20);
    +}
    +
    +// Page footer
    +function Footer()
    +{
    +    // Position at 1.5 cm from bottom
    +    $this->SetY(-15);
    +    // Arial italic 8
    +    $this->SetFont('Arial','I',8);
    +    // Page number
    +    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
    +}
    +}
    +
    +// Instanciation of inherited class
    +$pdf = new PDF();
    +$pdf->AliasNbPages();
    +$pdf->AddPage();
    +$pdf->SetFont('Times','',12);
    +for($i=1;$i<=40;$i++)
    +    $pdf->Cell(0,10,'Printing line number '.$i,0,1);
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    +This example makes use of the Header() and Footer() methods to process page headers and +footers. They are called automatically. They already exist in the FPDF class but do nothing, +therefore we have to extend the class and override them. +
    +
    +The logo is printed with the Image() method by specifying its upper-left corner and +its width. The height is calculated automatically to respect the image proportions. +
    +
    +To print the page number, a null value is passed as the cell width. It means that the cell +should extend up to the right margin of the page; this is handy to center text. The current page +number is returned by the PageNo() method; as for the total number of pages, it's obtained +via the special value {nb} which is substituted when the document is finished +(provided you first called AliasNbPages()). +
    +Note the use of the SetY() method which allows to set position at an absolute location in +the page, starting from the top or the bottom. +
    +
    +Another interesting feature is used here: the automatic page breaking. As soon as a cell would +cross a limit in the page (at 2 centimeters from the bottom by default), a break is issued +and the font restored. Although the header and footer select their own font (Arial), the body +continues with Times. This mechanism of automatic restoration also applies to colors and line +width. The limit which triggers page breaks can be set with SetAutoPageBreak(). + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto2.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto2.php new file mode 100644 index 00000000..cc7d51c7 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto2.php @@ -0,0 +1,41 @@ +Image('logo.png',10,6,30); + // Arial bold 15 + $this->SetFont('Arial','B',15); + // Move to the right + $this->Cell(80); + // Title + $this->Cell(30,10,'Title',1,0,'C'); + // Line break + $this->Ln(20); +} + +// Page footer +function Footer() +{ + // Position at 1.5 cm from bottom + $this->SetY(-15); + // Arial italic 8 + $this->SetFont('Arial','I',8); + // Page number + $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); +} +} + +// Instanciation of inherited class +$pdf = new PDF(); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetFont('Times','',12); +for($i=1;$i<=40;$i++) + $pdf->Cell(0,10,'Printing line number '.$i,0,1); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto3.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto3.htm new file mode 100644 index 00000000..fa583078 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto3.htm @@ -0,0 +1,115 @@ + + + + +Line breaks and colors + + + +

    Line breaks and colors

    +Let's continue with an example which prints justified paragraphs. It also illustrates the use +of colors. +
    +
    <?php
    +require('fpdf.php');
    +
    +class PDF extends FPDF
    +{
    +function Header()
    +{
    +    global $title;
    +
    +    // Arial bold 15
    +    $this->SetFont('Arial','B',15);
    +    // Calculate width of title and position
    +    $w = $this->GetStringWidth($title)+6;
    +    $this->SetX((210-$w)/2);
    +    // Colors of frame, background and text
    +    $this->SetDrawColor(0,80,180);
    +    $this->SetFillColor(230,230,0);
    +    $this->SetTextColor(220,50,50);
    +    // Thickness of frame (1 mm)
    +    $this->SetLineWidth(1);
    +    // Title
    +    $this->Cell($w,9,$title,1,1,'C',true);
    +    // Line break
    +    $this->Ln(10);
    +}
    +
    +function Footer()
    +{
    +    // Position at 1.5 cm from bottom
    +    $this->SetY(-15);
    +    // Arial italic 8
    +    $this->SetFont('Arial','I',8);
    +    // Text color in gray
    +    $this->SetTextColor(128);
    +    // Page number
    +    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
    +}
    +
    +function ChapterTitle($num, $label)
    +{
    +    // Arial 12
    +    $this->SetFont('Arial','',12);
    +    // Background color
    +    $this->SetFillColor(200,220,255);
    +    // Title
    +    $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true);
    +    // Line break
    +    $this->Ln(4);
    +}
    +
    +function ChapterBody($file)
    +{
    +    // Read text file
    +    $txt = file_get_contents($file);
    +    // Times 12
    +    $this->SetFont('Times','',12);
    +    // Output justified text
    +    $this->MultiCell(0,5,$txt);
    +    // Line break
    +    $this->Ln();
    +    // Mention in italics
    +    $this->SetFont('','I');
    +    $this->Cell(0,5,'(end of excerpt)');
    +}
    +
    +function PrintChapter($num, $title, $file)
    +{
    +    $this->AddPage();
    +    $this->ChapterTitle($num,$title);
    +    $this->ChapterBody($file);
    +}
    +}
    +
    +$pdf = new PDF();
    +$title = '20000 Leagues Under the Seas';
    +$pdf->SetTitle($title);
    +$pdf->SetAuthor('Jules Verne');
    +$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
    +$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    +The GetStringWidth() method allows to determine the length of a string in the current font, +which is used here to calculate the position and the width of the frame surrounding the title. +Then colors are set (via SetDrawColor(), SetFillColor() and SetTextColor()) and the +thickness of the line is set to 1 mm (instead of 0.2 by default) with SetLineWidth(). Finally, +we output the cell (the last parameter true indicates that the background must +be filled). +
    +
    +The method used to print the paragraphs is MultiCell(). Each time a line reaches the +right extremity of the cell or a carriage return character is met, a line break is issued +and a new cell automatically created under the current one. Text is justified by default. +
    +
    +Two document properties are defined: the title (SetTitle()) and the author (SetAuthor()). +There are several ways to view them in Adobe Reader. The first one is to open the file directly with +the reader, go to the File menu and choose the Properties option. The second one, also available from +the plug-in, is to right-click and select Document Properties. The third method is to type the Ctrl+D +key combination. + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto3.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto3.php new file mode 100644 index 00000000..eade51cf --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto3.php @@ -0,0 +1,81 @@ +SetFont('Arial','B',15); + // Calculate width of title and position + $w = $this->GetStringWidth($title)+6; + $this->SetX((210-$w)/2); + // Colors of frame, background and text + $this->SetDrawColor(0,80,180); + $this->SetFillColor(230,230,0); + $this->SetTextColor(220,50,50); + // Thickness of frame (1 mm) + $this->SetLineWidth(1); + // Title + $this->Cell($w,9,$title,1,1,'C',true); + // Line break + $this->Ln(10); +} + +function Footer() +{ + // Position at 1.5 cm from bottom + $this->SetY(-15); + // Arial italic 8 + $this->SetFont('Arial','I',8); + // Text color in gray + $this->SetTextColor(128); + // Page number + $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); +} + +function ChapterTitle($num, $label) +{ + // Arial 12 + $this->SetFont('Arial','',12); + // Background color + $this->SetFillColor(200,220,255); + // Title + $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); + // Line break + $this->Ln(4); +} + +function ChapterBody($file) +{ + // Read text file + $txt = file_get_contents($file); + // Times 12 + $this->SetFont('Times','',12); + // Output justified text + $this->MultiCell(0,5,$txt); + // Line break + $this->Ln(); + // Mention in italics + $this->SetFont('','I'); + $this->Cell(0,5,'(end of excerpt)'); +} + +function PrintChapter($num, $title, $file) +{ + $this->AddPage(); + $this->ChapterTitle($num,$title); + $this->ChapterBody($file); +} +} + +$pdf = new PDF(); +$title = '20000 Leagues Under the Seas'; +$pdf->SetTitle($title); +$pdf->SetAuthor('Jules Verne'); +$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); +$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto4.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto4.htm new file mode 100644 index 00000000..c4a4eb8e --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto4.htm @@ -0,0 +1,134 @@ + + + + +Multi-columns + + + +

    Multi-columns

    +This example is a variant of the previous one showing how to lay the text across multiple +columns. +
    +
    <?php
    +require('fpdf.php');
    +
    +class PDF extends FPDF
    +{
    +// Current column
    +var $col = 0;
    +// Ordinate of column start
    +var $y0;
    +
    +function Header()
    +{
    +    // Page header
    +    global $title;
    +
    +    $this->SetFont('Arial','B',15);
    +    $w = $this->GetStringWidth($title)+6;
    +    $this->SetX((210-$w)/2);
    +    $this->SetDrawColor(0,80,180);
    +    $this->SetFillColor(230,230,0);
    +    $this->SetTextColor(220,50,50);
    +    $this->SetLineWidth(1);
    +    $this->Cell($w,9,$title,1,1,'C',true);
    +    $this->Ln(10);
    +    // Save ordinate
    +    $this->y0 = $this->GetY();
    +}
    +
    +function Footer()
    +{
    +    // Page footer
    +    $this->SetY(-15);
    +    $this->SetFont('Arial','I',8);
    +    $this->SetTextColor(128);
    +    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
    +}
    +
    +function SetCol($col)
    +{
    +    // Set position at a given column
    +    $this->col = $col;
    +    $x = 10+$col*65;
    +    $this->SetLeftMargin($x);
    +    $this->SetX($x);
    +}
    +
    +function AcceptPageBreak()
    +{
    +    // Method accepting or not automatic page break
    +    if($this->col<2)
    +    {
    +        // Go to next column
    +        $this->SetCol($this->col+1);
    +        // Set ordinate to top
    +        $this->SetY($this->y0);
    +        // Keep on page
    +        return false;
    +    }
    +    else
    +    {
    +        // Go back to first column
    +        $this->SetCol(0);
    +        // Page break
    +        return true;
    +    }
    +}
    +
    +function ChapterTitle($num, $label)
    +{
    +    // Title
    +    $this->SetFont('Arial','',12);
    +    $this->SetFillColor(200,220,255);
    +    $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true);
    +    $this->Ln(4);
    +    // Save ordinate
    +    $this->y0 = $this->GetY();
    +}
    +
    +function ChapterBody($file)
    +{
    +    // Read text file
    +    $txt = file_get_contents($file);
    +    // Font
    +    $this->SetFont('Times','',12);
    +    // Output text in a 6 cm width column
    +    $this->MultiCell(60,5,$txt);
    +    $this->Ln();
    +    // Mention
    +    $this->SetFont('','I');
    +    $this->Cell(0,5,'(end of excerpt)');
    +    // Go back to first column
    +    $this->SetCol(0);
    +}
    +
    +function PrintChapter($num, $title, $file)
    +{
    +    // Add chapter
    +    $this->AddPage();
    +    $this->ChapterTitle($num,$title);
    +    $this->ChapterBody($file);
    +}
    +}
    +
    +$pdf = new PDF();
    +$title = '20000 Leagues Under the Seas';
    +$pdf->SetTitle($title);
    +$pdf->SetAuthor('Jules Verne');
    +$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
    +$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    +The key method used is AcceptPageBreak(). It allows to accept or not an automatic page +break. By refusing it and altering the margin and current position, the desired column layout +is achieved. +
    +For the rest, not many changes; two properties have been added to the class to save the current +column number and the position where columns begin, and the MultiCell() call specifies a +6 centimeter width. + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto4.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto4.php new file mode 100644 index 00000000..360d2375 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto4.php @@ -0,0 +1,111 @@ +SetFont('Arial','B',15); + $w = $this->GetStringWidth($title)+6; + $this->SetX((210-$w)/2); + $this->SetDrawColor(0,80,180); + $this->SetFillColor(230,230,0); + $this->SetTextColor(220,50,50); + $this->SetLineWidth(1); + $this->Cell($w,9,$title,1,1,'C',true); + $this->Ln(10); + // Save ordinate + $this->y0 = $this->GetY(); +} + +function Footer() +{ + // Page footer + $this->SetY(-15); + $this->SetFont('Arial','I',8); + $this->SetTextColor(128); + $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); +} + +function SetCol($col) +{ + // Set position at a given column + $this->col = $col; + $x = 10+$col*65; + $this->SetLeftMargin($x); + $this->SetX($x); +} + +function AcceptPageBreak() +{ + // Method accepting or not automatic page break + if($this->col<2) + { + // Go to next column + $this->SetCol($this->col+1); + // Set ordinate to top + $this->SetY($this->y0); + // Keep on page + return false; + } + else + { + // Go back to first column + $this->SetCol(0); + // Page break + return true; + } +} + +function ChapterTitle($num, $label) +{ + // Title + $this->SetFont('Arial','',12); + $this->SetFillColor(200,220,255); + $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); + $this->Ln(4); + // Save ordinate + $this->y0 = $this->GetY(); +} + +function ChapterBody($file) +{ + // Read text file + $txt = file_get_contents($file); + // Font + $this->SetFont('Times','',12); + // Output text in a 6 cm width column + $this->MultiCell(60,5,$txt); + $this->Ln(); + // Mention + $this->SetFont('','I'); + $this->Cell(0,5,'(end of excerpt)'); + // Go back to first column + $this->SetCol(0); +} + +function PrintChapter($num, $title, $file) +{ + // Add chapter + $this->AddPage(); + $this->ChapterTitle($num,$title); + $this->ChapterBody($file); +} +} + +$pdf = new PDF(); +$title = '20000 Leagues Under the Seas'; +$pdf->SetTitle($title); +$pdf->SetAuthor('Jules Verne'); +$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); +$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto5.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto5.htm new file mode 100644 index 00000000..03fdd543 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto5.htm @@ -0,0 +1,134 @@ + + + + +Tables + + + +

    Tables

    +This tutorial shows different ways to make tables. +
    +
    <?php
    +require('fpdf.php');
    +
    +class PDF extends FPDF
    +{
    +// Load data
    +function LoadData($file)
    +{
    +    // Read file lines
    +    $lines = file($file);
    +    $data = array();
    +    foreach($lines as $line)
    +        $data[] = explode(';',trim($line));
    +    return $data;
    +}
    +
    +// Simple table
    +function BasicTable($header, $data)
    +{
    +    // Header
    +    foreach($header as $col)
    +        $this->Cell(40,7,$col,1);
    +    $this->Ln();
    +    // Data
    +    foreach($data as $row)
    +    {
    +        foreach($row as $col)
    +            $this->Cell(40,6,$col,1);
    +        $this->Ln();
    +    }
    +}
    +
    +// Better table
    +function ImprovedTable($header, $data)
    +{
    +    // Column widths
    +    $w = array(40, 35, 40, 45);
    +    // Header
    +    for($i=0;$i<count($header);$i++)
    +        $this->Cell($w[$i],7,$header[$i],1,0,'C');
    +    $this->Ln();
    +    // Data
    +    foreach($data as $row)
    +    {
    +        $this->Cell($w[0],6,$row[0],'LR');
    +        $this->Cell($w[1],6,$row[1],'LR');
    +        $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');
    +        $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');
    +        $this->Ln();
    +    }
    +    // Closing line
    +    $this->Cell(array_sum($w),0,'','T');
    +}
    +
    +// Colored table
    +function FancyTable($header, $data)
    +{
    +    // Colors, line width and bold font
    +    $this->SetFillColor(255,0,0);
    +    $this->SetTextColor(255);
    +    $this->SetDrawColor(128,0,0);
    +    $this->SetLineWidth(.3);
    +    $this->SetFont('','B');
    +    // Header
    +    $w = array(40, 35, 40, 45);
    +    for($i=0;$i<count($header);$i++)
    +        $this->Cell($w[$i],7,$header[$i],1,0,'C',true);
    +    $this->Ln();
    +    // Color and font restoration
    +    $this->SetFillColor(224,235,255);
    +    $this->SetTextColor(0);
    +    $this->SetFont('');
    +    // Data
    +    $fill = false;
    +    foreach($data as $row)
    +    {
    +        $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
    +        $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
    +        $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
    +        $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
    +        $this->Ln();
    +        $fill = !$fill;
    +    }
    +    // Closing line
    +    $this->Cell(array_sum($w),0,'','T');
    +}
    +}
    +
    +$pdf = new PDF();
    +// Column headings
    +$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)');
    +// Data loading
    +$data = $pdf->LoadData('countries.txt');
    +$pdf->SetFont('Arial','',14);
    +$pdf->AddPage();
    +$pdf->BasicTable($header,$data);
    +$pdf->AddPage();
    +$pdf->ImprovedTable($header,$data);
    +$pdf->AddPage();
    +$pdf->FancyTable($header,$data);
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    +A table being just a collection of cells, it's natural to build one from them. The first +example is achieved in the most basic way possible: simple framed cells, all of the same size +and left aligned. The result is rudimentary but very quick to obtain. +
    +
    +The second table brings some improvements: each column has its own width, headings are centered, +and numbers right aligned. Moreover, horizontal lines have been removed. This is done by means +of the border parameter of the Cell() method, which specifies which sides of the +cell must be drawn. Here we want the left (L) and right (R) ones. It remains +the problem of the horizontal line to finish the table. There are two possibilities: either +check for the last line in the loop, in which case we use LRB for the border +parameter; or, as done here, add the line once the loop is over. +
    +
    +The third table is similar to the second one but uses colors. Fill, text and line colors are +simply specified. Alternate coloring for rows is obtained by using alternatively transparent +and filled cells. + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto5.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto5.php new file mode 100644 index 00000000..f1b64a21 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto5.php @@ -0,0 +1,102 @@ +Cell(40,7,$col,1); + $this->Ln(); + // Data + foreach($data as $row) + { + foreach($row as $col) + $this->Cell(40,6,$col,1); + $this->Ln(); + } +} + +// Better table +function ImprovedTable($header, $data) +{ + // Column widths + $w = array(40, 35, 40, 45); + // Header + for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C'); + $this->Ln(); + // Data + foreach($data as $row) + { + $this->Cell($w[0],6,$row[0],'LR'); + $this->Cell($w[1],6,$row[1],'LR'); + $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R'); + $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R'); + $this->Ln(); + } + // Closing line + $this->Cell(array_sum($w),0,'','T'); +} + +// Colored table +function FancyTable($header, $data) +{ + // Colors, line width and bold font + $this->SetFillColor(255,0,0); + $this->SetTextColor(255); + $this->SetDrawColor(128,0,0); + $this->SetLineWidth(.3); + $this->SetFont('','B'); + // Header + $w = array(40, 35, 40, 45); + for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C',true); + $this->Ln(); + // Color and font restoration + $this->SetFillColor(224,235,255); + $this->SetTextColor(0); + $this->SetFont(''); + // Data + $fill = false; + foreach($data as $row) + { + $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill); + $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill); + $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill); + $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill); + $this->Ln(); + $fill = !$fill; + } + // Closing line + $this->Cell(array_sum($w),0,'','T'); +} +} + +$pdf = new PDF(); +// Column headings +$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)'); +// Data loading +$data = $pdf->LoadData('countries.txt'); +$pdf->SetFont('Arial','',14); +$pdf->AddPage(); +$pdf->BasicTable($header,$data); +$pdf->AddPage(); +$pdf->ImprovedTable($header,$data); +$pdf->AddPage(); +$pdf->FancyTable($header,$data); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto6.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto6.htm new file mode 100644 index 00000000..2b98d201 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto6.htm @@ -0,0 +1,165 @@ + + + + +Links and flowing text + + + +

    Links and flowing text

    +This tutorial explains how to insert links (internal and external) and shows a new text writing +mode. It also contains a basic HTML parser. +
    +
    <?php
    +require('fpdf.php');
    +
    +class PDF extends FPDF
    +{
    +var $B;
    +var $I;
    +var $U;
    +var $HREF;
    +
    +function PDF($orientation='P', $unit='mm', $size='A4')
    +{
    +    // Call parent constructor
    +    $this->FPDF($orientation,$unit,$size);
    +    // Initialization
    +    $this->B = 0;
    +    $this->I = 0;
    +    $this->U = 0;
    +    $this->HREF = '';
    +}
    +
    +function WriteHTML($html)
    +{
    +    // HTML parser
    +    $html = str_replace("\n",' ',$html);
    +    $a = preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
    +    foreach($a as $i=>$e)
    +    {
    +        if($i%2==0)
    +        {
    +            // Text
    +            if($this->HREF)
    +                $this->PutLink($this->HREF,$e);
    +            else
    +                $this->Write(5,$e);
    +        }
    +        else
    +        {
    +            // Tag
    +            if($e[0]=='/')
    +                $this->CloseTag(strtoupper(substr($e,1)));
    +            else
    +            {
    +                // Extract attributes
    +                $a2 = explode(' ',$e);
    +                $tag = strtoupper(array_shift($a2));
    +                $attr = array();
    +                foreach($a2 as $v)
    +                {
    +                    if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3))
    +                        $attr[strtoupper($a3[1])] = $a3[2];
    +                }
    +                $this->OpenTag($tag,$attr);
    +            }
    +        }
    +    }
    +}
    +
    +function OpenTag($tag, $attr)
    +{
    +    // Opening tag
    +    if($tag=='B' || $tag=='I' || $tag=='U')
    +        $this->SetStyle($tag,true);
    +    if($tag=='A')
    +        $this->HREF = $attr['HREF'];
    +    if($tag=='BR')
    +        $this->Ln(5);
    +}
    +
    +function CloseTag($tag)
    +{
    +    // Closing tag
    +    if($tag=='B' || $tag=='I' || $tag=='U')
    +        $this->SetStyle($tag,false);
    +    if($tag=='A')
    +        $this->HREF = '';
    +}
    +
    +function SetStyle($tag, $enable)
    +{
    +    // Modify style and select corresponding font
    +    $this->$tag += ($enable ? 1 : -1);
    +    $style = '';
    +    foreach(array('B', 'I', 'U') as $s)
    +    {
    +        if($this->$s>0)
    +            $style .= $s;
    +    }
    +    $this->SetFont('',$style);
    +}
    +
    +function PutLink($URL, $txt)
    +{
    +    // Put a hyperlink
    +    $this->SetTextColor(0,0,255);
    +    $this->SetStyle('U',true);
    +    $this->Write(5,$txt,$URL);
    +    $this->SetStyle('U',false);
    +    $this->SetTextColor(0);
    +}
    +}
    +
    +$html = 'You can now easily print text mixing different styles: <b>bold</b>, <i>italic</i>,
    +<u>underlined</u>, or <b><i><u>all at once</u></i></b>!<br><br>You can also insert links on
    +text, such as <a href="http://www.fpdf.org">www.fpdf.org</a>, or on an image: click on the logo.';
    +
    +$pdf = new PDF();
    +// First page
    +$pdf->AddPage();
    +$pdf->SetFont('Arial','',20);
    +$pdf->Write(5,"To find out what's new in this tutorial, click ");
    +$pdf->SetFont('','U');
    +$link = $pdf->AddLink();
    +$pdf->Write(5,'here',$link);
    +$pdf->SetFont('');
    +// Second page
    +$pdf->AddPage();
    +$pdf->SetLink($link);
    +$pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org');
    +$pdf->SetLeftMargin(45);
    +$pdf->SetFontSize(14);
    +$pdf->WriteHTML($html);
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    +The new method to print text is Write(). It's very close to MultiCell(); the differences are: +
      +
    • The end of line is at the right margin and the next line begins at the left one
    • +
    • The current position moves at the end of the text
    • +
    +So it allows to write a chunk of text, alter the font style, then continue from the exact +place we left it. On the other hand, you cannot justify it. +
    +
    +The method is used on the first page to put a link pointing to the second one. The beginning of +the sentence is written in regular style, then we switch to underline and finish it. The link +is created with AddLink(), which returns a link identifier. The identifier is +passed as third parameter of Write(). Once the second page is created, we use SetLink() to +make the link point to the beginning of the current page. +
    +
    +Then we put an image with an external link on it. An external link is just a URL. It's passed as +last parameter of Image(). +
    +
    +Finally, the left margin is moved after the image with SetLeftMargin() and some text in +HTML format is output. A very simple HTML parser is used for this, based on regular expressions. +Recognized tags are <b>, <i>, <u>, <a> and <br>; the others are +ignored. The parser also makes use of the Write() method. An external link is put the same way as +an internal one (third parameter of Write()). Note that Cell() also allows to put links. + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto6.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto6.php new file mode 100644 index 00000000..88fdd513 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto6.php @@ -0,0 +1,124 @@ +FPDF($orientation,$unit,$size); + // Initialization + $this->B = 0; + $this->I = 0; + $this->U = 0; + $this->HREF = ''; +} + +function WriteHTML($html) +{ + // HTML parser + $html = str_replace("\n",' ',$html); + $a = preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE); + foreach($a as $i=>$e) + { + if($i%2==0) + { + // Text + if($this->HREF) + $this->PutLink($this->HREF,$e); + else + $this->Write(5,$e); + } + else + { + // Tag + if($e[0]=='/') + $this->CloseTag(strtoupper(substr($e,1))); + else + { + // Extract attributes + $a2 = explode(' ',$e); + $tag = strtoupper(array_shift($a2)); + $attr = array(); + foreach($a2 as $v) + { + if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3)) + $attr[strtoupper($a3[1])] = $a3[2]; + } + $this->OpenTag($tag,$attr); + } + } + } +} + +function OpenTag($tag, $attr) +{ + // Opening tag + if($tag=='B' || $tag=='I' || $tag=='U') + $this->SetStyle($tag,true); + if($tag=='A') + $this->HREF = $attr['HREF']; + if($tag=='BR') + $this->Ln(5); +} + +function CloseTag($tag) +{ + // Closing tag + if($tag=='B' || $tag=='I' || $tag=='U') + $this->SetStyle($tag,false); + if($tag=='A') + $this->HREF = ''; +} + +function SetStyle($tag, $enable) +{ + // Modify style and select corresponding font + $this->$tag += ($enable ? 1 : -1); + $style = ''; + foreach(array('B', 'I', 'U') as $s) + { + if($this->$s>0) + $style .= $s; + } + $this->SetFont('',$style); +} + +function PutLink($URL, $txt) +{ + // Put a hyperlink + $this->SetTextColor(0,0,255); + $this->SetStyle('U',true); + $this->Write(5,$txt,$URL); + $this->SetStyle('U',false); + $this->SetTextColor(0); +} +} + +$html = 'You can now easily print text mixing different styles: bold, italic, +underlined, or all at once!

    You can also insert links on +text, such as www.fpdf.org, or on an image: click on the logo.'; + +$pdf = new PDF(); +// First page +$pdf->AddPage(); +$pdf->SetFont('Arial','',20); +$pdf->Write(5,"To find out what's new in this tutorial, click "); +$pdf->SetFont('','U'); +$link = $pdf->AddLink(); +$pdf->Write(5,'here',$link); +$pdf->SetFont(''); +// Second page +$pdf->AddPage(); +$pdf->SetLink($link); +$pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org'); +$pdf->SetLeftMargin(45); +$pdf->SetFontSize(14); +$pdf->WriteHTML($html); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto7.htm b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto7.htm new file mode 100644 index 00000000..21a3f6ed --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto7.htm @@ -0,0 +1,241 @@ + + + + +Adding new fonts and encoding support + + + + +

    Adding new fonts and encoding support

    +This tutorial explains how to use TrueType, OpenType and Type1 fonts so that you are not limited to +the standard fonts any more. The other benefit is that you can choose the font encoding, which allows +you to use other languages than the Western ones (the standard fonts having too few available characters). +
    +
    +Remark: for OpenType, only the format based on TrueType is supported (not the one based on Type1). +
    +
    +There are two ways to use a new font: embedding it in the PDF or not. When a font is not +embedded, it is searched in the system. The advantage is that the PDF file is lighter; on the other +hand, if it's not available, a substitution font is used. So it's preferable to ensure that the +needed font is installed on the client systems. If the file is to be viewed by a large audience, +it's highly recommended to embed. +
    +
    +Adding a new font requires two steps: +
      +
    • Generation of the font definition file
    • +
    • Declaration of the font in the script
    • +
    +For Type1, you need the corresponding AFM file. It's usually provided with the font. + +

    Generation of the font definition file

    +The first step consists in generating a PHP file containing all the information needed by FPDF; +in addition, the font file is compressed. To do this, a helper script is provided in the makefont +directory of the package: makefont.php. It contains the following function: +
    +
    +MakeFont(string fontfile, [, string enc [, boolean embed]]) +
    +
    fontfile
    +
    +

    Path to the .ttf, .otf or .pfb file.

    +
    +
    enc
    +
    +

    Name of the encoding to use. Default value: cp1252.

    +
    +
    embed
    +
    +

    Whether to embed the font or not. Default value: true.

    +
    +
    +The first parameter is the name of the font file. The extension must be either .ttf, .otf or .pfb and +determines the font type. If your Type1 font is in ASCII format (.pfa), you can convert it to binary +(.pfb) with the help of t1utils. +
    +
    +For Type1 fonts, the corresponding .afm file must be present in the same directory. +
    +
    +The encoding defines the association between a code (from 0 to 255) and a character. The first 128 are +always the same and correspond to ASCII; the following are variable. Encodings are stored in .map +files. The available ones are: +
      +
    • cp1250 (Central Europe)
    • +
    • cp1251 (Cyrillic)
    • +
    • cp1252 (Western Europe)
    • +
    • cp1253 (Greek)
    • +
    • cp1254 (Turkish)
    • +
    • cp1255 (Hebrew)
    • +
    • cp1257 (Baltic)
    • +
    • cp1258 (Vietnamese)
    • +
    • cp874 (Thai)
    • +
    • ISO-8859-1 (Western Europe)
    • +
    • ISO-8859-2 (Central Europe)
    • +
    • ISO-8859-4 (Baltic)
    • +
    • ISO-8859-5 (Cyrillic)
    • +
    • ISO-8859-7 (Greek)
    • +
    • ISO-8859-9 (Turkish)
    • +
    • ISO-8859-11 (Thai)
    • +
    • ISO-8859-15 (Western Europe)
    • +
    • ISO-8859-16 (Central Europe)
    • +
    • KOI8-R (Russian)
    • +
    • KOI8-U (Ukrainian)
    • +
    +Of course, the font must contain the characters corresponding to the chosen encoding. +
    +
    +Remark: the standard fonts use cp1252. +
    +
    +After you have called the function (create a new file for this and include makefont.php), a .php file +is created, with the same name as the font file. You may rename it if you wish. If the case of embedding, +the font file is compressed and gives a second file with .z as extension (except if the compression +function is not available, it requires Zlib). You may rename it too, but in this case you have to change +the variable $file in the .php file accordingly. +
    +
    +Example: +
    +
    <?php
    +require('makefont/makefont.php');
    +
    +MakeFont('c:\\Windows\\Fonts\\comic.ttf','cp1252');
    +?>
    +
    +which gives the files comic.php and comic.z. +
    +
    +Then copy the generated files to the font directory. If the font file could not be compressed, copy +it directly instead of the .z version. +
    +
    +Another way to call MakeFont() is through the command line: +
    +
    +php makefont\makefont.php c:\Windows\Fonts\comic.ttf cp1252 +
    +
    +Finally, for TrueType and OpenType fonts, you can also generate the files +online instead of doing it manually. + +

    Declaration of the font in the script

    +The second step is simple. You just need to call the AddFont() method: +
    +
    $pdf->AddFont('Comic','','comic.php');
    +
    +
    +And the font is now available (in regular and underlined styles), usable like the others. If we +had worked with Comic Sans MS Bold (comicbd.ttf), we would have written: +
    +
    $pdf->AddFont('Comic','B','comicbd.php');
    +
    +
    + +

    Example

    +Let's now see a complete example. We will use the font Calligrapher. +The first step is the generation of the font files: +
    +
    <?php
    +require('makefont/makefont.php');
    +
    +MakeFont('calligra.ttf','cp1252');
    +?>
    +
    +The script gives the following report: +
    +
    +Warning: character Euro is missing
    +Warning: character zcaron is missing
    +Font file compressed: calligra.z
    +Font definition file generated: calligra.php
    +
    +The euro character is not present in the font (it's too old). Another character is missing too. +
    +
    +Alternatively we could have used the command line: +
    +
    +php makefont\makefont.php calligra.ttf cp1252 +
    +
    +or used the online generator. +
    +
    +We can now copy the two generated files to the font directory and write the script: +
    +
    <?php
    +require('fpdf.php');
    +
    +$pdf = new FPDF();
    +$pdf->AddFont('Calligrapher','','calligra.php');
    +$pdf->AddPage();
    +$pdf->SetFont('Calligrapher','',35);
    +$pdf->Write(10,'Enjoy new fonts with FPDF!');
    +$pdf->Output();
    +?>
    +
    +

    [Demo]

    + +

    About the euro symbol

    +The euro character is not present in all encodings, and is not always placed at the same position: + + + + + + + + + + + + + + + + + + + + + + +
    EncodingPosition
    cp1250128
    cp1251136
    cp1252128
    cp1253128
    cp1254128
    cp1255128
    cp1257128
    cp1258128
    cp874128
    ISO-8859-1N/A
    ISO-8859-2N/A
    ISO-8859-4N/A
    ISO-8859-5N/A
    ISO-8859-7N/A
    ISO-8859-9N/A
    ISO-8859-11N/A
    ISO-8859-15164
    ISO-8859-16164
    KOI8-RN/A
    KOI8-UN/A
    +ISO-8859-1 is widespread but does not include the euro sign. If you need it, the simplest thing +to do is to use cp1252 or ISO-8859-15 instead, which are nearly identical but contain the precious +symbol. + +

    Reducing the size of TrueType fonts

    +Font files are often quite voluminous; this is due to the fact that they contain the characters +corresponding to many encodings. Zlib compression reduces them but they remain fairly big. A +technique exists to reduce them further. It consists in converting the font to the Type1 format +with ttf2pt1 (the Windows binary is +available here) while specifying the encoding +you are interested in; all other characters will be discarded. +
    +For example, the arial.ttf font that ships with Windows Vista weights 748 KB (it contains 3381 characters). +After compression it drops to 411. Let's convert it to Type1 by keeping only cp1250 characters: +
    +
    +ttf2pt1 -b -L cp1250.map c:\Windows\Fonts\arial.ttf arial +
    +
    +The .map files are located in the makefont directory of the package. The command produces +arial.pfb and arial.afm. The arial.pfb file weights only 57 KB, and 53 after compression. +
    +
    +It's possible to go even further. If you are interested only by a subset of the encoding (you +probably don't need all 217 characters), you can open the .map file and remove the lines you are +not interested in. This will reduce the file size accordingly. + + diff --git a/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto7.php b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto7.php new file mode 100644 index 00000000..d1127f37 --- /dev/null +++ b/3.0/modules/proofsheet/lib/fpdf/tutorial/tuto7.php @@ -0,0 +1,11 @@ +AddFont('Calligrapher','','calligra.php'); +$pdf->AddPage(); +$pdf->SetFont('Calligrapher','',35); +$pdf->Cell(0,10,'Enjoy new fonts with FPDF!'); +$pdf->Output(); +?> diff --git a/3.0/modules/proofsheet/module.info b/3.0/modules/proofsheet/module.info new file mode 100644 index 00000000..fec62944 --- /dev/null +++ b/3.0/modules/proofsheet/module.info @@ -0,0 +1,7 @@ +name = "ProofSheet" +description = "Displays links to generate a PDF proof sheet of the current album in A4 or LTR size." +version = 5 +author_name = "Shad Laws" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:proofsheet" +discuss_url = "http://gallery.menalto.com/node/105856" diff --git a/3.0/modules/purifier/config/purifier.php b/3.0/modules/purifier/config/purifier.php index 7d47787f..ec89ee3b 100644 --- a/3.0/modules/purifier/config/purifier.php +++ b/3.0/modules/purifier/config/purifier.php @@ -1,7 +1,7 @@ where("owner_id", "=", $item->owner_id)->find(); $record->add_item($item); } + + static function show_user_profile($data) { + // Display # of albums and photos/movies on user profile page. + // Also display current disc usage. + $v = new View("user_profile_quotas.html"); + $quotas_record = ORM::factory("users_space_usage")->where("owner_id", "=", $data->user->id)->find(); + + $v->user_profile_data = array(); + $v->user_profile_data[(string) t("Albums")] = db::build()->from("items")->where("type", "=", "album")->where("owner_id", "=", $data->user->id)->count_records(); + $v->user_profile_data[(string) t("Uploads")] = db::build()->from("items")->where("type", "!=", "album")->where("owner_id", "=", $data->user->id)->count_records(); + $v->user_profile_data[(string) t("Disc Usage")] = $quotas_record->total_usage_string(); + + $data->content[] = (object) array("title" => t("User stats"), "view" => $v); + } } diff --git a/3.0/modules/quotas/helpers/quotas_installer.php b/3.0/modules/quotas/helpers/quotas_installer.php index 6eb46f4a..9e6320ca 100644 --- a/3.0/modules/quotas/helpers/quotas_installer.php +++ b/3.0/modules/quotas/helpers/quotas_installer.php @@ -1,7 +1,7 @@ guest) { $record = ORM::factory("users_space_usage")->where("owner_id", "=", identity::active_user()->id)->find(); if ($record->get_usage_limit() == 0) { - print t("You are using %usage MB", array("usage" => number_format($record->total_usage_mb(), 2))); + print t("You are using %usage", array("usage" => $record->total_usage_string())); } else { - print t("You are using %usage of your %limit MB limit (%percentage%)", - array("usage" => number_format($record->current_usage_mb(), 2), - "limit" => number_format($record->get_usage_limit_mb(), 2), + print t("You are using %usage of your %limit limit (%percentage%)", + array("usage" => $record->current_usage_string(), + "limit" => $record->get_usage_limit_string(), "percentage" => number_format((($record->current_usage() / $record->get_usage_limit()) * 100), 2))); } } diff --git a/3.0/modules/quotas/models/groups_quota.php b/3.0/modules/quotas/models/groups_quota.php index 25af34e1..d295026b 100644 --- a/3.0/modules/quotas/models/groups_quota.php +++ b/3.0/modules/quotas/models/groups_quota.php @@ -1,7 +1,7 @@ = 1024) { + $bytes = $bytes / 1024; + $unit_counter++; + } + + return (number_format($bytes, 2) . " " . $usage_unit[$unit_counter]); + } + + public function partial_usage_string($file_type) { + // Return a string for the user's total usage in fullsizes, resizes, or thumbs + // with the appropriate file size prefix. // $file_type should be either fullsize, resize, or thumb. - return ($this->$file_type / 1024 / 1024); + return (Users_Space_Usage_Model_Core::_format_usage($this->$file_type)); } public function total_usage() { @@ -29,9 +41,9 @@ class Users_Space_Usage_Model_Core extends ORM { return ($this->fullsize + $this->resize + $this->thumb); } - public function total_usage_mb() { - // Return the user's total usage in megabytes. - return (($this->total_usage()) / 1024 / 1024); + public function total_usage_string() { + // Return the user's total usage as a string with the appropriate file size prefix. + return (Users_Space_Usage_Model_Core::_format_usage($this->total_usage())); } public function current_usage() { @@ -43,9 +55,10 @@ class Users_Space_Usage_Model_Core extends ORM { } } - public function current_usage_mb() { - // Return the users relevant usage in megabytes based on the use_all_sizes setting. - return ($this->current_usage() / 1024 / 1024); + public function current_usage_string() { + // Return the users relevant usage as a string with the appropriate file size prefix + // based on the use_all_sizes setting. + return (Users_Space_Usage_Model_Core::_format_usage($this->current_usage())); } public function get_usage_limit() { @@ -68,9 +81,15 @@ class Users_Space_Usage_Model_Core extends ORM { return 0; } - public function get_usage_limit_mb() { - // Returns a user's maximum limit in megabytes. - return ($this->get_usage_limit() / 1024 / 1024); + public function get_usage_limit_string() { + // Returns a user's maximum limit as a string with the appropriate file size prefix + // or an infinity symbol if the user has no limit. + $user_limit = $this->get_usage_limit(); + if ($user_limit == 0) { + return "∞"; + } else { + return (Users_Space_Usage_Model_Core::_format_usage($this->get_usage_limit())); + } } public function add_item($item) { diff --git a/3.0/modules/quotas/views/admin_quotas.html.php b/3.0/modules/quotas/views/admin_quotas.html.php index e1f63763..d3886653 100644 --- a/3.0/modules/quotas/views/admin_quotas.html.php +++ b/3.0/modules/quotas/views/admin_quotas.html.php @@ -34,19 +34,19 @@ full_name) ?> - partial_usage_mb("fullsize"), 2); ?> MB + partial_usage_string("fullsize"); ?> - partial_usage_mb("resize"), 2); ?> MB + partial_usage_string("resize"); ?> - partial_usage_mb("thumb"), 2); ?> MB + partial_usage_string("thumb"); ?> - total_usage_mb(), 2) ?> MB + total_usage_string(); ?> - get_usage_limit_mb(), 2) ?> MB + get_usage_limit_string(); ?> diff --git a/3.0/modules/quotas/views/user_profile_quotas.html.php b/3.0/modules/quotas/views/user_profile_quotas.html.php new file mode 100644 index 00000000..e559abda --- /dev/null +++ b/3.0/modules/quotas/views/user_profile_quotas.html.php @@ -0,0 +1,9 @@ + + + $value): ?> + + + + + +
    diff --git a/3.0/modules/rectangle_thumbs/helpers/rectangle_thumbs_graphics.php b/3.0/modules/rectangle_thumbs/helpers/rectangle_thumbs_graphics.php index fc431b46..86a371ab 100644 --- a/3.0/modules/rectangle_thumbs/helpers/rectangle_thumbs_graphics.php +++ b/3.0/modules/rectangle_thumbs/helpers/rectangle_thumbs_graphics.php @@ -1,7 +1,7 @@ item->is_album()) { + // Calculate file size. + $filesize_unit = array("B","kB","MB","GB","TB","PB","EB","ZB","YB"); + $item_filesize = filesize($theme->item->file_path()); + $unit_counter = 0; + while ($item_filesize >= 1024) { + $item_filesize = $item_filesize / 1024; + $unit_counter++; + } + $item_filesize = number_format($item_filesize, 2) . " " . $filesize_unit[$unit_counter]; + $info["file_size"] = array( + "label" => t("File size:"), + "value" => $item_filesize + ); + + // Display photo/video resolution. + $info["file_resolution"] = array( + "label" => t("Resolution:"), + "value" => $theme->item->width . " x " . $theme->item->height . " " . t("pixels") + ); + } + //if ($theme->item->captured && module::get_var("rwinfo", "show_captured")) { // $info["captured"] = array( // "label" => t("Captured:"), @@ -94,11 +116,19 @@ class rwinfo_block_Core { if ($theme->item->owner && module::get_var("rwinfo", "show_owner")) { $display_name = $theme->item->owner->display_name(); - if ($theme->item->owner->url) { + + // rWatcher Edit: Display profile instead of web site, if viewable. + $str_owner_url = $theme->item->owner->url; + if (rwinfo_block_Core::_can_view_profile_pages(identity::lookup_user($theme->item->owner->id))) { + $str_owner_url = user_profile::url($theme->item->owner->id); + } + // rWatcher End Edit + + if ($str_owner_url) { //rW Edit $str_owner_url. $info["owner"] = array( "label" => t("Owner:"), - "value" => "item->owner->url}\">" . - html::clean($display_name) . "" + "value" => "" . + html::clean($display_name) . "" //rW Edit $str_owner_url. ); } else { $info["owner"] = array( @@ -115,4 +145,31 @@ class rwinfo_block_Core { } return $block; } + + // This came from modules/gallery/controllers/user_profile.php. + static private function _can_view_profile_pages($user) { + if (!$user->loaded()) { + return false; + } + + if ($user->id == identity::active_user()->id) { + // You can always view your own profile + return true; + } + + switch (module::get_var("gallery", "show_user_profiles_to")) { + case "admin_users": + return identity::active_user()->admin; + + case "registered_users": + return !identity::active_user()->guest; + + case "everybody": + return true; + + default: + // Fail in private mode on an invalid setting + return false; + } + } } \ No newline at end of file diff --git a/3.0/modules/rwinfo/helpers/rwinfo_installer.php b/3.0/modules/rwinfo/helpers/rwinfo_installer.php index ca8b429d..dd9eee4d 100644 --- a/3.0/modules/rwinfo/helpers/rwinfo_installer.php +++ b/3.0/modules/rwinfo/helpers/rwinfo_installer.php @@ -1,7 +1,7 @@ owner) { + // rWatcher Edit: Display profile instead of web site, if viewable. + $str_owner_url = $item->owner->url; + if (rwinfo_theme_Core::_can_view_profile_pages(identity::lookup_user($item->owner->id))) { + $str_owner_url = user_profile::url($item->owner->id); + } + // rWatcher End Edit + $results .= "
  • "; - if ($item->owner->url) { + if ($str_owner_url) { //rW Edit str_owner_url $results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name(), - "owner_url" => $item->owner->url)); + "owner_url" => $str_owner_url)); // rW Edit str_owner_url } else { $results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name())); } @@ -57,4 +65,31 @@ class rwinfo_theme_Core { } return $results; } + + // This came from modules/gallery/controllers/user_profile.php. + static private function _can_view_profile_pages($user) { + if (!$user->loaded()) { + return false; + } + + if ($user->id == identity::active_user()->id) { + // You can always view your own profile + return true; + } + + switch (module::get_var("gallery", "show_user_profiles_to")) { + case "admin_users": + return identity::active_user()->admin; + + case "registered_users": + return !identity::active_user()->guest; + + case "everybody": + return true; + + default: + // Fail in private mode on an invalid setting + return false; + } + } } \ No newline at end of file diff --git a/3.0/modules/scheduler/config/routes.php b/3.0/modules/scheduler/config/routes.php index 2cda2992..3e1c00c4 100644 --- a/3.0/modules/scheduler/config/routes.php +++ b/3.0/modules/scheduler/config/routes.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/contactowner/helpers/contactowner_event.php b/3.0/modules/session_explorer/helpers/session_explorer_event.php similarity index 78% rename from 3.1/modules/contactowner/helpers/contactowner_event.php rename to 3.0/modules/session_explorer/helpers/session_explorer_event.php index 7c527155..ef305e39 100644 --- a/3.1/modules/contactowner/helpers/contactowner_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("contactowner") - ->label(t("ContactOwner Settings")) - ->url(url::site("admin/contactowner"))); + ->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 @@ page_title = t("Short search fix settings"); + $view->content = new View("admin_short_search_fix.html"); + $view->content->form = $this->_get_admin_form(); + print $view; + } + + public function save() { + access::verify_csrf(); + $form = $this->_get_admin_form(); + $form->validate(); + module::set_var("short_search_fix", "search_prefix", + $form->short_search_fix_settings->search_prefix->value); + message::success(t("Short search fix settings updated")); + if ($form->short_search_fix_settings->mark_rebuild_search_records->value) { + $db = Database::instance(); + $db->query("UPDATE {search_records} SET dirty=1;"); + } + if ($form->short_search_fix_settings->mark_uptodate_search_records->value) { + $db = Database::instance(); + $db->query("UPDATE {search_records} SET dirty=0;"); + } + url::redirect("admin/short_search_fix"); + } + + private function _get_admin_form() { + $form = new Forge("admin/short_search_fix/save", "", "post", + array("id" => "g-short-search-fix-admin-form")); + $short_search_fix_settings = $form->group("short_search_fix_settings")->label(t("Prefix and search record rebuild")); + $short_search_fix_settings->input("search_prefix") + ->label(t("Enter the prefix to be added to the start of every search word (Default: 1Z)")) + ->value(module::get_var("short_search_fix", "search_prefix")); + $short_search_fix_settings->checkbox("mark_rebuild_search_records") + ->label(t("Mark all search records for rebuild. This is needed when the prefix is changed. Afterward, go to Maintenace | Update search records.")) + ->checked(false); + $short_search_fix_settings->checkbox("mark_uptodate_search_records") + ->label(t("Mark all search records as up-to-date. This is a pseudo-undo of the above.")) + ->checked(false); + $short_search_fix_settings->submit("save")->value(t("Save")); + return $form; + } +} \ No newline at end of file diff --git a/3.0/modules/short_search_fix/helpers/MY_search.php b/3.0/modules/short_search_fix/helpers/MY_search.php new file mode 100644 index 00000000..8e4b8830 --- /dev/null +++ b/3.0/modules/short_search_fix/helpers/MY_search.php @@ -0,0 +1,58 @@ + 0) { + $terms = ' ' . $terms; + $terms = str_replace(' ', ' '.$prefix, $terms); + $terms = str_replace(' '.$prefix.'"', ' '.'"'.$prefix, $terms); + $terms = substr($terms,1); + } + return $terms; + } +} diff --git a/3.1/modules/ecard/helpers/ecard_event.php b/3.0/modules/short_search_fix/helpers/short_search_fix_event.php similarity index 55% rename from 3.1/modules/ecard/helpers/ecard_event.php rename to 3.0/modules/short_search_fix/helpers/short_search_fix_event.php index ebbd5442..db418ebd 100644 --- a/3.1/modules/ecard/helpers/ecard_event.php +++ b/3.0/modules/short_search_fix/helpers/short_search_fix_event.php @@ -1,40 +1,45 @@ -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")); - } - } -} +get("settings_menu") + ->append(Menu::factory("link") + ->id("short_search_fix") + ->label(t("Short search fix")) + ->url(url::site("admin/short_search_fix"))); + } + + // This is the function that changes what's written to the search_records database + static function item_index_data($item, $data) { + $prefix = module::get_var("short_search_fix","search_prefix"); + foreach ($data as &$terms) { + // strip leading, trailing, and extra whitespaces + $terms = preg_replace('/^\s+/', '', $terms); + $terms = preg_replace('/\s+$/', '', $terms); + $terms = preg_replace('/\s\s+/', ' ', $terms); + // add the prefixes + if (preg_match('/\w/',$terms) > 0) { + $terms = $prefix . str_replace(' ', ' '.$prefix, $terms); + } + } + } + +} diff --git a/3.1/modules/jhead/helpers/jhead_installer.php b/3.0/modules/short_search_fix/helpers/short_search_fix_installer.php similarity index 68% rename from 3.1/modules/jhead/helpers/jhead_installer.php rename to 3.0/modules/short_search_fix/helpers/short_search_fix_installer.php index 606f231e..1db9cb27 100644 --- a/3.1/modules/jhead/helpers/jhead_installer.php +++ b/3.0/modules/short_search_fix/helpers/short_search_fix_installer.php @@ -1,33 +1,41 @@ -query("UPDATE {search_records} SET dirty=1;"); + } + + static function deactivate() { + $db = Database::instance(); + $db->query("UPDATE {search_records} SET dirty=1;"); + } + + static function uninstall() { + $db = Database::instance(); + module::clear_var("short_search_fix", "search_prefix"); + } +} diff --git a/3.0/modules/short_search_fix/module.info b/3.0/modules/short_search_fix/module.info new file mode 100644 index 00000000..b24d10d2 --- /dev/null +++ b/3.0/modules/short_search_fix/module.info @@ -0,0 +1,7 @@ +name = "Short Search Fix" +description = "Allows 2-3 letter searches to be performed without requiring SQL system variable modification (useful for shared hosting)." +version = 1 +author_name = "Shad Laws" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:short_search_fix" +discuss_url = "http://gallery.menalto.com/node/105935" \ No newline at end of file diff --git a/3.0/modules/short_search_fix/views/admin_short_search_fix.html.php b/3.0/modules/short_search_fix/views/admin_short_search_fix.html.php new file mode 100644 index 00000000..81ecea86 --- /dev/null +++ b/3.0/modules/short_search_fix/views/admin_short_search_fix.html.php @@ -0,0 +1,10 @@ + +
    +

    +

    + +

    +
    + +
    +
    diff --git a/3.0/modules/social_share/views/google.html.php b/3.0/modules/social_share/views/google.html.php index 1f45994e..f928a358 100644 --- a/3.0/modules/social_share/views/google.html.php +++ b/3.0/modules/social_share/views/google.html.php @@ -1,12 +1,17 @@
    -
    " annotation="">
    +
    " + annotation=""> +
    + +
    \ 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 @@ - -load_sessioninfo(); ?> - -html_attributes() ?> xml:lang="en" lang="en" is_rtl)? "dir=rtl" : null; ?> > -item(); - if (($theme->enable_pagecache) and (isset($item))): - // Page will expire in 60 seconds - header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 60).'GMT'); - header("Cache-Control: public"); - header("Cache-Control: post-check=3600, pre-check=43200", false); - header("Content-Type: text/html; charset=UTF-8"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - endif; -?> - - - -start_combining("script,css") ?> - - - -item()): ?> -bb2html($theme->item()->title, 2); ?> -tag()): ?> - $theme->bb2html($theme->tag()->name, 2))) ?> - -bb2html(item::root()->title, 2); ?> - - -<?= $_title ?> -disable_seosupport): ?> - - - - - - - - - " /> - -allow_root_page): ?> -: ; action-uri=url(); ?>?root=yes; icon-uri=favicon.ico" /> -: ; action-uri=url(); ?>?root=no; icon-uri=favicon.ico" /> - -: ; action-uri=url(); ?>; icon-uri=favicon.ico" /> - -admin): ?> - -: ; action-uri=; icon-uri=favicon.ico" /> - - - -appletouchicon): ?> - - -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"); ?> - - -page_subtype == "photo"): ?> -script("jquery.scrollTo.js"); ?> -page_subtype == "movie"): ?> -script("flowplayer.js") ?> - - -head() ?> - - -theme_js_inject(); ?> -theme_css_inject(); ?> -get_combined("css"); // LOOKING FOR YOUR CSS? It's all been combined into the link ?> -custom_css_inject(TRUE); ?> -get_combined("script") // LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link ?> - - -thumb_inpage): ?> - - - -item()): - $item = $theme->item(); - else: - $item = item::root(); - endif; ?> -body_attributes() ?>show_root_page)? ' id="g-rootpage"' : null; ?> get_bodyclass(); ?>> -
    -
    -page_top() ?> -site_status() ?> -guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position == "bar")): ?> - -
    - site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?> -
    - -
    -header_top() ?> -viewmode != "mini"): ?> - -bb2html($header_text, 1) ?> - - - - -guest) or ($theme->show_guest_menu)) and ($theme->mainmenu_position != "bar")): ?> -
    - site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?> -
    - - -messages() ?> -header_bottom() ?> - -loginmenu_position == "header"): ?> -user_menu() ?> - - - - - - - -breadcrumb_menu($theme, null); ?> - -breadcrumb_menu($theme, $parents); ?> - - - - - breadcrumb_menu function. - $breadcrumb_content = ""; - if ($this->breadcrumbs_position == "hide"): - else: - $limit_title_length = module::get_var("gallery", "visible_title_length", 999); - - $breadcrumb_content .= ''; - endif; - - print $breadcrumb_content; -?> - - - -custom_header(); ?> -
    -page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "top")): ?> -
    - -
    - -
    -
    -show_root_page): ?> - sidebar_menu($item->url()) ?> -
    "> - - album_menu() ?> - - photo_menu() ?> - - movie_menu() ?> - - tag_menu() ?> - -
    - -sidebarvisible): - case "left": - echo '
    '; - $closediv = TRUE; - break; - case "none": - case "top": - case "bottom": - if (($theme->thumb_inpage) and ($page_subtype == "photo")): - echo '
    '; - $closediv = TRUE; - else: - $closediv = FALSE; - endif; - break; - default: - echo '
    '; - $closediv = TRUE; - break; - endswitch; ?> -page_subtype != "login") and ($theme->page_subtype != "reauthenticate")): ?> -sidebarvisible == "none") or ($theme->sidebarvisible == "bottom") or ($theme->sidebarvisible == "top")): ?> -thumb_inpage) and ($page_subtype == "photo")): ?> -

     

    '; ?> -get_block_html("thumbnav"); ?> - - - - - -" : null; ?> - -sidebarvisible): - case "left": - echo '
    '; - break; - case "none": - case "top": - case "bottom": - if (($theme->thumb_inpage) and ($page_subtype == "photo")): - echo '
    '; - else: - echo '
    '; - endif; - break; - default: - echo '
    '; - break; - endswitch; - - if ($theme->show_root_page): - echo new View("rootpage.html"); - else: - echo $content; - endif; ?> -
    -
    -
    -page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible == "bottom")): ?> -
    - -
    - - -page_bottom() ?> - - diff --git a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/paginator.html.php b/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/paginator.html.php deleted file mode 100644 index 0a85b414..00000000 --- a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/paginator.html.php +++ /dev/null @@ -1,210 +0,0 @@ - - - -id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($siblings[$i-1]->name)); - } elseif ($page_type == "") { - } - endfor; - else: - // End rWatcher Mod. - - switch ($page_type) { - case "collection": - if (isset($item)): - $parent = $item->parent(); - endif; - $current_page = $page; - $total_pages = $max_pages; - // Prepare page url list - for ($i = 1; $i <= $total_pages; $i++): - $_pagelist[$i] = url::site(url::merge(array("page" => $i))); - endfor; - break; - case "item": - if (isset($item)): - $parent = $item->parent(); - endif; - $current_page = $position; - $total_pages = $total; - if (isset($parent)): - $siblings = $parent->children(); - for ($i = 1; $i <= $total; $i++): - $_pagelist[$i] = $siblings[$i-1]->url(); - endfor; - endif; - break; - default: - $current_page = 1; - $total_pages = 1; - $_pagelist[1] = url::site(); - break; - } - -// rWatcher Mod - endif; -// End rWatcher Mod. - - if ($total_pages <= 1): - $pagination_msg = " "; - else: - $pagination_msg = t("Page:") . ' '; - if ($total_pages < 13): - for ($i = 1; $i <= $total_pages; $i++): - if ($i == $current_page): - $pagination_msg .= '' . t($i) . ''; - else: - $pagination_msg .= '' . t($i) . ''; - endif; - if ($i < $total_pages): - $pagination_msg .= '·'; - endif; - endfor; - elseif ($current_page < 9): - for ($i = 1; $i <= 10; $i++): - if ($i == $current_page): - $pagination_msg .= '' . t($i) . ''; - else: - $pagination_msg .= '' . t($i) . ''; - endif; - if ($i < 10): - $pagination_msg .= '·'; - endif; - endfor; - - $pagination_msg .= '…'; - $pagination_msg .= '' . t($total_pages - 1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t($total_pages) . ''; - - elseif ($current_page > $total_pages - 8): - $pagination_msg .= '' . t(1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t(2) . ''; - $pagination_msg .= '…'; - - for ($i = $total_pages - 9; $i <= $total_pages; $i++): - if ($i == $current_page): - $pagination_msg .= '' . t($i) . ''; - else: - $pagination_msg .= '' . t($i) . ''; - endif; - if ($i < $total_pages): - $pagination_msg .= '·'; - endif; - endfor; - - else: - $pagination_msg .= '' . t(1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t(2) . ''; - $pagination_msg .= '…'; - - for ($i = $current_page - 5; $i <= $current_page + 5; $i++): - if ($i == $current_page): - $pagination_msg .= '' . t($i) . ''; - else: - $pagination_msg .= '' . t($i) . ''; - endif; - if ($i < $current_page + 5): - $pagination_msg .= '·'; - endif; - endfor; - - $pagination_msg .= '…'; - $pagination_msg .= '' . t($total_pages - 1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t($total_pages) . ''; - endif; - endif; -?> - - \ No newline at end of file diff --git a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/photo.html.php b/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/photo.html.php deleted file mode 100644 index bfe20999..00000000 --- a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/photo.html.php +++ /dev/null @@ -1,122 +0,0 @@ - -desc_allowbbcode): - $_description = $theme->bb2html($item->description, 1); - else: - $_description = nl2br(html::purify($item->description)); - endif; - - if ($theme->is_photometa_visible): - $_description .= ''; - endif; - - switch ($theme->photo_popupbox): - case "preview": - $include_list = FALSE; - $include_single = TRUE; - break; - case "none": - $include_list = FALSE; - $include_single = FALSE; - break; - default: - $include_list = TRUE; - $include_single = TRUE; - break; - endswitch; -?> - -
    - bb2html(html::purify($item->title), 1); ?> -
    -

    -
    - add_paginator("top", FALSE); ?> - photo_top() ?> - photo_descmode == "top") and ($_description)): ?> -
    - -
    - resize_top($item) ?> - resize_width; -// rWatcher Modification. - //ORIGINAL LINE $siblings = $item->parent()->children(); - $siblings = ""; - if (isset($dynamic_siblings)) { - $siblings = $dynamic_siblings; - } else { - $siblings = $item->parent()->children(); - } -// End rWatcher Modification - ?> - -
    - \n"; - $script .= " if (document.images) {\n"; - for ($i = 0; ($i <= count($siblings) - 1); $i++): - if ($siblings[$i]->rand_key == $item->rand_key): ?> - " title="bb2html(html::purify($item->title), 2) ?>" href="file_url() : $item->resize_url(); ?>"> - resize_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize", "alt" => $_title)) ?> - - resize_url() . "\";\n"; - endif; - if ($i > 0): - $script .= " var image_preload_p = new Image();\n image_preload_p.src = \"" . $siblings[$i-1]->resize_url() . "\";\n"; - endif; - else: - if ($include_list): ?> - is_album()): ?> - file_url() : $siblings[$i]->resize_url(); ?>">  - - - - - \n"; ?> - photo_descmode): - case "overlay_top": - $_align = "g-align-top"; - break; - case "overlay_bottom": - $_align = "g-align-bottom"; - break; - default: - break; - endswitch; - endif; ?> - - -
    - - -
    - -
    - resize_bottom($item) ?> -
    - photo_descmode == "bottom") and ($_description)): ?> -
    - - add_paginator("bottom", FALSE); ?> - photo_bottom() ?> -
    - \ No newline at end of file diff --git a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/tag_albums_album.html.php b/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/tag_albums_album.html.php deleted file mode 100644 index ac750319..00000000 --- a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/tag_albums_album.html.php +++ /dev/null @@ -1,239 +0,0 @@ - -album_top() was changed to $theme->dynamic_top(). - // $item->title and $item->description have been changed to $title and $description. - // - // The g-album-grid block was also taken from album.html.php. The section for uploading new photos to an empty album - // has been removed. Also, $theme->context_menu has been removed as well (it was crashing the page). -?> - -
    - dynamic_top() ?> -

    bb2html(html::purify($title), 1) ?>

    -
    - -add_paginator("top"); ?> - -album_descmode == "top") and ($description)): ?> -
    bb2html(html::purify($description), 1) ?>
    - - - -
    -
    -
    -
    - - -
    -
      -disablephotopage) && (count($siblings) > count($children))): - $j = 0; - foreach ($siblings as $i => $sibling): - //if ($sibling->rand_key == $children[$j]->rand_key): - if ($sibling->id == $children[$j]->item_id): - //echo $theme->get_thumb_element($sibling, !$theme->hidecontextmenu); - echo rw_get_thumb_element($children[$j], $theme); - if ($j + 1 < count($children)): - $j++; - endif; - else: - echo $theme->get_thumb_link($sibling); - //echo rw_get_thumb_link($sibling, $theme); - endif; - endforeach; - else: - foreach ($children as $i => $child): - //echo $theme->get_thumb_element($child, !$theme->hidecontextmenu); - echo rw_get_thumb_element($child, $theme); - endforeach; - endif; - else: ?> -
    • - -
    -
    - -dynamic_bottom() ?> - -album_descmode == "bottom") and ($description)): ?> -
    bb2html(html::purify($description), 1) ?>
    - - -add_paginator("bottom"); ?> - -is_album()): - return ""; - endif; - - /* - if (access::can("view_full", $item)): - $direct_link = $item->file_url(); - else: - $direct_link = $item->resize_url(); - endif;*/ - $direct_link = $child->full_or_resize_url(); - - return ''; - } - - function rw_get_thumb_element($child, $theme) { - // This code is based on grey dragon's get_thumb_element function. - // Change all $item to $child - // Change all $this to $theme - $thumb_item = $child; - if ($theme->thumb_random): - if ($child->is_album() && ($rnd = item::random_query()->where("parent_id", "=", $child->id)->find()) && $rnd->loaded()): - $thumb_item = $rnd; - endif; - endif; - - $item_class = $child->is_album() ? "g-album" : "g-photo"; - $content = '
  • has_thumb()): - $is_portrait = ($thumb_item->thumb_height > $thumb_item->thumb_width); - $_shift = ""; - switch ($theme->thumb_imgalign): - case "center": - if (($theme->crop_factor == 1) and (!$is_portrait)): - $_shift = 'style="margin-top: ' . intval(($theme->_thumb_size_y - $thumb_item->thumb_height) / 2) . 'px;"'; - elseif ($theme->crop_factor > 0): - $_shift = 'style="margin-top: -' . intval(($thumb_item->thumb_height - $theme->_thumb_size_y) / 2) . 'px;"'; - endif; - break; - case "bottom": - if (($theme->crop_factor == 1) and (!$is_portrait)): - $_shift = 'style="margin-top: ' . intval($theme->_thumb_size_y - $thumb_item->thumb_height) . 'px;"'; - elseif ($theme->crop_factor > 0): - $_shift = 'style="margin-top: -' . intval($thumb_item->thumb_height - $theme->_thumb_size_y) . 'px;"'; - endif; - break; - case "fit": - break; - case "top": - default: - break; - endswitch; - else: - $is_portrait = FALSE; - $_shift = 'style="margin-top: 0px;"'; - endif; - - $content .= ($is_portrait)? " g-portrait" : " g-landscape"; - $content .= '">' . $theme->thumb_top($child); - - $content .= '
    '; - $thumb_content = '

    '; - - $use_direct_link = (($theme->disablephotopage) && (!$child->is_album())); - $class_name = "g-thumblink"; - if ($use_direct_link): - $class_name .= ' g-sb-preview" rel="g-preview'; - //if (access::can("view_full", $child)): - //$direct_link = $child->file_url(); - //else: - $direct_link = $child->full_or_resize_url(); - //endif; - else: - $direct_link = $child->url(); - endif; - - if ($use_direct_link && module::is_active("exif") && module::info("exif")): - $thumb_content .= 'id}") . '" title="' . t("Photo details")->for_html_attr() . '"> '; - endif; - - $thumb_content .= ''; - if ($thumb_item->has_thumb()): - if (($theme->crop_factor > 1) && ($theme->thumb_imgalign == "fit")): - if ($thumb_item->thumb_height > $theme->_thumb_size_y): - if ($is_portrait): - $_max = $theme->_thumb_size_y; - else: - $_max = intval($theme->_thumb_size_x * ($theme->_thumb_size_y / $thumb_item->thumb_height)); - endif; - else: - $_max = $theme->_thumb_size_x; - endif; - $_max = min($thumb_item->thumb_width, $_max); - $thumb_content .= $thumb_item->thumb_img(array(), $_max); - else: - $thumb_content .= $thumb_item->thumb_img(); - endif; - else: - $thumb_content .= 'No Image'; - endif; - $thumb_content .= '

    '; - - if (($theme->thumb_metamode != "hide") and ($_thumb_descmode == "overlay_bottom")): - $_thumb_metamode = "merged"; - else: - $_thumb_metamode = $theme->thumb_metamode; - endif; - - if (($_thumb_descmode == "overlay") or ($_thumb_descmode == "overlay_top") or ($_thumb_descmode == "overlay_bottom")): - $thumb_content .= '
      bb2html(html::purify($child->title), 2) . ''; - if ($_thumb_metamode == "merged"): - $thumb_content .= $theme->thumb_info($child); - endif; - $thumb_content .= '
    '; - endif; - - if (($_thumb_metamode == "default") and ($_thumb_descmode != "overlay_bottom")): - $thumb_content .= ''; - endif; - - if ($_thumb_descmode == "bottom"): - $thumb_content .= '
      '; - $thumb_content .= '
    • ' . $theme->bb2html(html::purify($child->title), 2) . '
    • '; - if ($_thumb_metamode == "merged"): - $thumb_content .= $theme->thumb_info($item); - endif; - $thumb_content .= '
    '; - endif; - - /* - if ($addcontext): - $_text = $this->context_menu($item, "#g-item-id-{$item->id} .g-thumbnail"); - $thumb_content .= (stripos($_text, '
  • '))? $_text : null; - endif; - */ - try { - $view = new View("frame.html"); - $view->thumb_content = $thumb_content; - $content .= $view; - } catch (Exception $e) { - $content .= $thumb_content; - } - - $content .= '
  • '; - $content .= $theme->thumb_bottom($child); - $content .= ''; - - return $content; - //print $content; - // End of modified function code. - } -?> \ No newline at end of file diff --git a/3.0/modules/tag_albums/-- Theme Files/clean_canvas 1.0.7/views/calpage.html.php b/3.0/modules/tag_albums/-- Theme Files/clean_canvas 1.0.7/views/calpage.html.php deleted file mode 100644 index 9b4635ef..00000000 --- a/3.0/modules/tag_albums/-- Theme Files/clean_canvas 1.0.7/views/calpage.html.php +++ /dev/null @@ -1,204 +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("dark/themeroller/ui.base.css") ?> - css("dark/screen_colors.css") ?> - css("dark/screen_candy.css") ?> - - css("clean/themeroller/ui.base.css") ?> - css("clean/screen_colors.css") ?> - css("clean/screen_candy.css") ?> - - css("screen_layout_base.css") ?> - css("screen_fonts.css") ?> - - css("screen_layout_wide.css") ?> - - css("screen_layout_fixed.css") ?> - - - - - get_combined("script") ?> - - - get_combined("css") ?> - - - body_attributes() ?>> - page_top() ?> - -
    - -
    - - site_status() ?> -
    -
    - - - - - - user_menu() ?> - header_top() ?> -
    - - 1 ) { ?> - $display_name) { ?> - - - - installed_locales = array_merge(array("" => t("« none »")), $locales); ?> - selected = (string) locales::cookie_locale(); ?> - - -
    - - - - - header_bottom() ?> -
    - - - - - - - -
    -
    -
    -
    -
    - messages() ?> - -
    -
    -
    - item() && !empty($parents))): ?> - - -
    - page_subtype != "login"): ?> - - -
    -
    - -
    - page_bottom() ?> - - diff --git a/3.0/modules/tag_albums/controllers/admin_tag_albums.php b/3.0/modules/tag_albums/controllers/admin_tag_albums.php index 6267e33c..6682588f 100644 --- a/3.0/modules/tag_albums/controllers/admin_tag_albums.php +++ b/3.0/modules/tag_albums/controllers/admin_tag_albums.php @@ -1,7 +1,7 @@ checklist("tag_index_scope") ->options($tag_index_scope_options); - $tag_index_filter_options["tag_index_filter"] = Array(t("Display filter links on \"All Tags\" album pages?"), module::get_var("tag_albums", "tag_index_filter")); - $tag_albums_tagsort_group->checklist("tag_index_filter") - ->options($tag_index_filter_options); + $tag_index_filter_top_options["tag_index_filter_top"] = Array(t("Display filter links on the top of \"All Tags\" album pages?"), module::get_var("tag_albums", "tag_index_filter_top")); + $tag_albums_tagsort_group->checklist("tag_index_filter_top") + ->options($tag_index_filter_top_options); + + $tag_index_filter_bottom_options["tag_index_filter_bottom"] = Array(t("Display filter links on the bottom of \"All Tags\" album pages?"), module::get_var("tag_albums", "tag_index_filter_bottom")); + $tag_albums_tagsort_group->checklist("tag_index_filter_bottom") + ->options($tag_index_filter_bottom_options); $tag_albums_tagitemsort_group = $form->group("Tag_Albums_Tag_Item_Sort")->label(t("\"All Tags\" Sub-Album Preferences")); $tag_albums_tagitemsort_group->dropdown("subalbum_sort_by") @@ -104,7 +108,8 @@ class Admin_Tag_Albums_Controller extends Admin_Controller { module::set_var("tag_albums", "tag_page_title", $form->Tag_Albums_Tag_Sort->tag_page_title->value); module::set_var("tag_albums", "tag_index", $form->Tag_Albums_Tag_Sort->tag_index->value); module::set_var("tag_albums", "tag_index_scope", count($form->Tag_Albums_Tag_Sort->tag_index_scope->value)); - module::set_var("tag_albums", "tag_index_filter", count($form->Tag_Albums_Tag_Sort->tag_index_filter->value)); + module::set_var("tag_albums", "tag_index_filter_top", count($form->Tag_Albums_Tag_Sort->tag_index_filter_top->value)); + module::set_var("tag_albums", "tag_index_filter_bottom", count($form->Tag_Albums_Tag_Sort->tag_index_filter_bottom->value)); module::set_var("tag_albums", "tag_sort_by", $form->Tag_Albums_Tag_Sort->tag_sort_by->value); module::set_var("tag_albums", "tag_sort_direction", $form->Tag_Albums_Tag_Sort->tag_sort_direction->value); module::set_var("tag_albums", "subalbum_sort_by", $form->Tag_Albums_Tag_Item_Sort->subalbum_sort_by->value); diff --git a/3.0/modules/tag_albums/controllers/tag_albums.php b/3.0/modules/tag_albums/controllers/tag_albums.php index c234a1c5..763e6652 100644 --- a/3.0/modules/tag_albums/controllers/tag_albums.php +++ b/3.0/modules/tag_albums/controllers/tag_albums.php @@ -1,7 +1,7 @@ where("id", "=", $id) - ->find_all(); - - // If it doesn't exist, redirect to the modules root page. - if (count($album_tags) == 0) { - url::redirect("tag_albums/"); - } - - // If it does exist, and is set to *, load a list of all tags. - if ($album_tags[0]->tags == "*") { - $this->index($id, ""); - } else { - // Otherwise, populate this page with the specified items. - - // Inherit permissions, title and description from the album that linked to this page. - $album = ORM::factory("item", $album_tags[0]->album_id); - access::required("view", $album); - $page_title = $album->title; - $page_description = $album->description; - - // URL to this page - $str_page_url = "tag_albums/album/" . $id . "/" . urlencode($album->name); - - // Determine page sort order. - $sort_page_field = $album->sort_column; - $sort_page_direction = $album->sort_order; - - // Determine search type (AND/OR) and generate an array of the tag ids. - $tag_ids = Array(); - foreach (explode(",", $album_tags[0]->tags) as $tag_name) { - $tag = ORM::factory("tag")->where("name", "=", trim($tag_name))->find(); - if ($tag->loaded()) { - $tag_ids[] = $tag->id; - } - } - $album_tags_search_type = $album_tags[0]->search_type; - - // Figure out how many items to display on each page. - $page_size = module::get_var("gallery", "page_size", 9); - - // If this page was reached from a breadcrumb, figure out what page to load from the show id. - $show = Input::instance()->get("show"); - if ($show) { - $child = ORM::factory("item", $show); - $index = $this->_get_position($child->$sort_page_field, $child->id, $tag_ids, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, true); - if ($index) { - $page = ceil($index / $page_size); - if ($page == 1) { - url::redirect($str_page_url); - } else { - url::redirect($str_page_url . "?page=$page"); - } - } - } - - // Figure out how many items are in this "virtual album" - $count = $this->_count_records($tag_ids, $album_tags_search_type, true); - - // 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($str_page_url); - } - - // First item to display. - $offset = ($page - 1) * $page_size; - - // 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($str_page_url . "/?page=$max_pages"); - } - - // Figure out which items to display on this page and store their details in $children. - $tag_children = $this->_get_records($tag_ids, $page_size, $offset, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, true); - $children_array = Array(); - foreach ($tag_children as $one_child) { - $child_tag = new Tag_Albums_Item($one_child->title, url::site("tag_albums/show/" . $one_child->id . "/0/" . $id . "/" . urlencode($one_child->name)), $one_child->type, $one_child->id); - $child_tag->id = $one_child->id; - $child_tag->view_count = $one_child->view_count; - $child_tag->owner = identity::lookup_user($one_child->owner_id); - if ($one_child->has_thumb()) { - $child_tag->set_thumb($one_child->thumb_url(), $one_child->thumb_width, $one_child->thumb_height); - } - $children_array[] = $child_tag; - } - $children = new Tag_Albums_Children($children_array); - - // Set up the previous and next page buttons. - if ($page > 1) { - $previous_page = $page - 1; - $view->previous_page_link = url::site($str_page_url . "/?page={$previous_page}"); - } - if ($page < $max_pages) { - $next_page = $page + 1; - $view->next_page_link = url::site($str_page_url . "/?page={$next_page}"); - } - - // Set up breadcrumbs. - $tag_album_breadcrumbs = Array(); - $counter = 0; - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($album->title, ""); - $parent_item = ORM::factory("item", $album->parent_id); - while ($parent_item->id != 1) { - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); - $parent_item = ORM::factory("item", $parent_item->parent_id); - } - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); - $tag_album_breadcrumbs[1]->url .= "?show=" . $album->id; - $tag_album_breadcrumbs = array_reverse($tag_album_breadcrumbs, true); - - // Set up and display the actual page. - $parent_album = ORM::factory("item", $album->parent_id); - $template = new Theme_View("calpage.html", "collection", "Tag Albums"); - $template->page_title = $page_title; - $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("all_siblings", $this->_get_records($tag_ids, $count, 0, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false)); - $template->set_global("children_count", $count); - $template->set_global("parent_url", $parent_album->url()); // Used by Grey Dragon. - $template->content = new View("tag_albums_album.html"); - $template->content->title = $page_title; - $template->content->description = $page_description; - $template->set_global("breadcrumbs", $tag_album_breadcrumbs); - print $template; - } - } - public function filter($id, $filter) { // Display the index page, but only show albums for // tags whose name begins with $filter. @@ -318,21 +179,48 @@ class tag_albums_Controller extends Controller { } // Generate an arry of "fake" items, one for each tag on the page. - // Grab thumbnails from the most recently uploaded item for each tag, if available. + // Grab thumbnails from a admin-specified photo, or the most recently + // uploaded item for each tag, if available. $children_array = Array(); foreach ($display_tags as $one_tag) { - $tag_item = ORM::factory("item") - ->viewable() - ->join("items_tags", "items.id", "items_tags.item_id") - ->where("items_tags.tag_id", "=", $one_tag->id) - ->order_by("items.id", "DESC") - ->find_all(1, 0); - $child_tag = new Tag_Albums_Item($one_tag->name, url::site("tag_albums/tag/" . $one_tag->id . "/" . $id . "/" . urlencode($one_tag->name)), "album", 0); - if (count($tag_item) > 0) { - if ($tag_item[0]->has_thumb()) { - $child_tag->set_thumb($tag_item[0]->thumb_url(), $tag_item[0]->thumb_width, $tag_item[0]->thumb_height); + $tag_thumb_url = ""; + $tag_thumb_width = ""; + $tag_thumb_height = ""; + + // Check and see if the admin specified a photo to use for this tags thumbnail. + $record = ORM::factory("tags_album_tag_cover")->where("tag_id", "=", $one_tag->id)->find(); + if ($record->loaded()) { + $tag_thumb_item = ORM::factory("item", $record->photo_id); + if ($tag_thumb_item->loaded()) { + $tag_thumb_url = $tag_thumb_item->thumb_url(); + $tag_thumb_width = $tag_thumb_item->thumb_width; + $tag_thumb_height = $tag_thumb_item->thumb_height; } } + + // If no pre-specified thumbnail was found, use the most recently uploaded photo (if available). + if ($tag_thumb_url == "") { + $tag_item = ORM::factory("item") + ->viewable() + ->join("items_tags", "items.id", "items_tags.item_id") + ->where("items_tags.tag_id", "=", $one_tag->id) + ->order_by("items.id", "DESC") + ->find_all(1, 0); + if (count($tag_item) > 0) { + if ($tag_item[0]->has_thumb()) { + $tag_thumb_url = $tag_item[0]->thumb_url(); + $tag_thumb_width = $tag_item[0]->thumb_width; + $tag_thumb_height = $tag_item[0]->thumb_height; + } + } + } + + // Create a new object to represent this virtual album, and add it to the array of objects for + // this page. + $child_tag = new Tag_Albums_Item($one_tag->name, url::site("tag_albums/tag/" . $one_tag->id . "/" . $id . "/" . urlencode($one_tag->name)), "album", 0); + if ($tag_thumb_url != "") { + $child_tag->set_thumb($tag_thumb_url, $tag_thumb_width, $tag_thumb_height); + } $children_array[] = $child_tag; } $children = new Tag_Albums_Children($children_array); @@ -342,36 +230,38 @@ class tag_albums_Controller extends Controller { $parent_url = ""; if ($id > 0) { $counter = 0; - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($album->title, ""); + $tag_album_breadcrumbs[] = Breadcrumb::instance($album->title, $album->url())->set_last(); $parent_item = ORM::factory("item", $album->parent_id); $parent_url = $parent_item->url(); while ($parent_item->id != 1) { - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); $parent_item = ORM::factory("item", $parent_item->parent_id); } - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); $tag_album_breadcrumbs[1]->url .= "?show=" . $album->id; $tag_album_breadcrumbs = array_reverse($tag_album_breadcrumbs, true); } else { $parent_url = item::root()->url(); - $tag_album_breadcrumbs[0] = new Tag_Albums_Breadcrumb(item::root()->title, item::root()->url()); - $tag_album_breadcrumbs[1] = new Tag_Albums_Breadcrumb($page_title, ""); + $tag_album_breadcrumbs[] = Breadcrumb::instance(item::root()->title, item::root()->url())->set_first(); + $tag_album_breadcrumbs[] = Breadcrumb::instance($page_title, $str_page_url)->set_first(); } // Set up and display the actual page. - $template = new Theme_View("calpage.html", "collection", "Tag Albums"); + $template = new Theme_View("page.html", "collection", "Tag Albums"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $children, + "breadcrumbs" => $tag_album_breadcrumbs, + "children_count" => $all_tags_count)); $template->page_title = $page_title; - $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", $all_tags_count); - $template->set_global("parent_url", $parent_url); // Used by Grey Dragon. - $template->content = new View("tag_albums_album.html"); + $template->content = new View("dynamic.html"); $template->content->title = $page_title; $template->content->description = $page_description; + + $template->set_global("parent_url", $parent_url); // Used by Grey Dragon. $template->content->filter_text = $this->_get_filter_html($id, $filter); - $template->set_global("breadcrumbs", $tag_album_breadcrumbs); print $template; } @@ -441,20 +331,6 @@ class tag_albums_Controller extends Controller { // Figure out which items to display on this page. $tag_children = $this->_get_records(Array($id), $page_size, $offset, "items." . $sort_page_field, $sort_page_direction, "OR", true); - - // Create an array of "fake" items to display on the page. - $children_array = Array(); - foreach ($tag_children as $one_child) { - $child_tag = new Tag_Albums_Item($one_child->title, url::site("tag_albums/show/" . $one_child->id . "/" . $id . "/" . $album_id . "/" . urlencode($one_child->name)), $one_child->type, $one_child->id); - $child_tag->id = $one_child->id; - $child_tag->view_count = $one_child->view_count; - $child_tag->owner = identity::lookup_user($one_child->owner_id); - if ($one_child->has_thumb()) { - $child_tag->set_thumb($one_child->thumb_url(), $one_child->thumb_width, $one_child->thumb_height); - } - $children_array[] = $child_tag; - } - $children = new Tag_Albums_Children($children_array); // Set up the previous and next page buttons. if ($page > 1) { @@ -471,55 +347,238 @@ class tag_albums_Controller extends Controller { $parent_url = ""; if ($album_id > 0) { $counter = 0; - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($display_tag->name, ""); + $tag_album_breadcrumbs[] = Breadcrumb::instance($display_tag->name, $str_page_url)->set_last(); $parent_item = ORM::factory("item", $album_tags[0]->album_id); if ($album_tags[0]->tags != "*") { $parent_item = ORM::factory("item", $parent_item->parent_id); } $parent_url = $parent_item->url(); // Used by Grey Dragon. while ($parent_item->id != 1) { - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); $parent_item = ORM::factory("item", $parent_item->parent_id); } - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); $parent_item = ORM::factory("item", $album_tags[0]->album_id); - if ((module::get_var("tag_albums", "tag_index_scope", "false")) && (module::get_var("tag_albums", "tag_index", "default") != "default")) { - $tag_album_breadcrumbs[1]->url = url::site("tag_albums/album/" . $album_id . "/" . urlencode($parent_item->name)); - } else { - $tag_album_breadcrumbs[1]->url = url::site("tag_albums/album/" . $album_id . "/" . urlencode($parent_item->name)) . "?show=" . $id; - } + $tag_album_breadcrumbs[1]->url .= "?show=" . $id; $tag_album_breadcrumbs = array_reverse($tag_album_breadcrumbs, true); } else { $parent_url = url::site("tag_albums/"); - $tag_album_breadcrumbs[0] = new Tag_Albums_Breadcrumb(item::root()->title, item::root()->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance(item::root()->title, item::root()->url())->set_first(); if (module::get_var("tag_albums", "tag_index", "default") == "default") { - $tag_album_breadcrumbs[1] = new Tag_Albums_Breadcrumb(module::get_var("tag_albums", "tag_page_title", "All Tags"), url::site("tag_albums/") . "?show=" . $id); + $tag_album_breadcrumbs[] = Breadcrumb::instance(module::get_var("tag_albums", "tag_page_title", "All Tags"), url::site("tag_albums/") . "?show=" . $id); } else { - $tag_album_breadcrumbs[1] = new Tag_Albums_Breadcrumb(module::get_var("tag_albums", "tag_page_title", "All Tags"), url::site("tag_albums/")); + $tag_album_breadcrumbs[] = Breadcrumb::instance(module::get_var("tag_albums", "tag_page_title", "All Tags"), url::site("tag_albums/")); } - $tag_album_breadcrumbs[2] = new Tag_Albums_Breadcrumb($display_tag->name, ""); + $tag_album_breadcrumbs[] = Breadcrumb::instance($display_tag->name, $str_page_url)->set_last(); } // Set up and display the actual page. - $template = new Theme_View("calpage.html", "collection", "Tag Albums"); + $template = new Theme_View("page.html", "collection", "Tag Albums"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $tag_children, + "breadcrumbs" => $tag_album_breadcrumbs, + "children_count" => $count)); $template->page_title = $display_tag->name; - $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("all_siblings", $this->_get_records(Array($id), $count, 0, "items." . $sort_page_field, $sort_page_direction, "OR", false)); - $template->set_global("children_count", $count); - $template->set_global("parent_url", $parent_url); // Used by Grey Dragon. - $template->content = new View("tag_albums_album.html"); + $template->content = new View("dynamic.html"); $template->content->title = $display_tag->name; - $template->set_global("breadcrumbs", $tag_album_breadcrumbs); + $template->content->description = $page_description; + + $template->set_global("all_siblings", $this->_get_records(Array($id), $count, 0, "items." . $sort_page_field, $sort_page_direction, "OR", false)); + $template->set_global("parent_url", $parent_url); // Used by Grey Dragon. print $template; + + // Set breadcrumbs on the photo pages to point back to the calendar day view. + item::set_display_context_callback("tag_albums_Controller::get_display_context", $id, $album_id); + } + + public function album($id) { + // Displays a dynamic page containing items that have been + // tagged with one or more tags. + + // Load the specified ID to make sure it exists. + $album_tags = ORM::factory("tags_album_id") + ->where("id", "=", $id) + ->find_all(); + + // If it doesn't exist, redirect to the modules root page. + if (count($album_tags) == 0) { + url::redirect("tag_albums/"); + } + + // If it does exist, and is set to *, load a list of all tags. + if ($album_tags[0]->tags == "*") { + $this->index($id, ""); + } else { + // Otherwise, populate this page with the specified items. + + // Inherit permissions, title and description from the album that linked to this page. + $album = ORM::factory("item", $album_tags[0]->album_id); + access::required("view", $album); + $page_title = $album->title; + $page_description = $album->description; + + // URL to this page + $str_page_url = "tag_albums/album/" . $id . "/" . urlencode($album->name); + + // Determine page sort order. + $sort_page_field = $album->sort_column; + $sort_page_direction = $album->sort_order; + + // Determine search type (AND/OR) and generate an array of the tag ids. + $tag_ids = Array(); + foreach (explode(",", $album_tags[0]->tags) as $tag_name) { + $tag = ORM::factory("tag")->where("name", "=", trim($tag_name))->find(); + if ($tag->loaded()) { + $tag_ids[] = $tag->id; + } + } + $album_tags_search_type = $album_tags[0]->search_type; + + // Figure out how many items to display on each page. + $page_size = module::get_var("gallery", "page_size", 9); + + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = $this->_get_position($child->$sort_page_field, $child->id, $tag_ids, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, true); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect($str_page_url); + } else { + url::redirect($str_page_url . "?page=$page"); + } + } + } + + // Figure out how many items are in this "virtual album" + $count = $this->_count_records($tag_ids, $album_tags_search_type, true); + + // 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($str_page_url); + } + + // First item to display. + $offset = ($page - 1) * $page_size; + + // 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($str_page_url . "/?page=$max_pages"); + } + + // Figure out which items to display on this page and store their details in $children. + $tag_children = $this->_get_records($tag_ids, $page_size, $offset, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, true); + + // Set up the previous and next page buttons. + if ($page > 1) { + $previous_page = $page - 1; + $view->previous_page_link = url::site($str_page_url . "/?page={$previous_page}"); + } + if ($page < $max_pages) { + $next_page = $page + 1; + $view->next_page_link = url::site($str_page_url . "/?page={$next_page}"); + } + + // Set up breadcrumbs. + $tag_album_breadcrumbs = array(); + $counter = 0; + $tag_album_breadcrumbs[] = Breadcrumb::instance($album->title, $album->url())->set_last(); + $parent_item = ORM::factory("item", $album->parent_id); + while ($parent_item->id != 1) { + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $tag_album_breadcrumbs[1]->url .= "?show=" . $album->id; + + $tag_album_breadcrumbs = array_reverse($tag_album_breadcrumbs, true); + + // Set up and display the actual page. + $template = new Theme_View("page.html", "collection", "Tag Albums"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $tag_children, + "breadcrumbs" => $tag_album_breadcrumbs, + "children_count" => $count)); + $template->page_title = $page_title; + $template->content = new View("dynamic.html"); + $template->content->title = $page_title; + $template->content->description = $page_description; + + $template->set_global("all_siblings", $this->_get_records($tag_ids, $count, 0, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false)); + $parent_album = ORM::factory("item", $album->parent_id); + $template->set_global("parent_url", $parent_album->url()); // Used by Grey Dragon. + print $template; + + // Set breadcrumbs on the photo pages to point back to the calendar day view. + item::set_display_context_callback("tag_albums_Controller::get_display_context", 0, $id); + } } public function show($item_id, $tag_id, $album_id) { - // Display the specified photo or video ($item_id) with breadcrumbs - // that point back to a virtual album ($tag_id / $album_id). + // This function used to be responsible for displaying photos. + // As of Gallery 3.0.3, it is no longer needed, now it just + // redirects to the photo's primary URL to avoid breaking older links. + item::set_display_context_callback("tag_albums_Controller::get_display_context", $tag_id, $album_id); + $item = ORM::factory("item", $item_id); + url::redirect(url::abs_site("{$item->type}s/{$item->id}")); + } + public function make_tag_album_cover($id, $tag_id, $album_id) { + if (!identity::active_user()->admin) { + message::error(t("You do not have sufficient privileges to do this")); + url::redirect("tag_albums/show/" . $id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($item->name)); + } + + $item = ORM::factory("item", $id); + + if (($album_id > 0) && ($tag_id == 0)) { + // If we are dealing with a dynamic album, set it's thumbnail to this pics. + // Based on modules/gallery/helpers/item.php + $album_tags = ORM::factory("tags_album_id") + ->where("id", "=", $album_id) + ->find_all(); + if (count($album_tags) > 0) { + $parent = ORM::factory("item", $album_tags[0]->album_id); + $parent->album_cover_item_id = $item->id; + $parent->thumb_dirty = 1; + graphics::generate($parent); + $parent->save(); + + $grand_parent = $parent->parent(); + if ($grand_parent && access::can("edit", $grand_parent) && + $grand_parent->album_cover_item_id == null) { + item::make_album_cover($parent); + } + } + message::success(t("Made " . $item->title . " this album's cover")); + url::redirect("tag_albums/show/" . $id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($item->name)); + } else { + // If setting a thumbnail for an auto-generated all tags->tag album. + $record = ORM::factory("tags_album_tag_cover")->where("tag_id", "=", $tag_id)->find(); + if (!$record->loaded()) { + $record->tag_id = $tag_id; + } + $record->photo_id = $id; + $record->save(); + message::success(t("Made " . $item->title . " this album's cover")); + url::redirect("tag_albums/show/" . $id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($item->name)); + } + } + + static function get_display_context($item, $tag_id, $album_id) { // Make sure #album_id is valid, clear it out if it isn't. $album_tags = ORM::factory("tags_album_id") ->where("id", "=", $album_id) @@ -530,9 +589,6 @@ class tag_albums_Controller extends Controller { // Load the tag and item, make sure the user has access to the item. $display_tag = ORM::factory("tag", $tag_id); - $item = ORM::factory("item", $item_id); - access::required("view", $item); - $parent_url = ""; // Figure out sort order from module preferences. $sort_page_field = ""; @@ -552,21 +608,19 @@ class tag_albums_Controller extends Controller { $previous_item = ""; $next_item = ""; $position = 0; - $dynamic_siblings = ""; if ($tag_id > 0) { - $sibling_count = $this->_count_records(Array($tag_id), "OR", false); - $position = $this->_get_position($item->$sort_page_field, $item->id, Array($tag_id), "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + $sibling_count = tag_albums_Controller::_count_records(Array($tag_id), "OR", false); + $position = tag_albums_Controller::_get_position($item->$sort_page_field, $item->id, Array($tag_id), "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); if ($position > 1) { - $previous_item_object = $this->_get_records(Array($tag_id), 1, $position-2, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + $previous_item_object = tag_albums_Controller::_get_records(Array($tag_id), 1, $position-2, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); if (count($previous_item_object) > 0) { - $previous_item = new Tag_Albums_Item($previous_item_object[0]->title, url::site("tag_albums/show/" . $previous_item_object[0]->id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($previous_item_object[0]->name)), $previous_item_object[0]->type, $previous_item_object[0]->id); + $previous_item = $previous_item_object[0]; } } - $next_item_object = $this->_get_records(Array($tag_id), 1, $position, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + $next_item_object = tag_albums_Controller::_get_records(Array($tag_id), 1, $position, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); if (count($next_item_object) > 0) { - $next_item = new Tag_Albums_Item($next_item_object[0]->title, url::site("tag_albums/show/" . $next_item_object[0]->id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($next_item_object[0]->name)), $next_item_object[0]->type, $next_item_object[0]->id); + $next_item = $next_item_object[0]; } - $dynamic_siblings = $this->_get_records(Array($tag_id), null, null, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); } else { $tag_ids = Array(); foreach (explode(",", $album_tags[0]->tags) as $tag_name) { @@ -576,98 +630,54 @@ class tag_albums_Controller extends Controller { } } $album_tags_search_type = $album_tags[0]->search_type; - $sibling_count = $this->_count_records($tag_ids, $album_tags_search_type, false); - $position = $this->_get_position($item->$sort_page_field, $item->id, $tag_ids, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + $sibling_count = tag_albums_Controller::_count_records($tag_ids, $album_tags_search_type, false); + $position = tag_albums_Controller::_get_position($item->$sort_page_field, $item->id, $tag_ids, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); if ($position > 1) { - $previous_item_object = $this->_get_records($tag_ids, 1, $position-2, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + $previous_item_object = tag_albums_Controller::_get_records($tag_ids, 1, $position-2, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); if (count($previous_item_object) > 0) { - $previous_item = new Tag_Albums_Item($previous_item_object[0]->title, url::site("tag_albums/show/" . $previous_item_object[0]->id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($previous_item_object[0]->name)), $previous_item_object[0]->type); + $previous_item = $previous_item_object[0]; } } - $next_item_object = $this->_get_records($tag_ids, 1, $position, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + $next_item_object = tag_albums_Controller::_get_records($tag_ids, 1, $position, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); if (count($next_item_object) > 0) { - $next_item = new Tag_Albums_Item($next_item_object[0]->title, url::site("tag_albums/show/" . $next_item_object[0]->id . "/" . $tag_id . "/" . $album_id . "/" . urlencode($next_item_object[0]->name)), $next_item_object[0]->type); + $next_item = $next_item_object[0]; } - $dynamic_siblings = $this->_get_records($tag_ids, null, null, "items." . $sort_page_field, $sort_page_direction, $album_tags_search_type, false); + } // Set up breadcrumbs $tag_album_breadcrumbs = Array(); if ($album_id > 0) { $counter = 0; - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($item->title, ""); + $tag_album_breadcrumbs[] = Breadcrumb::instance($item->title, $item->url())->set_last(); if ($album_tags[0]->tags == "*") { - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($display_tag->name, url::site("tag_albums/tag/" . $display_tag->id . "/" . $album_id . "/" . urlencode($display_tag->name))); + $tag_album_breadcrumbs[] = Breadcrumb::instance($display_tag->name, url::site("tag_albums/tag/" . $display_tag->id . "/" . $album_id . "/" . urlencode($display_tag->name))); } $parent_item = ORM::factory("item", $album_tags[0]->album_id); - if ($album_tags[0]->tags == "*") { - $parent_url = url::site("tag_albums/tag/" . $display_tag->id . "/" . $album_id . "/" . urlencode($display_tag->name)); - } else { - $parent_url = $parent_item->url(); - } - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, url::site("tag_albums/album/" . $album_id . "/" . urlencode($parent_item->name))); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, url::site("tag_albums/album/" . $album_id . "/" . urlencode($parent_item->name))); $parent_item = ORM::factory("item", $parent_item->parent_id); while ($parent_item->id != 1) { - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); $parent_item = ORM::factory("item", $parent_item->parent_id); } - $tag_album_breadcrumbs[$counter++] = new Tag_Albums_Breadcrumb($parent_item->title, $parent_item->url()); + $tag_album_breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); $tag_album_breadcrumbs[1]->url .= "?show=" . $item->id; $tag_album_breadcrumbs = array_reverse($tag_album_breadcrumbs, true); } else { - $tag_album_breadcrumbs[0] = new Tag_Albums_Breadcrumb(item::root()->title, item::root()->url()); - $tag_album_breadcrumbs[1] = new Tag_Albums_Breadcrumb(module::get_var("tag_albums", "tag_page_title", "All Tags"), url::site("tag_albums/")); - $tag_album_breadcrumbs[2] = new Tag_Albums_Breadcrumb($display_tag->name, url::site("tag_albums/tag/" . $display_tag->id . "/" . urlencode($display_tag->name)) . "?show=" . $item->id); - $tag_album_breadcrumbs[3] = new Tag_Albums_Breadcrumb($item->title, ""); - $parent_url = url::site("tag_albums/tag/" . $display_tag->id . "/" . urlencode($display_tag->name)); + $tag_album_breadcrumbs[] = Breadcrumb::instance(item::root()->title, item::root()->url())->set_first(); + $tag_album_breadcrumbs[] = Breadcrumb::instance(module::get_var("tag_albums", "tag_page_title", "All Tags"), url::site("tag_albums/")); + $tag_album_breadcrumbs[] = Breadcrumb::instance($display_tag->name, url::site("tag_albums/tag/" . $display_tag->id . "/" . urlencode($display_tag->name)) . "?show=" . $item->id); + $tag_album_breadcrumbs[] = Breadcrumb::instance($item->title, $item->url())->set_last(); } - // Increase the items view count. - $item->increment_view_count(); - - // Load the page. - if ($item->is_photo()) { - $template = new Theme_View("calpage.html", "item", "photo"); - $template->page_title = $item->title; - $template->set_global("children", Array()); - $template->set_global("item", $item); - $template->set_global("previous_item", $previous_item); - $template->set_global("next_item", $next_item); - $template->set_global("is_tagalbum_page", true); // used for grey dragon - $template->set_global("tag_id", $tag_id); // used for grey dragon - $template->set_global("album_id", $album_id); // used for grey dragon - $template->set_global("parent_url", $parent_url); // Used by Grey Dragon. - $template->set_global("dynamic_siblings", $dynamic_siblings); // Used by Grey Dragon. - $template->set_global("children_count", 0); - $template->set_global("position", $position); - $template->set_global("sibling_count", $sibling_count); - $template->content = new View("photo.html"); - $template->content->title = $item->title; - $template->set_global("breadcrumbs", $tag_album_breadcrumbs); - print $template; - } elseif ($item->is_movie()) { - $template = new Theme_View("calpage.html", "item", "movie"); - $template->page_title = $item->title; - $template->set_global("children", Array()); - $template->set_global("item", $item); - $template->set_global("previous_item", $previous_item); - $template->set_global("next_item", $next_item); - $template->set_global("is_tagalbum_page", true); // used for grey dragon - $template->set_global("tag_id", $tag_id); // used for grey dragon - $template->set_global("album_id", $album_id); // used for grey dragon - $template->set_global("parent_url", $parent_url); // Used by Grey Dragon. - $template->set_global("dynamic_siblings", $dynamic_siblings); // Used by Grey Dragon. - $template->set_global("children_count", 0); - $template->set_global("position", $position); - $template->set_global("sibling_count", $sibling_count); - $template->content = new View("movie.html"); - $template->content->title = $item->title; - $template->set_global("breadcrumbs", $tag_album_breadcrumbs); - print $template; - } else { - // If it's something we don't know how to deal with, just redirect to its real page. - url::redirect(url::abs_site("{$item->type}s/{$item->id}")); - } + return array("position" => $position, + "previous_item" => $previous_item, + "next_item" => $next_item, + "tag_id" => $tag_id, + "album_id" => $album_id, + "is_tagalbum_page" => true, + "sibling_count" => $sibling_count, + "breadcrumbs" => $tag_album_breadcrumbs); } private function _get_position($item_title, $item_id, $tag_ids, $sort_field, $sort_direction, $search_type, $include_albums) { @@ -767,6 +777,7 @@ class tag_albums_Controller extends Controller { $items_model->select("items.left_ptr"); $items_model->select("items.right_ptr"); $items_model->select("items.relative_path_cache"); + $items_model->select("items.relative_url_cache"); $items_model->select('COUNT("*") AS result_count'); } $items_model->viewable(); @@ -790,45 +801,6 @@ class tag_albums_Controller extends Controller { return $items_model->find_all($page_size, $offset); } - private function _get_filter_html($album_id, $str_filter) { - // Generate HTML to display filter links on the index page. - - // Make sure $album_id is set. - if ($album_id == "") { - $album_id = 0; - } - - // Generate the links. - $str_html = "Filter: "; - if ($str_filter != "") { - if ($album_id > 0) { - $album_tags = ORM::factory("tags_album_id") - ->where("id", "=", $album_id) - ->find_all(); - $album = ORM::factory("item", $album_tags[0]->album_id); - $str_html .= "name)) . "\">(All) "; - } else { - $str_html .= "(All) "; - } - } - if ($str_filter == "NUM") { - $str_html .= "# "; - } else { - $str_html .= "# "; - } - foreach(range('A','Z') as $letter) { - if ($letter == $str_filter) { - $str_html .= $letter . " "; - } else { - $str_html .= ""; - $str_html .= $letter . " "; - } - } - - // Return the HTML. - return $str_html; - } - private function _count_records($tag_ids, $search_type, $include_albums) { // Count the number of viewable items for the designated tag(s) // and return that number. @@ -876,4 +848,43 @@ class tag_albums_Controller extends Controller { return count($items_model->find_all()); } } + + private function _get_filter_html($album_id, $str_filter) { + // Generate HTML to display filter links on the index page. + + // Make sure $album_id is set. + if ($album_id == "") { + $album_id = 0; + } + + // Generate the links. + $str_html = "Filter: "; + if ($str_filter != "") { + if ($album_id > 0) { + $album_tags = ORM::factory("tags_album_id") + ->where("id", "=", $album_id) + ->find_all(); + $album = ORM::factory("item", $album_tags[0]->album_id); + $str_html .= "name)) . "\">(All) "; + } else { + $str_html .= "(All) "; + } + } + if ($str_filter == "NUM") { + $str_html .= "# "; + } else { + $str_html .= "# "; + } + foreach(range('A','Z') as $letter) { + if ($letter == $str_filter) { + $str_html .= $letter . " "; + } else { + $str_html .= ""; + $str_html .= $letter . " "; + } + } + + // Return the HTML. + return $str_html; + } } diff --git a/3.0/modules/tag_albums/helpers/tag_albums_block.php b/3.0/modules/tag_albums/helpers/tag_albums_block.php index 7243722c..cfcdbbe6 100644 --- a/3.0/modules/tag_albums/helpers/tag_albums_block.php +++ b/3.0/modules/tag_albums/helpers/tag_albums_block.php @@ -1,7 +1,7 @@ delete("tags_album_ids")->where("album_id", "=", $item->id)->execute(); } } + + static function site_menu($menu, $theme) { + if ($item = $theme->item()) { + if ($item->is_photo()) { + if ((identity::active_user()->admin) && (isset($theme->is_tagalbum_page))) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("g-tag-albums-set-cover") + ->label(t("Choose as the tag album cover")) + ->css_id("g-tag-albums-set-cover") + ->url(url::site("tag_albums/make_tag_album_cover/" . $item->id . "/" . $theme->tag_id . "/" . $theme->album_id))); + } + } + } + } } diff --git a/3.0/modules/tag_albums/helpers/tag_albums_installer.php b/3.0/modules/tag_albums/helpers/tag_albums_installer.php index ee3df5e2..d4a916e9 100644 --- a/3.0/modules/tag_albums/helpers/tag_albums_installer.php +++ b/3.0/modules/tag_albums/helpers/tag_albums_installer.php @@ -1,7 +1,7 @@ query("CREATE TABLE IF NOT EXISTS {tags_album_tag_covers} ( + `id` int(9) NOT NULL auto_increment, + `tag_id` int(9) NOT NULL, + `photo_id` int(9) NOT NULL, + PRIMARY KEY (`id`), + KEY(`tag_id`, `id`)) + DEFAULT CHARSET=utf8;"); + // Set up some default values. module::set_var("tag_albums", "tag_sort_by", "name"); module::set_var("tag_albums", "tag_sort_direction", "ASC"); @@ -36,19 +44,39 @@ class tag_albums_installer { module::set_var("tag_albums", "subalbum_sort_direction", "ASC"); module::set_var("tag_albums", "tag_index", "default"); module::set_var("tag_albums", "tag_index_scope", "0"); - module::set_var("tag_albums", "tag_index_filter", "0"); + module::set_var("tag_albums", "tag_index_filter_top", "0"); + module::set_var("tag_albums", "tag_index_filter_bottom", "0"); // Set the module's version number. - module::set_version("tag_albums", 2); + module::set_version("tag_albums", 4); } static function upgrade($version) { + $db = Database::instance(); if ($version == 1) { module::set_var("tag_albums", "tag_index", "default"); module::set_var("tag_albums", "tag_index_scope", "0"); module::set_var("tag_albums", "tag_index_filter", "0"); module::set_version("tag_albums", 2); } + + if ($version == 2) { + $db->query("CREATE TABLE IF NOT EXISTS {tags_album_tag_covers} ( + `id` int(9) NOT NULL auto_increment, + `tag_id` int(9) NOT NULL, + `photo_id` int(9) NOT NULL, + PRIMARY KEY (`id`), + KEY(`tag_id`, `id`)) + DEFAULT CHARSET=utf8;"); + module::set_version("tag_albums", 3); + } + + if ($version == 3) { + module::set_var("tag_albums", "tag_index_filter_top", module::get_var("tag_albums", "tag_index_filter", "0")); + module::set_var("tag_albums", "tag_index_filter_bottom", module::get_var("tag_albums", "tag_index_filter", "0")); + module::clear_var("tag_albums", "tag_index_filter"); + module::set_version("tag_albums", 4); + } } static function deactivate() { diff --git a/3.0/modules/tag_albums/helpers/tag_albums_theme.php b/3.0/modules/tag_albums/helpers/tag_albums_theme.php index 84f9a633..32ef0309 100644 --- a/3.0/modules/tag_albums/helpers/tag_albums_theme.php +++ b/3.0/modules/tag_albums/helpers/tag_albums_theme.php @@ -1,7 +1,7 @@ content->filter_text) && module::get_var("tag_albums", "tag_index_filter_top", "0")) { + $view = new View("tag_albums_filter.html"); + $view->filter_text = $theme->content->filter_text; + return $view; + } + } + + static function dynamic_bottom($theme) { + // If this page is the "all tags" dynamic page, display filter link text. + if (isset($theme->content->filter_text) && module::get_var("tag_albums", "tag_index_filter_bottom", "0")) { + $view = new View("tag_albums_filter.html"); + $view->filter_text = $theme->content->filter_text; + return $view; + } + } } diff --git a/3.0/modules/tag_albums/libraries/Tag_Albums_Breadcrumb.php b/3.0/modules/tag_albums/libraries/Tag_Albums_Breadcrumb.php deleted file mode 100644 index ba576e49..00000000 --- a/3.0/modules/tag_albums/libraries/Tag_Albums_Breadcrumb.php +++ /dev/null @@ -1,31 +0,0 @@ -title = $new_title; - $this->url = $new_url; - } -} diff --git a/3.0/modules/tag_albums/libraries/Tag_Albums_Children.php b/3.0/modules/tag_albums/libraries/Tag_Albums_Children.php index c6ea859d..37ecc081 100644 --- a/3.0/modules/tag_albums/libraries/Tag_Albums_Children.php +++ b/3.0/modules/tag_albums/libraries/Tag_Albums_Children.php @@ -1,7 +1,7 @@ viewable() ->join("items_tags", "items.id", "items_tags.item_id") - ->where("items_tags.tag_id", "=", $this->id); - if ($type) { - $model->where("items.type", "=", $type); - } - return $model->find_all($limit, $offset); + ->where("items_tags.tag_id", "=", $this->id) + ->merge_where($where) + ->order_by("items.id") + ->find_all($limit, $offset); } /** * Return the count of all viewable items associated with this tag. - * @param string $type the type of item (album, photo) + * @param string $where an array of arrays, each compatible with ORM::where() * @return integer */ - public function items_count($type=null) { - $model = ORM::factory("item") + public function items_count($where=array()) { + if (is_scalar($where)) { + // backwards compatibility + $where = array(array("items.type", "=", $where)); + } + return $model = ORM::factory("item") ->viewable() ->join("items_tags", "items.id", "items_tags.item_id") - ->where("items_tags.tag_id", "=", $this->id); - - if ($type) { - $model->where("items.type", "=", $type); - } - return $model->count_all(); + ->where("items_tags.tag_id", "=", $this->id) + ->merge_where($where) + ->count_all(); } /** @@ -69,13 +73,23 @@ class Tag_Model_Core extends ORM { * to this tag. */ public function save() { - $related_item_ids = array(); - foreach (db::build() - ->select("item_id") - ->from("items_tags") - ->where("tag_id", "=", $this->id) - ->execute() as $row) { - $related_item_ids[$row->item_id] = 1; + // Check to see if another tag exists with the same name + $duplicate_tag = ORM::factory("tag") + ->where("name", "=", $this->name) + ->where("id", "!=", $this->id) + ->find(); + if ($duplicate_tag->loaded()) { + // If so, tag its items with this tag so as to merge it + $duplicate_tag_items = ORM::factory("item") + ->join("items_tags", "items.id", "items_tags.item_id") + ->where("items_tags.tag_id", "=", $duplicate_tag->id) + ->find_all(); + foreach ($duplicate_tag_items as $item) { + $this->add($item); + } + + // ... and remove the duplicate tag + $duplicate_tag->delete(); } if (isset($this->object_relations["items"])) { @@ -132,6 +146,7 @@ class Tag_Model_Core extends ORM { * @param string $query the query string (eg "page=3") */ public function url($query=null) { + // rWatcher Edit: Modify URL function to point users to tag_albums instead of tag. $album_id = Input::instance()->get("album"); if (!($album_id)) { $album_id = 0; @@ -142,4 +157,4 @@ class Tag_Model_Core extends ORM { } return $url; } -} +} \ No newline at end of file diff --git a/3.0/modules/tag_albums/models/tags_album_id.php b/3.0/modules/tag_albums/models/tags_album_id.php index a9b16b4f..46ed3bc3 100644 --- a/3.0/modules/tag_albums/models/tags_album_id.php +++ b/3.0/modules/tag_albums/models/tags_album_id.php @@ -1,7 +1,7 @@ - -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"): ?> - thumb_proportion($theme->item())) != 1): ?> - - - - - - - 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") ?> - - css("screen-rtl.css") ?> - - - - - get_combined("css") ?> - - - get_combined("script") ?> - - - body_attributes() ?>> - page_top() ?> -
    - site_status() ?> -
    -
    - - - - - - user_menu() ?> - header_top() ?> - - - - - - header_bottom() ?> -
    - - - - - - - -
    -
    -
    -
    -
    - messages() ?> - -
    -
    -
    -
    - page_subtype != "login"): ?> - - -
    -
    - -
    - page_bottom() ?> - - \ No newline at end of file diff --git a/3.0/modules/tag_albums/views/tag_albums_album.html.php b/3.0/modules/tag_albums/views/tag_albums_album.html.php deleted file mode 100644 index 620d3c81..00000000 --- a/3.0/modules/tag_albums/views/tag_albums_album.html.php +++ /dev/null @@ -1,50 +0,0 @@ - -album_top() was changed to $theme->dynamic_top(). - // $item->title and $item->description have been changed to $title and $description. - // - // The g-album-grid block was also taken from album.html.php. The section for uploading new photos to an empty album - // has been removed. Also, $theme->context_menu has been removed as well (it was crashing the page). -?> -
    - dynamic_top() ?> -

    -
    -
    - - -
    -
    -
    -
    - - - -dynamic_bottom() ?> - -paginator() ?> diff --git a/3.0/modules/tag_albums/views/tag_albums_filter.html.php b/3.0/modules/tag_albums/views/tag_albums_filter.html.php new file mode 100644 index 00000000..3f017c61 --- /dev/null +++ b/3.0/modules/tag_albums/views/tag_albums_filter.html.php @@ -0,0 +1,4 @@ + +
    +
    +
    diff --git a/3.0/modules/tag_cloud/controllers/admin_tag_cloud.php b/3.0/modules/tag_cloud/controllers/admin_tag_cloud.php index 2d42e703..8137719a 100644 --- a/3.0/modules/tag_cloud/controllers/admin_tag_cloud.php +++ b/3.0/modules/tag_cloud/controllers/admin_tag_cloud.php @@ -1,7 +1,7 @@ _get_admin_form(); + $this->_print_screen($form); + } + + public function edit() { + access::verify_csrf(); + $cfg = $this->_get_config(); + $form = $this->_get_admin_form(); + if ($form->validate()) { + if ($form->options_general->load_defaults->value) { + // reset all to defaults, redirect with message + module::install("tag_cloud_html5"); + message::success(t("Tag cloud options reset successfully")); + url::redirect("admin/tag_cloud_html5"); + } else { + $valid = true; + // run checks on various inputs + $options_general = $form->options_general; + if ($options_general->height_sidebar->value < 0) { + $form->options_general->height_sidebar->add_error("not_valid", 1); + $valid = false; + } + foreach ($cfg['groups'] as $groupname => $grouptext) { + ${"options".$groupname} = $form->{"options".$groupname}; + if ($options_general->{"maxtags".$groupname}->value < 0) { + $form->options_general->{"maxtags".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"maxSpeed".$groupname}->value < 0) { + $form->{"options".$groupname}->{"maxSpeed".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"initialX".$groupname}->value < -1) || (${"options".$groupname}->{"initialX".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"initialX".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"initialY".$groupname}->value < -1) || (${"options".$groupname}->{"initialY".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"initialY".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"deadZone".$groupname}->value < 0) || (${"options".$groupname}->{"deadZone".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"deadZone".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"zoom".$groupname}->value < 0) { + $form->{"options".$groupname}->{"zoom".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"depth".$groupname}->value < 0) || (${"options".$groupname}->{"depth".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"depth".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"outlineOffset".$groupname}->value < 0) { + $form->{"options".$groupname}->{"outlineOffset".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (preg_match("/^#[0-9A-Fa-f]{6}$/", ${"options".$groupname}->{"outlineColour".$groupname}->value) == 0) { + $form->{"options".$groupname}->{"outlineColour".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((preg_match("/^#[0-9A-Fa-f]{6}$/", ${"options".$groupname}->{"textColour".$groupname}->value) == 0) && (strcmp(${"options".$groupname}->{"textColour".$groupname}->value, "") != 0) ) { + $form->{"options".$groupname}->{"textColour".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"textHeight".$groupname}->value < 0) { + $form->{"options".$groupname}->{"textHeight".$groupname}->add_error("not_valid", 1); + $valid = false; + } + } + if ($valid) { + // all inputs passed tests above; save them + module::set_var("tag_cloud_html5", "show_wholecloud_link", ($options_general->show_wholecloud_link->value == 1)); + module::set_var("tag_cloud_html5", "show_add_tag_form", ($options_general->show_add_tag_form->value == 1)); + module::set_var("tag_cloud_html5", "height_sidebar", $options_general->height_sidebar->value); + module::set_var("tag_cloud_html5", "show_wholecloud_list", ($options_general->show_wholecloud_list->value == 1)); + foreach ($cfg['groups'] as $groupname => $grouptext) { + module::set_var("tag_cloud_html5", "maxtags".$groupname, $options_general->{"maxtags".$groupname}->value); + + $optionsarray = array(); + $optionsarray['maxSpeed'] = ${"options".$groupname}->{"maxSpeed".$groupname}->value; + $optionsarray['deadZone'] = ${"options".$groupname}->{"deadZone".$groupname}->value; + $optionsarray['initial'] = array(${"options".$groupname}->{"initialX".$groupname}->value, ${"options".$groupname}->{"initialY".$groupname}->value); + $optionsarray['initialDecel'] = (${"options".$groupname}->{"initialDecel".$groupname}->value == 1); + $optionsarray['zoom'] = ${"options".$groupname}->{"zoom".$groupname}->value; + $optionsarray['depth'] = ${"options".$groupname}->{"depth".$groupname}->value; + $optionsarray['outlineMethod'] = ${"options".$groupname}->{"outlineMethod".$groupname}->value; + $optionsarray['outlineOffset'] = ${"options".$groupname}->{"outlineOffset".$groupname}->value; + $optionsarray['outlineColour'] = ${"options".$groupname}->{"outlineColour".$groupname}->value; + $optionsarray['textColour'] = ${"options".$groupname}->{"textColour".$groupname}->value; + $optionsarray['textFont'] = ${"options".$groupname}->{"textFont".$groupname}->value; + $optionsarray['textHeight'] = ${"options".$groupname}->{"textHeight".$groupname}->value; + $optionsarray['frontSelect'] = (${"options".$groupname}->{"frontSelect".$groupname}->value == 1); + $optionsarray['wheelZoom'] = false; // note that this is locked - otherwise scrolling through the page screws everything up + module::set_var("tag_cloud_html5", "options".$groupname, json_encode($optionsarray)); + } + // all done; redirect with message + message::success(t("Tag cloud options updated successfully")); + url::redirect("admin/tag_cloud_html5"); + } + } + } + // print screen from existing form - you wind up here if something wasn't validated + $this->_print_screen($form); + } + + private function _get_config() { + // these define the two variable name groups, along with their labels which are always shown with t() for i18n. + $cfg['groups'] = array("_sidebar"=>"Sidebar", "_wholecloud"=>"Whole cloud"); + // this defines the separator that's used between the group name and the attribute, and is *not* put through t(). + $cfg['sep'] = ": "; + return $cfg; + } + + private function _print_screen($form) { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_tag_cloud_html5.html"); + $view->content->form = $form; + print $view; + } + + private function _get_admin_form() { + $cfg = $this->_get_config(); + $sep = $cfg['sep']; + + // Make the form. This form has three groups: group_general, group_sidebar, and group_wholecloud. + $form = new Forge("admin/tag_cloud_html5/edit", "", "post", array("id" => "g-tag-cloud-html5-admin-form")); + + // group_general + $group_general = $form->group("options_general")->label(t("Tag cloud options").$sep.t("General")); + $group_general->checkbox("load_defaults") + ->label(t("Reset all to default values")) + ->checked(false); + $group_general->checkbox("show_wholecloud_link") + ->label(t("Show 'View whole cloud' link in sidebar")) + ->checked(module::get_var("tag_cloud_html5", "show_wholecloud_link", null)); + $group_general->checkbox("show_add_tag_form") + ->label(t("Show 'Add tag to album' form in sidebar (when permitted and applicable)")) + ->checked(module::get_var("tag_cloud_html5", "show_add_tag_form", null)); + $group_general->input("height_sidebar") + ->label(t("Height of sidebar (as fraction of width)")) + ->value(round(module::get_var("tag_cloud_html5", "height_sidebar", null),3)) // round or else it gets 6 decimal places... + ->error_message("not_valid", t("Height of sidebar must be a 1-5 digit number")) + ->rules("required|valid_numeric|length[1,5]"); + $group_general->checkbox("show_wholecloud_list") + ->label(t("Show tag list under cloud on 'View whole cloud' page")) + ->checked(module::get_var("tag_cloud_html5", "show_wholecloud_list", null)); + + foreach ($cfg['groups'] as $groupname => $grouptext) { + // maxtags - note that this is displayed under group_general! + $maxtags = module::get_var("tag_cloud_html5", "maxtags".$groupname, null); + $group_general->input("maxtags".$groupname) + ->label(t($grouptext).$sep.t("max tags shown")) + ->value($maxtags) + ->error_message("not_valid", t("Max tags must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + // group_sidebar and group_wholecloud + $options = json_decode(module::get_var("tag_cloud_html5", "options".$groupname, null),true); + ${"group".$groupname} = $form->group("options".$groupname)->label(t("Tag cloud options").$sep.t($grouptext)); + ${"group".$groupname}->input("maxSpeed".$groupname) + ->label(t($grouptext).$sep.t("max speed (typically 0.01-0.20)")) + ->value($options['maxSpeed']) + ->error_message("not_valid", t("Max speed must be a 1-5 digit number")) + ->rules("required|valid_numeric|length[1,5]"); + ${"group".$groupname}->input("initialX".$groupname) + ->label(t($grouptext).$sep.t("initial horizontal speed (between +/-1.0, as fraction of max speed)")) + ->value($options['initial'][0]) + ->error_message("not_valid", t("Initial horizontal speed must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->input("initialY".$groupname) + ->label(t($grouptext).$sep.t("initial vertical speed (between +/-1.0, as fraction of max speed)")) + ->value($options['initial'][1]) + ->error_message("not_valid", t("Initial vertical speed must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->checkbox("initialDecel".$groupname) + ->label(t($grouptext).$sep.t("initial deceleration (if false, the initial speed is held until a mouseover event)")) + ->checked($options['initialDecel']); + ${"group".$groupname}->input("deadZone".$groupname) + ->label(t($grouptext).$sep.t("dead zone (0.0-1.0, where 0.0 is no dead zone and 1.0 is no active zone)")) + ->value($options['deadZone']) + ->error_message("not_valid", t("Dead zone must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->input("zoom".$groupname) + ->label(t($grouptext).$sep.t("zoom (<1.0 is zoom out, >1.0 is zoom in)")) + ->value($options['zoom']) + ->error_message("not_valid", t("Zoom must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->input("depth".$groupname) + ->label(t($grouptext).$sep.t("depth (0.0-1.0)")) + ->value($options['depth']) + ->error_message("not_valid", t("Depth must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->dropdown("outlineMethod".$groupname) + ->label(t($grouptext).$sep.t("outline method (mouseover event)")) + ->options(array("colour"=>t("change text color"),"outline"=>t("add outline around text"),"block"=>t("add block behind text"))) + ->selected($options['outlineMethod']); + ${"group".$groupname}->input("outlineOffset".$groupname) + ->label(t($grouptext).$sep.t("outline offset (mouseover region size around text, in pixels)")) + ->value($options['outlineOffset']) + ->error_message("not_valid", t("Outline offset must be a 1-2 digit number")) + ->rules("required|valid_numeric|length[1,2]"); + ${"group".$groupname}->input("outlineColour".$groupname) + ->label(t($grouptext).$sep.t("outline color (mouseover color, as #hhhhhh)")) + ->value($options['outlineColour']) + ->error_message("not_valid", t("Outline color must be specified as #hhhhhh")) + ->rules("required|length[7]"); + ${"group".$groupname}->input("textColour".$groupname) + ->label(t($grouptext).$sep.t("text color (as #hhhhhh, or empty to use theme color)")) + ->value($options['textColour']) + ->error_message("not_valid", t("Text color must be specified as empty or #hhhhhh")) + ->rules("length[0,7]"); + ${"group".$groupname}->input("textFont".$groupname) + ->label(t($grouptext).$sep.t("text font family (empty to use theme font)")) + ->value($options['textFont']) + ->error_message("not_valid", t("Text font must be empty or a 0-40 character string")) + ->rules("length[0,40]"); + ${"group".$groupname}->input("textHeight".$groupname) + ->label(t($grouptext).$sep.t("text height (in pixels)")) + ->value($options['textHeight']) + ->error_message("not_valid", t("Text height must be a 1-2 digit number")) + ->rules("required|valid_numeric|length[1,2]"); + ${"group".$groupname}->checkbox("frontSelect".$groupname) + ->label(t($grouptext).$sep.t("only allow tags in front to be selected")) + ->checked($options['frontSelect']); + + } + + $form->submit("")->value(t("Save")); + + return $form; + } + +} diff --git a/3.0/modules/tag_cloud_html5/controllers/tag_cloud.php b/3.0/modules/tag_cloud_html5/controllers/tag_cloud.php new file mode 100644 index 00000000..ce9e0147 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/controllers/tag_cloud.php @@ -0,0 +1,44 @@ +content = new View("tag_cloud_html5_page.html"); + $template->content->title = t("Tag cloud"); + $template->content->cloud = tag::cloud($maxtags); + $template->content->options = $options; + + // Display the page. + print $template; + } +} diff --git a/3.0/modules/tag_cloud_html5/css/admin_tag_cloud_html5.css b/3.0/modules/tag_cloud_html5/css/admin_tag_cloud_html5.css new file mode 100644 index 00000000..28afb51f --- /dev/null +++ b/3.0/modules/tag_cloud_html5/css/admin_tag_cloud_html5.css @@ -0,0 +1,30 @@ +#g-content fieldset li { + display: block; + clear: both; + height: 24px; +} +#g-content fieldset input { + display: inline; + float: left; + height: 18px; + margin-right: 0.8em; + width: 250px; +} +#g-content fieldset select { + display: inline; + float: left; + height: 24px; + margin-right: 0.8em; + width: 256px; +} +#g-content fieldset label { + display: inline; + line-height: 24px; +} +#g-content fieldset label input.checkbox { + float: left; + height: 24px; + margin-right: 0.8em; + width: 20px; + margin-left: 236px; +} \ No newline at end of file diff --git a/3.0/modules/tag_cloud_html5/css/tag_cloud_html5.css b/3.0/modules/tag_cloud_html5/css/tag_cloud_html5.css new file mode 100644 index 00000000..bf20ce8c --- /dev/null +++ b/3.0/modules/tag_cloud_html5/css/tag_cloud_html5.css @@ -0,0 +1,106 @@ +/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* comment out this first block to make the inline tags appear if the cloud doesn't load */ +#g-tag-cloud-html5-tags { + display: none; +} + +#g-tag-cloud-html5-tags ul { + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li { + display: inline; + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page ul li a:hover { + text-decoration: underline; +} + +/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-tag-cloud-html5-page-canvas { + display: block; + margin: 0 auto; +} + +#g-tag-cloud-html5-page-tags ul { + font-size: 1.2em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li { + display: inline; + line-height: 1.5em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-page-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page-tags ul li.size0 a { + color: #9cf; + font-size: 70%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size1 a { + color: #9cf; + font-size: 80%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size2 a { + color: #69f; + font-size: 90%; + font-weight: 300; +} + +#g-tag-cloud-html5-page-tags ul li.size3 a { + color: #69c; + font-size: 100%; + font-weight: 500; +} + +#g-tag-cloud-html5-page-tags ul li.size4 a { + color: #369; + font-size: 110%; + font-weight: 700; +} + +#g-tag-cloud-html5-page-tags ul li.size5 a { + color: #0e2b52; + font-size: 120%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size6 a { + color: #0e2b52; + font-size: 130%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size7 a { + color: #0e2b52; + font-size: 140%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li a:hover { + color: #f30; + text-decoration: underline; +} diff --git a/3.1/modules/tag_cloud/helpers/tag_cloud_block.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_block.php similarity index 54% rename from 3.1/modules/tag_cloud/helpers/tag_cloud_block.php rename to 3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_block.php index f8f2858b..e1df9264 100644 --- a/3.1/modules/tag_cloud/helpers/tag_cloud_block.php +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_block.php @@ -1,7 +1,7 @@ t("Tag Cloud")); + "tag_cloud_html5_site" => (t("Tag cloud")." HTML5")); } static function get($block_id, $theme) { $block = ""; switch ($block_id) { - case "tag_cloud_site": - $options = array(); - foreach (array("tagcolor", "background_color", "mouseover", "transparent", "speed", "distribution") - as $option) { - $value = module::get_var("tag_cloud", $option, null); - if (!empty($value)) { - switch ($option) { - case "tagcolor": - $options["tcolor"] = $value; - break; - case "mouseover": - $options["hicolor"] = $value; - break; - case "background_color": - $options["bgColor"] = $value; - break; - case "transparent": - $options["wmode"] = "transparent"; - break; - case "speed": - $options["tspeed"] = $value; - break; - case "distribution": - $options["distr"] = "true"; - break; - } - } - } + case "tag_cloud_html5_site": + // load settings + $options = module::get_var("tag_cloud_html5", "options_sidebar", null); + $maxtags = module::get_var("tag_cloud_html5", "maxtags_sidebar", null); + $showlink = module::get_var("tag_cloud_html5", "show_wholecloud_link", null); + $showaddtag = module::get_var("tag_cloud_html5", "show_add_tag_form", null); + $height = module::get_var("tag_cloud_html5", "height_sidebar", null); + + // make the block $block = new Block(); $block->css_id = "g-tag"; - $block->title = t("Tag Cloud"); - $block->content = new View("tag_cloud_block.html"); - $block->content->cloud = tag::cloud(30); + $block->title = t("Tag cloud"); + $block->content = new View("tag_cloud_html5_block.html"); + $block->content->cloud = tag::cloud($maxtags); $block->content->options = $options; + $block->content->height = $height; + + // add the 'View whole cloud' link if needed + if ($showlink) { + $block->content->wholecloud_link = "".t("View whole cloud").""; + } else { + $block->content->wholecloud_link = ""; + } - if ($theme->item() && $theme->page_subtype() != "tag" && access::can("edit", $theme->item())) { + // add the 'Add tag' form if needed + if ($theme->item() && $theme->page_subtype() != "tag" && access::can("edit", $theme->item()) && $showaddtag) { $controller = new Tags_Controller(); $block->content->form = tag::get_add_form($theme->item()); } else { $block->content->form = ""; } + break; } return $block; diff --git a/3.1/modules/navcarousel/helpers/navcarousel_event.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_event.php similarity index 81% rename from 3.1/modules/navcarousel/helpers/navcarousel_event.php rename to 3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_event.php index a636ea23..4e7fc3ca 100644 --- a/3.1/modules/navcarousel/helpers/navcarousel_event.php +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_event.php @@ -1,7 +1,7 @@ get("settings_menu") ->append(Menu::factory("link") - ->id("navcarousel_menu") - ->label(t("Navigation carousel")) - ->url(url::site("admin/navcarousel"))); + ->id("tag_cloud_html5") + ->label(t("Tag cloud")." HTML5") + ->url(url::site("admin/tag_cloud_html5"))); } } diff --git a/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_installer.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_installer.php new file mode 100644 index 00000000..422a6f2c --- /dev/null +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_installer.php @@ -0,0 +1,78 @@ + 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 12, + "frontSelect" => true, + "wheelZoom" => false + ))); + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array( + "maxSpeed" => 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 13, + "frontSelect" => true, + "wheelZoom" => false + ))); + module::set_version("tag_cloud_html5", 4); + } + + static function upgrade() { + if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) || + is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) || + (module::get_version("tag_cloud_html5") < 4) ) { + module::install("tag_cloud_html5"); + } + } + + static function uninstall() { + module::clear_all_vars("tag_cloud_html5"); + } + +} diff --git a/3.1/modules/twitter/helpers/twitter_theme.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_theme.php similarity index 87% rename from 3.1/modules/twitter/helpers/twitter_theme.php rename to 3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_theme.php index 2862966d..2bcb516a 100644 --- a/3.1/modules/twitter/helpers/twitter_theme.php +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_theme.php @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class twitter_theme_Core { +class tag_cloud_html5_theme_Core { static function head($theme) { - $theme->script("twitter.js"); - $theme->css("twitter.css"); + $theme->script("jquery.tagcanvas.mod.min.js"); + $theme->css("tag_cloud_html5.css"); } -} +} \ No newline at end of file diff --git a/3.0/modules/tag_cloud_html5/js/excanvas.compiled.js b/3.0/modules/tag_cloud_html5/js/excanvas.compiled.js new file mode 100644 index 00000000..a34ca1da --- /dev/null +++ b/3.0/modules/tag_cloud_html5/js/excanvas.compiled.js @@ -0,0 +1,35 @@ +// Copyright 2006 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. +document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_|| +b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d','","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_), +z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(), +this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a, +0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager= +M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})(); diff --git a/3.0/modules/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js b/3.0/modules/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js new file mode 100644 index 00000000..44bf1876 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js @@ -0,0 +1,27 @@ +/** + * Copyright (C) 2010-2012 Graham Breach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ +/** + * jQuery.tagcanvas 1.17.1 + * For more information, please contact + */ +/** + * Modified by Shad Laws 2012/06/01 -- all modified lines have "mod Shad Laws" comments + * - included initialDecel and deadZone as options + * - set defaults of new options to mimic behavior without them (false and 0) + * - removed two unnecessary variable declarations caught by YUI Compressor + */ +(function(I){var R,Q,G=Math.abs,r=Math.sin,h=Math.cos,z=Math.max,V=Math.min,B={},C={},D={0:"0,",1:"17,",2:"34,",3:"51,",4:"68,",5:"85,",6:"102,",7:"119,",8:"136,",9:"153,",a:"170,",A:"170,",b:"187,",B:"187,",c:"204,",C:"204,",d:"221,",D:"221,",e:"238,",E:"238,",f:"255,",F:"255,"},e,J,d,l=document,y,c={};for(R=0;R<256;++R){Q=R.toString(16);if(R<16){Q="0"+Q}C[Q]=C[Q.toUpperCase()]=R.toString()+","}function N(i){return typeof(i)!="undefined"}function H(j){var Y=j.length-1,X,Z;while(Y){Z=~~(Math.random()*Y);X=j[Y];j[Y]=j[Z];j[Z]=X;--Y}}function n(Y,aa,af,ac){var ab,ae,j,ad,ag=[],Z=Math.PI*(3-Math.sqrt(5)),X=2/Y;for(ab=0;ab0)}function W(ae,j){var X=1024,aa=ae.weightGradient,Z,ac,Y,ad,ab;if(ae.gCanvas){ac=ae.gCanvas.getContext("2d")}else{ae.gCanvas=Z=g(X,1);if(!Z){return null}ac=Z.getContext("2d");ad=ac.createLinearGradient(0,0,X,0);for(Y in aa){ad.addColorStop(1-Y,aa[Y])}ac.fillStyle=ad;ac.fillRect(0,0,X,1)}ab=ac.getImageData(~~((X-1)*j),0,1,1).data;return"rgba("+ab[0]+","+ab[1]+","+ab[2]+","+(ab[3]/255)+")"}function u(aa,Z,X,ad,ab,ac,j){var Y=(ac||0)+(j&&j[0]<0?G(j[0]):0),i=(ac||0)+(j&&j[1]<0?G(j[1]):0);aa.font=Z;aa.textBaseline="top";aa.fillStyle=X;ab&&(aa.shadowColor=ab);ac&&(aa.shadowBlur=ac);j&&(aa.shadowOffsetX=j[0],aa.shadowOffsetY=j[1]);aa.fillText(ad,Y,i)}function m(aj,ab,af,ah,aa,X,ad,ae,j,ai,ag){var Y=ah+G(j[0])+ae+ae,i=aa+G(j[1])+ae+ae,Z,ac;Z=g(Y+ai,i+ag);if(!Z){return null}ac=Z.getContext("2d");u(ac,ab,X,aj,ad,ae,j);return Z}function P(ab,ae,af,Y){var Z=ab.width+G(Y[0])+af+af,j=ab.height+G(Y[1])+af+af,ac,ad,aa=(af||0)+(Y&&Y[0]<0?G(Y[0]):0),X=(af||0)+(Y&&Y[1]<0?G(Y[1]):0);ac=g(Z,j);if(!ac){return null}ad=ac.getContext("2d");ae&&(ad.shadowColor=ae);af&&(ad.shadowBlur=af);Y&&(ad.shadowOffsetX=Y[0],ad.shadowOffsetY=Y[1]);ad.drawImage(ab,aa,X);return ac}function K(aj,ab,ah){var ai=parseInt(aj.length*ah),aa=parseInt(ah*2),Y=g(ai,aa),ae,j,Z,ad,ag,af,X,ac;if(!Y){return null}ae=Y.getContext("2d");ae.fillStyle="#000";ae.fillRect(0,0,ai,aa);u(ae,ah+"px "+ab,"#fff",aj);j=ae.getImageData(0,0,ai,aa);Z=j.width;ad=j.height;ac={min:{x:Z,y:ad},max:{x:-1,y:-1}};for(af=0;af0){if(agac.max.x){ac.max.x=ag}if(afac.max.y){ac.max.y=af}}}}if(Z!=ai){ac.min.x*=(ai/Z);ac.max.x*=(ai/Z)}if(ad!=aa){ac.min.y*=(ai/ad);ac.max.y*=(ai/ad)}Y=null;return ac}function t(i){return"'"+i.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'"}function A(i,j,X){X=X||l;if(X.addEventListener){X.addEventListener(i,j,false)}else{X.attachEvent("on"+i,j)}}function O(Z,ab,Y,j){var X=j.taglist,aa=j.imageScale;if(aa&&!(ab.width&&ab.height)){A("load",function(){O(Z,ab,Y,j)},window);return}if(!Z.complete){A("load",function(){O(Z,ab,Y,j)},Z);return}ab.width=ab.width;ab.height=ab.height;if(aa){Z.width=ab.width*aa;Z.height=ab.height*aa}Y.w=Z.width;Y.h=Z.height;X.push(Y)}function M(Y,X){var j=l.defaultView,i=X.replace(/\-([a-z])/g,function(Z){return Z.charAt(1).toUpperCase()});return(j&&j.getComputedStyle&&j.getComputedStyle(Y,null).getPropertyValue(X))||(Y.currentStyle&&Y.currentStyle[i])}function x(X,j){var i=1,Y;if(X.weightFrom){i=1*(j.getAttribute(X.weightFrom)||X.textHeight)}else{if(Y=M(j,"font-size")){i=(Y.indexOf("px")>-1&&Y.replace("px","")*1)||(Y.indexOf("pt")>-1&&Y.replace("pt","")*1.25)||Y*3.3}else{X.weight=false}}return i}function k(X){L(X);var j=X.target||X.fromElement.parentNode,i=s.tc[j.id];i&&(i.mx=i.my=-1)}function L(Z){var Y,X,j=l.documentElement,aa;for(Y in s.tc){X=s.tc[Y];if(X.tttimer){clearTimeout(X.tttimer);X.tttimer=null}aa=I(X.canvas).offset();if(Z.pageX){X.mx=Z.pageX-aa.left;X.my=Z.pageY-aa.top}else{X.mx=Z.clientX+(j.scrollLeft||l.body.scrollLeft)-aa.left;X.my=Z.clientY+(j.scrollTop||l.body.scrollTop)-aa.top}}}function q(Y){var j=s,i=l.addEventListener?0:1,X=Y.target&&N(Y.target.id)?Y.target.id:Y.srcElement.parentNode.id;if(X&&Y.button==i&&j.tc[X]){L(Y);j.tc[X].Clicked(Y)}}function T(X){var i=s,j=X.target&&N(X.target.id)?X.target.id:X.srcElement.parentNode.id;if(j&&i.tc[j]){X.cancelBubble=true;X.returnValue=false;X.preventDefault&&X.preventDefault();i.tc[j].Wheel((X.wheelDelta||X.detail)>0)}}function o(){var X=s.tc,j;for(j in X){X[j].Draw()}}function b(X,i){var j=r(i),Y=h(i);return{x:X.x,y:(X.y*Y)+(X.z*j),z:(X.y*-j)+(X.z*Y)}}function a(X,i){var j=r(i),Y=h(i);return{x:(X.x*Y)+(X.z*-j),y:X.y,z:(X.x*j)+(X.z*Y)}}function S(X,ae,ad,Z,ac,aa){var i,Y,ab,j=X.z1/(X.z1+X.z2+ae.z);i=ae.y*j*aa;Y=ae.x*j*ac;ab=X.z2+ae.z;return{x:Y,y:i,z:ab}}function f(i){this.ts=new Date().valueOf();this.tc=i;this.x=this.y=this.w=this.h=this.sc=1;this.z=0;this.Draw=i.pulsateTo<1&&i.outlineMethod!="colour"?this.DrawPulsate:this.DrawSimple;this.SetMethod(i.outlineMethod)}e=f.prototype;e.SetMethod=function(X){var j={block:["PreDraw","DrawBlock"],colour:["PreDraw","DrawColour"],outline:["PostDraw","DrawOutline"],classic:["LastDraw","DrawOutline"],none:["LastDraw"]},i=j[X]||j.outline;if(X=="none"){this.Draw=function(){return 1}}else{this.drawFunc=this[i[1]]}this[i[0]]=this.Draw};e.Update=function(ad,ac,ae,aa,ab,j,Z,i){var X=this.tc.outlineOffset,Y=2*X;this.x=ab*ad+Z-X;this.y=ab*ac+i-X;this.w=ab*ae+Y;this.h=ab*aa+Y;this.sc=ab;this.z=j.z};e.DrawOutline=function(aa,i,Z,j,X,Y){aa.strokeStyle=Y;aa.strokeRect(i,Z,j,X)};e.DrawColour=function(Y,ab,Z,ac,X,i,ad,j,aa){return this[ad.image?"DrawColourImage":"DrawColourText"](Y,ab,Z,ac,X,i,ad,j,aa)};e.DrawColourText=function(Z,ac,aa,ad,X,i,ae,j,ab){var Y=ae.colour;ae.colour=i;ae.Draw(Z,j,ab);ae.colour=Y;return 1};e.DrawColourImage=function(ac,af,ad,ag,ab,i,aj,j,ae){var ah=ac.canvas,Z=~~z(af,0),Y=~~z(ad,0),aa=V(ah.width-Z,ag)+0.5|0,ai=V(ah.height-Y,ab)+0.5|0,X;if(y){y.width=aa,y.height=ai}else{y=g(aa,ai)}if(!y){return this.SetMethod("outline")}X=y.getContext("2d");X.drawImage(ah,Z,Y,aa,ai,0,0,aa,ai);ac.clearRect(Z,Y,aa,ai);aj.Draw(ac,j,ae);ac.setTransform(1,0,0,1,0,0);ac.save();ac.beginPath();ac.rect(Z,Y,aa,ai);ac.clip();ac.globalCompositeOperation="source-in";ac.fillStyle=i;ac.fillRect(Z,Y,aa,ai);ac.restore();ac.globalCompositeOperation="destination-over";ac.drawImage(y,0,0,aa,ai,Z,Y,aa,ai);ac.globalCompositeOperation="source-over";return 1};e.DrawBlock=function(aa,i,Z,j,X,Y){aa.fillStyle=Y;aa.fillRect(i,Z,j,X)};e.DrawSimple=function(Z,i,j,Y){var X=this.tc;Z.setTransform(1,0,0,1,0,0);Z.strokeStyle=X.outlineColour;Z.lineWidth=X.outlineThickness;Z.shadowBlur=Z.shadowOffsetX=Z.shadowOffsetY=0;Z.globalAlpha=1;return this.drawFunc(Z,this.x,this.y,this.w,this.h,X.outlineColour,i,j,Y)};e.DrawPulsate=function(aa,i,j,Y){var Z=new Date().valueOf()-this.ts,X=this.tc;aa.setTransform(1,0,0,1,0,0);aa.strokeStyle=X.outlineColour;aa.lineWidth=X.outlineThickness;aa.shadowBlur=aa.shadowOffsetX=aa.shadowOffsetY=0;aa.globalAlpha=X.pulsateTo+((1-X.pulsateTo)*(0.5+(h(2*Math.PI*Z/(1000*X.pulsateTime))/2)));return this.drawFunc(aa,this.x,this.y,this.w,this.h,X.outlineColour,i,j,Y)};e.Active=function(X,i,j){return(i>=this.x&&j>=this.y&&i<=this.x+this.w&&j<=this.y+this.h)};e.PreDraw=e.PostDraw=e.LastDraw=function(){};function E(Z,j,ad,af,ae,ab,X,Y){var ac=Z.ctxt,aa;this.tc=Z;this.image=j.src?j:null;this.name=j.src?"":j;this.title=ad.title||null;this.a=ad;this.p3d={x:af[0]*Z.radius*1.1,y:af[1]*Z.radius*1.1,z:af[2]*Z.radius*1.1};this.x=this.y=0;this.w=ae;this.h=ab;this.colour=X||Z.textColour;this.textFont=Y||Z.textFont;this.weight=this.sc=this.alpha=1;this.weighted=!Z.weight;this.outline=new f(Z);if(this.image){if(Z.txtOpt&&Z.shadow){aa=P(this.image,Z.shadow,Z.shadowBlur,Z.shadowOffset);if(aa){this.image=aa;this.w=aa.width;this.h=aa.height}}}else{this.textHeight=Z.textHeight;this.extents=K(this.name,this.textFont,this.textHeight);this.Measure(ac,Z)}this.SetShadowColour=Z.shadowAlpha?this.SetShadowColourAlpha:this.SetShadowColourFixed;this.SetDraw(Z)}J=E.prototype;J.SetDraw=function(i){this.Draw=this.image?(i.ie>7?this.DrawImageIE:this.DrawImage):this.DrawText;i.noSelect&&(this.CheckActive=function(){})};J.Measure=function(ab,j){this.h=this.extents?this.extents.max.y+this.extents.min.y:this.textHeight;ab.font=this.font=this.textHeight+"px "+this.textFont;this.w=ab.measureText(this.name).width;if(j.txtOpt){var Y=j.txtScale,Z=Y*this.textHeight,aa=Z+"px "+this.textFont,X=[Y*j.shadowOffset[0],Y*j.shadowOffset[1]],i;ab.font=aa;i=ab.measureText(this.name).width;this.image=m(this.name,aa,Z,i,Y*this.h,this.colour,j.shadow,Y*j.shadowBlur,X,Y,Y);if(this.image){this.w=this.image.width/Y;this.h=this.image.height/Y}this.SetDraw(j);j.txtOpt=this.image}};J.SetWeight=function(i){if(!this.name.length){return}this.weight=i;this.Weight(this.tc.ctxt,this.tc);this.Measure(this.tc.ctxt,this.tc)};J.Weight=function(Y,X){var j=this.weight,i=X.weightMode;this.weighted=true;if(i=="colour"||i=="both"){this.colour=W(X,(j-X.min_weight)/(X.max_weight-X.min_weight))}if(i=="size"||i=="both"){this.textHeight=j*X.weightSize}this.extents=K(this.name,this.textFont,this.textHeight)};J.SetShadowColourFixed=function(X,j,i){X.shadowColor=j};J.SetShadowColourAlpha=function(X,j,i){X.shadowColor=p(j,i)};J.DrawText=function(X,ab,j){var ac=this.tc,Z=this.x,Y=this.y,aa,i,ad=this.sc;X.globalAlpha=this.alpha;X.setTransform(ad,0,0,ad,0,0);X.fillStyle=this.colour;ac.shadow&&this.SetShadowColour(X,ac.shadow,this.alpha);X.font=this.font;aa=this.w;i=this.h;Z+=(ab/ad)-(aa/2);Y+=(j/ad)-(i/2);X.fillText(this.name,Z,Y)};J.DrawImage=function(Z,af,Y){var ac=this.x,aa=this.y,ag=this.sc,j=this.image,ad=this.w,X=this.h,ab=this.alpha,ae=this.shadow;Z.globalAlpha=ab;Z.setTransform(ag,0,0,ag,0,0);Z.fillStyle=this.colour;ae&&this.SetShadowColour(Z,ae,ab);ac+=(af/ag)-(ad/2);aa+=(Y/ag)-(X/2);Z.drawImage(j,ac,aa,ad,X)};J.DrawImageIE=function(Z,ad,Y){var j=this.image,ae=this.sc,ac=j.width=this.w*ae,X=j.height=this.h*ae,ab=(this.x*ae)+ad-(ac/2),aa=(this.y*ae)+Y-(X/2);Z.setTransform(1,0,0,1,0,0);Z.globalAlpha=this.alpha;Z.drawImage(j,ab,aa)};J.Calc=function(Z,Y){var i=a(this.p3d,Z),j=this.tc,aa=j.minBrightness,X=j.radius;this.p3d=b(i,Y);i=S(j,this.p3d,this.w,this.h,j.stretchX,j.stretchY);this.x=i.x;this.y=i.y;this.sc=(j.z1+j.z2-i.z)/j.z2;this.alpha=z(aa,V(1,aa+1-((i.z-j.z2+X)/(2*X))))};J.CheckActive=function(Y,ac,X){var ad=this.tc,i=this.outline,ab=this.w,j=this.h,aa=this.x-ab/2,Z=this.y-j/2;i.Update(aa,Z,ab,j,this.sc,this.p3d,ac,X);return i.Active(Y,ad.mx,ad.my)?i:null};J.Clicked=function(aa){var j=this.a,X=j.target,Y=j.href,i;if(X!=""&&X!="_self"){if(self.frames[X]){self.frames[X]=Y}else{try{if(top.frames[X]){top.frames[X]=Y;return}}catch(Z){}window.open(Y,X)}return}if(l.createEvent){i=l.createEvent("MouseEvents");i.initMouseEvent("click",1,1,window,0,0,0,0,0,0,0,0,0,0,null);if(!j.dispatchEvent(i)){return}}else{if(j.fireEvent){if(!j.fireEvent("onclick")){return}}}l.location=Y};function s(){var j,X={mx:-1,my:-1,z1:20000,z2:20000,z0:0.0002,freezeActive:false,activeCursor:"pointer",pulsateTo:1,pulsateTime:3,reverse:false,depth:0.5,maxSpeed:0.05,minSpeed:0,decel:0.95,interval:20,initial:null,initialDecel:false,deadZone:0,hideTags:true,minBrightness:0.1,outlineColour:"#ffff99",outlineThickness:2,outlineOffset:5,outlineMethod:"outline",textColour:"#ff99ff",textHeight:15,textFont:"Helvetica, Arial, sans-serif",shadow:"#000",shadowBlur:0,shadowOffset:[0,0],zoom:1,weight:false,weightMode:"size",weightFrom:null,weightSize:1,weightGradient:{0:"#f00",0.33:"#ff0",0.66:"#0f0",1:"#00f"},txtOpt:true,txtScale:2,frontSelect:false,wheelZoom:true,zoomMin:0.3,zoomMax:3,zoomStep:0.05,shape:"sphere",lock:null,tooltip:null,tooltipDelay:300,tooltipClass:"tctooltip",radiusX:1,radiusY:1,radiusZ:1,stretchX:1,stretchY:1,shuffleTags:false,noSelect:false,noMouse:false,imageScale:1};for(j in X){this[j]=X[j]}this.max_weight=0;this.min_weight=200}d=s.prototype;d.Draw=function(){var ag=this.canvas,ae=ag.width,X=ag.height,j=0,ad=this.yaw,Y=this.pitch,Z=ae/2,aj=X/2,ah=this.ctxt,ab,ai,af,ac=-1,al=this.taglist,aa=al.length,ak=this.frontSelect;if(ad==0&&Y==0&&this.drawn&&!this.deadZoneActive){return this.Animate(ae,X)}ah.setTransform(1,0,0,1,0,0);this.active=null;for(af=0;af=0&&this.my>=0&&al[af].CheckActive(ah,Z,aj);if(ai&&ai.sc>j&&(!ak||ai.z<=0)){ab=ai;ab.index=ac=af;j=ai.sc}}this.active=ab;if(!this.txtOpt&&this.shadow){ah.shadowBlur=this.shadowBlur;ah.shadowOffsetX=this.shadowOffset[0];ah.shadowOffsetY=this.shadowOffset[1]}ah.clearRect(0,0,ae,X);for(af=0;af=0&&aa>=0&&abae){this.yaw=ad>X.z0?X.yaw*X.decel:0}if(j!="y"&&Y>ae){this.pitch=Y>X.z0?X.pitch*X.decel:0}}}};d.Zoom=function(i){this.z2=this.z1*(1/i);this.drawn=0};d.Clicked=function(Y){var X=this.taglist,i=this.active;try{if(i&&X[i.index]){X[i.index].Clicked(Y)}}catch(j){}};d.Wheel=function(j){var X=this.zoom+this.zoomStep*(j?1:-1);this.zoom=V(this.zoomMax,z(this.zoomMin,X));this.Zoom(this.zoom)};s.tc={};jQuery.fn.tagcanvas=function(X,j){var i,Y=j?jQuery("#"+j):this;if(l.all&&!j){return false}i=Y.find("a");if(N(window.G_vmlCanvasManager)){this.each(function(){I(this)[0]=window.G_vmlCanvasManager.initElement(I(this)[0])});X.ie=parseFloat(navigator.appVersion.split("MSIE")[1])}if(!i.length||!this[0].getContext||!this[0].getContext("2d").fillText){return false}this.each(function(){var ab,Z,ad,ag,ah,ac,af,ae=[],aa={sphere:n,vcylinder:w,hcylinder:F};j||(i=I(this).find("a"));ac=new s;for(ab in X){ac[ab]=X[ab]}ac.z1=(19800/(Math.exp(ac.depth)*(1-1/Math.E)))+20000-19800/(1-(1/Math.E));ac.z2=ac.z1*(1/ac.zoom);ac.radius=(this.height>this.width?this.width:this.height)*0.33*(ac.z2+ac.z1)/(ac.z1);ac.yaw=ac.initial?ac.initial[0]*ac.maxSpeed:0;ac.pitch=ac.initial?ac.initial[1]*ac.maxSpeed:0;ac.canvas=I(this)[0];ac.ctxt=ac.canvas.getContext("2d");ac.textFont=ac.textFont&&t(ac.textFont);ac.deadZone*=1;ac.pulsateTo*=1;ac.textHeight*=1;ac.minBrightness*=1;ac.ctxt.textBaseline="top";if(ac.shadowBlur||ac.shadowOffset[0]||ac.shadowOffset[1]){ac.ctxt.shadowColor=ac.shadow;ac.shadow=ac.ctxt.shadowColor;ac.shadowAlpha=v()}else{delete ac.shadow}ac.taglist=[];ac.shape=aa[ac.shape]||aa.sphere;Z=ac.shape(i.length,ac.radiusX,ac.radiusY,ac.radiusZ);ac.shuffleTags&&H(Z);ac.listLength=i.length;for(ab=0;abac.max_weight){ac.max_weight=af}if(afac.min_weight)){for(ab=0;ab + +
    +

    + +

    +

    + excanvas to maintain compatibility with pre-9.0 Internet Explorer.") ?> +

    +

    + here.") ?> +

    + +
    diff --git a/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_block.html.php b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_block.html.php new file mode 100644 index 00000000..68d12e47 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_block.html.php @@ -0,0 +1,38 @@ + + + +
    + + + +
    +
    + +
    + + diff --git a/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_page.html.php b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_page.html.php new file mode 100644 index 00000000..c8d58b97 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_page.html.php @@ -0,0 +1,38 @@ + + + +
    +
    + dynamic_top() ?> +
    +

    +
    +
    + + + +
    +
    + +
    +dynamic_bottom() ?> diff --git a/3.0/modules/tag_cloud_page/controllers/tag_cloud_page.php b/3.0/modules/tag_cloud_page/controllers/tag_cloud_page.php index 2fc045df..f00e29ad 100644 --- a/3.0/modules/tag_cloud_page/controllers/tag_cloud_page.php +++ b/3.0/modules/tag_cloud_page/controllers/tag_cloud_page.php @@ -1,7 +1,7 @@ group("GoogleMapsKey"); $googlemap_group->input("google_api_key") - ->label(t("Google Maps API Key")) - ->value(module::get_var("tagsmap", "googlemap_api_key")) - ->rules("required"); + ->label(t("Google APIs Console key (optional):")) + ->value(module::get_var("tagsmap", "googlemap_api_key")); // Input boxes for the Maps starting location map type and zoom. $startingmap_group = $form->group("GoogleMapsPos"); @@ -212,6 +210,8 @@ class Admin_TagsMap_Controller extends Admin_Controller { "G_PHYSICAL_MAP" => "Physical", "G_SATELLITE_3D_MAP" => "Google Earth")) ->selected(module::get_var("tagsmap", "googlemap_type")); + $startingmap_group->checkbox("restrict_maps")->label(t("Restrict maps to registered users?")) + ->checked(module::get_var("tagsmap", "restrict_maps", false)); // Add a save button to the form. $form->submit("SaveSettings")->value(t("Save")); @@ -234,6 +234,7 @@ class Admin_TagsMap_Controller extends Admin_Controller { module::set_var("tagsmap", "googlemap_longitude", $form->GoogleMapsPos->google_starting_longitude->value); module::set_var("tagsmap", "googlemap_zoom", $form->GoogleMapsPos->google_default_zoom->value); module::set_var("tagsmap", "googlemap_type", $form->GoogleMapsPos->google_default_type->value); + module::set_var("tagsmap", "restrict_maps", $form->GoogleMapsPos->restrict_maps->value); // Display a success message and redirect back to the TagsMap admin page. message::success(t("Your settings have been saved.")); @@ -247,4 +248,4 @@ class Admin_TagsMap_Controller extends Admin_Controller { $view->content->tags = ORM::factory("tag")->order_by("name", "ASC")->find_all(); print $view; } -} \ No newline at end of file +} diff --git a/3.0/modules/tagsmap/controllers/tagsmap.php b/3.0/modules/tagsmap/controllers/tagsmap.php index 8725db86..8e01f5b5 100644 --- a/3.0/modules/tagsmap/controllers/tagsmap.php +++ b/3.0/modules/tagsmap/controllers/tagsmap.php @@ -1,7 +1,7 @@ guest)) { + throw new Kohana_404_Exception(); + } + // Generate a list of GPS coordinates. $tagsGPS = ORM::factory("tags_gps")->find_all(); - + // Set up and display the actual page. // If fullsize is true, allow the map to take up the entire browser window, // if not, then display the map in the gallery theme. if ($fullsize == true) { $view = new View("tagsmap_googlemap.html"); $view->map_fullsize = true; - + // Load in module preferences. $view->tags_gps = $tagsGPS; $view->google_map_key = module::get_var("tagsmap", "googlemap_api_key"); @@ -38,21 +43,28 @@ class TagsMap_Controller extends Controller { $view->google_map_longitude = module::get_var("tagsmap", "googlemap_longitude"); $view->google_map_zoom = module::get_var("tagsmap", "googlemap_zoom"); $view->google_map_type = module::get_var("tagsmap", "googlemap_type"); - + print $view; } else { - $template = new Theme_View("page.html", "other", "TagsMap"); + // Set up breadcrumbs. + $breadcrumbs = array(); + $root = item::root(); + $breadcrumbs[] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[] = Breadcrumb::instance(t("Tag Map"), url::site("tagsmap/googlemap/"))->set_last(); + + $template = new Theme_View("page.html", "other", "tag"); $template->page_title = t("Gallery :: Map"); + $template->set_global(array("breadcrumbs" => $breadcrumbs)); $template->content = new View("tagsmap_googlemap.html"); - // Load in module preferences. + // Load in module preferences. $template->content->tags_gps = $tagsGPS; $template->content->google_map_key = module::get_var("tagsmap", "googlemap_api_key"); $template->content->google_map_latitude = module::get_var("tagsmap", "googlemap_latitude"); $template->content->google_map_longitude = module::get_var("tagsmap", "googlemap_longitude"); $template->content->google_map_zoom = module::get_var("tagsmap", "googlemap_zoom"); $template->content->google_map_type = module::get_var("tagsmap", "googlemap_type"); - + print $template; } } diff --git a/3.0/modules/tagsmap/css/tagsmap_menu.css b/3.0/modules/tagsmap/css/tagsmap_menu.css index 925e1181..9d89d015 100644 --- a/3.0/modules/tagsmap/css/tagsmap_menu.css +++ b/3.0/modules/tagsmap/css/tagsmap_menu.css @@ -1,3 +1,7 @@ #g-view-menu #g-tagsmap-link { background-image: url('../images/ico-view-tagsmap.png'); } +#g-tagsmap-dialog { + color: black; +} +#g-tagsmap-dialog a { color: blue !important; } diff --git a/3.0/modules/tagsmap/helpers/tagsmap_event.php b/3.0/modules/tagsmap/helpers/tagsmap_event.php index b38d9f50..81d14736 100644 --- a/3.0/modules/tagsmap/helpers/tagsmap_event.php +++ b/3.0/modules/tagsmap/helpers/tagsmap_event.php @@ -1,7 +1,7 @@ guest)) { + return; + } $menu->append(Menu::factory("link") ->id("tagsmap") ->label(t("View Map")) @@ -56,18 +60,38 @@ class tagsmap_event_Core { } static function movie_menu($menu, $theme) { + // Make sure the user can view maps before displaying one. + if ((module::get_var("tagsmap", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } $menu->append(Menu::factory("link") ->id("tagsmap") ->label(t("View Map")) ->url(url::site("tagsmap/googlemap/")) ->css_id("g-tagsmap-link")); } - + + static function tag_menu($menu, $theme) { + // Make sure the user can view maps before displaying one. + if ((module::get_var("tagsmap", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + $menu->append(Menu::factory("link") + ->id("tagsmap") + ->label(t("View Map")) + ->url(url::site("tagsmap/googlemap/")) + ->css_id("g-tagsmap-link")); + } + static function album_menu($menu, $theme) { + // Make sure the user can view maps before displaying one. + if ((module::get_var("tagsmap", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } $menu->append(Menu::factory("link") ->id("tagsmap") ->label(t("View Map")) ->url(url::site("tagsmap/googlemap/")) ->css_id("g-tagsmap-link")); } -} \ No newline at end of file +} diff --git a/3.0/modules/tagsmap/helpers/tagsmap_installer.php b/3.0/modules/tagsmap/helpers/tagsmap_installer.php index 4567d4df..ca404509 100644 --- a/3.0/modules/tagsmap/helpers/tagsmap_installer.php +++ b/3.0/modules/tagsmap/helpers/tagsmap_installer.php @@ -1,7 +1,7 @@ css("tagsmap_menu.css"); } diff --git a/3.0/modules/tagsmap/models/tags_gps.php b/3.0/modules/tagsmap/models/tags_gps.php index 31f7943f..669cbc05 100644 --- a/3.0/modules/tagsmap/models/tags_gps.php +++ b/3.0/modules/tagsmap/models/tags_gps.php @@ -1,7 +1,7 @@ -
    You may sign up for a Google Maps API key here.

    +
    + here.

    diff --git a/3.0/modules/tagsmap/views/admin_tagsmap_delete.html.php b/3.0/modules/tagsmap/views/admin_tagsmap_delete.html.php index 8b6c0e95..dd4704a6 100644 --- a/3.0/modules/tagsmap/views/admin_tagsmap_delete.html.php +++ b/3.0/modules/tagsmap/views/admin_tagsmap_delete.html.php @@ -6,4 +6,3 @@ ">Cancel - diff --git a/3.0/modules/tagsmap/views/admin_tagsmap_edit.html.php b/3.0/modules/tagsmap/views/admin_tagsmap_edit.html.php index e01f2b29..ff08cbbc 100644 --- a/3.0/modules/tagsmap/views/admin_tagsmap_edit.html.php +++ b/3.0/modules/tagsmap/views/admin_tagsmap_edit.html.php @@ -9,7 +9,13 @@ - +\n"; +} else { + print "\n"; +} +?> + - diff --git a/3.0/modules/tagsmap/views/tagsmap_googlemap.html.php b/3.0/modules/tagsmap/views/tagsmap_googlemap.html.php index 8e08eabd..aee5a028 100644 --- a/3.0/modules/tagsmap/views/tagsmap_googlemap.html.php +++ b/3.0/modules/tagsmap/views/tagsmap_googlemap.html.php @@ -9,7 +9,12 @@ - +\n"; +} else { + print "\n"; +} +?> - - - -
    -
    - -
    -
    - -
    -
    - -
    +
    + + +
    -
    - - +item())): ?> 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..31d14722 --- /dev/null +++ b/3.0/themes/pear4gallery3/views/facebook_comment.html.php @@ -0,0 +1,25 @@ + +
    +

    Facebook comments for

    +
    + + +
    + + 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..f5b040d4 100644 --- a/3.0/themes/pear4gallery3/views/page.html.php +++ b/3.0/themes/pear4gallery3/views/page.html.php @@ -1,14 +1,35 @@ +page_subtype == "search") { + $v = new View("thumbs.html"); + $v->children = $content->items; + print $v; + die(0); + } + echo new View("thumbs.html"); + die(0); +} +?> 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']) { +?> + +html_attributes() ?> xml:lang="en" lang="en"> + + Photo page + + + head() ?> + + Page moved here. + + @@ -49,9 +70,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..cf7d99f1 --- /dev/null +++ b/3.0/themes/pear4gallery3/views/search.html.php @@ -0,0 +1,18 @@ + + + + + + set_global("children", $items);// = $items; + print $v;?> + +

    + %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..fe61e065 --- /dev/null +++ b/3.0/themes/pear4gallery3/views/thumbs.html.php @@ -0,0 +1,71 @@ + +paginator() ?> + + + $child): ?> + 50) break; ?> + + is_album()): ?> + url()."/'+getAlbumHash((typeof skimimg === 'undefined') ? 0 : 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_event.php b/3.1/modules/adsense/helpers/adsense_event.php deleted file mode 100644 index d72165e1..00000000 --- a/3.1/modules/adsense/helpers/adsense_event.php +++ /dev/null @@ -1,28 +0,0 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("adsense_menu") - ->label(t("Adsense")) - ->url(url::site("admin/adsense"))); - } -} 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/module.info b/3.1/modules/bitly/module.info deleted file mode 100644 index 31ac2592..00000000 --- a/3.1/modules/bitly/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "bit.ly" -description = "Shorten and track Gallery URLs with bit.ly (http://bit.ly). You'll need a bit.ly API key." -version = 1 -author_name = "Chad Kieffer" -author_url = "http://2tbsp.com/content/bitly-module-gallery-3" -info_url = "http://codex.gallery2.org/Gallery3:Modules:bitly" -discuss_url = "http://gallery.menalto.com/forum_module_bitly" diff --git a/3.1/modules/bitly/views/admin_bitly.html.php b/3.1/modules/bitly/views/admin_bitly.html.php deleted file mode 100644 index d1d6703a..00000000 --- a/3.1/modules/bitly/views/admin_bitly.html.php +++ /dev/null @@ -1,18 +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/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_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/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_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_block.php b/3.1/modules/iptc/helpers/iptc_block.php deleted file mode 100644 index 1a6ed955..00000000 --- a/3.1/modules/iptc/helpers/iptc_block.php +++ /dev/null @@ -1,43 +0,0 @@ - t("IPTC info")); - } - - 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; - } - return $block; - } -} \ No newline at end of file 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/module.info b/3.1/modules/jhead/module.info deleted file mode 100644 index ea0de472..00000000 --- a/3.1/modules/jhead/module.info +++ /dev/null @@ -1,7 +0,0 @@ -name = "jhead Autorotation" -description = "Invoke jhead to rotate images according to Exif orientation tag." -version = 1 -author_name = "" -author_url = "" -info_url = "http://codex.gallery2.org/Gallery3:Modules:jhead" -discuss_url = "http://gallery.menalto.com/forum_module_jhead" diff --git a/3.1/modules/keeporiginal/controllers/keeporiginal.php b/3.1/modules/keeporiginal/controllers/keeporiginal.php deleted file mode 100644 index 36f6affe..00000000 --- a/3.1/modules/keeporiginal/controllers/keeporiginal.php +++ /dev/null @@ -1,72 +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 a4f76361..00000000 --- a/3.1/modules/minislideshow/helpers/minislideshow_event.php +++ /dev/null @@ -1,71 +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. - $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() ?>