This commit is contained in:
Stian Lund 2024-03-25 17:08:25 +01:00
parent bcf0eb0235
commit 6e538e9bbd
17 changed files with 926 additions and 926 deletions

View File

@ -1,17 +1,17 @@
#g-content fieldset { #g-content fieldset {
display: block; display: block;
} }
#g-content fieldset.g-tag-cloud-html5-admin-form-top { #g-content fieldset.g-tag-cloud-html5-admin-form-top {
width: 80%; width: 80%;
clear: both; clear: both;
} }
#g-content fieldset.g-tag-cloud-html5-admin-form-left { #g-content fieldset.g-tag-cloud-html5-admin-form-left {
width: 45%; width: 45%;
float: left; float: left;
clear: left; clear: left;
margin-right: 2% margin-right: 2%
} }
#g-content fieldset.g-tag-cloud-html5-admin-form-right { #g-content fieldset.g-tag-cloud-html5-admin-form-right {
width: 45%; width: 45%;
clear: right; clear: right;
} }

View File

@ -1,106 +1,106 @@
/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */ /* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */
/* comment out this first block to make the inline tags appear if the cloud doesn't load */ /* comment out this first block to make the inline tags appear if the cloud doesn't load */
#g-tag-cloud-html5-tags { #g-tag-cloud-html5-tags {
display: none; display: none;
} }
#g-tag-cloud-html5-tags ul { #g-tag-cloud-html5-tags ul {
text-align: justify; text-align: justify;
} }
#g-tag-cloud-html5-tags ul li { #g-tag-cloud-html5-tags ul li {
display: inline; display: inline;
text-align: justify; text-align: justify;
} }
#g-tag-cloud-html5-tags ul li a { #g-tag-cloud-html5-tags ul li a {
text-decoration: none; text-decoration: none;
} }
#g-tag-cloud-html5-tags ul li span { #g-tag-cloud-html5-tags ul li span {
display: none; display: none;
} }
#g-tag-cloud-html5-page ul li a:hover { #g-tag-cloud-html5-page ul li a:hover {
text-decoration: underline; text-decoration: underline;
} }
/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ /* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */
#g-tag-cloud-html5-page-canvas { #g-tag-cloud-html5-page-canvas {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
#g-tag-cloud-html5-page-tags ul { #g-tag-cloud-html5-page-tags ul {
font-size: 1.2em; font-size: 1.2em;
text-align: justify; text-align: justify;
} }
#g-tag-cloud-html5-page-tags ul li { #g-tag-cloud-html5-page-tags ul li {
display: inline; display: inline;
line-height: 1.5em; line-height: 1.5em;
text-align: justify; text-align: justify;
} }
#g-tag-cloud-html5-page-tags ul li a { #g-tag-cloud-html5-page-tags ul li a {
text-decoration: none; text-decoration: none;
} }
#g-tag-cloud-html5-page-tags ul li span { #g-tag-cloud-html5-page-tags ul li span {
display: none; display: none;
} }
#g-tag-cloud-html5-page-tags ul li.size0 a { #g-tag-cloud-html5-page-tags ul li.size0 a {
color: #9cf; color: #9cf;
font-size: 70%; font-size: 70%;
font-weight: 100; font-weight: 100;
} }
#g-tag-cloud-html5-page-tags ul li.size1 a { #g-tag-cloud-html5-page-tags ul li.size1 a {
color: #9cf; color: #9cf;
font-size: 80%; font-size: 80%;
font-weight: 100; font-weight: 100;
} }
#g-tag-cloud-html5-page-tags ul li.size2 a { #g-tag-cloud-html5-page-tags ul li.size2 a {
color: #69f; color: #69f;
font-size: 90%; font-size: 90%;
font-weight: 300; font-weight: 300;
} }
#g-tag-cloud-html5-page-tags ul li.size3 a { #g-tag-cloud-html5-page-tags ul li.size3 a {
color: #69c; color: #69c;
font-size: 100%; font-size: 100%;
font-weight: 500; font-weight: 500;
} }
#g-tag-cloud-html5-page-tags ul li.size4 a { #g-tag-cloud-html5-page-tags ul li.size4 a {
color: #369; color: #369;
font-size: 110%; font-size: 110%;
font-weight: 700; font-weight: 700;
} }
#g-tag-cloud-html5-page-tags ul li.size5 a { #g-tag-cloud-html5-page-tags ul li.size5 a {
color: #0e2b52; color: #0e2b52;
font-size: 120%; font-size: 120%;
font-weight: 900; font-weight: 900;
} }
#g-tag-cloud-html5-page-tags ul li.size6 a { #g-tag-cloud-html5-page-tags ul li.size6 a {
color: #0e2b52; color: #0e2b52;
font-size: 130%; font-size: 130%;
font-weight: 900; font-weight: 900;
} }
#g-tag-cloud-html5-page-tags ul li.size7 a { #g-tag-cloud-html5-page-tags ul li.size7 a {
color: #0e2b52; color: #0e2b52;
font-size: 140%; font-size: 140%;
font-weight: 900; font-weight: 900;
} }
#g-tag-cloud-html5-page-tags ul li a:hover { #g-tag-cloud-html5-page-tags ul li a:hover {
color: #f30; color: #f30;
text-decoration: underline; text-decoration: underline;
} }

View File

@ -1,177 +1,177 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta * Copyright (C) 2000-2013 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class tag_cloud_html5_installer { class tag_cloud_html5_installer {
static function install() { static function install() {
// clear and reset default values. this is also called in the admin menu for // clear and reset default values. this is also called in the admin menu for
// 'reset all to default values' and if the upgrader sees variables missing. // 'reset all to default values' and if the upgrader sees variables missing.
module::clear_all_vars("tag_cloud_html5"); module::clear_all_vars("tag_cloud_html5");
module::set_var("tag_cloud_html5", "show_wholecloud_link", true); module::set_var("tag_cloud_html5", "show_wholecloud_link", true);
module::set_var("tag_cloud_html5", "show_add_tag_form", true); module::set_var("tag_cloud_html5", "show_add_tag_form", true);
module::set_var("tag_cloud_html5", "show_wholecloud_list", true); module::set_var("tag_cloud_html5", "show_wholecloud_list", true);
module::set_var("tag_cloud_html5", "maxtags_sidebar", 30); module::set_var("tag_cloud_html5", "maxtags_sidebar", 30);
module::set_var("tag_cloud_html5", "width_sidebar", 1.00); module::set_var("tag_cloud_html5", "width_sidebar", 1.00);
module::set_var("tag_cloud_html5", "height_sidebar", 0.8); module::set_var("tag_cloud_html5", "height_sidebar", 0.8);
module::set_var("tag_cloud_html5", "maxtags_wholecloud", 500); module::set_var("tag_cloud_html5", "maxtags_wholecloud", 500);
module::set_var("tag_cloud_html5", "width_wholecloud", 0.95); module::set_var("tag_cloud_html5", "width_wholecloud", 0.95);
module::set_var("tag_cloud_html5", "height_wholecloud", 0.75); module::set_var("tag_cloud_html5", "height_wholecloud", 0.75);
module::set_var("tag_cloud_html5", "options_sidebar", json_encode(array( module::set_var("tag_cloud_html5", "options_sidebar", json_encode(array(
"maxSpeed" => 0.05, "maxSpeed" => 0.05,
"deadZone" => 0.25, "deadZone" => 0.25,
"initial" => array(0.8,-0.3), "initial" => array(0.8,-0.3),
"initialDecel" => true, "initialDecel" => true,
"zoom" => 1.25, "zoom" => 1.25,
"depth" => 0.5, "depth" => 0.5,
"outlineMethod" => "colour", "outlineMethod" => "colour",
"outlineOffset" => 8, "outlineOffset" => 8,
"outlineColour" => "#eeeeee", "outlineColour" => "#eeeeee",
"textColour" => "", "textColour" => "",
"textFont" => "", "textFont" => "",
"textHeight" => 12, "textHeight" => 12,
"frontSelect" => true, "frontSelect" => true,
"wheelZoom" => false, "wheelZoom" => false,
"shape" => "sphere", "shape" => "sphere",
"lock" => "", "lock" => "",
"stretchX" => 1.0, "stretchX" => 1.0,
"stretchY" => 1.0, "stretchY" => 1.0,
"decel" => 0.92, "decel" => 0.92,
"physModel" => true, "physModel" => true,
"maxInputZone" => 0.25, "maxInputZone" => 0.25,
"minSpeed" => 0.002 "minSpeed" => 0.002
))); )));
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array( module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array(
"maxSpeed" => 0.05, "maxSpeed" => 0.05,
"deadZone" => 0.25, "deadZone" => 0.25,
"initial" => array(0.8,-0.3), "initial" => array(0.8,-0.3),
"initialDecel" => true, "initialDecel" => true,
"zoom" => 1.25, "zoom" => 1.25,
"depth" => 0.5, "depth" => 0.5,
"outlineMethod" => "colour", "outlineMethod" => "colour",
"outlineOffset" => 8, "outlineOffset" => 8,
"outlineColour" => "#eeeeee", "outlineColour" => "#eeeeee",
"textColour" => "", "textColour" => "",
"textFont" => "", "textFont" => "",
"textHeight" => 13, "textHeight" => 13,
"frontSelect" => true, "frontSelect" => true,
"wheelZoom" => false, "wheelZoom" => false,
"shape" => "sphere", "shape" => "sphere",
"lock" => "", "lock" => "",
"stretchX" => 1.0, "stretchX" => 1.0,
"stretchY" => 1.0, "stretchY" => 1.0,
"decel" => 0.92, "decel" => 0.92,
"physModel" => true, "physModel" => true,
"maxInputZone" => 0.15, "maxInputZone" => 0.15,
"minSpeed" => 0.002 "minSpeed" => 0.002
))); )));
module::set_version("tag_cloud_html5", 7); module::set_version("tag_cloud_html5", 7);
} }
static function upgrade() { static function upgrade() {
if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) || if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) ||
is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) || is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) ||
(module::get_version("tag_cloud_html5") < 1) ) { (module::get_version("tag_cloud_html5") < 1) ) {
module::install("tag_cloud_html5"); module::install("tag_cloud_html5");
} }
if (module::get_version("tag_cloud_html5") < 2) { if (module::get_version("tag_cloud_html5") < 2) {
// added wheelZoom, which is not accessible from admin menu // added wheelZoom, which is not accessible from admin menu
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["wheelZoom"] = false; $options["wheelZoom"] = false;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["wheelZoom"] = false; $options["wheelZoom"] = false;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
} }
if (module::get_version("tag_cloud_html5") < 3) { if (module::get_version("tag_cloud_html5") < 3) {
// added deadZone, initial, and initialDecel // added deadZone, initial, and initialDecel
module::set_var("tag_cloud_html5", "show_add_tag_form", true); module::set_var("tag_cloud_html5", "show_add_tag_form", true);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["deadZone"] = 0.25; $options["deadZone"] = 0.25;
$options["initial"] = array(0.8,-0.3); $options["initial"] = array(0.8,-0.3);
$options["initialDecel"] = true; $options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["deadZone"] = 0.25; $options["deadZone"] = 0.25;
$options["initial"] = array(0.8,-0.3); $options["initial"] = array(0.8,-0.3);
$options["initialDecel"] = true; $options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
} }
if (module::get_version("tag_cloud_html5") < 4) { if (module::get_version("tag_cloud_html5") < 4) {
// added height_sidebar, then scaled back zoom and textHeight for consistency // added height_sidebar, then scaled back zoom and textHeight for consistency
module::set_var("tag_cloud_html5", "height_sidebar", 0.8); module::set_var("tag_cloud_html5", "height_sidebar", 0.8);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["zoom"] = $options["zoom"] / 0.8; $options["zoom"] = $options["zoom"] / 0.8;
$options["textHeight"] = $options["textHeight"] * 0.8; $options["textHeight"] = $options["textHeight"] * 0.8;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
} }
if (module::get_version("tag_cloud_html5") < 5) { if (module::get_version("tag_cloud_html5") < 5) {
// added lots of options that are on admin menu // added lots of options that are on admin menu
// added physModel, lock, and initialDecel as options not on admin menu // added physModel, lock, and initialDecel as options not on admin menu
// (previously initialDecel was on menu, so reset here) // (previously initialDecel was on menu, so reset here)
module::set_var("tag_cloud_html5", "width_sidebar", 1.00); module::set_var("tag_cloud_html5", "width_sidebar", 1.00);
module::set_var("tag_cloud_html5", "width_wholecloud", 0.95); module::set_var("tag_cloud_html5", "width_wholecloud", 0.95);
module::set_var("tag_cloud_html5", "height_wholecloud", 0.75); module::set_var("tag_cloud_html5", "height_wholecloud", 0.75);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["deadZone"] = $options["deadZone"]; $options["deadZone"] = $options["deadZone"];
$options["shape"] = "sphere"; $options["shape"] = "sphere";
$options["lock"] = ""; $options["lock"] = "";
$options["stretchX"] = 1.0; $options["stretchX"] = 1.0;
$options["stretchY"] = 1.0; $options["stretchY"] = 1.0;
$options["decel"] = 0.92; $options["decel"] = 0.92;
$options["physModel"] = true; $options["physModel"] = true;
$options["maxInputZone"] = 0.25; $options["maxInputZone"] = 0.25;
$options["minSpeed"] = 0.002; $options["minSpeed"] = 0.002;
$options["initialDecel"] = true; $options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["deadZone"] = $options["deadZone"]; $options["deadZone"] = $options["deadZone"];
$options["shape"] = "sphere"; $options["shape"] = "sphere";
$options["lock"] = ""; $options["lock"] = "";
$options["stretchX"] = 1.0; $options["stretchX"] = 1.0;
$options["stretchY"] = 1.0; $options["stretchY"] = 1.0;
$options["decel"] = 0.92; $options["decel"] = 0.92;
$options["physModel"] = true; $options["physModel"] = true;
$options["maxInputZone"] = 0.15; $options["maxInputZone"] = 0.15;
$options["minSpeed"] = 0.002; $options["minSpeed"] = 0.002;
$options["initialDecel"] = true; $options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
} }
// note: there are no variable changes for v6 and v7 upgrades // note: there are no variable changes for v6 and v7 upgrades
module::set_version("tag_cloud_html5", 7); module::set_version("tag_cloud_html5", 7);
} }
static function uninstall() { static function uninstall() {
module::clear_all_vars("tag_cloud_html5"); module::clear_all_vars("tag_cloud_html5");
} }
} }

View File

@ -1,58 +1,58 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta * Copyright (C) 2000-2013 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class Form_Input extends Form_Input_Core { class Form_Input extends Form_Input_Core {
/** /**
* Custom validation rule: numrange * Custom validation rule: numrange
* 0 args : returns error if not numeric * 0 args : returns error if not numeric
* 1 arg : returns error if not numeric OR if below min * 1 arg : returns error if not numeric OR if below min
* 2 args : returns error if not numeric OR if below min OR if above max * 2 args : returns error if not numeric OR if below min OR if above max
*/ */
protected function rule_numrange($min = null, $max = null) { protected function rule_numrange($min = null, $max = null) {
if (is_numeric($this->value)) { if (is_numeric($this->value)) {
if (!is_null($min) && ($this->value < $min)) { if (!is_null($min) && ($this->value < $min)) {
// below min // below min
$this->errors['numrange'] = true; $this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is below minimum of').' '.$min; $this->error_messages['numrange'] = t('Value is below minimum of').' '.$min;
} elseif (!is_null($max) && ($this->value > $max)) { } elseif (!is_null($max) && ($this->value > $max)) {
// above max // above max
$this->errors['numrange'] = true; $this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;; $this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;;
} }
} else { } else {
// not numeric // not numeric
$this->errors['numrange'] = true; $this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is not numeric'); $this->error_messages['numrange'] = t('Value is not numeric');
} }
} }
/** /**
* Custom validation rule: color * Custom validation rule: color
* returns no error if string is formatted as #hhhhhh OR if string is empty * returns no error if string is formatted as #hhhhhh OR if string is empty
* to exclude the empty case, add "required" as another rule * to exclude the empty case, add "required" as another rule
*/ */
protected function rule_color() { protected function rule_color() {
if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) { if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) {
$this->errors['color'] = true; $this->errors['color'] = true;
$this->error_messages['color'] = t('Color is not in #hhhhhh format'); $this->error_messages['color'] = t('Color is not in #hhhhhh format');
} }
} }
} }

View File

@ -1,24 +1,24 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta * Copyright (C) 2000-2013 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class arrow_nav_theme { class arrow_nav_theme {
static function head($theme) { static function head($theme) {
return $theme->script("arrow_nav.js"); return $theme->script("arrow_nav.js");
} }
} }

View File

@ -1,11 +1,11 @@
GreyDragon Shared Module Changelog GreyDragon Shared Module Changelog
version 1.3: version 1.3:
- Added check to detect situation when CURL is not installed to disable Auto Update feature - Added check to detect situation when CURL is not installed to disable Auto Update feature
- Improved CURL logic to properly handle redirects - Improved CURL logic to properly handle redirects
version 1.2: version 1.2:
- Fixed issue with some installations not taking relative path for CSS - Fixed issue with some installations not taking relative path for CSS
version 1.1: version 1.1:
- Initial release - Initial release

View File

@ -1,59 +1,59 @@
/** /**
* Gallery 3 Grey Dragon Common Module * Gallery 3 Grey Dragon Common Module
* Copyright (C) 2012 Serguei Dosyukov * Copyright (C) 2012 Serguei Dosyukov
* *
* CSS rules for admin section * CSS rules for admin section
*/ */
body { min-width: 1200px; } body { min-width: 1200px; }
#g-content { font-size: 1em; margin-bottom: 0; width: auto; padding-left: 1em; padding-right: 1em; } #g-content { font-size: 1em; margin-bottom: 0; width: auto; padding-left: 1em; padding-right: 1em; }
#g-content ul { margin-bottom: 0; } #g-content ul { margin-bottom: 0; }
#g-content h3 { color: #d54e21; border-bottom: #a2bdbf 1px solid; margin-top: 0.3em; margin-bottom: 0.3em; } #g-content h3 { color: #d54e21; border-bottom: #a2bdbf 1px solid; margin-top: 0.3em; margin-bottom: 0.3em; }
#g-content p { color: #333; } #g-content p { color: #333; }
#g-content table { margin-bottom: 0; } #g-content table { margin-bottom: 0; }
#g-content input { display: inline; float: left; margin-right: 0.8em; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } #g-content input { display: inline; float: left; margin-right: 0.8em; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
#g-content textarea { height: 6em; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } #g-content textarea { height: 6em; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
#g-content select { display: inline; float: left; margin-right: 0.8em; width: 50.6%; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } #g-content select { display: inline; float: left; margin-right: 0.8em; width: 50.6%; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
#g-content input[type='checkbox'] { border: none; } #g-content input[type='checkbox'] { border: none; }
#g-content input[type='text'] { width: 50%; } #g-content input[type='text'] { width: 50%; }
#g-content input.submit { display: inline-block; min-width: 100px; padding: 4px 10px 4px; font-size: 13px; line-height: 18px; color:#333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); background-color: #fafafa; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6); background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-repeat: no-repeat; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); border: 1px solid #ccc; border-bottom-color: #bbb; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); cursor: pointer; *margin-left: .3em; } #g-content input.submit { display: inline-block; min-width: 100px; padding: 4px 10px 4px; font-size: 13px; line-height: 18px; color:#333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); background-color: #fafafa; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6); background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-repeat: no-repeat; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); border: 1px solid #ccc; border-bottom-color: #bbb; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); cursor: pointer; *margin-left: .3em; }
#g-content input.submit:first-child { *margin-left: 0; } #g-content input.submit:first-child { *margin-left: 0; }
#g-content input.submit:hover { color: #333333; text-decoration: none; background-color: #e6e6e6; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -ms-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } #g-content input.submit:hover { color: #333333; text-decoration: none; background-color: #e6e6e6; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -ms-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; }
#g-content input.g-error { padding-left: 30px; border: none; } #g-content input.g-error { padding-left: 30px; border: none; }
#g-content input.g-success { background-color: transparent; } #g-content input.g-success { background-color: transparent; }
#g-content input.g-warning { background-color: transparent; border: none; } #g-content input.g-warning { background-color: transparent; border: none; }
#g-content p.g-error { padding-left: 30px; border: none; margin-bottom: 0; background-image: none; } #g-content p.g-error { padding-left: 30px; border: none; margin-bottom: 0; background-image: none; }
#gd-admin-header { padding: 7px 0; margin: 4px 0 0 0; background-color: #fbfbfb; background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); background-image:- ms-linear-gradient(top, #ffffff, #f5f5f5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); background-image: linear-gradient(top, #ffffff, #f5f5f5); background-repeat: repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); border: 1px solid #ddd; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; display: inline-block; width: 100%; } #gd-admin-header { padding: 7px 0; margin: 4px 0 0 0; background-color: #fbfbfb; background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); background-image:- ms-linear-gradient(top, #ffffff, #f5f5f5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); background-image: linear-gradient(top, #ffffff, #f5f5f5); background-repeat: repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); border: 1px solid #ddd; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; display: inline-block; width: 100%; }
#gd-admin-header .divider{padding:0 5px;color:#999999;} #gd-admin-header .divider{padding:0 5px;color:#999999;}
#gd-admin-header .active a{color:#333333;} #gd-admin-header .active a{color:#333333;}
#gd-admin-version, #gd-admin-version,
#gd-admin-version-2 { margin-top: 4px; padding: 7px 14px; background-color: rgb(217, 237, 247); border: 1px solid #bce8f1; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } #gd-admin-version-2 { margin-top: 4px; padding: 7px 14px; background-color: rgb(217, 237, 247); border: 1px solid #bce8f1; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; }
#gd-admin-title { float: left; padding-left: 10px; color: #333v42; font-weight: bold; font-size: 1.4em; text-shadow: #deeefa 0 1px 0; display: inline-block; } #gd-admin-title { float: left; padding-left: 10px; color: #333v42; font-weight: bold; font-size: 1.4em; text-shadow: #deeefa 0 1px 0; display: inline-block; }
#gd-admin-hlinks { float: right; padding-right: 10px; } #gd-admin-hlinks { float: right; padding-right: 10px; }
#gd-admin-hlinks li { list-style-type: none; float: left; color: #618299; display: inline; text-shadow: 0 1px 0 #ffffff; } #gd-admin-hlinks li { list-style-type: none; float: left; color: #618299; display: inline; text-shadow: 0 1px 0 #ffffff; }
#gd-admin-hlinks a { line-height: 1.6em; } #gd-admin-hlinks a { line-height: 1.6em; }
#gd-admin-hlinks a[disabled="disabled"], #gd-admin-hlinks a[disabled="disabled"]:hover { text-decoration: none; cursor: default; } #gd-admin-hlinks a[disabled="disabled"], #gd-admin-hlinks a[disabled="disabled"]:hover { text-decoration: none; cursor: default; }
#g-autoupdate-config { display: none; border: 1px solid #ddd; border-top: none; width: 45%; height: 2.5em; margin-left: 54%; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } #g-autoupdate-config { display: none; border: 1px solid #ddd; border-top: none; width: 45%; height: 2.5em; margin-left: 54%; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; }
#g-autoupdate-config.visible { min-height: 30px; display: inline-block; } #g-autoupdate-config.visible { min-height: 30px; display: inline-block; }
#g-autoupdate-config ul { float: right; margin: 6px 10px;} #g-autoupdate-config ul { float: right; margin: 6px 10px;}
#g-autoupdate-config li { float: left; display: inline; line-height: 1.5em; } #g-autoupdate-config li { float: left; display: inline; line-height: 1.5em; }
#g-admin-container { margin-top: 14px; font-size: 0.9em; line-height: 1.6em; } #g-admin-container { margin-top: 14px; font-size: 0.9em; line-height: 1.6em; }
#g-admin-container .column1 { float: left; width: 53%; min-width: 610px; } #g-admin-container .column1 { float: left; width: 53%; min-width: 610px; }
#g-admin-container .column2 { float: right; width: 46%; min-width: 529px; } #g-admin-container .column2 { float: right; width: 46%; min-width: 529px; }
#g-admin-container fieldset { position: relative; border-top-left-radius: 0.4em; border-top-right-radius: 0.4em; overflow: hidden; } #g-admin-container fieldset { position: relative; border-top-left-radius: 0.4em; border-top-right-radius: 0.4em; overflow: hidden; }
#g-admin-container legend { position: absolute; left: 0; width: 100%; padding: 0.4em 0.8em; background: url(../images/blue-grad.png) #d5e6f2 repeat-x left top; border-bottom: #dfdfdf 1px solid; } #g-admin-container legend { position: absolute; left: 0; width: 100%; padding: 0.4em 0.8em; background: url(../images/blue-grad.png) #d5e6f2 repeat-x left top; border-bottom: #dfdfdf 1px solid; }
#g-admin-container fieldset ul { margin-top: 34px; } #g-admin-container fieldset ul { margin-top: 34px; }

View File

@ -1,9 +1,9 @@
name = "GreyDragon Shared" name = "GreyDragon Shared"
description = "Shared content for modules from GreyDragon. Need to be activated.<br />Version 1.3 | By <a href=http://blog.dragonsoft.us>Serguei Dosyukov</a>" description = "Shared content for modules from GreyDragon. Need to be activated.<br />Version 1.3 | By <a href=http://blog.dragonsoft.us>Serguei Dosyukov</a>"
version = 13 version = 13
author_name = "Serguei Dosyukov" author_name = "Serguei Dosyukov"
author_url = "http://blog.dragonsoft.us/gallery-3/" author_url = "http://blog.dragonsoft.us/gallery-3/"
info_url = "" info_url = ""
discuss_url = "" discuss_url = ""

View File

@ -1,180 +1,180 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Grey Dragon Theme - a custom theme for Gallery 3 * Grey Dragon Theme - a custom theme for Gallery 3
* This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us * This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us
* Copyright (C) 2012 Serguei Dosyukov * Copyright (C) 2012 Serguei Dosyukov
* *
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General * 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 * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. * option) any later version.
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the * 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 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details. * for more details.
* *
* You should have received a copy of the GNU General Public License along with this program; if not, write to * 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. * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
?> ?>
<style> <style>
@import "<?= url::file("modules/greydragon/css/gd_common.css"); ?>"; @import "<?= url::file("modules/greydragon/css/gd_common.css"); ?>";
</style> </style>
<script> <script>
$(document).ready( function() { $(document).ready( function() {
$('form').submit( function() { $('input[type=submit]', this).attr('disabled', 'disabled'); }); $('form').submit( function() { $('input[type=submit]', this).attr('disabled', 'disabled'); });
var objAutoUpdate = $('#g-autoupdate-config'); var objAutoUpdate = $('#g-autoupdate-config');
var objAutoHidden = $('input[name="g_auto_delay"]'); var objAutoHidden = $('input[name="g_auto_delay"]');
var objAutoEdit = $('#g-auto-delay-edit'); var objAutoEdit = $('#g-auto-delay-edit');
    function showSidebar(){ objAutoEdit.val(objAutoHidden.val()); objAutoUpdate.slideDown('fast', function() { objAutoUpdate.addClass('visible'); }); };     function showSidebar(){ objAutoEdit.val(objAutoHidden.val()); objAutoUpdate.slideDown('fast', function() { objAutoUpdate.addClass('visible'); }); };
    function hideSidebar(){ objAutoHidden.val(objAutoEdit.val()); objAutoUpdate.slideUp('fast', function() { objAutoUpdate.removeClass('visible'); }); };     function hideSidebar(){ objAutoHidden.val(objAutoEdit.val()); objAutoUpdate.slideUp('fast', function() { objAutoUpdate.removeClass('visible'); }); };
objAutoEdit.keyup( function() { objAutoHidden.val($(this).val()); }); objAutoEdit.keyup( function() { objAutoHidden.val($(this).val()); });
objAutoEdit.keydown(function(event) { objAutoEdit.keydown(function(event) {
// Allow: backspace, delete, tab and escape // Allow: backspace, delete, tab and escape
if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 ||
// Allow: Ctrl+A // Allow: Ctrl+A
(event.keyCode == 65 && event.ctrlKey === true) || (event.keyCode == 65 && event.ctrlKey === true) ||
// Allow: home, end, left, right // Allow: home, end, left, right
(event.keyCode >= 35 && event.keyCode <= 39)) { (event.keyCode >= 35 && event.keyCode <= 39)) {
// let it happen, don't do anything // let it happen, don't do anything
return; return;
} else { } else {
// Ensure that it is a number and stop the keypress // Ensure that it is a number and stop the keypress
if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) { if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {
event.preventDefault(); event.preventDefault();
} }
} }
}); });
   
    $('.g-link-autoupdate').click(function(e){ e.preventDefault(); if ( objAutoUpdate.hasClass('visible') ){ hideSidebar(); } else { showSidebar(); }});     $('.g-link-autoupdate').click(function(e){ e.preventDefault(); if ( objAutoUpdate.hasClass('visible') ){ hideSidebar(); } else { showSidebar(); }});
}); });
</script> </script>
<? <?
function isCurlInstalled() { function isCurlInstalled() {
if (in_array('curl', get_loaded_extensions())) { if (in_array('curl', get_loaded_extensions())) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
// -1 - cannot get version info // -1 - cannot get version info
// 0 - current // 0 - current
// + - newer is avaialble, version is returned // + - newer is avaialble, version is returned
function checkVersionInfo($downloadid, $version) { function checkVersionInfo($downloadid, $version) {
if (!isset($downloadid)): if (!isset($downloadid)):
return -1; return -1;
endif; endif;
try { try {
$call = "http://blog.dragonsoft.us/downloadversion/" . $downloadid; $call = "http://blog.dragonsoft.us/downloadversion/" . $downloadid;
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $call); curl_setopt($ch, CURLOPT_URL, $call);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_MAXREDIRS, 1); curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
$output=curl_exec($ch); $output=curl_exec($ch);
$json = json_decode($output); $json = json_decode($output);
if ($json->id == $downloadid): if ($json->id == $downloadid):
$newversion = $json->version; $newversion = $json->version;
if ($json->version > $version): if ($json->version > $version):
return $json->version; return $json->version;
else: else:
return 0; return 0;
endif; endif;
else: else:
return -1; return -1;
endif; endif;
} catch (Exception $e) { } catch (Exception $e) {
return -1; return -1;
} }
} }
if ($is_module): if ($is_module):
$admin_info = new ArrayObject(parse_ini_file(MODPATH . $name . "/module.info"), ArrayObject::ARRAY_AS_PROPS); $admin_info = new ArrayObject(parse_ini_file(MODPATH . $name . "/module.info"), ArrayObject::ARRAY_AS_PROPS);
$version = number_format($admin_info->version / 10, 1, '.', ''); $version = number_format($admin_info->version / 10, 1, '.', '');
$lastupdate = module::get_var($name, "last_update", time()); $lastupdate = module::get_var($name, "last_update", time());
$checkInDays = module::get_var($name, "auto_delay", 30); $checkInDays = module::get_var($name, "auto_delay", 30);
else: else:
$admin_info = new ArrayObject(parse_ini_file(THEMEPATH . $name . "/theme.info"), ArrayObject::ARRAY_AS_PROPS); $admin_info = new ArrayObject(parse_ini_file(THEMEPATH . $name . "/theme.info"), ArrayObject::ARRAY_AS_PROPS);
$version = $admin_info->version; $version = $admin_info->version;
$lastupdate = module::get_var("th_" . $name, "last_update", time()); $lastupdate = module::get_var("th_" . $name, "last_update", time());
$checkInDays = module::get_var("th_" . $name, "auto_delay", 30); $checkInDays = module::get_var("th_" . $name, "auto_delay", 30);
endif; endif;
if (isCurlInstalled() && ($checkInDays > 0) && ((time() - $lastupdate) > ($checkInDays * 24 * 60 * 60))): // Check version every N days if (isCurlInstalled() && ($checkInDays > 0) && ((time() - $lastupdate) > ($checkInDays * 24 * 60 * 60))): // Check version every N days
$admin_info2 = new ArrayObject(parse_ini_file(MODPATH . "greydragon/module.info"), ArrayObject::ARRAY_AS_PROPS); $admin_info2 = new ArrayObject(parse_ini_file(MODPATH . "greydragon/module.info"), ArrayObject::ARRAY_AS_PROPS);
$version2 = number_format($admin_info2->version / 10, 1, '.', ''); $version2 = number_format($admin_info2->version / 10, 1, '.', '');
$versionCheck = checkVersionInfo($downloadid, $version); $versionCheck = checkVersionInfo($downloadid, $version);
$versionCheck2 = checkVersionInfo(15, $version2); $versionCheck2 = checkVersionInfo(15, $version2);
if (($versionCheck == 0) && ($versionCheck2 == 0)): if (($versionCheck == 0) && ($versionCheck2 == 0)):
if ($is_module): if ($is_module):
module::set_var($name, "last_update", time()); module::set_var($name, "last_update", time());
else: else:
module::set_var("th_" . $name, "last_update", time()); module::set_var("th_" . $name, "last_update", time());
endif; endif;
endif; endif;
else: else:
$versionCheck = 0; $versionCheck = 0;
$versionCheck2 = 0; $versionCheck2 = 0;
endif; endif;
?> ?>
<div id="gd-admin-header"> <div id="gd-admin-header">
<div id="gd-admin-title"><?= t($admin_info->name) ?> - <?= $version ?></div> <div id="gd-admin-title"><?= t($admin_info->name) ?> - <?= $version ?></div>
<div id="gd-admin-hlinks"> <div id="gd-admin-hlinks">
<ul style="float: right;"><li><a href="http://blog.dragonsoft.us/gallery-3/" target="_blank"><?= t("Home") ?></a>&nbsp;|&nbsp;</li> <ul style="float: right;"><li><a href="http://blog.dragonsoft.us/gallery-3/" target="_blank"><?= t("Home") ?></a>&nbsp;|&nbsp;</li>
<? if (isset($admin_info->discuss_url)): ?> <? if (isset($admin_info->discuss_url)): ?>
<li><a href="<?= $admin_info->discuss_url; ?>" target="_blank"><?= t("Support") ?></a>&nbsp;|&nbsp;</li> <li><a href="<?= $admin_info->discuss_url; ?>" target="_blank"><?= t("Support") ?></a>&nbsp;|&nbsp;</li>
<? endif; ?> <? endif; ?>
<? if (isset($admin_info->info_url)): ?> <? if (isset($admin_info->info_url)): ?>
<li><a href="<?= $admin_info->info_url; ?>" target="_blank"><?= t("Download") ?></a>&nbsp;|&nbsp;</li> <li><a href="<?= $admin_info->info_url; ?>" target="_blank"><?= t("Download") ?></a>&nbsp;|&nbsp;</li>
<? endif; ?> <? endif; ?>
<? if (isset($admin_info->vote)): ?> <? if (isset($admin_info->vote)): ?>
<li><a href="<?= $admin_info->vote; ?>" target="_blank"><?= t("Vote") ?></a>&nbsp;|&nbsp;</li> <li><a href="<?= $admin_info->vote; ?>" target="_blank"><?= t("Vote") ?></a>&nbsp;|&nbsp;</li>
<? endif; ?> <? endif; ?>
<li><a href="http://twitter.com/greydragon_th" target="_blank" title="<?= t("Follow Us on Twitter") ?>"><?= t("Follow Us") ?></a>&nbsp;|&nbsp;</li> <li><a href="http://twitter.com/greydragon_th" target="_blank" title="<?= t("Follow Us on Twitter") ?>"><?= t("Follow Us") ?></a>&nbsp;|&nbsp;</li>
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9MWBSVJMWMJEU" target="_blank" ><?= t("Coffee Fund") ?></a>&nbsp;|&nbsp;</li> <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9MWBSVJMWMJEU" target="_blank" ><?= t("Coffee Fund") ?></a>&nbsp;|&nbsp;</li>
<li><a href="#" class="g-link-autoupdate" <?= (isCurlInstalled())? null : "disabled=\"disabled\""; ?> ><?= t("Auto Update"); ?></a></li> <li><a href="#" class="g-link-autoupdate" <?= (isCurlInstalled())? null : "disabled=\"disabled\""; ?> ><?= t("Auto Update"); ?></a></li>
</ul> </ul>
</div> </div>
</div> </div>
<div id="g-autoupdate-config"> <div id="g-autoupdate-config">
<ul><li><?= t("Check every"); ?>&nbsp;&nbsp;</li> <ul><li><?= t("Check every"); ?>&nbsp;&nbsp;</li>
<li><input id="g-auto-delay-edit" type="text" size="2" value="30"></li> <li><input id="g-auto-delay-edit" type="text" size="2" value="30"></li>
<li><?=t("days (set to 0 to disable)"); ?></li> <li><?=t("days (set to 0 to disable)"); ?></li>
<? if (($versionCheck == 0) && ($versionCheck2 == 0)): ?> <? if (($versionCheck == 0) && ($versionCheck2 == 0)): ?>
<li>&nbsp;&nbsp;|&nbsp;&nbsp;<?= t("Last check:"); ?>&nbsp;<?= date("Y-m-d H:i:s", $lastupdate); ?></li> <li>&nbsp;&nbsp;|&nbsp;&nbsp;<?= t("Last check:"); ?>&nbsp;<?= date("Y-m-d H:i:s", $lastupdate); ?></li>
<? endif; ?> <? endif; ?>
</ul> </ul>
</div> </div>
<? if ($versionCheck == -1): ?> <? if ($versionCheck == -1): ?>
<div id="gd-admin-version"><?= t("Version check is incomplete. No version information has been found."); ?> <?= $versionCheck; ?> : <?= $downloadid; ?></div> <div id="gd-admin-version"><?= t("Version check is incomplete. No version information has been found."); ?> <?= $versionCheck; ?> : <?= $downloadid; ?></div>
<? elseif ($versionCheck == 0): ?> <? elseif ($versionCheck == 0): ?>
<? else: ?> <? else: ?>
<div id="gd-admin-version"><?= t("Newer version") ?> <?= $versionCheck; ?> <?= t("is available. Click Download link for more info.") ?></div> <div id="gd-admin-version"><?= t("Newer version") ?> <?= $versionCheck; ?> <?= t("is available. Click Download link for more info.") ?></div>
<? endif; ?> <? endif; ?>
<? if (($versionCheck2 == -1) || ($versionCheck2 == 0)): ?> <? if (($versionCheck2 == -1) || ($versionCheck2 == 0)): ?>
<? else: ?> <? else: ?>
<div id="gd-admin-version-2"><?= t("Newer version") ?> <?= $versionCheck2; ?> <?= t("of GreyDragon Shared Module is available. Click") . ' <a href="http://codex.gallery2.org/Gallery3:Modules:greydragon" target="_blank">' . t("here") . '</a> ' . t("for more info.") ?></div> <div id="gd-admin-version-2"><?= t("Newer version") ?> <?= $versionCheck2; ?> <?= t("of GreyDragon Shared Module is available. Click") . ' <a href="http://codex.gallery2.org/Gallery3:Modules:greydragon" target="_blank">' . t("here") . '</a> ' . t("for more info.") ?></div>
<? endif; ?> <? endif; ?>
<div id="g-admin-container"> <div id="g-admin-container">
<? if (isset($help)): ?> <? if (isset($help)): ?>
<div class="column1"> <div class="column1">
<?= $form ?> <?= $form ?>
</div> </div>
<div class="column2"> <div class="column2">
<?= $help ?> <?= $help ?>
</div> </div>
<? else: ?> <? else: ?>
<?= $form ?> <?= $form ?>
<? endif; ?> <? endif; ?>
</div> </div>

View File

@ -1,37 +1,37 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta * Copyright (C) 2000-2009 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class image_fit_theme_Core { class image_fit_theme_Core {
static function head($theme) { static function head($theme) {
if($theme->page_subtype == "photo") { if($theme->page_subtype == "photo") {
return $theme->script("jquery.imagefit.js"); return $theme->script("jquery.imagefit.js");
} }
} }
static function page_bottom($theme) { static function page_bottom($theme) {
$fit_code = " $fit_code = "
<!-- image_fit code --> <!-- image_fit code -->
<script type=\"text/javascript\"> <script type=\"text/javascript\">
$(window).load(function() { $(window).load(function() {
$('#g-photo').imagefit(); $('#g-photo').imagefit();
}); });
</script> </script>
<!-- End image fit code -->"; <!-- End image fit code -->";
return $fit_code; return $fit_code;
} }
} }

View File

@ -1,75 +1,75 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta * Copyright (C) 2000-2009 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class Admin_Reset_count_Controller extends Admin_Controller { class Admin_Reset_count_Controller extends Admin_Controller {
public function index() { public function index() {
$item_id = Input::instance()->get("item_id"); $item_id = Input::instance()->get("item_id");
print $this->_get_view($item_id); print $this->_get_view($item_id);
} }
public function handler() { public function handler() {
$item_id = Input::instance()->get("item_id"); $item_id = Input::instance()->get("item_id");
access::verify_csrf(); access::verify_csrf();
$form = $this->_get_form(); $form = $this->_get_form();
if ($form->validate()) { if ($form->validate()) {
$reset_count = $form->reset->reset_count->value; $reset_count = $form->reset->reset_count->value;
$item = ORM::factory("item", $item_id); $item = ORM::factory("item", $item_id);
$count = $form->reset->count->value; $count = $form->reset->count->value;
if ($reset_count): if ($reset_count):
db::build() db::build()
->update("items") ->update("items")
->set("view_count", $count) ->set("view_count", $count)
->where("id", "=", $item_id) ->where("id", "=", $item_id)
->execute(); ->execute();
message::success(t('The view count has been updated. <a class="g-album-link" href="%url" class="g-dialog-link">Return to item</a>.', message::success(t('The view count has been updated. <a class="g-album-link" href="%url" class="g-dialog-link">Return to item</a>.',
array("url" => html::mark_clean(url::site("items/$item_id"))))); array("url" => html::mark_clean(url::site("items/$item_id")))));
endif; endif;
url::redirect("admin/reset_count?item_id=$item_id"); url::redirect("admin/reset_count?item_id=$item_id");
} }
print $this->_get_view($form); print $this->_get_view($form);
} }
private function _get_view($item_id) { private function _get_view($item_id) {
$v = new Admin_View("admin.html"); $v = new Admin_View("admin.html");
$v->content = new View("admin_reset_count.html"); $v->content = new View("admin_reset_count.html");
$v->content->form = empty($form) ? $this->_get_form($item_id) : $form; $v->content->form = empty($form) ? $this->_get_form($item_id) : $form;
return $v; return $v;
} }
private function _get_form() { private function _get_form() {
$item_id = Input::instance()->get("item_id"); $item_id = Input::instance()->get("item_id");
$item = ORM::factory("item", $item_id); $item = ORM::factory("item", $item_id);
$form = new Forge("admin/reset_count/handler?item_id=$item_id", "", "post", array("id" => "g-admin-form")); $form = new Forge("admin/reset_count/handler?item_id=$item_id", "", "post", array("id" => "g-admin-form"));
$group = $form->group("reset") $group = $form->group("reset")
->label(t('Reset count')); ->label(t('Reset count'));
$group->input("item_id")->label(t("Item to be changed:")) $group->input("item_id")->label(t("Item to be changed:"))
->value($item->title)->disabled(true); ->value($item->title)->disabled(true);
$group->input("count")->label(t("new count for this item:")) $group->input("count")->label(t("new count for this item:"))
->value("") ->value("")
->rules("required") ->rules("required")
->rules("valid_numeric|length[1,5]"); ->rules("valid_numeric|length[1,5]");
$group->checkbox("reset_count")->label(t("Check to reset the item count for this item.")) $group->checkbox("reset_count")->label(t("Check to reset the item count for this item."))
->checked(false); ->checked(false);
$group->submit("submit")->value(t("Commit changes")); $group->submit("submit")->value(t("Commit changes"));
return $form; return $form;
} }
} }

View File

@ -1,71 +1,71 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta * Copyright (C) 2000-2009 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class Admin_Reset_counts_Controller extends Admin_Controller { class Admin_Reset_counts_Controller extends Admin_Controller {
public function index() { public function index() {
$album_id = Input::instance()->get("album_id"); $album_id = Input::instance()->get("album_id");
print $this->_get_view($album_id); print $this->_get_view($album_id);
} }
public function handler() { public function handler() {
$album_id = Input::instance()->get("album_id"); $album_id = Input::instance()->get("album_id");
access::verify_csrf(); access::verify_csrf();
$form = $this->_get_form(); $form = $this->_get_form();
if ($form->validate()) { if ($form->validate()) {
$reset_counts = $form->reset->reset_counts->value; $reset_counts = $form->reset->reset_counts->value;
$item = ORM::factory("item", $album_id); $item = ORM::factory("item", $album_id);
if ($reset_counts): if ($reset_counts):
db::build() db::build()
->update("items") ->update("items")
->set("view_count", 0) ->set("view_count", 0)
->where("left_ptr", ">=", $item->left_ptr) ->where("left_ptr", ">=", $item->left_ptr)
->where("right_ptr", "<=", $item->right_ptr) ->where("right_ptr", "<=", $item->right_ptr)
->execute(); ->execute();
message::success(t('The view counts have been updated. <a class="g-album-link" href="%url" class="g-dialog-link">Return to album</a>.', message::success(t('The view counts have been updated. <a class="g-album-link" href="%url" class="g-dialog-link">Return to album</a>.',
array("url" => html::mark_clean(url::site("items/$album_id"))))); array("url" => html::mark_clean(url::site("items/$album_id")))));
endif; endif;
url::redirect("admin/reset_counts?album_id=$album_id"); url::redirect("admin/reset_counts?album_id=$album_id");
} }
print $this->_get_view($form); print $this->_get_view($form);
} }
private function _get_view($album_id) { private function _get_view($album_id) {
$v = new Admin_View("admin.html"); $v = new Admin_View("admin.html");
$v->content = new View("admin_reset_counts.html"); $v->content = new View("admin_reset_counts.html");
$v->content->form = empty($form) ? $this->_get_form($album_id) : $form; $v->content->form = empty($form) ? $this->_get_form($album_id) : $form;
return $v; return $v;
} }
private function _get_form() { private function _get_form() {
$album_id = Input::instance()->get("album_id"); $album_id = Input::instance()->get("album_id");
$album = ORM::factory("item", $album_id); $album = ORM::factory("item", $album_id);
$form = new Forge("admin/reset_counts/handler?album_id=$album_id", "", "post", array("id" => "g-admin-form")); $form = new Forge("admin/reset_counts/handler?album_id=$album_id", "", "post", array("id" => "g-admin-form"));
$group = $form->group("reset") $group = $form->group("reset")
->label(t('Reset counts')); ->label(t('Reset counts'));
$group->input("album_id")->label(t("Items in this album will be changed:")) $group->input("album_id")->label(t("Items in this album will be changed:"))
->value($album->title)->disabled(true); ->value($album->title)->disabled(true);
$group->checkbox("reset_counts")->label(t("Check to reset the item counts in this album.")) $group->checkbox("reset_counts")->label(t("Check to reset the item counts in this album."))
->checked(false); ->checked(false);
$group->submit("submit")->value(t("Commit changes")); $group->submit("submit")->value(t("Commit changes"));
return $form; return $form;
} }
} }

View File

@ -1,62 +1,62 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta * Copyright (C) 2000-2009 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class reset_counts_event_Core { class reset_counts_event_Core {
static function site_menu($menu, $theme) { static function site_menu($menu, $theme) {
$item = $theme->item(); $item = $theme->item();
$user = identity::active_user(); $user = identity::active_user();
if ($item && $item->is_album() && $user->admin) { if ($item && $item->is_album() && $user->admin) {
$menu->get("options_menu") $menu->get("options_menu")
->append(Menu::factory("link") ->append(Menu::factory("link")
->id("reset") ->id("reset")
->label(t("Reset item counts")) ->label(t("Reset item counts"))
->css_id("g-menu-reset-link") ->css_id("g-menu-reset-link")
->url(url::site("admin/reset_counts?album_id={$item->id}"))); ->url(url::site("admin/reset_counts?album_id={$item->id}")));
} }
if ($item && ($item->is_photo() || $item->is_movie()) && $user->admin) { if ($item && ($item->is_photo() || $item->is_movie()) && $user->admin) {
$menu->get("options_menu") $menu->get("options_menu")
->append(Menu::factory("link") ->append(Menu::factory("link")
->id("reset") ->id("reset")
->label(t("Reset item count")) ->label(t("Reset item count"))
->css_id("g-menu-reset-link") ->css_id("g-menu-reset-link")
->url(url::site("admin/reset_count?item_id={$item->id}"))); ->url(url::site("admin/reset_count?item_id={$item->id}")));
} }
} }
static function context_menu($menu, $theme, $item) { static function context_menu($menu, $theme, $item) {
$user = identity::active_user(); $user = identity::active_user();
if ($user->admin) { if ($user->admin) {
if ($item->is_album()) { if ($item->is_album()) {
$menu->get("options_menu") $menu->get("options_menu")
->append(Menu::factory("link") ->append(Menu::factory("link")
->id("reset") ->id("reset")
->label(t("Reset album only count")) ->label(t("Reset album only count"))
->css_class("ui-icon-refresh") ->css_class("ui-icon-refresh")
->url(url::site("admin/reset_count?item_id={$item->id}"))); ->url(url::site("admin/reset_count?item_id={$item->id}")));
} else { } else {
$menu->get("options_menu") $menu->get("options_menu")
->append(Menu::factory("link") ->append(Menu::factory("link")
->id("reset") ->id("reset")
->label(t("Reset count")) ->label(t("Reset count"))
->css_class("ui-icon-refresh") ->css_class("ui-icon-refresh")
->url(url::site("admin/reset_count?item_id={$item->id}"))); ->url(url::site("admin/reset_count?item_id={$item->id}")));
} }
} }
} }
} }

View File

@ -1,28 +1,28 @@
<?php defined("SYSPATH") or die("No direct script access."); <?php defined("SYSPATH") or die("No direct script access.");
/** /**
* Gallery - a web based photo album viewer and editor * Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta * Copyright (C) 2000-2009 Bharat Mediratta
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class reset_counts_installer { class reset_counts_installer {
static function deactivate() { static function deactivate() {
} }
static function upgrade($version) { static function upgrade($version) {
if ($version < 2) { if ($version < 2) {
module::set_version("reset_counts", $version = 2); module::set_version("reset_counts", $version = 2);
} }
} }
} }

View File

@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?> <?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-admin-comment-block-block"> <div id="g-admin-comment-block-block">
<h2><?= t("Reset count admin.") ?></h2> <h2><?= t("Reset count admin.") ?></h2>
<?= $form ?> <?= $form ?>
</div> </div>

View File

@ -1,6 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?> <?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-admin-comment-block-block"> <div id="g-admin-comment-block-block">
<h2><?= t("Reset the item counts for items in this album.") ?></h2> <h2><?= t("Reset the item counts for items in this album.") ?></h2>
<p class="g-warning"><?= t("Carefull, this will reset the items counts in the sub-albums as well.") ?></p> <p class="g-warning"><?= t("Carefull, this will reset the items counts in the sub-albums as well.") ?></p>
<?= $form ?> <?= $form ?>
</div> </div>

View File

@ -1,7 +1,7 @@
name = "Tree View Page" name = "Tree View Page"
description = "Displays links to all albums in the gallery on a seperate page." description = "Displays links to all albums in the gallery on a seperate page."
version = 4 version = 4
author_name = "itzling" author_name = "itzling"
author_url = "http://codex.galleryproject.org/User:Itzling" author_url = "http://codex.galleryproject.org/User:Itzling"
info_url = "http://codex.galleryproject.org/Gallery3:Modules:treeview" info_url = "http://codex.galleryproject.org/Gallery3:Modules:treeview"
discuss_url = "http://galleryproject.org/node/112461" discuss_url = "http://galleryproject.org/node/112461"