Merge branch 'master' of github.com:gallery/gallery3-contrib
2
client/PHP/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# local file to provide configuration for the client code. See README.
|
||||
local_config.php
|
4
client/PHP/README
Normal file
@ -0,0 +1,4 @@
|
||||
# Create a local file called local_config.php and add the following content:
|
||||
$SITE_URL = "http://<your domain>/gallery3/index.php/rest";
|
||||
$USER = "<user admin Id>";
|
||||
$PASSWORD = "<user admin password>";
|
20
modules/kbd_nav/changelog.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Kbd Navigation Changelog
|
||||
|
||||
version 1.5:
|
||||
- Fix for RTL detection
|
||||
- Added support for Wind theme
|
||||
|
||||
version 1.4:
|
||||
- Added RTL detection
|
||||
|
||||
version 1.3:
|
||||
- Internal revision
|
||||
|
||||
version 1.2:
|
||||
- Added support for GreyDragon Photo Slideshow navigation - in Photo SB slideshow mode, key navigation is superseded by slideshow navigation.
|
||||
|
||||
version 1.1:
|
||||
- Internal revision
|
||||
|
||||
version 1.0:
|
||||
- Initial release
|
8
modules/kbd_nav/helpers/kbd_nav_theme.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
|
||||
class Kbd_Nav_theme_Core {
|
||||
|
||||
static function head($theme) {
|
||||
$theme->script("kbd_nav.js");
|
||||
}
|
||||
}
|
102
modules/kbd_nav/js/kbd_nav.js
Normal file
@ -0,0 +1,102 @@
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2010 Serguei Dosyukov, http://blog.dragonsoft.us
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
|
||||
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
$.fn.KbdNavigation = function(options, callback) {
|
||||
|
||||
this.options = options || {};
|
||||
var opt = this.options;
|
||||
this.callback = callback || null;
|
||||
var clbk = this.callback;
|
||||
|
||||
$(this).bind("keydown", function(event) {
|
||||
if ($('#sb-body-inner>img#sb-content').is(':visible')) {
|
||||
return false;
|
||||
}
|
||||
// ignore shortcuts when inside a jQuery dialog; otherwise it becomes impossible
|
||||
// to navigate the cursor inside an input box
|
||||
if ($('.ui-widget-overlay').is(':visible')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var direction = "ltr";
|
||||
if (document.body) {
|
||||
if (window.getComputedStyle) {
|
||||
direction = window.getComputedStyle(document.body, null).direction;
|
||||
} else if (document.body.currentStyle) {
|
||||
direction = document.body.currentStyle.direction;
|
||||
}
|
||||
}
|
||||
|
||||
var lnk = "";
|
||||
var lnk_first, lnk_prev, lnk_parent, lnk_next, lnk_last;
|
||||
|
||||
if(opt.first) { lnk_first = opt.first; } else { lnk_first = $("#g-navi-first").attr("href"); }
|
||||
if(opt.prev) { lnk_prev = opt.prev; } else { lnk_prev = $("#g-navi-prev").attr("href"); }
|
||||
if(opt.parent) { lnk_parent = opt.parent; } else { lnk_parent = $("#g-navi-parent").attr("href"); }
|
||||
if(opt.next) { lnk_next = opt.next; } else { lnk_next = $("#g-navi-next").attr("href"); }
|
||||
if(opt.last) { lnk_last = opt.last; } else { lnk_last = $("#g-navi-last").attr("href"); }
|
||||
|
||||
// Support for standard Wind Theme tags
|
||||
if(!lnk_first) { lnk_first = $(".g-paginator .ui-icon-seek-first").parent().attr("href"); }
|
||||
if(!lnk_prev) { lnk_prev = $(".g-paginator .ui-icon-seek-prev").parent().attr("href"); }
|
||||
if(!lnk_next) { lnk_next = $(".g-paginator .ui-icon-seek-next").parent().attr("href"); }
|
||||
if(!lnk_last) { lnk_last = $(".g-paginator .ui-icon-seek-end").parent().attr("href"); }
|
||||
|
||||
var keyCode = event.keyCode;
|
||||
|
||||
if (direction == "rtl") {
|
||||
switch(keyCode) {
|
||||
case 0x25: // Left
|
||||
keyCode = 0x27;
|
||||
break;
|
||||
case 0x27: // Right
|
||||
keyCode = 0x25;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(keyCode) {
|
||||
case 0x25: // Ctr+Left/Left
|
||||
if(event.ctrlKey) { lnk = lnk_first; } else { lnk = lnk_prev; }
|
||||
break;
|
||||
case 0x26: // Ctrl+Up
|
||||
if(event.ctrlKey) { lnk = lnk_parent; }
|
||||
break;
|
||||
case 0x27: // Ctrl+Right/Right
|
||||
if(event.ctrlKey) { lnk = lnk_last; } else { lnk = lnk_next; }
|
||||
break;
|
||||
}
|
||||
|
||||
if(lnk) {
|
||||
if(typeof clbk == 'function') {
|
||||
clbk();
|
||||
return false;
|
||||
} else {
|
||||
window.location = lnk;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready( function() {
|
||||
$(document).KbdNavigation({});
|
||||
if ($('#sb-content').is(':visible')) { return true; }
|
||||
});
|
3
modules/kbd_nav/module.info
Normal file
@ -0,0 +1,3 @@
|
||||
name = "Kbd Navigation"
|
||||
description = "Adds keyboard navigation to the gallery.<br />Version 1.5 | By <a href=http://blog.dragonsoft.us>Serguei Dosyukov</a> | <a href=http://codex.gallery2.org/Gallery3:Modules:kbd_nav>Visit plugin Site</a> | <a href=http://gallery.menalto.com/node/95438>Support</a>"
|
||||
version = 5
|
21
modules/photoannotation/controllers/admin_photoannotation.php
Normal file → Executable file
@ -48,17 +48,34 @@ class Admin_Photoannotation_Controller extends Admin_Controller {
|
||||
}
|
||||
//Load all existing tag annotations
|
||||
$tag_annotations = ORM::factory("items_face")->where("tag_id", "=", $sourcetag->id)->find_all();
|
||||
|
||||
//Disable user notifications so that users don't get flooded with mails
|
||||
$old_notification_setting = module::get_var("photoannotation", "nonotifications", false);
|
||||
module::set_var("photoannotation", "nonotifications", true, true);
|
||||
foreach ($tag_annotations as $tag_annotation) {
|
||||
photoannotation::saveuser($targetuser->id, $tag_annotation->item_id, $tag_annotation->x1, $tag_annotation->y1, $tag_annotation->x2, $tag_annotation->y2, $tag_annotation->description);
|
||||
//Delete the old annotation
|
||||
$tag_annotation->delete();
|
||||
}
|
||||
//Remove and delete old tag
|
||||
if ($form->deletetag->value) {
|
||||
$this->_remove_tag($sourcetag, true);
|
||||
} elseif ($form->removetag->value) {
|
||||
$this->_remove_tag($sourcetag, false);
|
||||
}
|
||||
module::set_var("photoannotation", "nonotifications", $old_notification_setting, true);
|
||||
message::success(t("%count tag annotations (%tagname) have been converted to user annotations (%username)", array("count" => count($tag_annotations), "tagname" => $sourcetag->name, "username" => $targetuser->display_name())));
|
||||
url::redirect("admin/photoannotation/converter");
|
||||
}
|
||||
print $this->_get_converter_view($form);
|
||||
}
|
||||
|
||||
private function _remove_tag($tag, $delete) {
|
||||
$name = $tag->name;
|
||||
db::build()->delete("items_tags")->where("tag_id", "=", $tag->id)->execute();
|
||||
if ($delete) {
|
||||
$tag->delete();
|
||||
}
|
||||
}
|
||||
|
||||
public function handler() {
|
||||
access::verify_csrf();
|
||||
@ -223,6 +240,8 @@ class Admin_Photoannotation_Controller extends Admin_Controller {
|
||||
->options($tag_array);
|
||||
$form->dropdown("targetuser")->label(t("Select user"))
|
||||
->options($user_array);
|
||||
$form->checkbox("deletetag")->label(t("Delete the tag after conversion."));
|
||||
$form->checkbox("removetag")->label(t("Remove the tag from photos after conversion."));
|
||||
$form->submit("submit")->value(t("Convert"));
|
||||
return $form;
|
||||
}
|
||||
|
185
modules/themeroller/controllers/admin_themeroller.php
Executable file
@ -0,0 +1,185 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 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_Themeroller_Controller extends Admin_Controller {
|
||||
public function form_upload() {
|
||||
$v = new View("admin_themeroller_upload.html");
|
||||
|
||||
list ($v->form, $v->errors) = $this->_get_upload_form();
|
||||
$v->is_writable = is_writable(THEMEPATH);
|
||||
$v->action = "admin/themeroller/form_create";
|
||||
$submit_class = "ui-state-default ui-corner-all submit g-left";
|
||||
|
||||
if ($v->not_writable = !is_writable(THEMEPATH)) {
|
||||
$submit_class .= " ui-state-disabled";
|
||||
}
|
||||
$v->submit_class = $submit_class;
|
||||
$v->script_data = array(
|
||||
"g3sid" => Session::instance()->id(),
|
||||
"user_agent" => Input::instance()->server("HTTP_USER_AGENT"),
|
||||
"csrf" => access::csrf_token());
|
||||
json::reply(array("html" => (string) $v));
|
||||
}
|
||||
|
||||
public function form_create() {
|
||||
$theme_name = Session::instance()->get_once("theme_name");
|
||||
json::reply(array("html" => (string) $this->_get_theme_form($theme_name)));
|
||||
}
|
||||
|
||||
public function upload() {
|
||||
access::verify_csrf();
|
||||
|
||||
$validation = new Validation(array_merge($_POST, $_FILES));
|
||||
$validation->add_rules("zip_file", "upload::valid", "upload::required", "upload::type[zip]");
|
||||
$validation->add_rules("is_admin", "chars[0,1]");
|
||||
$validation->add_callbacks("zip_file", array($this, "_unload_zip"));
|
||||
if ($validation->validate()) {
|
||||
$session = Session::instance();
|
||||
$themeroller_name = $session->get("themeroller_name");
|
||||
$is_admin = $validation["is_admin"];
|
||||
$counter = 0;
|
||||
$theme_name_generated = $theme_name = ($is_admin ? "admin_" : "") . $themeroller_name;
|
||||
while (file_exists(THEMEPATH . "$theme_name_generated/theme.info")) {
|
||||
$counter++;
|
||||
$theme_name_generated = "{$theme_name}_{$counter}";
|
||||
}
|
||||
|
||||
$theme_name = strtolower(strtr($theme_name_generated, " ", "_"));
|
||||
$session->set("theme_name", $theme_name);
|
||||
$session->set("themeroller_is_admin", $is_admin);
|
||||
print "FILEID: {$validation["zip_file"]["tmp_name"]}";
|
||||
} else {
|
||||
header("HTTP/1.1 400 Bad Request");
|
||||
print "ERROR: " . t("Invalid zip archive");
|
||||
}
|
||||
}
|
||||
|
||||
public function create() {
|
||||
access::verify_csrf();
|
||||
|
||||
$form = $this->_get_theme_form();
|
||||
if ($form->validate()) {
|
||||
$session = Session::instance();
|
||||
$extract_path = $session->get_once("theme_extract_path");
|
||||
$v = new View("admin_themeroller_progress.html");
|
||||
|
||||
$task_def = Task_Definition::factory()
|
||||
->callback("themeroller_task::create_theme")
|
||||
->description(t("Generate theme from a themeroller archive"))
|
||||
->name(t("Generate theme"));
|
||||
|
||||
$v->task = task::create($task_def,
|
||||
array("path" => $extract_path,
|
||||
"original_name" => $form->theme->original->value,
|
||||
"theme_name" => $form->theme->theme_name->value,
|
||||
"display_name" => $form->theme->display_name->value,
|
||||
"description" => $form->theme->description->value,
|
||||
"is_admin" => $session->get("themeroller_is_admin")));
|
||||
|
||||
json::reply(array("html" => (string) $v));
|
||||
} else {
|
||||
json::reply(array("result" => "error", "html" => (string) $form));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the task of creating the theme
|
||||
*/
|
||||
static function run($task_id) {
|
||||
access::verify_csrf();
|
||||
|
||||
$task = ORM::factory("task", $task_id);
|
||||
if (!$task->loaded() || $task->owner_id != identity::active_user()->id) {
|
||||
access::forbidden();
|
||||
}
|
||||
|
||||
$task = task::run($task_id);
|
||||
|
||||
// Prevent the JavaScript code from breaking by forcing a period as
|
||||
// decimal separator for all locales with sprintf("%F", $value).
|
||||
json::reply(array("done" => (bool)$task->done,
|
||||
"status" => (string)$task->status,
|
||||
"percent_complete" => sprintf("%F", $task->percent_complete)));
|
||||
}
|
||||
|
||||
static function _is_theme_defined($name) {
|
||||
$theme_name = strtolower(strtr($name->value, " ", "_"));
|
||||
if (file_exists(THEMEPATH . "$theme_name/theme.info")) {
|
||||
$name->add_error("conflict", 1);
|
||||
}
|
||||
}
|
||||
|
||||
public function _unload_zip(Validation $post, $field) {
|
||||
$zipfile = $post["zip_file"]["tmp_name"];
|
||||
if (false !== ($extract_path = themeroller::extract_zip_file($zipfile))) {
|
||||
$theme_name = themeroller::get_theme_name($extract_path);
|
||||
if (!empty($theme_name)) {
|
||||
Session::instance()->set("themeroller_name", $theme_name);
|
||||
} else {
|
||||
Kohana_Log::add("error", "zip file: css directory not found");
|
||||
$post->add_error($field, "invalid zipfile");
|
||||
}
|
||||
} else {
|
||||
Kohana_Log::add("error", "zip file: open failed");
|
||||
$post->add_error($field, "invalid zipfile");
|
||||
}
|
||||
if (file_exists($zipfile)) {
|
||||
unlink($zipfile);
|
||||
}
|
||||
}
|
||||
|
||||
private function _get_theme_form($theme_name=null) {
|
||||
$session = Session::instance();
|
||||
$form = new Forge("admin/themeroller/create", "", "post", array("id" => "g-themeroller-create-form"));
|
||||
$form_group = $form->group("theme")->label(t("Create theme"));
|
||||
$original_name = $form_group->hidden("original");
|
||||
$name_field = $form_group->input("theme_name")->label(t("Theme Name"))->id("g-name")
|
||||
->rules("required")
|
||||
->callback("Admin_Themeroller_Controller::_is_theme_defined")
|
||||
->error_messages("conflict", t("There is already a theme with that name"))
|
||||
->error_messages("required", t("You must enter a theme name"));
|
||||
$display_name = $form_group->input("display_name")->label(t("Display Name"))
|
||||
->id("g-display-name")
|
||||
->rules("required")
|
||||
->error_messages("required", t("You must enter a theme display name"));
|
||||
if (!empty($theme_name)) {
|
||||
$name_field->value($theme_name);
|
||||
$is_admin = $session->get("themeroller_is_admin");
|
||||
$themeroller_name = $session->get("themeroller_name");
|
||||
$display_name->value(ucwords($is_admin ? t("%name administration theme",
|
||||
array("name" => str_replace("-", " ", $themeroller_name))) :
|
||||
t("%name theme",
|
||||
array("name" => str_replace("-", " ", $themeroller_name)))));
|
||||
$original_name->hidden("original")->value(Session::instance()->get("themeroller_name"));
|
||||
}
|
||||
$form_group->textarea("description")->label(t("Description"))
|
||||
->id("g-description")
|
||||
->value(t("A generated theme based on the ui themeroller '%name' styling", array("name" => str_replace("admin_", "", $theme_name))))
|
||||
->rules("required")
|
||||
->error_messages("required", t("You must enter a theme description name"));
|
||||
$form_group->submit("")->value(t("Create"));
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
private function _get_upload_form() {
|
||||
$form = array("zip_file" => "", "is_admin" => "");
|
||||
$errors = array_fill_keys(array_keys($form), "");
|
||||
return array($form, $errors);
|
||||
}
|
||||
}
|
89
modules/themeroller/data/admin_views/admin.html.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<title>
|
||||
<? if ($page_title): ?>
|
||||
<?= t("Gallery Admin: %page_title", array("page_title" => $page_title)) ?>
|
||||
<? else: ?>
|
||||
<?= t("Admin dashboard") ?>
|
||||
<? endif ?>
|
||||
</title>
|
||||
<link rel="shortcut icon" href="<?= url::file("lib/images/favicon.ico") ?>" type="image/x-icon" />
|
||||
|
||||
<?= $theme->css("yui/reset-fonts-grids.css") ?>
|
||||
<?= $theme->css("themeroller/ui.base.css") ?>
|
||||
<?= $theme->css("superfish/css/superfish.css") ?>
|
||||
<?= $theme->css("gallery.common.css") ?>
|
||||
<?= $theme->css("screen.css") ?>
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" type="text/css" href="<?= $theme->url("fix-ie.css") ?>"
|
||||
media="screen,print,projection" />
|
||||
<![endif]-->
|
||||
|
||||
<?= $theme->script("jquery.js") ?>
|
||||
<?= $theme->script("jquery.form.js") ?>
|
||||
<?= $theme->script("jquery-ui.js") ?>
|
||||
<?= $theme->script("gallery.common.js") ?>
|
||||
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
|
||||
<script type="text/javascript">
|
||||
var MSG_CANCEL = <?= t("Cancel")->for_js() ?>;
|
||||
</script>
|
||||
<?= $theme->script("gallery.ajax.js") ?>
|
||||
<?= $theme->script("gallery.dialog.js") ?>
|
||||
<?= $theme->script("superfish/js/superfish.js") ?>
|
||||
<?= $theme->script("ui.init.js") ?>
|
||||
|
||||
<?= $theme->admin_head() ?>
|
||||
</head>
|
||||
|
||||
<body <?= $theme->body_attributes() ?>>
|
||||
<?= $theme->admin_page_top() ?>
|
||||
<? if ($sidebar): ?>
|
||||
<div id="doc3" class="yui-t5 g-view">
|
||||
<? else: ?>
|
||||
<div id="doc3" class="yui-t7 g-view">
|
||||
<? endif; ?>
|
||||
<?= $theme->site_status() ?>
|
||||
<div id="g-header" class="ui-helper-clearfix">
|
||||
<?= $theme->admin_header_top() ?>
|
||||
<a id="g-logo" class="g-left" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery")->for_html_attr() ?>">
|
||||
← <?= t("back to the ...") ?>
|
||||
</a>
|
||||
<?= $theme->user_menu() ?>
|
||||
<!-- hide the menu until after the page has loaded, to minimize menu flicker -->
|
||||
<div id="g-site-admin-menu" class="ui-helper-clearfix" style="visibility: hidden">
|
||||
<?= $theme->admin_menu() ?>
|
||||
</div>
|
||||
<script type="text/javascript"> $(document).ready(function() { $("#g-site-admin-menu").css("visibility", "visible"); }) </script>
|
||||
<?= $theme->admin_header_bottom() ?>
|
||||
</div>
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id="g-content" class="yui-g">
|
||||
<?= $theme->messages() ?>
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? if ($sidebar): ?>
|
||||
<div id="g-sidebar" class="yui-b">
|
||||
<?= $sidebar ?>
|
||||
</div>
|
||||
<? endif ?>
|
||||
</div>
|
||||
<div id="g-footer" class="g-inline ui-helper-clearfix">
|
||||
<?= $theme->admin_footer() ?>
|
||||
<? if (module::get_var("gallery", "show_credits")): ?>
|
||||
<ul id="g-credits" class="g-inline">
|
||||
<?= $theme->admin_credits() ?>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= $theme->admin_page_bottom() ?>
|
||||
</body>
|
||||
</html>
|
18
modules/themeroller/data/admin_views/block.html.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? if ($anchor): ?>
|
||||
<a name="<?= $anchor ?>"></a>
|
||||
<? endif ?>
|
||||
<div block_id="<?= $id ?>" id="<?= $css_id ?>" class="g-block ui-widget">
|
||||
<div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-icon-right">
|
||||
<? if ($css_id != "g-block-adder"): ?>
|
||||
<a href="<?= url::site("admin/dashboard/remove_block/$id?csrf=$csrf") ?>"
|
||||
class="ui-dialog-titlebar-close ui-corner-all">
|
||||
<span class="ui-icon ui-icon-closethick">remove</span>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<?= $title ?>
|
||||
</div>
|
||||
<div class="g-block-content">
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
44
modules/themeroller/data/admin_views/pager.html.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? // See http://docs.kohanaphp.com/libraries/pagination ?>
|
||||
<ul class="g-paginator">
|
||||
<? /* @todo This message isn't easily localizable */
|
||||
$from_to_msg = t2("Item %from_number of %count",
|
||||
"Items %from_number - %to_number of %count",
|
||||
$total_items,
|
||||
array("from_number" => $current_first_item,
|
||||
"to_number" => $current_last_item,
|
||||
"count" => $total_items)) ?>
|
||||
<li>
|
||||
<? if ($first_page): ?>
|
||||
<a href="<?= str_replace('{page}', 1, $url) ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-icon-left ui-state-disabled ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
|
||||
<? endif ?>
|
||||
<? if ($previous_page): ?>
|
||||
<a href="<?= str_replace('{page}', $previous_page, $url) ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-icon-left ui-state-disabled ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
|
||||
<? endif ?>
|
||||
</li>
|
||||
<li class="g-info"><?= $from_to_msg ?></li>
|
||||
<li class="g-text-right">
|
||||
<? if ($next_page): ?>
|
||||
<a href="<?= str_replace('{page}', $next_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-state-disabled ui-icon-right ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
|
||||
<? endif ?>
|
||||
<? if ($last_page): ?>
|
||||
<a href="<?= str_replace('{page}', $last_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-state-disabled ui-icon-right ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
|
||||
<? endif ?>
|
||||
</li>
|
||||
</ul>
|
59
modules/themeroller/data/css/fix-ie.css
Normal file
@ -0,0 +1,59 @@
|
||||
/**
|
||||
* Fix display in IE 6, 7, and 8
|
||||
*/
|
||||
|
||||
#g-banner {
|
||||
z-index: 2;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
#g-sidebar {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#g-photo,
|
||||
#g-movie {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
#g-photo .g-context-menu,
|
||||
#g-movie .g-context-menu {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
input.submit {
|
||||
clear: none !important;
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
.g-short-form input.text,
|
||||
.g-short-form input.submit {
|
||||
font-size: 1em;
|
||||
line-height: 1em;
|
||||
padding: .38em .3em;
|
||||
}
|
||||
|
||||
#g-search-form input#q {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#g-add-tag-form input.textbox {
|
||||
width: 110px !important;
|
||||
}
|
||||
|
||||
#g-add-tag-form input[type='submit'] {
|
||||
padding: .3em 0 !important;
|
||||
}
|
||||
|
||||
#g-dialog .g-cancel {
|
||||
display: inline-block !important;
|
||||
float: none !important;
|
||||
}
|
||||
|
||||
.g-paginator .g-text-right {
|
||||
width: 29%;
|
||||
}
|
||||
|
||||
.g-paginator .ui-icon-right {
|
||||
width: 60px;
|
||||
}
|
62
modules/themeroller/data/js/admin_ui.init.js
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Initialize jQuery UI and Gallery Plugins
|
||||
* @todo Move ui-corner-all assignments to theme admin views
|
||||
*/
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// Initialize Superfish menus
|
||||
$("#g-site-admin-menu .g-menu").hide().addClass("sf-menu");
|
||||
$("#g-site-admin-menu .g-menu").superfish({
|
||||
delay: 500,
|
||||
animation: {
|
||||
opacity: "show",
|
||||
height: "show"
|
||||
},
|
||||
pathClass: "g-selected",
|
||||
speed: "fast"
|
||||
}).show();
|
||||
|
||||
// Initialize status message effects
|
||||
$("#g-action-status li").gallery_show_message();
|
||||
|
||||
// Initialize modal dialogs
|
||||
$(".g-dialog-link").gallery_dialog();
|
||||
|
||||
// Initialize short forms
|
||||
$(".g-short-form").gallery_short_form();
|
||||
|
||||
// Initialize ajax links
|
||||
$(".g-ajax-link").gallery_ajax();
|
||||
|
||||
// Initialize panels
|
||||
$(".g-panel-link").gallery_panel();
|
||||
|
||||
if ($("#g-photo-stream").length) {
|
||||
// Vertically align thumbs in photostream
|
||||
$(".g-item").gallery_valign();
|
||||
}
|
||||
|
||||
// Apply jQuery UI button css to submit inputs
|
||||
$("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all");
|
||||
|
||||
// Round view menu buttons
|
||||
if ($("#g-admin-comments-menu").length) {
|
||||
$("#g-admin-comments-menu ul").removeClass("g-menu");
|
||||
$("#g-admin-comments-menu").addClass("g-buttonset");
|
||||
$("#g-admin-comments-menu a").addClass("g-button ui-state-default");
|
||||
$("#g-admin-comments-menu ul li:first a").addClass("ui-corner-left");
|
||||
$("#g-admin-comments-menu ul li:last a").addClass("ui-corner-right");
|
||||
}
|
||||
|
||||
// Round corners
|
||||
$(".g-selected").addClass("ui-corner-all");
|
||||
$(".g-available .g-block").addClass("ui-corner-all");
|
||||
$(".g-unavailable").addClass("ui-corner-all");
|
||||
|
||||
// Remove titles for menu options since we're displaying that text anyway
|
||||
$(".sf-menu a, .sf-menu li").removeAttr("title");
|
||||
|
||||
// Initialize button hover effect
|
||||
$.fn.gallery_hover_init();
|
||||
});
|
122
modules/themeroller/data/js/site_ui.init.js
Normal file
@ -0,0 +1,122 @@
|
||||
/**
|
||||
* Initialize jQuery UI and Gallery Plugins
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Initialize Superfish menus (hidden, then shown to address IE issue)
|
||||
$("#g-site-menu .g-menu").hide().addClass("sf-menu");
|
||||
$("#g-site-menu .g-menu").superfish({
|
||||
delay: 500,
|
||||
animation: {
|
||||
opacity:'show',
|
||||
height:'show'
|
||||
},
|
||||
pathClass: "g-selected",
|
||||
speed: 'fast'
|
||||
}).show();
|
||||
|
||||
// Initialize status message effects
|
||||
$("#g-action-status li").gallery_show_message();
|
||||
|
||||
// Initialize dialogs
|
||||
$(".g-dialog-link").gallery_dialog();
|
||||
|
||||
// Initialize short forms
|
||||
$(".g-short-form").gallery_short_form();
|
||||
|
||||
// Apply jQuery UI icon, hover, and rounded corner styles
|
||||
$("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all");
|
||||
if ($("#g-view-menu").length) {
|
||||
$("#g-view-menu ul").removeClass("g-menu").removeClass("sf-menu");
|
||||
$("#g-view-menu a").addClass("ui-icon");
|
||||
}
|
||||
|
||||
// Apply jQuery UI icon and hover styles to context menus
|
||||
if ($(".g-context-menu").length) {
|
||||
$(".g-context-menu li").addClass("ui-state-default");
|
||||
$(".g-context-menu a").addClass("g-button ui-icon-left");
|
||||
$(".g-context-menu a").prepend("<span class=\"ui-icon\"></span>");
|
||||
$(".g-context-menu a span").each(function() {
|
||||
var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString();
|
||||
$(this).addClass(iconClass);
|
||||
});
|
||||
}
|
||||
|
||||
// Remove titles for menu options since we're displaying that text anyway
|
||||
$(".sf-menu a, .sf-menu li").removeAttr("title");
|
||||
|
||||
// Album and search results views
|
||||
if ($("#g-album-grid").length) {
|
||||
// Set equal height for album items and vertically align thumbnails/metadata
|
||||
$('.g-item').equal_heights().gallery_valign();
|
||||
|
||||
// Initialize thumbnail hover effect
|
||||
$(".g-item").hover(
|
||||
function() {
|
||||
// Insert a placeholder to hold the item's position in the grid
|
||||
var placeHolder = $(this).clone().attr("id", "g-place-holder");
|
||||
$(this).after($(placeHolder));
|
||||
// Style and position the hover item
|
||||
var position = $(this).position();
|
||||
$(this).css("top", position.top).css("left", position.left);
|
||||
$(this).addClass("g-hover-item");
|
||||
// Initialize the contextual menu
|
||||
$(this).gallery_context_menu();
|
||||
// Set the hover item's height
|
||||
$(this).height("auto");
|
||||
var context_menu = $(this).find(".g-context-menu");
|
||||
var adj_height = $(this).height() + context_menu.height();
|
||||
if ($(this).next().height() > $(this).height()) {
|
||||
$(this).height($(this).next().height());
|
||||
} else if ($(this).prev().height() > $(this).height()) {
|
||||
$(this).height($(this).prev().height());
|
||||
} else {
|
||||
$(this).height(adj_height);
|
||||
}
|
||||
},
|
||||
function() {
|
||||
// Reset item height and position
|
||||
if ($(this).next().height()) {
|
||||
var sib_height = $(this).next().height();
|
||||
} else {
|
||||
var sib_height = $(this).prev().height();
|
||||
}
|
||||
if ($.browser.msie && $.browser.version >= 8) {
|
||||
sib_height = sib_height + 1;
|
||||
}
|
||||
$(this).css("height", sib_height);
|
||||
$(this).css("position", "relative");
|
||||
$(this).css("top", 0).css("left", 0);
|
||||
// Remove the placeholder and hover class from the item
|
||||
$(this).removeClass("g-hover-item");
|
||||
$("#g-place-holder").remove();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Photo/Item item view
|
||||
if ($("#g-photo,#g-movie").length) {
|
||||
// Ensure the resized image fits within its container
|
||||
$("#g-photo,#g-movie").gallery_fit_photo();
|
||||
|
||||
// Initialize context menus
|
||||
$("#g-photo,#g-movie").hover(function(){
|
||||
$(this).gallery_context_menu();
|
||||
});
|
||||
|
||||
// Add scroll effect for links to named anchors
|
||||
$.localScroll({
|
||||
queue: true,
|
||||
duration: 1000,
|
||||
hash: true
|
||||
});
|
||||
|
||||
$(this).find(".g-dialog-link").gallery_dialog();
|
||||
$(this).find(".g-ajax-link").gallery_ajax();
|
||||
}
|
||||
|
||||
// Initialize button hover effect
|
||||
$.fn.gallery_hover_init();
|
||||
|
||||
});
|
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail.png
Executable file
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_bgColorContent.png
Executable file
After Width: | Height: | Size: 7.9 KiB |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_bgColorDefault.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_bgColorHeader.png
Executable file
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_borderColorDefault.png
Executable file
After Width: | Height: | Size: 1.9 KiB |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_fcActive.png
Executable file
After Width: | Height: | Size: 782 B |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_fcDefault.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
modules/themeroller/data/masks/admin_thumbnail/thumbnail_fcHeader.png
Executable file
After Width: | Height: | Size: 3.5 KiB |
BIN
modules/themeroller/data/masks/css/themeroller/ui-icons_mask_256x240.png
Executable file
After Width: | Height: | Size: 8.8 KiB |
BIN
modules/themeroller/data/masks/images/avatar_mask.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
modules/themeroller/data/masks/images/ico-album_mask.png
Executable file
After Width: | Height: | Size: 459 B |
BIN
modules/themeroller/data/masks/images/ico-error_mask[iconColorError].png
Executable file
After Width: | Height: | Size: 610 B |
BIN
modules/themeroller/data/masks/images/ico-help_mask.png
Executable file
After Width: | Height: | Size: 641 B |
BIN
modules/themeroller/data/masks/images/ico-info_mask[iconColorHighlight].png
Executable file
After Width: | Height: | Size: 660 B |
BIN
modules/themeroller/data/masks/images/ico-print_mask.png
Executable file
After Width: | Height: | Size: 923 B |
After Width: | Height: | Size: 235 B |
BIN
modules/themeroller/data/masks/images/ico-separator_mask[iconColorDefault].png
Executable file
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 298 B |
After Width: | Height: | Size: 297 B |
BIN
modules/themeroller/data/masks/images/ico-success_mask[iconColorHighlight].png
Executable file
After Width: | Height: | Size: 337 B |
BIN
modules/themeroller/data/masks/images/ico-view-comments_mask.png
Executable file
After Width: | Height: | Size: 709 B |
BIN
modules/themeroller/data/masks/images/ico-view-fullsize_mask.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
modules/themeroller/data/masks/images/ico-view-slideshow-rtl_mask.png
Executable file
After Width: | Height: | Size: 963 B |
BIN
modules/themeroller/data/masks/images/ico-view-slideshow_mask.png
Executable file
After Width: | Height: | Size: 969 B |
BIN
modules/themeroller/data/masks/images/ico-warning_mask[iconColorWarning].png
Executable file
After Width: | Height: | Size: 545 B |
BIN
modules/themeroller/data/masks/images/select-photos-backg_mask.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
modules/themeroller/data/masks/site_thumbnail/thumbnail.png
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
modules/themeroller/data/masks/site_thumbnail/thumbnail_bgColorContent.png
Executable file
After Width: | Height: | Size: 3.7 KiB |
BIN
modules/themeroller/data/masks/site_thumbnail/thumbnail_bgColorDefault.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
modules/themeroller/data/masks/site_thumbnail/thumbnail_bgColorHeader.png
Executable file
After Width: | Height: | Size: 2.3 KiB |
BIN
modules/themeroller/data/masks/site_thumbnail/thumbnail_fcDefault.png
Executable file
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/themeroller/data/masks/site_thumbnail/thumbnail_iconColorHover.png
Executable file
After Width: | Height: | Size: 831 B |
42
modules/themeroller/data/views/album.html.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? // @todo Set hover on AlbumGrid list items for guest users ?>
|
||||
<div id="g-info">
|
||||
<?= $theme->album_top() ?>
|
||||
<h1><?= html::purify($item->title) ?></h1>
|
||||
<div class="g-description"><?= nl2br(html::purify($item->description)) ?></div>
|
||||
</div>
|
||||
|
||||
<ul id="g-album-grid" class="ui-helper-clearfix">
|
||||
<? if (count($children)): ?>
|
||||
<? foreach ($children as $i => $child): ?>
|
||||
<? $item_class = "g-photo"; ?>
|
||||
<? if ($child->is_album()): ?>
|
||||
<? $item_class = "g-album"; ?>
|
||||
<? endif ?>
|
||||
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
|
||||
<?= $theme->thumb_top($child) ?>
|
||||
<a href="<?= $child->url() ?>">
|
||||
<?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
|
||||
</a>
|
||||
<?= $theme->thumb_bottom($child) ?>
|
||||
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
|
||||
<h2><span class="<?= $item_class ?>"></span>
|
||||
<a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
|
||||
<ul class="g-metadata">
|
||||
<?= $theme->thumb_info($child) ?>
|
||||
</ul>
|
||||
</li>
|
||||
<? endforeach ?>
|
||||
<? else: ?>
|
||||
<? if ($user->admin || access::can("add", $item)): ?>
|
||||
<? $addurl = url::site("uploader/index/$item->id") ?>
|
||||
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
|
||||
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
|
||||
<? else: ?>
|
||||
<li><?= t("There aren't any photos here yet!") ?></li>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
</ul>
|
||||
<?= $theme->album_bottom() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
10
modules/themeroller/data/views/block.html.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? if ($anchor): ?>
|
||||
<a name="<?= $anchor ?>"></a>
|
||||
<? endif ?>
|
||||
<div id="<?= $css_id ?>" class="g-block">
|
||||
<h2><?= $title ?></h2>
|
||||
<div class="g-block-content">
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
29
modules/themeroller/data/views/dynamic.html.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<div id="g-album-header">
|
||||
<div id="g-album-header-buttons">
|
||||
<?= $theme->dynamic_top() ?>
|
||||
</div>
|
||||
<h1><?= html::clean($title) ?></h1>
|
||||
</div>
|
||||
|
||||
<ul id="g-album-grid" class="ui-helper-clearfix">
|
||||
<? foreach ($children as $i => $child): ?>
|
||||
<li class="g-item <?= $child->is_album() ? "g-album" : "" ?>">
|
||||
<?= $theme->thumb_top($child) ?>
|
||||
<a href="<?= $child->url() ?>">
|
||||
<img id="g-photo-id-<?= $child->id ?>" class="g-thumbnail"
|
||||
alt="photo" src="<?= $child->thumb_url() ?>"
|
||||
width="<?= $child->thumb_width ?>"
|
||||
height="<?= $child->thumb_height ?>" />
|
||||
</a>
|
||||
<h2><?= html::purify($child->title) ?></h2>
|
||||
<?= $theme->thumb_bottom($child) ?>
|
||||
<ul class="g-metadata">
|
||||
<?= $theme->thumb_info($child) ?>
|
||||
</ul>
|
||||
</li>
|
||||
<? endforeach ?>
|
||||
</ul>
|
||||
<?= $theme->dynamic_bottom() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
19
modules/themeroller/data/views/movie.html.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<div id="g-item">
|
||||
<?= $theme->photo_top() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
|
||||
<div id="g-movie" class="ui-helper-clearfix">
|
||||
<?= $theme->resize_top($item) ?>
|
||||
<?= $item->movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?>
|
||||
<?= $theme->resize_bottom($item) ?>
|
||||
</div>
|
||||
|
||||
<div id="g-info">
|
||||
<h1><?= html::purify($item->title) ?></h1>
|
||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
||||
</div>
|
||||
|
||||
<?= $theme->photo_bottom() ?>
|
||||
</div>
|
6
modules/themeroller/data/views/no_sidebar.html.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<ul class="g-message-block">
|
||||
<li class="g-warning"><?= t("No active sidebar blocks.") ?>
|
||||
<br/><a href="<?= url::site("admin/sidebar") ?>"><?= t("Add blocks") ?></a>
|
||||
</li>
|
||||
</ul>
|
151
modules/themeroller/data/views/page.html.php
Normal file
@ -0,0 +1,151 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<title>
|
||||
<? if ($page_title): ?>
|
||||
<?= $page_title ?>
|
||||
<? else: ?>
|
||||
<? if ($theme->item()): ?>
|
||||
<? if ($theme->item()->is_album()): ?>
|
||||
<?= t("Browse Album :: %album_title", array("album_title" => $theme->item()->title)) ?>
|
||||
<? elseif ($theme->item()->is_photo()): ?>
|
||||
<?= t("Photo :: %photo_title", array("photo_title" => $theme->item()->title)) ?>
|
||||
<? else: ?>
|
||||
<?= t("Movie :: %movie_title", array("movie_title" => $theme->item()->title)) ?>
|
||||
<? endif ?>
|
||||
<? elseif ($theme->tag()): ?>
|
||||
<?= t("Browse Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?>
|
||||
<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
|
||||
<?= t("Gallery") ?>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
</title>
|
||||
<link rel="shortcut icon" href="<?= url::file("lib/images/favicon.ico") ?>" type="image/x-icon" />
|
||||
<?= $theme->css("yui/reset-fonts-grids.css") ?>
|
||||
<?= $theme->css("superfish/css/superfish.css") ?>
|
||||
<?= $theme->css("themeroller/ui.base.css") ?>
|
||||
<?= $theme->css("gallery.common.css") ?>
|
||||
<?= $theme->css("screen.css") ?>
|
||||
<!--[if lte IE 8]>
|
||||
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
|
||||
media="screen,print,projection" />
|
||||
<![endif]-->
|
||||
<? if ($theme->page_type == "collection"): ?>
|
||||
<? if ($thumb_proportion != 1): ?>
|
||||
<? $new_width = round($thumb_proportion * 213) ?>
|
||||
<? $new_height = round($thumb_proportion * 240) ?>
|
||||
<style type="text/css">
|
||||
.g-view #g-content #g-album-grid .g-item {
|
||||
width: <?= $new_width ?>px;
|
||||
height: <?= $new_height ?>px;
|
||||
/* <?= $thumb_proportion ?> */
|
||||
}
|
||||
</style>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
<?= $theme->script("jquery.js") ?>
|
||||
<?= $theme->script("jquery.form.js") ?>
|
||||
<?= $theme->script("jquery-ui.js") ?>
|
||||
<?= $theme->script("gallery.common.js") ?>
|
||||
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
|
||||
<script type="text/javascript">
|
||||
var MSG_CANCEL = <?= t('Cancel')->for_js() ?>;
|
||||
</script>
|
||||
<?= $theme->script("gallery.ajax.js") ?>
|
||||
<?= $theme->script("gallery.dialog.js") ?>
|
||||
<?= $theme->script("superfish/js/superfish.js") ?>
|
||||
<?= $theme->script("jquery.localscroll.js") ?>
|
||||
<?= $theme->script("ui.init.js") ?>
|
||||
|
||||
<? /* These are page specific, but if we put them before $theme->head() they get combined */ ?>
|
||||
<? if ($theme->page_subtype == "photo"): ?>
|
||||
<?= $theme->script("jquery.scrollTo.js") ?>
|
||||
<?= $theme->script("gallery.show_full_size.js") ?>
|
||||
<? elseif ($theme->page_subtype == "movie"): ?>
|
||||
<?= $theme->script("flowplayer.js") ?>
|
||||
<? endif ?>
|
||||
|
||||
<?= $theme->head() ?>
|
||||
</head>
|
||||
|
||||
<body <?= $theme->body_attributes() ?>>
|
||||
<?= $theme->page_top() ?>
|
||||
<div id="doc4" class="yui-t5 g-view">
|
||||
<?= $theme->site_status() ?>
|
||||
<div id="g-header" class="ui-helper-clearfix">
|
||||
<div id="g-banner">
|
||||
<? if ($header_text = module::get_var("gallery", "header_text")): ?>
|
||||
<?= $header_text ?>
|
||||
<? else: ?>
|
||||
<a id="g-logo" class="g-left" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>">
|
||||
<img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= url::file("lib/images/logo.png") ?>" />
|
||||
</a>
|
||||
<? endif ?>
|
||||
<?= $theme->user_menu() ?>
|
||||
<?= $theme->header_top() ?>
|
||||
|
||||
<!-- hide the menu until after the page has loaded, to minimize menu flicker -->
|
||||
<div id="g-site-menu" style="visibility: hidden">
|
||||
<?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
|
||||
</div>
|
||||
<script type="text/javascript"> $(document).ready(function() { $("#g-site-menu").css("visibility", "visible"); }) </script>
|
||||
|
||||
<?= $theme->header_bottom() ?>
|
||||
</div>
|
||||
|
||||
<? if ($theme->item() && !empty($parents)): ?>
|
||||
<ul class="g-breadcrumbs">
|
||||
<? $i = 0 ?>
|
||||
<? foreach ($parents as $parent): ?>
|
||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
||||
containing that photo. For now, we just do it for
|
||||
the immediate parent so that when you go back up a
|
||||
level you're on the right page. -->
|
||||
<a href="<?= $parent->url($parent == $theme->item()->parent() ?
|
||||
"show={$theme->item()->id}" : null) ?>">
|
||||
<?= html::purify(text::limit_chars($parent->title, 15)) ?>
|
||||
</a>
|
||||
</li>
|
||||
<? $i++ ?>
|
||||
<? endforeach ?>
|
||||
<li class="g-active<? if ($i == 0) print " g-first" ?>">
|
||||
<?= html::purify(text::limit_chars($theme->item()->title, 15)) ?>
|
||||
</li>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
</div>
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id="g-content" class="yui-g">
|
||||
<?= $theme->messages() ?>
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="g-sidebar" class="yui-b">
|
||||
<? if ($theme->page_subtype != "login"): ?>
|
||||
<?= new View("sidebar.html") ?>
|
||||
<? endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="g-footer" class="ui-helper-clearfix">
|
||||
<?= $theme->footer() ?>
|
||||
<? if ($footer_text = module::get_var("gallery", "footer_text")): ?>
|
||||
<?= $footer_text ?>
|
||||
<? endif ?>
|
||||
|
||||
<? if (module::get_var("gallery", "show_credits")): ?>
|
||||
<ul id="g-credits" class="g-inline">
|
||||
<?= $theme->credits() ?>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= $theme->page_bottom() ?>
|
||||
</body>
|
||||
</html>
|
87
modules/themeroller/data/views/paginator.html.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<?
|
||||
// This is a generic paginator for album, photo and movie pages. Depending on the page type,
|
||||
// there are different sets of variables available. With this data, you can make a paginator
|
||||
// that lets you say "You're viewing photo 5 of 35", or "You're viewing photos 10 - 18 of 37"
|
||||
// for album views.
|
||||
//
|
||||
// Available variables for all page types:
|
||||
// $page_type - "collection", "item", or "other"
|
||||
// $page_subtype - "album", "movie", "photo", "tag", etc.
|
||||
// $previous_page_url - the url to the previous page, if there is one
|
||||
// $next_page_url - the url to the next page, if there is one
|
||||
// $total - the total number of photos in this album
|
||||
//
|
||||
// Available for the "collection" page types:
|
||||
// $page - what page number we're on
|
||||
// $max_pages - the maximum page number
|
||||
// $page_size - the page size
|
||||
// $first_page_url - the url to the first page, or null if we're on the first page
|
||||
// $last_page_url - the url to the last page, or null if we're on the last page
|
||||
// $first_visible_position - the position number of the first visible photo on this page
|
||||
// $last_visible_position - the position number of the last visible photo on this page
|
||||
//
|
||||
// Available for "item" page types:
|
||||
// $position - the position number of this photo
|
||||
//
|
||||
?>
|
||||
|
||||
<ul class="g-paginator ui-helper-clearfix">
|
||||
<li class="g-first">
|
||||
<? if ($page_type == "collection"): ?>
|
||||
<? if (isset($first_page_url)): ?>
|
||||
<a href="<?= $first_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-icon-left ui-state-disabled ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
|
||||
<? if (isset($previous_page_url)): ?>
|
||||
<a href="<?= $previous_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-icon-left ui-state-disabled ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
|
||||
<? endif ?>
|
||||
</li>
|
||||
|
||||
<li class="g-info">
|
||||
<? if ($total): ?>
|
||||
<? if ($page_type == "collection"): ?>
|
||||
<?= /* @todo This message isn't easily localizable */
|
||||
t2("Photo %from_number of %count",
|
||||
"Photos %from_number - %to_number of %count",
|
||||
$total,
|
||||
array("from_number" => $first_visible_position,
|
||||
"to_number" => $last_visible_position,
|
||||
"count" => $total)) ?>
|
||||
<? else: ?>
|
||||
<?= t("%position of %total", array("position" => $position, "total" => $total)) ?>
|
||||
<? endif ?>
|
||||
<? else: ?>
|
||||
<?= t("No photos") ?>
|
||||
<? endif ?>
|
||||
</li>
|
||||
|
||||
<li class="g-text-right">
|
||||
<? if (isset($next_page_url)): ?>
|
||||
<a href="<?= $next_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-state-disabled ui-icon-right ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
|
||||
<? endif ?>
|
||||
|
||||
<? if ($page_type == "collection"): ?>
|
||||
<? if (isset($last_page_url)): ?>
|
||||
<a href="<?= $last_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
|
||||
<? else: ?>
|
||||
<a class="g-button ui-state-disabled ui-icon-right ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
</li>
|
||||
</ul>
|
88
modules/themeroller/data/views/permissions_form.html.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<fieldset>
|
||||
<legend> <?= t('Edit Permissions') ?> </legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<? foreach ($groups as $group): ?>
|
||||
<th> <?= html::clean($group->name) ?> </th>
|
||||
<? endforeach ?>
|
||||
</tr>
|
||||
|
||||
<? foreach ($permissions as $permission): ?>
|
||||
<tr>
|
||||
<td> <?= t($permission->display_name) ?></td>
|
||||
<? foreach ($groups as $group): ?>
|
||||
<? $intent = access::group_intent($group, $permission->name, $item) ?>
|
||||
<? $allowed = access::group_can($group, $permission->name, $item) ?>
|
||||
<? $lock = access::locked_by($group, $permission->name, $item) ?>
|
||||
|
||||
<? if ($lock): ?>
|
||||
<td class="g-denied">
|
||||
<a href="javascript:return false;"
|
||||
title="<?= t('denied and locked through parent album')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-cancel g-passive" />
|
||||
<a href="javascript:show(<?= $lock->id ?>)"
|
||||
title="<?= t('denied and locked through parent album, click to go to parent album')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-locked" />
|
||||
</td>
|
||||
<? else: ?>
|
||||
<? if ($intent === access::INHERIT): ?>
|
||||
<? if ($allowed): ?>
|
||||
<td class="g-allowed">
|
||||
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('allowed through parent album, click to allow explicitly')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-check" />
|
||||
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('click to deny')->for_html_attr() ?>"
|
||||
class="ui-disabled ui-icon ui-icon-cancel" />
|
||||
</td>
|
||||
<? else: ?>
|
||||
<td class="g-denied">
|
||||
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('click to allow')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-check" />
|
||||
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('denied through parent album, click to deny explicitly')->for_html_attr() ?>"
|
||||
class="ui-disabled ui-icon ui-icon-cancel" />
|
||||
</td>
|
||||
<? endif ?>
|
||||
|
||||
<? elseif ($intent === access::DENY): ?>
|
||||
<td class="g-denied">
|
||||
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('click to allow')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-check" />
|
||||
<? if ($item->id == 1): ?>
|
||||
<a href="javascript:return false;"
|
||||
title="<?= t('denied')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-cancel g-passive" />
|
||||
<? else: ?>
|
||||
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('denied, click to reset')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-cancel" />
|
||||
<? endif ?>
|
||||
</td>
|
||||
<? elseif ($intent === access::ALLOW): ?>
|
||||
<td class="g-allowed">
|
||||
<? if ($item->id == 1): ?>
|
||||
<a href="javascript:return false;"
|
||||
title="<?= t('allowed')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-check g-passive" />
|
||||
<? else: ?>
|
||||
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('allowed, click to reset')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-check" />
|
||||
<? endif ?>
|
||||
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||
title="<?= t('click to deny')->for_html_attr() ?>"
|
||||
class="ui-icon ui-icon-cancel" />
|
||||
</td>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
</td>
|
||||
<? endforeach ?>
|
||||
</tr>
|
||||
<? endforeach ?>
|
||||
</table>
|
||||
</fieldset>
|
38
modules/themeroller/data/views/photo.html.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
|
||||
<? if (access::can("view_full", $theme->item())): ?>
|
||||
<!-- Use javascript to show the full size as an overlay on the current page -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".g-fullsize-link").click(function() {
|
||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<? endif ?>
|
||||
|
||||
<div id="g-item">
|
||||
<?= $theme->photo_top() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
|
||||
<div id="g-photo">
|
||||
<?= $theme->resize_top($item) ?>
|
||||
<? if (access::can("view_full", $item)): ?>
|
||||
<a href="<?= $item->file_url() ?>" class="g-fullsize-link" title="<?= t("View full size")->for_html_attr() ?>">
|
||||
<? endif ?>
|
||||
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
|
||||
<? if (access::can("view_full", $item)): ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<?= $theme->resize_bottom($item) ?>
|
||||
</div>
|
||||
|
||||
<div id="g-info">
|
||||
<h1><?= html::purify($item->title) ?></h1>
|
||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
||||
</div>
|
||||
|
||||
<?= $theme->photo_bottom() ?>
|
||||
</div>
|
16
modules/themeroller/data/views/sidebar.html.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<?= $theme->sidebar_top() ?>
|
||||
<div id="g-view-menu" class="g-buttonset ui-helper-clearfix">
|
||||
<? if ($page_subtype == "album"):?>
|
||||
<?= $theme->album_menu() ?>
|
||||
<? elseif ($page_subtype == "photo") : ?>
|
||||
<?= $theme->photo_menu() ?>
|
||||
<? elseif ($page_subtype == "movie") : ?>
|
||||
<?= $theme->movie_menu() ?>
|
||||
<? elseif ($page_subtype == "tag") : ?>
|
||||
<?= $theme->tag_menu() ?>
|
||||
<? endif ?>
|
||||
</div>
|
||||
|
||||
<?= $theme->sidebar_blocks() ?>
|
||||
<?= $theme->sidebar_bottom() ?>
|
203
modules/themeroller/helpers/themeroller.php
Normal file
@ -0,0 +1,203 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 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 themeroller {
|
||||
static function extract_zip_file($zipfile) {
|
||||
$extract_path = VARPATH . trim($zipfile, "/") . ".d";
|
||||
if (extension_loaded("zip")) {
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($zipfile) === true) {
|
||||
Session::instance()->set("theme_extract_path", $extract_path);
|
||||
$zip->extractTo($extract_path);
|
||||
$zip->close();
|
||||
return $extract_path;
|
||||
}
|
||||
} else if (extension_loaded("zlib")) {
|
||||
require_once(MODPATH . "themeroller/libraries/pclzip.lib.php");
|
||||
$archive = new PclZip($zipfile);
|
||||
$list = $archive->extract(PCLZIP_OPT_PATH, $extract_path);
|
||||
if (!empty($list)) {
|
||||
Session::instance()->set("theme_extract_path", $extract_path);
|
||||
return $extract_path;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static function recursive_directory_delete($path) {
|
||||
if (is_dir($path)) {
|
||||
$objects = scandir($path);
|
||||
foreach ($objects as $object) {
|
||||
if ($object[0] != ".") {
|
||||
$object_path = "$path/$object";
|
||||
if (filetype($object_path) == "dir") {
|
||||
self::recursive_directory_delete($object_path);
|
||||
} else {
|
||||
unlink($object_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function get_theme_name($extract_path) {
|
||||
$theme_name = null;
|
||||
if ($handle = opendir($extract_path . "/css")) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file[0] !== ".") {
|
||||
$theme_name = basename($file);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (empty($theme_name)) {
|
||||
Kohana_Log::add("error", "zip file: no theme name");
|
||||
$post->add_error($field, "invalid zipfile");
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
return $theme_name;
|
||||
}
|
||||
|
||||
static function get_theme_parameters($original_name, $css_path, $is_admin) {
|
||||
$parameters = array();
|
||||
$css_files = glob("$css_path/css/$original_name/jquery*.css");
|
||||
$css_contents = file_get_contents($css_files[0]);
|
||||
$parameters["colors"] = $parameters["icons"] = array();
|
||||
if (preg_match("/[?|&](.*)/", $css_contents, $matches)) {
|
||||
if (preg_match_all("/&{0,1}(\w+)=([a-zA-Z0-9\-_\%\.,]*)/", $matches[1], $colors, PREG_SET_ORDER)) {
|
||||
foreach ($colors as $color) {
|
||||
$parameters["colors"][$color[1]] = $color[2];
|
||||
if (strpos($color[1], "icon") === 0) {
|
||||
$parameters["icons"][] = $color[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty($parameters["colors"]["bgColorOverlay"])) {
|
||||
$parameters["colors"]["bgColorOverlay"] = $parameters["colors"]["bgColorDefault"];
|
||||
/* @todo go find the .ui-widget-overlay { background: #aaaaaa */
|
||||
}
|
||||
// The jquery themeroller has no warning style so lets generate the appropriate colors.
|
||||
// We'll do this by averaging the color components of highlight and error colors
|
||||
foreach (array("borderColor", "fc", "bgColor", "iconColor") as $type) {
|
||||
$highlight = self::_rgb(hexdec($parameters["colors"]["{$type}Highlight"]));
|
||||
$error = self::_rgb(hexdec($parameters["colors"]["{$type}Error"]));
|
||||
|
||||
$warning = 0;
|
||||
foreach (array("red", "green", "blue") as $color) {
|
||||
$warning = ($warning << 8) | (int)floor(($highlight[$color] + $error[$color]) / 2);
|
||||
}
|
||||
$parameters["colors"]["{$type}Warning"] = dechex($warning);
|
||||
if ($type == "iconColor") {
|
||||
$parameters["icons"][] = $parameters["colors"]["{$type}Warning"];
|
||||
}
|
||||
}
|
||||
|
||||
$parameters["js"] = $is_admin ? glob(MODPATH . "themeroller/data/js/admin_*.js") :
|
||||
glob(MODPATH . "themeroller/data/js/site_*.js");
|
||||
$parameters["standard_css"] = glob(MODPATH . "themeroller/data/css/*.css");
|
||||
$parameters["masks"] = glob(MODPATH . "themeroller/data/masks/images/*.png");
|
||||
$parameters["icon_mask"] = MODPATH . "themeroller/data/masks/css/themeroller/ui-icons_mask_256x240.png";
|
||||
$parameters["views"] = $is_admin ? glob(MODPATH . "themeroller/data/admin_views/*.html.php") :
|
||||
glob(MODPATH . "themeroller/data/views/*.html.php");
|
||||
$parameters["css_files"] = $css_files;
|
||||
$parameters["images"] =
|
||||
glob("$css_path/development-bundle/themes/$original_name/images/ui-bg*.png");
|
||||
$thumb_dir = $is_admin ? "admin_thumbnail" : "site_thumbnail";
|
||||
$parameters["thumbnail"] = MODPATH . "themeroller/data/masks/$thumb_dir/thumbnail.png";
|
||||
$parts = glob(MODPATH . "themeroller/data/masks/$thumb_dir/thumbnail_*.png");
|
||||
$parameters["thumbnail_parts"] = array();
|
||||
foreach ($parts as $thumb_file) {
|
||||
if (preg_match("/thumbnail_(.*)\.png$/", $thumb_file, $matches)) {
|
||||
$parameters["thumbnail_parts"][] = array("file" => $thumb_file,
|
||||
"color" => $parameters["colors"][$matches[1]]);
|
||||
}
|
||||
}
|
||||
|
||||
return $parameters;
|
||||
}
|
||||
|
||||
static function generate_image($mask_file, $output, $color) {
|
||||
$mask = imagecreatefrompng($mask_file);
|
||||
$image = imagecreatetruecolor(imagesx($mask), imagesy($mask));
|
||||
$icon_color = self::_rgb(hexdec($color));
|
||||
|
||||
$transparent = imagecolorallocatealpha($image,
|
||||
$icon_color['red'], $icon_color['green'], $icon_color['blue'], 127);
|
||||
imagefill($image, 0, 0, $transparent);
|
||||
|
||||
for ($y=0; $y < imagesy($mask); $y++) {
|
||||
for ($x=0; $x < imagesx($mask); $x++) {
|
||||
$pixel_color = imagecolorsforindex($mask, imagecolorat($mask, $x, $y));
|
||||
$mask_color = self::_grayscale_pixel($pixel_color);
|
||||
$mask_alpha = 127 - floor($mask_color["red"] * 127 / 256);
|
||||
$new_color = imagecolorallocatealpha($image,
|
||||
$icon_color['red'], $icon_color['green'], $icon_color['blue'], $mask_alpha);
|
||||
imagesetpixel($image, $x, $y, $new_color);
|
||||
}
|
||||
}
|
||||
|
||||
imagesavealpha($image, true);
|
||||
imagealphablending($image, false);
|
||||
imagepng($image, $output);
|
||||
imagedestroy($image);
|
||||
imagedestroy($mask);
|
||||
}
|
||||
|
||||
static function generate_thumbnail($base, $parts, $target) {
|
||||
$image = imagecreatefrompng($base);
|
||||
|
||||
$transparent = imagecolorallocatealpha($image, 0, 0, 0, 127);
|
||||
imagefill($image, 0, 0, $transparent);
|
||||
|
||||
$width = imagesx($image);
|
||||
$height = imagesy($image);
|
||||
|
||||
foreach ($parts as $thumb_part) {
|
||||
$color = self::_rgb(hexdec($thumb_part["color"]));
|
||||
$image_part = imagecreatefrompng($thumb_part["file"]);
|
||||
for ($y=0; $y < imagesy($image_part); $y++) {
|
||||
for ($x=0; $x < imagesx($image_part); $x++) {
|
||||
$pixel_color = imagecolorsforindex($image_part, imagecolorat($image_part, $x, $y));
|
||||
$new_color = imagecolorallocatealpha($image,
|
||||
$color['red'], $color['green'], $color['blue'], $pixel_color["alpha"]);
|
||||
imagesetpixel($image, $x, $y, $new_color);
|
||||
}
|
||||
}
|
||||
imagedestroy($image_part);
|
||||
}
|
||||
|
||||
imagesavealpha($image, true);
|
||||
imagealphablending($image, false);
|
||||
imagepng($image, $target);
|
||||
imagedestroy($image);
|
||||
}
|
||||
|
||||
private static function _rgb($color) {
|
||||
$r = ($color >> 16) & 0xff;
|
||||
$g = ($color >> 8) & 0xff;
|
||||
$b = $color & 0xff;
|
||||
return array("red" => $r, "green" => $g, "blue" => $b, "alpha" => 0);
|
||||
}
|
||||
|
||||
private static function _grayscale_pixel($color) {
|
||||
$gray = round(($color['red'] * 0.299) + ($color['green'] * 0.587) + ($color['blue'] * 0.114));
|
||||
return array("red" => $gray, "green" => $gray, "blue" => $gray, "alpha" => 0);
|
||||
}
|
||||
}
|
27
modules/themeroller/helpers/themeroller_event.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 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 themeroller_event {
|
||||
static function admin_menu($admin_menu, $theme) {
|
||||
$admin_menu->get("appearance_menu")
|
||||
->append(Menu::factory("dialog")
|
||||
->id("themeroller")
|
||||
->label(t("Import themeroller"))
|
||||
->url(url::site("admin/themeroller/form_upload")));
|
||||
}
|
||||
}
|
44
modules/themeroller/helpers/themeroller_installer.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 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 themeroller_installer {
|
||||
static function install() {
|
||||
$version = module::get_version("themeroller");
|
||||
if ($version == 0) {
|
||||
/* @todo Put database creation here */
|
||||
module::set_version("themeroller", 1);
|
||||
}
|
||||
}
|
||||
|
||||
static function upgrade($version) {
|
||||
}
|
||||
|
||||
static function uninstall() {
|
||||
/* @todo Put database table drops here */
|
||||
module::delete("themeroller");
|
||||
}
|
||||
|
||||
static function can_activate() {
|
||||
$messages = array();
|
||||
if (!(extension_loaded("zip") || extension_loaded("zlib"))) {
|
||||
$messages["warn"][] = t("Themeroller requires either the '%zip' or '%zlib' extension to be loaded",
|
||||
array("zip" => "zip", "zlib" => "zlib"));
|
||||
}
|
||||
return $messages;
|
||||
}
|
||||
}
|
260
modules/themeroller/helpers/themeroller_task.php
Normal file
@ -0,0 +1,260 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 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 themeroller_task_Core {
|
||||
static function available_tasks() {
|
||||
// Return empty array so nothing appears in the maintenance screen
|
||||
return array();
|
||||
}
|
||||
|
||||
static function create_theme($task) {
|
||||
try {
|
||||
$mode = $task->get("mode", "init");
|
||||
$start = microtime(true);
|
||||
$theme_name = $task->get("theme_name");
|
||||
$is_admin = $task->get("is_admin", false);
|
||||
$theme_path = THEMEPATH . "$theme_name/";
|
||||
$parameters = Cache::instance()->get("create_theme_cache:{$task->id}");
|
||||
if ($parameters) {
|
||||
$parameters = unserialize($parameters);
|
||||
}
|
||||
$completed = $task->get("completed", 0);
|
||||
switch ($mode) {
|
||||
case "init":
|
||||
$task->log(t("Starting theme '%theme' creation", array("theme" => $task->get("display_name"))));
|
||||
$task->set("mode", "create_directory");
|
||||
$parameters = themeroller::get_theme_parameters($task->get("original_name"),
|
||||
$task->get("path"),
|
||||
$is_admin);
|
||||
$task->set("total_activites",
|
||||
7 // number of directories to create
|
||||
+ 3 // screen.css, theme.info, thumbnail
|
||||
+ count($parameters["standard_css"]) // number of standard css to copy
|
||||
+ count($parameters["views"]) // number of views to copy
|
||||
+ count($parameters["js"]) // number of javascript files to copy
|
||||
+ count($parameters["masks"]) // number of images to generate
|
||||
+ count($parameters["icons"]) // number of icon images to generate
|
||||
+ count($parameters["css_files"]) // number of css files
|
||||
+ count($parameters["images"])); // number of image files to copy
|
||||
|
||||
$task->status = t("Starting up");
|
||||
break;
|
||||
case "create_directory":
|
||||
$completed = $task->get("completed");
|
||||
foreach (array("", "css", "css/themeroller", "css/themeroller/images", "images",
|
||||
"js", "views") as $dir) {
|
||||
$path = "{$theme_path}$dir";
|
||||
$completed++;
|
||||
if (!file_exists($path)) {
|
||||
mkdir($path);
|
||||
chmod($path, 0755);
|
||||
$task->log(t("Created directory: %path", array("path" => $path)));
|
||||
}
|
||||
}
|
||||
$task->status = t("Directories created");
|
||||
$task->set("mode", "copy_views");
|
||||
break;
|
||||
case "copy_views":
|
||||
$task->status = t("Copying views");
|
||||
while (!empty($parameters["views"]) && microtime(true) - $start < 1.5) {
|
||||
$view = array_shift($parameters["views"]);
|
||||
$target = "{$theme_path}views/" . basename($view);
|
||||
if (!file_exists($target)) {
|
||||
copy($view, $target);
|
||||
$task->log(t("Copied view: %path", array("path" => basename($view))));
|
||||
}
|
||||
$completed++;
|
||||
}
|
||||
|
||||
if (empty($parameters["views"])){
|
||||
$task->status = t("Views copied");
|
||||
$task->set("mode", "copy_themeroller_images");
|
||||
}
|
||||
break;
|
||||
case "copy_themeroller_images":
|
||||
$task->status = t("Copying themeroller images");
|
||||
while (!empty($parameters["images"]) && microtime(true) - $start < 1.5) {
|
||||
$image = array_shift($parameters["images"]);
|
||||
$target = "{$theme_path}css/themeroller/images/" . basename($image);
|
||||
if (!file_exists($target)) {
|
||||
copy($image, $target);
|
||||
$task->log(t("Copied themeroller image: %path", array("path" => basename($image))));
|
||||
}
|
||||
$completed++;
|
||||
}
|
||||
|
||||
if (empty($parameters["views"])){
|
||||
$task->status = t("Themeroller images copied");
|
||||
$task->set("mode", "copy_css");
|
||||
}
|
||||
break;
|
||||
case "copy_css":
|
||||
$task->status = t("Copying themeroller css");
|
||||
$target = "{$theme_path}css/themeroller/ui.base.css";
|
||||
copy($parameters["css_files"][0], $target);
|
||||
$completed++;
|
||||
$task->log(t("Copied themeroller css: themeroller/ui.base.css"));
|
||||
$task->status = t("Themeroller css copied");
|
||||
$task->set("mode", "generate_images");
|
||||
break;
|
||||
case "generate_images":
|
||||
$task->status = t("Generating gallery images");
|
||||
$target_dir = "{$theme_path}images/";
|
||||
$colors = $task->get("colors");
|
||||
$image_color = $parameters["colors"]["iconColorContent"];
|
||||
while (!empty($parameters["masks"]) && microtime(true) - $start < 1.5) {
|
||||
$mask = array_shift($parameters["masks"]);
|
||||
$basename = basename($mask);
|
||||
if (preg_match("/(.*)_mask(\[(\w*)\])?(\.png)$/", $basename, $matches)) {
|
||||
$basename = "{$matches[1]}{$matches[4]}";
|
||||
$image_color = empty($matches[3]) ? $parameters["colors"]["iconColorContent"] :
|
||||
$parameters["colors"][$matches[3]];
|
||||
} else {
|
||||
$image_color = $parameters["colors"]["iconColorContent"];
|
||||
}
|
||||
$image_file = "{$target_dir}$basename";
|
||||
themeroller::generate_image($mask, $image_file, $image_color);
|
||||
$completed++;
|
||||
$task->log(t("Generated image: %path", array("path" => $image_file)));
|
||||
}
|
||||
if (empty($parameters["masks"])) {
|
||||
$task->set("mode", "generate_icons");
|
||||
$task->status = t("Gallery images generated");
|
||||
}
|
||||
break;
|
||||
case "generate_icons":
|
||||
$task->status = t("Generating icons");
|
||||
$target_dir = "{$theme_path}css/themeroller/images/";
|
||||
$mask_file = $parameters["icon_mask"];
|
||||
while (!empty($parameters["icons"]) && microtime(true) - $start < 1.5) {
|
||||
$color = array_shift($parameters["icons"]);
|
||||
$icon_file = $target_dir . str_replace("mask", $color, basename($mask_file));
|
||||
themeroller::generate_image($mask_file, $icon_file, $color);
|
||||
$completed++;
|
||||
$task->log(t("Generated themeroller icon: %path", array("path" => $icon_file)));
|
||||
}
|
||||
if (empty($parameters["icons"])) {
|
||||
$task->set("mode", "copy_standard_css");
|
||||
$task->status = t("Icons generated");
|
||||
}
|
||||
break;
|
||||
case "copy_standard_css":
|
||||
$task->status = t("Copying standard css");
|
||||
while (!empty($parameters["standard_css"]) && microtime(true) - $start < 1.5) {
|
||||
$css = array_shift($parameters["standard_css"]);
|
||||
$target = "{$theme_path}css/" . basename($css);
|
||||
if (!file_exists($target)) {
|
||||
copy($css, $target);
|
||||
$task->log(t("Copied css file: %path", array("path" => basename($target))));
|
||||
}
|
||||
$completed++;
|
||||
}
|
||||
|
||||
if (empty($parameters["standard_css"])){
|
||||
$task->status = t("Standard css copied");
|
||||
$task->set("mode", "copy_javascript");
|
||||
}
|
||||
break;
|
||||
case "copy_javascript":
|
||||
$task->status = t("Copying javascript");
|
||||
while (!empty($parameters["js"]) && microtime(true) - $start < 1.5) {
|
||||
$js = array_shift($parameters["js"]);
|
||||
$target = "{$theme_path}js/" . str_replace(array("admin_", "site_"), "", basename($js));
|
||||
if (!file_exists($target)) {
|
||||
copy($js, $target);
|
||||
$task->log(t("Copied js file: %path", array("path" => basename($target))));
|
||||
}
|
||||
$completed++;
|
||||
}
|
||||
|
||||
if (empty($parameters["js"])){
|
||||
$task->status = t("Javascript copied");
|
||||
$task->set("mode", "generate_screen_css");
|
||||
}
|
||||
break;
|
||||
case "generate_screen_css":
|
||||
$file = "{$theme_path}/css/screen.css";
|
||||
$v = new View(($is_admin ? "admin" : "site") . "_screen.css");
|
||||
$v->display_name = $task->get("display_name");
|
||||
foreach ($parameters["colors"] as $color => $value) {
|
||||
$v->$color = $value;
|
||||
}
|
||||
ob_start();
|
||||
print $v->render();
|
||||
file_put_contents($file, ob_get_contents());
|
||||
ob_end_clean();
|
||||
$completed++;
|
||||
$task->log(t("Generated screen css: %path", array("path" => $file)));
|
||||
$task->status = t("Screen css generated");
|
||||
$task->set("mode", "generate_thumbnail");
|
||||
break;
|
||||
case "generate_thumbnail":
|
||||
themeroller::generate_thumbnail($parameters["thumbnail"],
|
||||
$parameters["thumbnail_parts"],
|
||||
"{$theme_path}thumbnail.png");
|
||||
$task->status = t("Thumbnail generated");
|
||||
$task->set("mode", "generate_theme_info");
|
||||
$completed++;
|
||||
$task->log(t("Generated theme thumbnail: %path", array("path" => "{$theme_path}thumbnail.png")));
|
||||
break;
|
||||
case "generate_theme_info":
|
||||
$file = "{$theme_path}/theme.info";
|
||||
$v = new View("theme.info");
|
||||
$v->display_name = $task->get("display_name");
|
||||
$v->description = $task->get("description");
|
||||
$v->user_name = identity::active_user()->name;
|
||||
$v->is_admin = $is_admin;
|
||||
$v->definition = json_encode($parameters["colors"]);
|
||||
ob_start();
|
||||
print $v->render();
|
||||
file_put_contents($file, ob_get_contents());
|
||||
ob_end_clean();
|
||||
$completed++;
|
||||
$task->log(t("Generated theme info: %path", array("path" => "{$theme_path}theme.info")));
|
||||
$task->status = t("Theme info generated");
|
||||
$task->set("mode", "done");
|
||||
break;
|
||||
case "done":
|
||||
themeroller::recursive_directory_delete($task->get("path"));
|
||||
$display_name = $task->get("display_name");
|
||||
$task->done = true;
|
||||
$task->state = "success";
|
||||
$task->percent_complete = 100;
|
||||
$completed = $task->get("total_activites");
|
||||
Cache::instance()->delete("create_theme_cache:{$task->id}");
|
||||
$message = t("Successfully generated: %name", array("name" => $display_name));
|
||||
message::info($message);
|
||||
$task->log($message);
|
||||
$task->status = t("'%name' generated", array("name" => $display_name));
|
||||
}
|
||||
$task->set("completed", $completed);
|
||||
if (!$task->done) {
|
||||
Cache::instance()->set("create_theme_cache:{$task->id}", serialize($parameters));
|
||||
$task->percent_complete = ($completed / $task->get("total_activites")) * 100;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
Kohana_Log::add("error",(string)$e);
|
||||
$task->done = true;
|
||||
$task->state = "error";
|
||||
$task->status = $e->getMessage();
|
||||
$task->log((string)$e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
504
modules/themeroller/libraries/gnu-lgpl.txt
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library 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 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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 library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
5694
modules/themeroller/libraries/pclzip.lib.php
Normal file
421
modules/themeroller/libraries/readme.txt
Normal file
@ -0,0 +1,421 @@
|
||||
// --------------------------------------------------------------------------------
|
||||
// PclZip 2.8.2 - readme.txt
|
||||
// --------------------------------------------------------------------------------
|
||||
// License GNU/LGPL - August 2009
|
||||
// Vincent Blavet - vincent@phpconcept.net
|
||||
// http://www.phpconcept.net
|
||||
// --------------------------------------------------------------------------------
|
||||
// $Id: readme.txt,v 1.60 2009/09/30 20:35:21 vblavet Exp $
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
0 - Sommaire
|
||||
============
|
||||
1 - Introduction
|
||||
2 - What's new
|
||||
3 - Corrected bugs
|
||||
4 - Known bugs or limitations
|
||||
5 - License
|
||||
6 - Warning
|
||||
7 - Documentation
|
||||
8 - Author
|
||||
9 - Contribute
|
||||
|
||||
1 - Introduction
|
||||
================
|
||||
|
||||
PclZip is a library that allow you to manage a Zip archive.
|
||||
|
||||
Full documentation about PclZip can be found here : http://www.phpconcept.net/pclzip
|
||||
|
||||
2 - What's new
|
||||
==============
|
||||
|
||||
Version 2.8.2 :
|
||||
- PCLZIP_CB_PRE_EXTRACT and PCLZIP_CB_POST_EXTRACT are now supported with
|
||||
extraction as a string (PCLZIP_OPT_EXTRACT_AS_STRING). The string
|
||||
can also be modified in the post-extract call back.
|
||||
**Bugs correction :
|
||||
- PCLZIP_OPT_REMOVE_ALL_PATH was not working correctly
|
||||
- Remove use of eval() and do direct call to callback functions
|
||||
- Correct support of 64bits systems (Thanks to WordPress team)
|
||||
|
||||
Version 2.8.1 :
|
||||
- Move option PCLZIP_OPT_BY_EREG to PCLZIP_OPT_BY_PREG because ereg() is
|
||||
deprecated in PHP 5.3. When using option PCLZIP_OPT_BY_EREG, PclZip will
|
||||
automatically replace it by PCLZIP_OPT_BY_PREG.
|
||||
|
||||
Version 2.8 :
|
||||
- Improve extraction of zip archive for large files by using temporary files
|
||||
This feature is working like the one defined in r2.7.
|
||||
Options are renamed : PCLZIP_OPT_TEMP_FILE_ON, PCLZIP_OPT_TEMP_FILE_OFF,
|
||||
PCLZIP_OPT_TEMP_FILE_THRESHOLD
|
||||
- Add a ratio constant PCLZIP_TEMPORARY_FILE_RATIO to configure the auto
|
||||
sense of temporary file use.
|
||||
- Bug correction : Reduce filepath in returned file list to remove ennoying
|
||||
'.//' preambule in file path.
|
||||
|
||||
Version 2.7 :
|
||||
- Improve creation of zip archive for large files :
|
||||
PclZip will now autosense the configured memory and use temporary files
|
||||
when large file is suspected.
|
||||
This feature can also ne triggered by manual options in create() and add()
|
||||
methods. 'PCLZIP_OPT_ADD_TEMP_FILE_ON' force the use of temporary files,
|
||||
'PCLZIP_OPT_ADD_TEMP_FILE_OFF' disable the autosense technic,
|
||||
'PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD' allow for configuration of a size
|
||||
threshold to use temporary files.
|
||||
Using "temporary files" rather than "memory" might take more time, but
|
||||
might give the ability to zip very large files :
|
||||
Tested on my win laptop with a 88Mo file :
|
||||
Zip "in-memory" : 18sec (max_execution_time=30, memory_limit=180Mo)
|
||||
Zip "tmporary-files" : 23sec (max_execution_time=30, memory_limit=30Mo)
|
||||
- Replace use of mktime() by time() to limit the E_STRICT error messages.
|
||||
- Bug correction : When adding files with full windows path (drive letter)
|
||||
PclZip is now working. Before, if the drive letter is not the default
|
||||
path, PclZip was not able to add the file.
|
||||
|
||||
Version 2.6 :
|
||||
- Code optimisation
|
||||
- New attributes PCLZIP_ATT_FILE_COMMENT gives the ability to
|
||||
add a comment for a specific file. (Don't really know if this is usefull)
|
||||
- New attribute PCLZIP_ATT_FILE_CONTENT gives the ability to add a string
|
||||
as a file.
|
||||
- New attribute PCLZIP_ATT_FILE_MTIME modify the timestamp associated with
|
||||
a file.
|
||||
- Correct a bug. Files archived with a timestamp with 0h0m0s were extracted
|
||||
with current time
|
||||
- Add CRC value in the informations returned back for each file after an
|
||||
action.
|
||||
- Add missing closedir() statement.
|
||||
- When adding a folder, and removing the path of this folder, files were
|
||||
incorrectly added with a '/' at the beginning. Which means files are
|
||||
related to root in unix systems. Corrected.
|
||||
- Add conditional if before constant definition. This will allow users
|
||||
to redefine constants without changing the file, and then improve
|
||||
upgrade of pclzip code for new versions.
|
||||
|
||||
Version 2.5 :
|
||||
- Introduce the ability to add file/folder with individual properties (file descriptor).
|
||||
This gives for example the ability to change the filename of a zipped file.
|
||||
. Able to add files individually
|
||||
. Able to change full name
|
||||
. Able to change short name
|
||||
. Compatible with global options
|
||||
- New attributes : PCLZIP_ATT_FILE_NAME, PCLZIP_ATT_FILE_NEW_SHORT_NAME, PCLZIP_ATT_FILE_NEW_FULL_NAME
|
||||
- New error code : PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE
|
||||
- Add a security control feature. PclZip can extract any file in any folder
|
||||
of a system. People may use this to upload a zip file and try to override
|
||||
a system file. The PCLZIP_OPT_EXTRACT_DIR_RESTRICTION will give the
|
||||
ability to forgive any directory transversal behavior.
|
||||
- New PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : check extraction path
|
||||
- New error code : PCLZIP_ERR_DIRECTORY_RESTRICTION
|
||||
- Modification in PclZipUtilPathInclusion() : dir and path beginning with ./ will be prepend
|
||||
by current path (getcwd())
|
||||
|
||||
Version 2.4 :
|
||||
- Code improvment : try to speed up the code by removing unusefull call to pack()
|
||||
- Correct bug in delete() : delete() should be called with no argument. This was not
|
||||
the case in 2.3. This is corrected in 2.4.
|
||||
- Correct a bug in path_inclusion function. When the path has several '../../', the
|
||||
result was bad.
|
||||
- Add a check for magic_quotes_runtime configuration. If enabled, PclZip will
|
||||
disable it while working and det it back to its original value.
|
||||
This resolve a lots of bad formated archive errors.
|
||||
- Bug correction : PclZip now correctly unzip file in some specific situation,
|
||||
when compressed content has same size as uncompressed content.
|
||||
- Bug correction : When selecting option 'PCLZIP_OPT_REMOVE_ALL_PATH',
|
||||
directories are not any more created.
|
||||
- Code improvment : correct unclosed opendir(), better handling of . and .. in
|
||||
loops.
|
||||
|
||||
|
||||
Version 2.3 :
|
||||
- Correct a bug with PHP5 : affecting the value 0xFE49FFE0 to a variable does not
|
||||
give the same result in PHP4 and PHP5 ....
|
||||
|
||||
Version 2.2 :
|
||||
- Try development of PCLZIP_OPT_CRYPT .....
|
||||
However this becomes to a stop. To crypt/decrypt I need to multiply 2 long integers,
|
||||
the result (greater than a long) is not supported by PHP. Even the use of bcmath
|
||||
functions does not help. I did not find yet a solution ...;
|
||||
- Add missing '/' at end of directory entries
|
||||
- Check is a file is encrypted or not. Returns status 'unsupported_encryption' and/or
|
||||
error code PCLZIP_ERR_UNSUPPORTED_ENCRYPTION.
|
||||
- Corrected : Bad "version need to extract" field in local file header
|
||||
- Add private method privCheckFileHeaders() in order to check local and central
|
||||
file headers. PclZip is now supporting purpose bit flag bit 3. Purpose bit flag bit 3 gives
|
||||
the ability to have a local file header without size, compressed size and crc filled.
|
||||
- Add a generic status 'error' for file status
|
||||
- Add control of compression type. PclZip only support deflate compression method.
|
||||
Before v2.2, PclZip does not check the compression method used in an archive while
|
||||
extracting. With v2.2 PclZip returns a new error status for a file using an unsupported
|
||||
compression method. New status is "unsupported_compression". New error code is
|
||||
PCLZIP_ERR_UNSUPPORTED_COMPRESSION.
|
||||
- Add optional attribute PCLZIP_OPT_STOP_ON_ERROR. This will stop the extract of files
|
||||
when errors like 'a folder with same name exists' or 'a newer file exists' or
|
||||
'a write protected file' exists, rather than set a status for the concerning file
|
||||
and resume the extract of the zip.
|
||||
- Add optional attribute PCLZIP_OPT_REPLACE_NEWER. This will force, during an extract' the
|
||||
replacement of the file, even if a newer version of the file exists.
|
||||
Note that today if a file with the same name already exists but is older it will be
|
||||
replaced by the extracted one.
|
||||
- Improve PclZipUtilOption()
|
||||
- Support of zip archive with trailing bytes. Before 2.2, PclZip checks that the central
|
||||
directory structure is the last data in the archive. Crypt encryption/decryption of
|
||||
zip archive put trailing 0 bytes after decryption. PclZip is now supporting this.
|
||||
|
||||
Version 2.1 :
|
||||
- Add the ability to abort the extraction by using a user callback function.
|
||||
The user can now return the value '2' in its callback which indicates to stop the
|
||||
extraction. For a pre call-back extract is stopped before the extration of the current
|
||||
file. For a post call back, the extraction is stopped after.
|
||||
- Add the ability to extract a file (or several files) directly in the standard output.
|
||||
This is done by the new parameter PCLZIP_OPT_EXTRACT_IN_OUTPUT with method extract().
|
||||
- Add support for parameters PCLZIP_OPT_COMMENT, PCLZIP_OPT_ADD_COMMENT,
|
||||
PCLZIP_OPT_PREPEND_COMMENT. This will create, replace, add, or prepend comments
|
||||
in the zip archive.
|
||||
- When merging two archives, the comments are not any more lost, but merged, with a
|
||||
blank space separator.
|
||||
- Corrected bug : Files are not deleted when all files are asked to be deleted.
|
||||
- Corrected bug : Folders with name '0' made PclZip to abort the create or add feature.
|
||||
|
||||
|
||||
Version 2.0 :
|
||||
***** Warning : Some new features may break the backward compatibility for your scripts.
|
||||
Please carefully read the readme file.
|
||||
- Add the ability to delete by Index, name and regular expression. This feature is
|
||||
performed by the method delete(), which uses the optional parameters
|
||||
PCLZIP_OPT_BY_INDEX, PCLZIP_OPT_BY_NAME, PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG.
|
||||
- Add the ability to extract by regular expression. To extract by regexp you must use the method
|
||||
extract(), with the option PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG
|
||||
(depending if you want to use ereg() or preg_match() syntax) followed by the
|
||||
regular expression pattern.
|
||||
- Add the ability to extract by index, directly with the extract() method. This is a
|
||||
code improvment of the extractByIndex() method.
|
||||
- Add the ability to extract by name. To extract by name you must use the method
|
||||
extract(), with the option PCLZIP_OPT_BY_NAME followed by the filename to
|
||||
extract or an array of filenames to extract. To extract all a folder, use the folder
|
||||
name rather than the filename with a '/' at the end.
|
||||
- Add the ability to add files without compression. This is done with a new attribute
|
||||
which is PCLZIP_OPT_NO_COMPRESSION.
|
||||
- Add the attribute PCLZIP_OPT_EXTRACT_AS_STRING, which allow to extract a file directly
|
||||
in a string without using any file (or temporary file).
|
||||
- Add constant PCLZIP_SEPARATOR for static configuration of filename separators in a single string.
|
||||
The default separator is now a comma (,) and not any more a blank space.
|
||||
THIS BREAK THE BACKWARD COMPATIBILITY : Please check if this may have an impact with
|
||||
your script.
|
||||
- Improve algorythm performance by removing the use of temporary files when adding or
|
||||
extracting files in an archive.
|
||||
- Add (correct) detection of empty filename zipping. This can occurs when the removed
|
||||
path is the same
|
||||
as a zipped dir. The dir is not zipped (['status'] = filtered), only its content.
|
||||
- Add better support for windows paths (thanks for help from manus@manusfreedom.com).
|
||||
- Corrected bug : When the archive file already exists with size=0, the add() method
|
||||
fails. Corrected in 2.0.
|
||||
- Remove the use of OS_WINDOWS constant. Use php_uname() function rather.
|
||||
- Control the order of index ranges in extract by index feature.
|
||||
- Change the internal management of folders (better handling of internal flag).
|
||||
|
||||
|
||||
Version 1.3 :
|
||||
- Removing the double include check. This is now done by include_once() and require_once()
|
||||
PHP directives.
|
||||
- Changing the error handling mecanism : Remove the use of an external error library.
|
||||
The former PclError...() functions are replaced by internal equivalent methods.
|
||||
By changing the environment variable PCLZIP_ERROR_EXTERNAL you can still use the former library.
|
||||
Introducing the use of constants for error codes rather than integer values. This will help
|
||||
in futur improvment.
|
||||
Introduction of error handling functions like errorCode(), errorName() and errorInfo().
|
||||
- Remove the deprecated use of calling function with arguments passed by reference.
|
||||
- Add the calling of extract(), extractByIndex(), create() and add() functions
|
||||
with variable options rather than fixed arguments.
|
||||
- Add the ability to remove all the file path while extracting or adding,
|
||||
without any need to specify the path to remove.
|
||||
This is available for extract(), extractByIndex(), create() and add() functionS by using
|
||||
the new variable options parameters :
|
||||
- PCLZIP_OPT_REMOVE_ALL_PATH : by indicating this option while calling the fct.
|
||||
- Ability to change the mode of a file after the extraction (chmod()).
|
||||
This is available for extract() and extractByIndex() functionS by using
|
||||
the new variable options parameters.
|
||||
- PCLZIP_OPT_SET_CHMOD : by setting the value of this option.
|
||||
- Ability to definition call-back options. These call-back will be called during the adding,
|
||||
or the extracting of file (extract(), extractByIndex(), create() and add() functions) :
|
||||
- PCLZIP_CB_PRE_EXTRACT : will be called before each extraction of a file. The user
|
||||
can trigerred the change the filename of the extracted file. The user can triggered the
|
||||
skip of the extraction. This is adding a 'skipped' status in the file list result value.
|
||||
- PCLZIP_CB_POST_EXTRACT : will be called after each extraction of a file.
|
||||
Nothing can be triggered from that point.
|
||||
- PCLZIP_CB_PRE_ADD : will be called before each add of a file. The user
|
||||
can trigerred the change the stored filename of the added file. The user can triggered the
|
||||
skip of the add. This is adding a 'skipped' status in the file list result value.
|
||||
- PCLZIP_CB_POST_ADD : will be called after each add of a file.
|
||||
Nothing can be triggered from that point.
|
||||
- Two status are added in the file list returned as function result : skipped & filename_too_long
|
||||
'skipped' is used when a call-back function ask for skipping the file.
|
||||
'filename_too_long' is used while adding a file with a too long filename to archive (the file is
|
||||
not added)
|
||||
- Adding the function PclZipUtilPathInclusion(), that check the inclusion of a path into
|
||||
a directory.
|
||||
- Add a check of the presence of the archive file before some actions (like list, ...)
|
||||
- Add the initialisation of field "index" in header array. This means that by
|
||||
default index will be -1 when not explicitly set by the methods.
|
||||
|
||||
Version 1.2 :
|
||||
- Adding a duplicate function.
|
||||
- Adding a merge function. The merge function is a "quick merge" function,
|
||||
it just append the content of an archive at the end of the first one. There
|
||||
is no check for duplicate files or more recent files.
|
||||
- Improve the search of the central directory end.
|
||||
|
||||
Version 1.1.2 :
|
||||
|
||||
- Changing the license of PclZip. PclZip is now released under the GNU / LGPL license
|
||||
(see License section).
|
||||
- Adding the optional support of a static temporary directory. You will need to configure
|
||||
the constant PCLZIP_TEMPORARY_DIR if you want to use this feature.
|
||||
- Improving the rename() function. In some cases rename() does not work (different
|
||||
Filesystems), so it will be replaced by a copy() + unlink() functions.
|
||||
|
||||
Version 1.1.1 :
|
||||
|
||||
- Maintenance release, no new feature.
|
||||
|
||||
Version 1.1 :
|
||||
|
||||
- New method Add() : adding files in the archive
|
||||
- New method ExtractByIndex() : partial extract of the archive, files are identified by
|
||||
their index in the archive
|
||||
- New method DeleteByIndex() : delete some files/folder entries from the archive,
|
||||
files are identified by their index in the archive.
|
||||
- Adding a test of the zlib extension presence. If not present abort the script.
|
||||
|
||||
Version 1.0.1 :
|
||||
|
||||
- No new feature
|
||||
|
||||
|
||||
3 - Corrected bugs
|
||||
==================
|
||||
|
||||
Corrected in Version 2.0 :
|
||||
- Corrected : During an extraction, if a call-back fucntion is used and try to skip
|
||||
a file, all the extraction process is stopped.
|
||||
|
||||
Corrected in Version 1.3 :
|
||||
- Corrected : Support of static synopsis for method extract() is broken.
|
||||
- Corrected : invalid size of archive content field (0xFF) should be (0xFFFF).
|
||||
- Corrected : When an extract is done with a remove_path parameter, the entry for
|
||||
the directory with exactly the same path is not skipped/filtered.
|
||||
- Corrected : extractByIndex() and deleteByIndex() were not managing index in the
|
||||
right way. For example indexes '1,3-5,11' will only extract files 1 and 11. This
|
||||
is due to a sort of the index resulting table that puts 11 before 3-5 (sort on
|
||||
string and not interger). The sort is temporarilly removed, this means that
|
||||
you must provide a sorted list of index ranges.
|
||||
|
||||
Corrected in Version 1.2 :
|
||||
|
||||
- Nothing.
|
||||
|
||||
Corrected in Version 1.1.2 :
|
||||
|
||||
- Corrected : Winzip is unable to delete or add new files in a PclZip created archives.
|
||||
|
||||
Corrected in Version 1.1.1 :
|
||||
|
||||
- Corrected : When archived file is not compressed (0% compression), the
|
||||
extract method fails.
|
||||
|
||||
Corrected in Version 1.1 :
|
||||
|
||||
- Corrected : Adding a complete tree of folder may result in a bad archive
|
||||
creation.
|
||||
|
||||
Corrected in Version 1.0.1 :
|
||||
|
||||
- Corrected : Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024).
|
||||
|
||||
|
||||
4 - Known bugs or limitations
|
||||
=============================
|
||||
|
||||
Please publish bugs reports in SourceForge :
|
||||
http://sourceforge.net/tracker/?group_id=40254&atid=427564
|
||||
|
||||
In Version 2.x :
|
||||
- PclZip does only support file uncompressed or compressed with deflate (compression method 8)
|
||||
- PclZip does not support password protected zip archive
|
||||
- Some concern were seen when changing mtime of a file while archiving.
|
||||
Seems to be linked to Daylight Saving Time (PclTest_changing_mtime).
|
||||
|
||||
In Version 1.2 :
|
||||
|
||||
- merge() methods does not check for duplicate files or last date of modifications.
|
||||
|
||||
In Version 1.1 :
|
||||
|
||||
- Limitation : Using 'extract' fields in the file header in the zip archive is not supported.
|
||||
- WinZip is unable to delete a single file in a PclZip created archive. It is also unable to
|
||||
add a file in a PclZip created archive. (Corrected in v.1.2)
|
||||
|
||||
In Version 1.0.1 :
|
||||
|
||||
- Adding a complete tree of folder may result in a bad archive
|
||||
creation. (Corrected in V.1.1).
|
||||
- Path given to methods must be in the unix format (/) and not the Windows format (\).
|
||||
Workaround : Use only / directory separators.
|
||||
- PclZip is using temporary files that are sometime the name of the file with a .tmp or .gz
|
||||
added suffix. Files with these names may already exist and may be overwritten.
|
||||
Workaround : none.
|
||||
- PclZip does not check if the zlib extension is present. If it is absent, the zip
|
||||
file is not created and the lib abort without warning.
|
||||
Workaround : enable the zlib extension on the php install
|
||||
|
||||
In Version 1.0 :
|
||||
|
||||
- Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024).
|
||||
(Corrected in v.1.0.1)
|
||||
- Limitation : Multi-disk zip archive are not supported.
|
||||
|
||||
|
||||
5 - License
|
||||
===========
|
||||
|
||||
Since version 1.1.2, PclZip Library is released under GNU/LGPL license.
|
||||
This library is free, so you can use it at no cost.
|
||||
|
||||
HOWEVER, if you release a script, an application, a library or any kind of
|
||||
code using PclZip library (or a part of it), YOU MUST :
|
||||
- Indicate in the documentation (or a readme file), that your work
|
||||
uses PclZip Library, and make a reference to the author and the web site
|
||||
http://www.phpconcept.net
|
||||
- Gives the ability to the final user to update the PclZip libary.
|
||||
|
||||
I will also appreciate that you send me a mail (vincent@phpconcept.net), just to
|
||||
be aware that someone is using PclZip.
|
||||
|
||||
For more information about GNU/LGPL license : http://www.gnu.org
|
||||
|
||||
6 - Warning
|
||||
=================
|
||||
|
||||
This library and the associated files are non commercial, non professional work.
|
||||
It should not have unexpected results. However if any damage is caused by this software
|
||||
the author can not be responsible.
|
||||
The use of this software is at the risk of the user.
|
||||
|
||||
7 - Documentation
|
||||
=================
|
||||
PclZip User Manuel is available in English on PhpConcept : http://www.phpconcept.net/pclzip/man/en/index.php
|
||||
A Russian translation was done by Feskov Kuzma : http://php.russofile.ru/ru/authors/unsort/zip/
|
||||
|
||||
8 - Author
|
||||
==========
|
||||
|
||||
This software was written by Vincent Blavet (vincent@phpconcept.net) on its leasure time.
|
||||
|
||||
9 - Contribute
|
||||
==============
|
||||
If you want to contribute to the development of PclZip, please contact vincent@phpconcept.net.
|
||||
If you can help in financing PhpConcept hosting service, please go to
|
||||
http://www.phpconcept.net/soutien.php
|
3
modules/themeroller/module.info
Executable file
@ -0,0 +1,3 @@
|
||||
name = "Theme generator"
|
||||
description = "Use a JQuery UI theme to create a Gallery3 Theme"
|
||||
version = 1
|
811
modules/themeroller/views/admin_screen.css.php
Normal file
@ -0,0 +1,811 @@
|
||||
/**
|
||||
* Gallery 3 Admin Redmond Theme Screen Styles
|
||||
*
|
||||
* @requires YUI reset, font, grids CSS
|
||||
*
|
||||
* Sheet organization:
|
||||
* 1) Basic HTML elements
|
||||
* 2) Reusable content blocks
|
||||
* 3) Page layout containers
|
||||
* 4) Content blocks in specific layout containers
|
||||
* 5) Navigation and menus
|
||||
* 6) jQuery and jQuery UI
|
||||
* 7) Module color overrides
|
||||
* 8) Forms
|
||||
* 9) States and interactions
|
||||
* 10) Right-to-left language styles
|
||||
*
|
||||
* @todo Review g-buttonset-vertical
|
||||
*/
|
||||
|
||||
/** *******************************************************************
|
||||
* 1) Basic HTML elements
|
||||
**********************************************************************/
|
||||
html {
|
||||
color: #<?= $fcDefault ?>;
|
||||
}
|
||||
|
||||
body, html {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; /* ffDefault */
|
||||
font-size: 13px/1.231; /* fsDefault/ gallery_line_height */
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, strong, th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
#g-dialog h1 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block h2 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block li {
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
a,
|
||||
.g-menu a,
|
||||
#g-dialog a,
|
||||
.g-button,
|
||||
.g-button:active {
|
||||
color: #<?= $fcDefault ?> !important;
|
||||
text-decoration: none;
|
||||
-moz-outline-style: none;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
.g-button:hover,
|
||||
a.ui-state-hover,
|
||||
input.ui-state-hover,
|
||||
button.ui-state-hover {
|
||||
color: #<?= $fcHover ?> !important;
|
||||
text-decoration: none;
|
||||
-moz-outline-style: none;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
#g-dialog a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.g-menu a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
fieldset {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#g-content form ul li {
|
||||
padding: .4em 0;
|
||||
}
|
||||
|
||||
#g-dialog form {
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
#g-dialog fieldset {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#g-content table {
|
||||
margin: .6em 0 2em 0;
|
||||
}
|
||||
|
||||
caption,
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: none;
|
||||
border-bottom: 1px solid #<?= $borderColorContent?>;
|
||||
padding: .5em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
th {
|
||||
vertical-align: bottom;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.g-even {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
}
|
||||
|
||||
.g-odd {
|
||||
background-color: #<?= $bgColorDefault ?>
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 2) Reusable content blocks
|
||||
*********************************************************************/
|
||||
|
||||
.g-block,
|
||||
#g-content #g-admin-dashboard .g-block {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.g-block h2 {
|
||||
padding: .3em .8em;
|
||||
}
|
||||
|
||||
.g-block-content {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#g-content .g-block {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#g-content .g-selected,
|
||||
#g-content .g-available .g-block {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
padding: .8em;
|
||||
}
|
||||
|
||||
.g-selected img,
|
||||
.g-available .g-block img {
|
||||
float: left;
|
||||
margin: 0 1em 1em 0;
|
||||
}
|
||||
|
||||
.g-selected {
|
||||
background: #<?= $bgColorActive ?>;
|
||||
}
|
||||
|
||||
.g-available .g-installed-toolkit:hover {
|
||||
cursor: pointer;
|
||||
background: #<?= $bgColorContent ?>;
|
||||
}
|
||||
|
||||
.g-available .g-button {
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
.g-selected .g-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.g-unavailable {
|
||||
border-color: #<?= $fcHeader ?>;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.g-info td {
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.g-success td {
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.g-error td {
|
||||
background-color: #<?= $borderColorError ?>;
|
||||
color: #<?= $fcError ?>;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.g-warning td {
|
||||
background-color: #<?= $bgColorWarning ?> !important;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.g-module-status.g-info,
|
||||
#g-log-entries .g-info,
|
||||
.g-module-status.g-success,
|
||||
#g-log-entries .g-success {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
}
|
||||
|
||||
/*** ******************************************************************
|
||||
* 3) Page layout containers
|
||||
*********************************************************************/
|
||||
|
||||
/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-header #g-login-menu {
|
||||
margin-top: 1em;
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-view {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
border-bottom: none;
|
||||
min-width: 974px !important;
|
||||
}
|
||||
|
||||
/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-header {
|
||||
background-color: #<?= $bgColorHeader ?>;
|
||||
border-bottom: 1px solid #<?= $borderColorHeader ?>;
|
||||
color: #<?= $fcHeader ?>;
|
||||
font-size: .8em;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#g-content {
|
||||
font-size: 1.1em;
|
||||
padding: 0 2em;
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
#g-sidebar {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
font-size: .9em;
|
||||
padding: 0 20px;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#g-footer {
|
||||
background-color: #<?= $bgColorHeader ?>;
|
||||
border-top: 1px solid #<?= $borderColorHeader ?>;
|
||||
color: #<?= $fcHeader ?>;
|
||||
font-size: .8em;
|
||||
margin-top: 20px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 4) Content blocks in specific layout containers
|
||||
*********************************************************************/
|
||||
|
||||
/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-header #g-logo {
|
||||
background: transparent url('../../../lib/images/logo.png') no-repeat 0 .5em;
|
||||
color: #<?= $fcHeader ?> !important;
|
||||
display: block;
|
||||
height: 65px;
|
||||
padding-top: 5px;
|
||||
width: 105px;
|
||||
}
|
||||
|
||||
#g-header #g-logo:hover {
|
||||
color: #<?= $fcHover ?> !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#g-login-menu li a {
|
||||
color: #<?= $fcHighlight ?> !important;
|
||||
}
|
||||
|
||||
#g-content .g-block h2 {
|
||||
background-color: transparent;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block-content {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.g-block .ui-dialog-titlebar {
|
||||
margin: -1em -1em 0;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block h2 {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Photo stream ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-photo-stream {
|
||||
}
|
||||
|
||||
#g-photo-stream .g-block-content ul {
|
||||
border-right: 1px solid #e8e8e8;
|
||||
height: 135px;
|
||||
overflow: auto;
|
||||
overflow: -moz-scrollbars-horizontal; /* for FF */
|
||||
overflow-x: scroll; /* scroll horizontal */
|
||||
overflow-y: hidden; /* Hide vertical*/
|
||||
}
|
||||
|
||||
#g-content #g-photo-stream .g-item {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
border-right-color: #<?= $borderColorHighlight ?>;
|
||||
border-bottom-color: #<?= $borderColorHighlight ?>;
|
||||
float: left;
|
||||
height: 90px;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
#g-content .g-item {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
border-right-color: #<?= $borderColorHighlight ?>;
|
||||
border-bottom-color: #<?= $borderColorHighlight ?>;
|
||||
height: 90px;
|
||||
padding: 14px 8px;
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
/* Graphics settings ~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-admin-graphics .g-available .g-block {
|
||||
clear: none;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
/* Appearance settings ~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-site-theme,
|
||||
#g-admin-theme {
|
||||
float: left;
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
#g-site-theme {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
/* Block admin ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-admin-blocks-list {
|
||||
float: left;
|
||||
margin: 0 2em 2em 0;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.g-admin-blocks-list div:last-child {
|
||||
border: .1em solid;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.g-admin-blocks-list ul {
|
||||
height: 98%;
|
||||
margin: .1em .1em;
|
||||
padding: .1em;
|
||||
}
|
||||
|
||||
.g-admin-blocks-list ul li.g-draggable {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
margin: .5em;
|
||||
padding: .3em .8em;
|
||||
}
|
||||
|
||||
/* In-line editing ~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
#g-in-place-edit-message {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
}
|
||||
|
||||
/* Theme options ~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
#g-theme-options-form {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
#g-theme-options-form-tabs {
|
||||
border: none !important;
|
||||
}
|
||||
#g-theme-options-form fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li a {
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li a.g-error {
|
||||
background: none no-repeat scroll 0 0 transparent;
|
||||
color: #<?= $fcError ?> !important;
|
||||
}
|
||||
|
||||
/* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-footer #g-credits li a {
|
||||
color: #<?= $fcHighlight ?> !important;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 5) Navigation and menus
|
||||
*********************************************************************/
|
||||
|
||||
/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-banner #g-login-menu {
|
||||
color: #<?= $fcHeader ?>;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#g-banner #g-login-menu li {
|
||||
padding-left: 1.2em;
|
||||
}
|
||||
|
||||
/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-site-admin-menu {
|
||||
bottom: 0;
|
||||
font-size: 1.2em;
|
||||
left: 140px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#g-site-admin-menu ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 6) jQuery and jQuery UI
|
||||
*********************************************************************/
|
||||
|
||||
/* Superfish menu overrides ~~~~~~~~~~~~~~ */
|
||||
.sf-menu a {
|
||||
border-left:1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
.sf-menu li,
|
||||
.sf-menu li li,
|
||||
.sf-menu li li ul li {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
}
|
||||
|
||||
.sf-menu li:hover {
|
||||
background-color: #<?= $bgColorHover ?>;
|
||||
}
|
||||
|
||||
.sf-menu li:hover,
|
||||
.sf-menu li.sfHover,
|
||||
.sf-menu a:focus,
|
||||
.sf-menu a:hover,
|
||||
.sf-menu a:active {
|
||||
background-color: #<?= $bgColorHover ?> !important;
|
||||
}
|
||||
|
||||
.sf-sub-indicator {
|
||||
background-image: url("themeroller/images/ui-icons_<?= $iconColorHighlight ?>_256x240.png");
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
a > .sf-sub-indicator {
|
||||
background-position: -64px -16px !important;
|
||||
top: 0.6em;
|
||||
}
|
||||
|
||||
.sf-menu ul a > .sf-sub-indicator {
|
||||
background-position: -32px -16px !important;
|
||||
}
|
||||
|
||||
/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.ui-widget-overlay {
|
||||
background: #<?= $bgColorOverlay ?>;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
#g-admin-dashboard .ui-state-highlight,
|
||||
#g-sidebar .ui-state-highlight {
|
||||
height: 2em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.g-buttonset-vertical a {
|
||||
width: 8em !important;
|
||||
}
|
||||
|
||||
#g-admin-dashboard .ui-dialog-titlebar,
|
||||
#g-admin-dashboard-sidebar .ui-dialog-titlebar {
|
||||
padding: .2em .4em;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 7) Module color overrides
|
||||
*********************************************************************/
|
||||
|
||||
/* User admin form ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
#g-user-admin-list .g-admin {
|
||||
color: #<?= $fcDefault ?> !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.g-group {
|
||||
border: 1px solid #<?= $borderColorContent ?> !important;
|
||||
}
|
||||
|
||||
.g-group h4 {
|
||||
background-color: #<?= $bgColorDefault ?> !important;
|
||||
border-bottom: 1px dashed #<?= $fcDefault ?> !important;
|
||||
}
|
||||
|
||||
.g-default-group h4,
|
||||
.g-default-group .g-user {
|
||||
color: #<?= $fcDefault ?> !important;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 8) Forms
|
||||
*********************************************************************/
|
||||
fieldset {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
legend {
|
||||
font-weight: bold;
|
||||
color: #<?= $fcDefault ?>;
|
||||
}
|
||||
|
||||
input.textbox,
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
textarea {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
border: 1px solid #<?= $borderColorActive ?>;
|
||||
border-top-color: #<?= $borderColorContent ?>;
|
||||
border-left-color: #<?= $borderColorContent ?>;
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
input:focus,
|
||||
input.textbox:focus,
|
||||
input[type=text]:focus,
|
||||
textarea:focus,
|
||||
option:focus {
|
||||
background-color: #<?= $bgColorActive ?>;
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
/* Forms in dialogs and panels ~~~~~~~~~ */
|
||||
|
||||
label,
|
||||
input[readonly] {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
color: #<?= $fcDefault ?>;
|
||||
}
|
||||
|
||||
/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-short-form .textbox,
|
||||
.g-short-form input[type=text] {
|
||||
background-color: <?= $bgColorDefault ?>;
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
.g-short-form .textbox.g-error {
|
||||
border: 1px solid #<?= $borderColorError ?>;
|
||||
color: #<?= $fcError ?>;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 9) States and interactions
|
||||
*********************************************************************/
|
||||
|
||||
.g-draggable:hover {
|
||||
border: 1px dashed #<?= $bgColorHighlight ?>;
|
||||
}
|
||||
|
||||
.ui-sortable .g-target,
|
||||
.ui-state-highlight {
|
||||
background-color: #<?= $bgColorHighlight ?>;
|
||||
border: 2px dotted #<?= $borderColorHighlight ?>;
|
||||
}
|
||||
|
||||
.g-active,
|
||||
.g-enabled,
|
||||
.g-available,
|
||||
.g-selected,
|
||||
.g-highlight {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.g-inactive,
|
||||
.g-disabled,
|
||||
.g-unavailable,
|
||||
.g-uneditable,
|
||||
.g-locked,
|
||||
.g-deselected,
|
||||
.g-understate {
|
||||
color: #<?= $borderColorContent ?>;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.g-editable:hover {
|
||||
background-color: #<?= $bgColorActive ?>;
|
||||
color: #<?= $iconColorActive ?>
|
||||
}
|
||||
|
||||
form li.g-error,
|
||||
form li.g-info,
|
||||
form li.g-success,
|
||||
form li.g-warning {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
form.g-error input[type="text"],
|
||||
li.g-error input[type="text"],
|
||||
form.g-error input[type="password"],
|
||||
li.g-error input[type="password"],
|
||||
form.g-error input[type="checkbox"],
|
||||
li.g-error input[type="checkbox"],
|
||||
form.g-error input[type="radio"],
|
||||
li.g-error input[type="radio"],
|
||||
form.g-error textarea,
|
||||
li.g-error textarea,
|
||||
form.g-error select,
|
||||
li.g-error select {
|
||||
border: 2px solid #<?= $fcError ?>;
|
||||
}
|
||||
|
||||
.g-error,
|
||||
.g-denied,
|
||||
tr.g-error td.g-error,
|
||||
#g-add-photos-status .g-error {
|
||||
background: #<?= $borderColorError ?> url('../images/ico-error.png') no-repeat .4em 50%;
|
||||
color: #<?= $fcError ?>;
|
||||
}
|
||||
|
||||
.g-info {
|
||||
background: #<?= $bgColorContent ?> url('../images/ico-info.png') no-repeat .4em 50%;
|
||||
}
|
||||
|
||||
.g-success,
|
||||
.g-allowed,
|
||||
#g-add-photos-status .g-success {
|
||||
background: #<?= $bgColorContent ?> url('../images/ico-success.png') no-repeat .4em 50%;
|
||||
}
|
||||
|
||||
tr.g-success {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
tr.g-success td.g-success {
|
||||
background-image: url('../images/ico-success.png');
|
||||
}
|
||||
|
||||
.g-warning,
|
||||
tr.g-warning td.g-warning {
|
||||
background: #<?= $bgColorWarning ?> url('../images/ico-warning.png') no-repeat .4em 50% !important;
|
||||
color: #<?= $fcWarning ?> !important;
|
||||
}
|
||||
|
||||
form .g-error {
|
||||
background-color: #<?= $bgColorError ?>;
|
||||
}
|
||||
|
||||
.g-default {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.g-draggable:hover {
|
||||
border: 1px dashed #<?= $bgColorHighlight ?>;
|
||||
}
|
||||
|
||||
.ui-sortable .g-target,
|
||||
.ui-state-highlight {
|
||||
background-color: #<?= $bgColorHighlight ?>;
|
||||
border: 2px dotted #<?= $borderColorHighlight ?>;
|
||||
}
|
||||
|
||||
/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-loading-large,
|
||||
.g-dialog-loading-large {
|
||||
background: #<?= $bgColorContent ?> url('../images/loading-large.gif') no-repeat center center !important;
|
||||
}
|
||||
|
||||
.g-loading-small {
|
||||
background: #<?= $bgColorContent ?> url('../images/loading-small.gif') no-repeat center center !important;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 10) Right to left styles
|
||||
*********************************************************************/
|
||||
|
||||
.rtl #g-content #g-album-grid .g-item,
|
||||
.rtl #g-site-theme,
|
||||
.rtl #g-admin-theme,
|
||||
.rtl .g-selected img,
|
||||
.rtl .g-available .g-block img,
|
||||
.rtl #g-content #g-photo-stream .g-item,
|
||||
.rtl li.g-group,
|
||||
.rtl #g-server-add-admin {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.rtl #g-admin-graphics .g-available .g-block {
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
margin-right: 0em;
|
||||
}
|
||||
|
||||
.rtl #g-site-admin-menu {
|
||||
left: auto;
|
||||
right: 150px;
|
||||
}
|
||||
|
||||
.rtl #g-header #g-login-menu {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl #g-header #g-login-menu li {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 1.2em;
|
||||
}
|
||||
|
||||
.rtl .g-selected img,
|
||||
.rtl .g-available .g-block img {
|
||||
margin: 0 0 1em 1em;
|
||||
}
|
||||
|
||||
/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.rtl .sf-menu a {
|
||||
border-right:1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
.rtl .sf-sub-indicator {
|
||||
background: url("themeroller/images/ui-icons_<?= $fcDefault ?>_256x240.png") no-repeat -96px -16px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
||||
}
|
||||
|
||||
/*** shadows for all but IE6 ***/
|
||||
.rtl .sf-shadow ul {
|
||||
background: url('../images/superfish-shadow.png') no-repeat bottom left;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
-webkit-border-top-right-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-moz-border-radius-topleft: 17px;
|
||||
-moz-border-radius-bottomright: 17px;
|
||||
-webkit-border-top-left-radius: 17px;
|
||||
-webkit-border-bottom-right-radius: 17px;
|
||||
border-top-left-radius: 17px;
|
||||
border-bottom-right-radius: 17px;
|
||||
}
|
79
modules/themeroller/views/admin_themeroller.html.php
Executable file
@ -0,0 +1,79 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<script type="text/javascript" src="<?= url::file("lib/swfobject.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?= url::file("lib/uploadify/jquery.uploadify.min.js") ?>"></script>
|
||||
<script type="text/javascript">
|
||||
$("#g-admin-themeroller").ready(function() {
|
||||
$("#g-themeroller-zip").uploadify({
|
||||
'uploader' : '<?= url::file("lib/uploadify/uploadify.swf") ?>',
|
||||
'script' : '<?= url::site($action) ?>',
|
||||
'cancelImg' : '<?= url::file("lib/uploadify/cancel.png") ?>',
|
||||
'fileExt' : '*.zip',
|
||||
scriptData: <?= json_encode($script_data) ?>,
|
||||
'fileDesc' : <?= t("Archive file")->for_js() ?>,
|
||||
'auto' : true,
|
||||
'multi' : false,
|
||||
'wmode' : 'transparent',
|
||||
hideButton: true, /* should be true */
|
||||
});
|
||||
|
||||
$("#g-themeroller-zipUploader").css({height: '25px', width: '70px', position: 'absolute'});
|
||||
});
|
||||
</script>
|
||||
<div id="g-admin-themeroller">
|
||||
<h1><?= t("Generate theme") ?></h1>
|
||||
<?= form::open($action, array("method" => "post", "id" => "g-themeroller-form")) ?>
|
||||
<fieldset>
|
||||
<ul>
|
||||
<li><?= access::csrf_form_field() ?></li>
|
||||
<? if (!$is_writable): ?>
|
||||
<li class="g-error">
|
||||
<?= t("The theme directory is not writable. Please ensure that it is writable by the web server") ?>
|
||||
</li>
|
||||
<? endif ?>
|
||||
<li <? if (!empty($errors["name"])): ?> class="g-error"<? endif ?>>
|
||||
<?= form::label("name", t("Name")) ?>
|
||||
<?= form::input("name", $form["name"]) ?>
|
||||
<? if (!empty($errors["name"]) && $errors["name"] == "required"): ?>
|
||||
<p class="g-error"><?= t("Theme name is required") ?></p>
|
||||
<? endif ?>
|
||||
<? if (!empty($errors["name"]) && $errors["name"] == "module_exists"): ?>
|
||||
<p class="g-error"><?= t("Theme exists") ?></p>
|
||||
<? endif ?>
|
||||
</li>
|
||||
<li <? if (!empty($errors["display_name"])): ?> class="g-error"<? endif ?>>
|
||||
<?= form::label("display_name", t("Display name")) ?>
|
||||
<?= form::input("display_name", $form["display_name"]) ?>
|
||||
<? if (!empty($errors["display_name"]) && $errors["display_name"] == "required"): ?>
|
||||
<p class="g-error"><?= t("Theme display_name is required")?></p>
|
||||
<? endif ?>
|
||||
</li>
|
||||
<li <? if (!empty($errors["description"])): ?> class="g-error"<? endif ?>>
|
||||
<?= form::label("description", t("Description")) ?>
|
||||
<?= form::textarea("description", $form["description"]) ?>
|
||||
<? if (!empty($errors["description"]) && $errors["description"] == "required"): ?>
|
||||
<p class="g-error"><?= t("Theme description is required")?></p>
|
||||
<? endif ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= form::label("is_admin", t("Generate an admin theme")) ?>
|
||||
<?= form::checkbox("is_admin", "", !empty($form["is_admin"])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= form::label("zip_file", t("Upload and generate theme")) ?>
|
||||
<br />
|
||||
<?= form::upload(array("name" => "zip_file",
|
||||
"id" => "g-themeroller-zip",
|
||||
"accept" => "application/zip, multipart/x-zip")) ?>
|
||||
<span style="z-index: 1">
|
||||
<button type="submit"
|
||||
id="g-generate-theme"
|
||||
class="<?= $submit_class ?>"
|
||||
<? if ($not_writable): ?> disabled<? endif ?>>
|
||||
<?= t("Generate") ?>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,64 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<script type="text/javascript">
|
||||
var target_value;
|
||||
var animation = null;
|
||||
var delta = 1;
|
||||
animate_progress_bar = function() {
|
||||
var current_value = parseInt($(".g-progress-bar div").css("width").replace("%", ""));
|
||||
if (target_value > current_value) {
|
||||
// speed up
|
||||
delta = Math.min(delta + 0.04, 3);
|
||||
} else {
|
||||
// slow down
|
||||
delta = Math.max(delta - 0.05, 1);
|
||||
}
|
||||
|
||||
if (target_value == 100) {
|
||||
$(".g-progress-bar").progressbar("value", 100);
|
||||
} else if (current_value != target_value || delta != 1) {
|
||||
var new_value = Math.min(current_value + delta, target_value);
|
||||
$(".g-progress-bar").progressbar("value", new_value);
|
||||
animation = setTimeout(function() { animate_progress_bar(target_value); }, 100);
|
||||
} else {
|
||||
animation = null;
|
||||
delta = 1;
|
||||
}
|
||||
$.fn.gallery_hover_init();
|
||||
}
|
||||
|
||||
update = function() {
|
||||
$.ajax({
|
||||
url: <?= html::js_string(url::site("admin/themeroller/run/$task->id?csrf=$csrf")) ?>,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
target_value = data.percent_complete;
|
||||
if (!animation) {
|
||||
animate_progress_bar();
|
||||
}
|
||||
$("#g-status").html("" + data.status);
|
||||
if (data.done) {
|
||||
dismiss();
|
||||
} else {
|
||||
setTimeout(update, 100);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".g-progress-bar").progressbar({value: 0});
|
||||
update();
|
||||
dismiss = function() {
|
||||
window.location = <?= html::js_string(url::site("admin/themes")) ?>;
|
||||
}
|
||||
</script>
|
||||
<div id="g-progress">
|
||||
</div>
|
||||
<h1> <?= $task->name ?> </h1>
|
||||
<div class="g-progress-bar"></div>
|
||||
<div id="g-status">
|
||||
<?= t("Starting up...") ?>
|
||||
</div>
|
||||
<div class="g-text-right">
|
||||
<button id="g-pause-button" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Pause") ?></button>
|
||||
<button id="g-done-button" class="ui-state-default ui-corner-all" style="display: none" onclick="dismiss()"><?= t("Close") ?></button>
|
||||
</div>
|
||||
</div>
|
70
modules/themeroller/views/admin_themeroller_upload.html.php
Executable file
@ -0,0 +1,70 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<script type="text/javascript" src="<?= url::file("lib/swfobject.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?= url::file("lib/uploadify/jquery.uploadify.min.js") ?>"></script>
|
||||
<script type="text/javascript">
|
||||
$("#g-admin-themeroller").ready(function() {
|
||||
$("#g-themeroller-zip").uploadify({
|
||||
'uploader' : '<?= url::file("lib/uploadify/uploadify.swf") ?>',
|
||||
'script' : '<?= url::site("admin/themeroller/upload") ?>',
|
||||
'cancelImg' : '<?= url::file("lib/uploadify/cancel.png") ?>',
|
||||
'fileExt' : '*.zip',
|
||||
scriptData : <?= json_encode($script_data) ?>,
|
||||
'fileDesc' : <?= t("Archive file")->for_js() ?>,
|
||||
'auto' : true,
|
||||
'multi' : false,
|
||||
fileDataName : 'zip_file',
|
||||
'wmode' : 'transparent',
|
||||
hideButton: true, /* should be true */
|
||||
onSelectOnce: function(event, queueID, fileObj) {
|
||||
$("#g-themeroller-form").find(":submit")
|
||||
.addClass("ui-state-disabled")
|
||||
.attr("disabled", "disabled");
|
||||
},
|
||||
onComplete : function(event, queueID, fileObj, response, data) {
|
||||
$("#g-themeroller-form").submit();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#g-themeroller-is-admin").change(function(event) {
|
||||
var scriptData = $("#g-themeroller-zip").uploadifySettings("scriptData");
|
||||
scriptData.is_admin = $(this).is(":checked") ? 1 : 0;
|
||||
$("#g-themeroller-zip").uploadifySettings("scriptData", scriptData);
|
||||
});
|
||||
|
||||
$("#g-themeroller-zipUploader").css({height: '40px', width: '70px', position: 'absolute'});
|
||||
});
|
||||
</script>
|
||||
<div id="g-admin-themeroller">
|
||||
<h1><?= t("Upload themeroller archive") ?></h1>
|
||||
<?= form::open($action, array("method" => "get", "id" => "g-themeroller-form")) ?>
|
||||
<fieldset>
|
||||
<ul>
|
||||
<li><?= access::csrf_form_field() ?></li>
|
||||
<? if (!$is_writable): ?>
|
||||
<li class="g-error">
|
||||
<?= t("The theme directory is not writable. Please ensure that it is writable by the web server") ?>
|
||||
</li>
|
||||
<? endif ?>
|
||||
<li><span><?= t("Upload and generate theme") ?></span></li>
|
||||
<li>
|
||||
<?= form::checkbox(array("name" => "is_admin",
|
||||
"id" => "g-themeroller-is-admin")) ?>
|
||||
<?= form::label("is_admin", t("Generate an admin theme")) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= form::upload(array("name" => "zip_file",
|
||||
"id" => "g-themeroller-zip",
|
||||
"accept" => "application/zip, multipart/x-zip")) ?>
|
||||
<span style="z-index: 1">
|
||||
<button type="submit"
|
||||
id="g-generate-theme"
|
||||
class="<?= $submit_class ?>"
|
||||
<? if ($not_writable): ?> disabled<? endif ?>>
|
||||
<?= t("Upload") ?>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
996
modules/themeroller/views/site_screen.css.php
Normal file
@ -0,0 +1,996 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
/**
|
||||
* Gallery 3 <?= $display_name ?> Screen Styles
|
||||
*
|
||||
* @requires YUI reset, font, grids CSS
|
||||
*
|
||||
* Sheet organization:
|
||||
* 1) Font sizes, base HTML elements
|
||||
* 2) Reusable content blocks
|
||||
* 3) Page layout containers
|
||||
* 4) Content blocks in specific layout containers
|
||||
* 5) Navigation and menus
|
||||
* 6) jQuery and jQuery UI
|
||||
* 7) Forms
|
||||
* 8) States and interactions
|
||||
* 9) Organize module style
|
||||
* 10) Tag module styles
|
||||
* 11) Right-to-left language styles
|
||||
*/
|
||||
|
||||
/** *******************************************************************
|
||||
* 1) Font sizes, base HTML elements
|
||||
**********************************************************************/
|
||||
html {
|
||||
color: #<?= $fcDefault ?>;
|
||||
}
|
||||
|
||||
body, html {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
font-family: <?= urldecode($ffDefault) ?>;
|
||||
font-size: 13px/1.231; /* gallery_line_height */
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, strong, th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
#g-dialog h1 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block h2 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#g-sidebar .g-block li {
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
#g-content,
|
||||
#g-site-menu,
|
||||
h3 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#g-sidebar,
|
||||
.g-breadcrumbs {
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
#g-banner,
|
||||
#g-footer,
|
||||
.g-message {
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
#g-album-grid .g-item,
|
||||
#g-item #g-photo,
|
||||
#g-item #g-movie {
|
||||
font-size: .7em;
|
||||
}
|
||||
|
||||
/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
a,
|
||||
.g-menu a,
|
||||
#g-dialog a,
|
||||
.g-button,
|
||||
.g-button:active {
|
||||
color: #<?= $fcDefault ?> !important; /* fcDefault; */
|
||||
cursor: pointer !important;
|
||||
text-decoration: none;
|
||||
-moz-outline-style: none;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
.g-button:hover,
|
||||
a.ui-state-hover,
|
||||
input.ui-state-hover,
|
||||
button.ui-state-hover {
|
||||
color: #<?= $fcHover ?> !important; /* fcHover */
|
||||
text-decoration: none;
|
||||
-moz-outline-style: none;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
#g-dialog a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.g-menu a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#g-dialog #g-action-status li {
|
||||
width: 400px;
|
||||
white-space: normal;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#g-content table {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
caption,
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: none;
|
||||
border-bottom: 1px solid #<?= $borderColorContent ?>;
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.g-even {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
}
|
||||
|
||||
.g-odd {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 2) Reusable content blocks
|
||||
*********************************************************************/
|
||||
|
||||
.g-block h2 {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
padding: .3em .8em;
|
||||
}
|
||||
|
||||
.g-block-content {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/*** ******************************************************************
|
||||
* 3) Page layout containers
|
||||
*********************************************************************/
|
||||
|
||||
/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-view {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-header {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#g-banner {
|
||||
background-color: #<?= $bgColorHeader ?>;
|
||||
border-bottom: 1px solid #<?= $borderColorHeader ?>;
|
||||
color: #<?= $fcHeader?>;
|
||||
min-height: 5em;
|
||||
padding: 1em 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#g-content {
|
||||
padding-left: 20px;
|
||||
position: relative;
|
||||
width: 696px;
|
||||
}
|
||||
|
||||
#g-sidebar {
|
||||
padding: 0 20px;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#g-footer {
|
||||
background-color: #<?= $bgColorHeader ?>;
|
||||
border-top: 1px solid #<?= $borderColorHeader ?>;
|
||||
margin-top: 20px;
|
||||
padding: 10px 20px;
|
||||
color: #<?= $fcHeader?>;
|
||||
}
|
||||
|
||||
/* Status and validation messages ~~~~ */
|
||||
|
||||
.g-message-block {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
#g-site-status li {
|
||||
border-bottom: 1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-breadcrumbs li {
|
||||
background: transparent url('../images/ico-separator.png') no-repeat scroll left center;
|
||||
}
|
||||
|
||||
.g-breadcrumbs .g-first {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-paginator {
|
||||
}
|
||||
|
||||
.g-paginator li {
|
||||
}
|
||||
|
||||
.g-paginator .g-info {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Dialogs and panels ~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-dialog {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#g-dialog legend {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#g-dialog .g-cancel {
|
||||
margin: .4em 1em;
|
||||
}
|
||||
|
||||
#g-panel {
|
||||
display: none;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
/* Inline layout ~~~~~~~~~~ */
|
||||
|
||||
.g-inline li {
|
||||
float: left;
|
||||
margin-left: 1.8em;
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.g-inline li.g-first {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 4) Content blocks in specific layout containers
|
||||
*********************************************************************/
|
||||
|
||||
/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-banner #g-quick-search-form {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#g-banner #g-quick-search-form input[type='text'] {
|
||||
width: 17em;
|
||||
}
|
||||
|
||||
#g-content .g-block h2 {
|
||||
background-color: transparent;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#g-login-menu li a {
|
||||
color: #<?= $fcHighlight ?> !important;
|
||||
}
|
||||
|
||||
/* Sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-sidebar .g-block-content {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
#g-sidebar #g-image-block {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-content #g-album-grid {
|
||||
margin: 1em 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#g-content #g-album-grid .g-item {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
border: 1px solid #<?= $bgColorContent ?>;
|
||||
float: left;
|
||||
padding: .6em 8px;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
width: 213px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#g-content #g-album-grid .g-item h2 {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
#g-content .g-photo h2,
|
||||
#g-content .g-item .g-metadata {
|
||||
display: none;
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
#g-content #g-album-grid .g-album {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
}
|
||||
|
||||
#g-content #g-album-grid .g-album h2 span.g-album {
|
||||
background: transparent url('../images/ico-album.png') no-repeat top left;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
#g-content #g-album-grid .g-hover-item {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
position: absolute !important;
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
|
||||
#g-content .g-hover-item h2,
|
||||
#g-content .g-hover-item .g-metadata {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#g-content #g-album-grid #g-place-holder {
|
||||
position: relative;
|
||||
visibility: hidden;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* Search results ~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-content #g-search-results {
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
/* Individual photo content ~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#g-item #g-photo,
|
||||
#g-item #g-movie {
|
||||
padding: 2.2em 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#g-item img.g-resize,
|
||||
#g-item a.g-movie {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-footer #g-credits li {
|
||||
padding-right: 1.2em;
|
||||
}
|
||||
|
||||
#g-footer #g-credits li a {
|
||||
color: #<?= $fcHighlight ?> !important;
|
||||
}
|
||||
|
||||
/* In-line editing ~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-in-place-edit-message {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
}
|
||||
|
||||
/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
#g-edit-permissions-form td {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
#g-edit-permissions-form fieldset {
|
||||
border: 1px solid #<?= $borderColorHighlight ?>;
|
||||
}
|
||||
|
||||
#g-permissions .g-denied {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#g-permissions .g-allowed {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.g-allowed a {
|
||||
background-image: url("themeroller/images/ui-icons_<?= $iconColorHighlight ?>_256x240.png") !important;
|
||||
display:inline-block;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.g-denied a {
|
||||
background-image: url("themeroller/images/ui-icons_<?= $iconColorError ?>_256x240.png") !important;
|
||||
display:inline-block;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.g-denied a.g-passive,
|
||||
.g-allowed a.g-passive {
|
||||
filter:Alpha(Opacity=35);
|
||||
opacity: .55;
|
||||
}
|
||||
|
||||
#g-permissions .g-active a {
|
||||
border: 1px solid #<?= $borderColorActive ?>;
|
||||
background: #<?= $bgColorActive ?>;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 5) Navigation and menus
|
||||
*********************************************************************/
|
||||
|
||||
/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-banner #g-login-menu {
|
||||
color: #<?= $fcHeader ?>;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#g-banner #g-login-menu li {
|
||||
padding-left: 1.2em;
|
||||
}
|
||||
|
||||
/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-site-menu {
|
||||
bottom: 0;
|
||||
left: 140px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#g-site-menu ul {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-context-menu {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.g-item .g-context-menu {
|
||||
display: none;
|
||||
margin-top: 2em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#g-item .g-context-menu ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.g-context-menu li {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.g-context-menu li a {
|
||||
display: block;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.g-hover-item .g-context-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.g-hover-item .g-context-menu li {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.g-hover-item .g-context-menu a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
#g-view-menu {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#g-view-menu a {
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
height: 28px !important;
|
||||
width: 43px !important;
|
||||
}
|
||||
|
||||
#g-view-menu #g-slideshow-link {
|
||||
background-image: url('../images/ico-view-slideshow.png');
|
||||
}
|
||||
|
||||
#g-view-menu .g-fullsize-link {
|
||||
background-image: url('../images/ico-view-fullsize.png');
|
||||
}
|
||||
|
||||
#g-view-menu #g-comments-link {
|
||||
background-image: url('../images/ico-view-comments.png');
|
||||
}
|
||||
|
||||
#g-view-menu #g-print-digibug-link {
|
||||
background-image: url('../images/ico-print.png');
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 6) jQuery and jQuery UI
|
||||
*********************************************************************/
|
||||
|
||||
/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.ui-widget-overlay {
|
||||
background: #<?= $bgColorOverlay ?>;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
/* Rotate icon, ThemeRoller only provides one of these */
|
||||
|
||||
.ui-icon-rotate-ccw {
|
||||
background-position: -192px -64px;
|
||||
}
|
||||
|
||||
.ui-icon-rotate-cw {
|
||||
background-position: -208px -64px;
|
||||
}
|
||||
|
||||
/* Superfish menu overrides ~~~~~~~~~~~~~~ */
|
||||
.sf-menu a {
|
||||
border-left:1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
.sf-menu li,
|
||||
.sf-menu li li,
|
||||
.sf-menu li li ul li {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
}
|
||||
|
||||
.sf-menu li:hover {
|
||||
background-color: #<?= $bgColorHover ?>;
|
||||
}
|
||||
|
||||
.sf-menu li:hover,
|
||||
.sf-menu li.sfHover,
|
||||
.sf-menu a:focus,
|
||||
.sf-menu a:hover,
|
||||
.sf-menu a:active {
|
||||
background-color: #<?= $bgColorHover ?> !important;
|
||||
}
|
||||
|
||||
.sf-sub-indicator {
|
||||
background-image: url("themeroller/images/ui-icons_<?= $iconColorHighlight ?>_256x240.png");
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
a > .sf-sub-indicator {
|
||||
background-position: -64px -16px !important;
|
||||
top: 0.6em;
|
||||
}
|
||||
|
||||
.sf-menu ul a > .sf-sub-indicator {
|
||||
background-position: -32px -16px !important;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 7) Forms
|
||||
*********************************************************************/
|
||||
fieldset {
|
||||
border: 1px solid #<?= $borderColorContent ?>;
|
||||
}
|
||||
|
||||
legend {
|
||||
font-weight: bold;
|
||||
color: #<?= $fcDefault ?>;
|
||||
}
|
||||
|
||||
input.textbox,
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
textarea {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
border: 1px solid #<?= $borderColorActive ?>;
|
||||
border-top-color: #<?= $borderColorContent ?>;
|
||||
border-left-color: #<?= $borderColorContent ?>;
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
input:focus,
|
||||
input.textbox:focus,
|
||||
input[type=text]:focus,
|
||||
textarea:focus,
|
||||
option:focus {
|
||||
background-color: #<?= $bgColorActive ?>;
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
/* Forms in dialogs and panels ~~~~~~~~~ */
|
||||
|
||||
label,
|
||||
input[readonly] {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
color: #<?= $fcDefault ?>;
|
||||
}
|
||||
|
||||
/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-short-form .textbox,
|
||||
.g-short-form input[type=text] {
|
||||
background-color: <?= $bgColorDefault ?>
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
.g-short-form .textbox.g-error {
|
||||
border: 1px solid #<?= $borderColorError ?>;
|
||||
color: #<?= $fcError ?>;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 8) States and interactions
|
||||
*********************************************************************/
|
||||
|
||||
.g-active,
|
||||
.g-enabled,
|
||||
.g-available,
|
||||
.g-selected,
|
||||
.g-highlight {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.g-inactive,
|
||||
.g-disabled,
|
||||
.g-unavailable,
|
||||
.g-uneditable,
|
||||
.g-locked,
|
||||
.g-deselected,
|
||||
.g-understate {
|
||||
color: #<?= $borderColorContent ?>;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.g-editable:hover {
|
||||
background-color: #<?= $bgColorActive ?>;
|
||||
color: #<?= $iconColorActive ?>
|
||||
}
|
||||
|
||||
form li.g-error,
|
||||
form li.g-info,
|
||||
form li.g-success,
|
||||
form li.g-warning {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
form.g-error input[type="text"],
|
||||
li.g-error input[type="text"],
|
||||
form.g-error input[type="password"],
|
||||
li.g-error input[type="password"],
|
||||
form.g-error input[type="checkbox"],
|
||||
li.g-error input[type="checkbox"],
|
||||
form.g-error input[type="radio"],
|
||||
li.g-error input[type="radio"],
|
||||
form.g-error textarea,
|
||||
li.g-error textarea,
|
||||
form.g-error select,
|
||||
li.g-error select {
|
||||
border: 2px solid #<?= $fcError ?>;
|
||||
}
|
||||
|
||||
.g-error,
|
||||
tr.g-error td.g-error,
|
||||
#g-add-photos-status .g-error {
|
||||
background: #<?= $borderColorError ?> url('../images/ico-error.png') no-repeat .4em 50%;
|
||||
color: #<?= $fcError ?>;
|
||||
}
|
||||
|
||||
.g-info {
|
||||
background: #<?= $bgColorContent ?> url('../images/ico-info.png') no-repeat .4em 50%;
|
||||
}
|
||||
|
||||
.g-success,
|
||||
#g-add-photos-status .g-success {
|
||||
background: #<?= $bgColorContent ?> url('../images/ico-success.png') no-repeat .4em 50%;
|
||||
}
|
||||
|
||||
tr.g-success {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
tr.g-success td.g-success {
|
||||
background-image: url('../images/ico-success.png');
|
||||
}
|
||||
|
||||
.g-warning,
|
||||
tr.g-warning td.g-warning {
|
||||
background: #<?= $bgColorWarning ?> url('../images/ico-warning.png') no-repeat .4em 50%;
|
||||
color: #<?= $fcWarning ?>;
|
||||
}
|
||||
|
||||
form .g-error {
|
||||
background-color: #<?= $bgColorError ?>;
|
||||
}
|
||||
|
||||
.g-default {
|
||||
background-color: #<?= $bgColorDefault ?>;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.g-draggable:hover {
|
||||
border: 1px dashed #<?= $bgColorHighlight ?>;
|
||||
}
|
||||
|
||||
.ui-sortable .g-target,
|
||||
.ui-state-highlight {
|
||||
background-color: #<?= $bgColorHighlight ?>;
|
||||
border: 2px dotted #<?= $borderColorHighlight ?>;
|
||||
}
|
||||
|
||||
/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.g-loading-large,
|
||||
.g-dialog-loading-large {
|
||||
background: #<?= $bgColorContent ?> url('../images/loading-large.gif') no-repeat center center !important;
|
||||
}
|
||||
|
||||
.g-loading-small {
|
||||
background: #<?= $bgColorContent ?> url('../images/loading-small.gif') no-repeat center center !important;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 9) Organize module style
|
||||
*********************************************************************/
|
||||
#g-organize {
|
||||
background-color: #<?= $bgColorContent ?>;
|
||||
border: 0px solid #<?= $borderColorContent ?>;
|
||||
color: #<?= $fcContent ?>;
|
||||
}
|
||||
|
||||
#g-organize-hover {
|
||||
background-color: #<?= $bgColorHover ?>;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#g-organize-active {
|
||||
background-color: #<?= $bgColorHighlight ?>;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 10) Tag module styles
|
||||
*********************************************************************/
|
||||
/* Tag cloud ~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
#g-tag-cloud ul li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size0 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 70%;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size1 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 80%;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size2 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 90%;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size3 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 100%;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size4 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 110%;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size5 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 120%;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size6 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 130%;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li.size7 a {
|
||||
color: #<?= $fcContent ?>;
|
||||
font-size: 140%;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
#g-tag-cloud ul li a:hover {
|
||||
color: #f30;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 11) Right to left language styles
|
||||
*********************************************************************/
|
||||
|
||||
.rtl #g-header #g-login-menu,
|
||||
.rtl #g-header #g-quick-search-form {
|
||||
clear: left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl #g-header #g-login-menu li {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 1.2em;
|
||||
}
|
||||
|
||||
.rtl #g-site-menu {
|
||||
left: auto;
|
||||
right: 150px;
|
||||
}
|
||||
|
||||
.rtl #g-view-menu #g-slideshow-link {
|
||||
background-image: url('../images/ico-view-slideshow-rtl.png');
|
||||
}
|
||||
|
||||
.rtl #g-sidebar .g-block-content {
|
||||
padding-right: 1em;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.rtl #g-footer #g-credits li {
|
||||
padding-left: 1.2em !important;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.rtl .g-breadcrumbs li {
|
||||
background: transparent url('../images/ico-separator-rtl.png') no-repeat scroll right center;
|
||||
}
|
||||
|
||||
.rtl .g-breadcrumbs .g-first {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
.rtl .g-buttonset .ui-corner-tl {
|
||||
-moz-border-radius-topleft: 0;
|
||||
-webkit-border-top-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
-moz-border-radius-topright: 5px !important;
|
||||
-webkit-border-top-right-radius: 5px !important;
|
||||
border-top-right-radius: 5px !important;
|
||||
}
|
||||
|
||||
.rtl .g-buttonset .ui-corner-tr {
|
||||
-moz-border-radius-topright: 0;
|
||||
-webkit-border-top-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
-moz-border-radius-topleft: 5px !important;
|
||||
-webkit-border-top-left-radius: 5px !important;
|
||||
border-top-left-radius: 5px !important;
|
||||
}
|
||||
|
||||
.rtl .g-buttonset .ui-corner-bl {
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-moz-border-radius-bottomright: 5px !important;
|
||||
-webkit-border-bottom-right-radius: 5px !important;
|
||||
border-bottom-right-radius: 5px !important;
|
||||
}
|
||||
|
||||
.rtl .g-buttonset .ui-corner-br {
|
||||
-moz-border-radius-bottomright: 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft: 5px !important;
|
||||
-webkit-border-bottom-left-radius: 5px !important;
|
||||
border-bottom-left-radius: 5px !important;
|
||||
}
|
||||
|
||||
.rtl .g-buttonset .ui-corner-right,
|
||||
.rtl .ui-progressbar .ui-corner-right {
|
||||
-moz-border-radius-topright: 0;
|
||||
-webkit-border-top-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
-moz-border-radius-topleft: 5px !important;
|
||||
-webkit-border-top-left-radius: 5px !important;
|
||||
border-top-left-radius: 5px !important;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft: 5px !important;
|
||||
-webkit-border-bottom-left-radius: 5px !important;
|
||||
border-bottom-left-radius: 5px !important;
|
||||
}
|
||||
|
||||
.rtl .g-buttonset .ui-corner-left,
|
||||
.rtl .ui-progressbar .ui-corner-left {
|
||||
-moz-border-radius-topleft: 0;
|
||||
-webkit-border-top-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
-moz-border-radius-topright: 5px !important;
|
||||
-webkit-border-top-right-radius: 5px !important;
|
||||
border-top-right-radius: 5px !important;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-moz-border-radius-bottomright: 5px !important;
|
||||
-webkit-border-bottom-right-radius: 5px !important;
|
||||
border-bottom-right-radius: 5px !important;
|
||||
}
|
||||
|
||||
/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
.rtl .sf-menu a {
|
||||
border-right:1px solid #<?= $borderColorHighlight ?>;
|
||||
}
|
||||
|
||||
.rtl .sf-sub-indicator {
|
||||
background: url("themeroller/images/ui-icons_2e83ff_256x240.png") no-repeat -96px -16px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
||||
}
|
||||
|
||||
/*** shadows for all but IE6 ***/
|
||||
.rtl .sf-shadow ul {
|
||||
background: url('../images/superfish-shadow.png') no-repeat bottom left;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
-webkit-border-top-right-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-moz-border-radius-topleft: 17px;
|
||||
-moz-border-radius-bottomright: 17px;
|
||||
-webkit-border-top-left-radius: 17px;
|
||||
-webkit-border-bottom-right-radius: 17px;
|
||||
border-top-left-radius: 17px;
|
||||
border-bottom-right-radius: 17px;
|
||||
}
|
9
modules/themeroller/views/theme.info.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
name = "<?= $display_name ?>"
|
||||
description = "<?= $description ?>"
|
||||
version = 1
|
||||
author = "<?= $user_name ?>"
|
||||
site = "<?= !$is_admin ? 1 : 0?>"
|
||||
admin = "<?= $is_admin ? 1 : 0?>"
|
||||
; definition = <?= $definition ?>
|
||||
|