diff --git a/modules/.unused/navcarousel/controllers/admin_navcarousel.php b/modules/.unused/navcarousel/controllers/admin_navcarousel.php index 5d9dff6..fc17b2c 100755 --- a/modules/.unused/navcarousel/controllers/admin_navcarousel.php +++ b/modules/.unused/navcarousel/controllers/admin_navcarousel.php @@ -1,7 +1,7 @@ page_type == "item") { - return $theme->script("jquery.jcarousel.min.js") - . $theme->css("skin.css"); + if ($theme->page_type == "item") { + return + $theme->script("jquery.jcarousel.js") + . $theme->css("skin.css"); } } static function photo_bottom($theme) { + $content = ''; + + if ($theme->page_type == "item") { + if (locales::is_rtl()) { + $rtl_support = "rtl: true,\n"; + } else { + $rtl_support = "rtl: false,\n"; + } + $carouselwidth = module::get_var("navcarousel", "carouselwidth", "600"); + if ($carouselwidth == 0) { + $carouselwidth = "100%"; + $containerwidth = ""; + } else { + $carouselwidth = $carouselwidth ."px"; + $containerwidth = ".jcarousel-skin-tango .jcarousel-container-horizontal {\n + width: ". $carouselwidth .";\n + }\n"; + } + $thumbsize = module::get_var("navcarousel", "thumbsize", "50"); + $showelements = module::get_var("navcarousel", "showelements", "7"); + $childcount = $theme->item->parent()->viewable()->children_count(); + $itemoffset = intval(floor($showelements / 2)); + if ($childcount <= $showelements) { + $itemoffset = 1; + } else { + $itempos = $theme->item->parent()->get_position($theme->item); + $itemoffset = $itempos - $itemoffset; + if ($itemoffset < 1) { + $itemoffset = 1; + } + if (($itemoffset + $showelements) > $childcount) { + $itemoffset = $childcount - $showelements + 1; + } + } + if (module::get_var("navcarousel", "noajax", false)) { + $ajaxhandler = ""; + } else { + $ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n"; + } + if (module::get_var("navcarousel", "showondomready", false)) { + $onwinload = ""; + } else { + $onwinload = "});\n + $(window).load(function () {\n"; + } + + $content = "\n + \n + \n + "; + } + if (!module::get_var("navcarousel", "abovephoto", false)) { if ($theme->page_type == "item") { - return new View("navcarousel.html"); + $content .= new View("navcarousel.html"); } } + + return $content; } static function photo_top($theme) { diff --git a/modules/.unused/navcarousel/js/jquery.jcarousel.js b/modules/.unused/navcarousel/js/jquery.jcarousel.js index 90f2459..5fae118 100755 --- a/modules/.unused/navcarousel/js/jquery.jcarousel.js +++ b/modules/.unused/navcarousel/js/jquery.jcarousel.js @@ -205,10 +205,12 @@ if (this.options.initCallback != null) this.options.initCallback(this, 'init'); +/* if (!windowLoaded && $.browser.safari) { this.buttons(false, false); $(window).bind('load.jcarousel', function() { self.setup(); }); } else +*/ this.setup(); }; @@ -894,6 +896,7 @@ var el = e.jquery != undefined ? e[0] : e; +/* if (p == 'marginRight' && $.browser.safari) { var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2; @@ -904,6 +907,7 @@ return oWidth2 - oWidth; } +*/ return $jc.intval($.css(el, p)); }, diff --git a/modules/.unused/navcarousel/module.info b/modules/.unused/navcarousel/module.info index 0dd8e5f..f4c7bf3 100755 --- a/modules/.unused/navcarousel/module.info +++ b/modules/.unused/navcarousel/module.info @@ -1,3 +1,7 @@ name = "Navigation Carousel" description = "Adds a navigation carousel under the photo." version = 4 +author_name = "" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:navcarousel" +discuss_url = "http://gallery.menalto.com/forum_module_navcarousel" diff --git a/modules/.unused/navcarousel/views/navcarousel.html.php b/modules/.unused/navcarousel/views/navcarousel.html.php index 508cafb..40af0d8 100755 --- a/modules/.unused/navcarousel/views/navcarousel.html.php +++ b/modules/.unused/navcarousel/views/navcarousel.html.php @@ -1,88 +1,4 @@ item->parent()->viewable()->children_count(); - $itemoffset = intval(floor($showelements / 2)); - if ($childcount <= $showelements) { - $itemoffset = 1; - } else { - $itempos = $theme->item->parent()->get_position($theme->item); - $itemoffset = $itempos - $itemoffset; - if ($itemoffset < 1) { - $itemoffset = 1; - } - if (($itemoffset + $showelements) > $childcount) { - $itemoffset = $childcount - $showelements + 1; - } - } - if (module::get_var("navcarousel", "noajax", false)) { - $ajaxhandler = ""; - } else { - $ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n"; - } - if (module::get_var("navcarousel", "showondomready", false)) { - $onwinload = ""; - } else { - $onwinload = "});\n - $(window).load(function () {\n"; - } - echo "\n - \n - \n - "; $thumbsize = module::get_var("navcarousel", "thumbsize", "50"); $parent = $item->parent(); $item_counter = 0; diff --git a/modules/.unused/register/views/admin_register.html.php b/modules/.unused/register/views/admin_register.html.php index 54f7409..b1549d8 100755 --- a/modules/.unused/register/views/admin_register.html.php +++ b/modules/.unused/register/views/admin_register.html.php @@ -23,12 +23,12 @@
- +
"post"), $hidden) ?>
@@ -73,14 +73,14 @@ - + "> - state != 2): ?> + state != 2): ?> id) ?> - +   - + state) ?> name) ?> @@ -88,11 +88,11 @@ email) ?> request_date)) ?> - + "g-registration-activate", "name" => "activate_users", "class" => "submit"), t("Activate selected")) ?>
- + diff --git a/modules/.unused/tag_cloud_html5/css/admin_tag_cloud_html5.css b/modules/.unused/tag_cloud_html5/css/admin_tag_cloud_html5.css index 87869fa..e87717f 100755 --- a/modules/.unused/tag_cloud_html5/css/admin_tag_cloud_html5.css +++ b/modules/.unused/tag_cloud_html5/css/admin_tag_cloud_html5.css @@ -1,17 +1,17 @@ -#g-content fieldset { - display: block; -} -#g-content fieldset.g-tag-cloud-html5-admin-form-top { - width: 80%; - clear: both; -} -#g-content fieldset.g-tag-cloud-html5-admin-form-left { - width: 45%; - float: left; - clear: left; - margin-right: 2% -} -#g-content fieldset.g-tag-cloud-html5-admin-form-right { - width: 45%; - clear: right; +#g-content fieldset { + display: block; +} +#g-content fieldset.g-tag-cloud-html5-admin-form-top { + width: 80%; + clear: both; +} +#g-content fieldset.g-tag-cloud-html5-admin-form-left { + width: 45%; + float: left; + clear: left; + margin-right: 2% +} +#g-content fieldset.g-tag-cloud-html5-admin-form-right { + width: 45%; + clear: right; } \ No newline at end of file diff --git a/modules/.unused/tag_cloud_html5/css/tag_cloud_html5.css b/modules/.unused/tag_cloud_html5/css/tag_cloud_html5.css index a3d8633..bf20ce8 100755 --- a/modules/.unused/tag_cloud_html5/css/tag_cloud_html5.css +++ b/modules/.unused/tag_cloud_html5/css/tag_cloud_html5.css @@ -1,106 +1,106 @@ -/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */ - -/* comment out this first block to make the inline tags appear if the cloud doesn't load */ -#g-tag-cloud-html5-tags { - display: none; -} - -#g-tag-cloud-html5-tags ul { - text-align: justify; -} - -#g-tag-cloud-html5-tags ul li { - display: inline; - text-align: justify; -} - -#g-tag-cloud-html5-tags ul li a { - text-decoration: none; -} - -#g-tag-cloud-html5-tags ul li span { - display: none; -} - -#g-tag-cloud-html5-page ul li a:hover { - text-decoration: underline; -} - -/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-tag-cloud-html5-page-canvas { - display: block; - margin: 0 auto; -} - -#g-tag-cloud-html5-page-tags ul { - font-size: 1.2em; - text-align: justify; -} - -#g-tag-cloud-html5-page-tags ul li { - display: inline; - line-height: 1.5em; - text-align: justify; -} - -#g-tag-cloud-html5-page-tags ul li a { - text-decoration: none; -} - -#g-tag-cloud-html5-page-tags ul li span { - display: none; -} - -#g-tag-cloud-html5-page-tags ul li.size0 a { - color: #9cf; - font-size: 70%; - font-weight: 100; -} - -#g-tag-cloud-html5-page-tags ul li.size1 a { - color: #9cf; - font-size: 80%; - font-weight: 100; -} - -#g-tag-cloud-html5-page-tags ul li.size2 a { - color: #69f; - font-size: 90%; - font-weight: 300; -} - -#g-tag-cloud-html5-page-tags ul li.size3 a { - color: #69c; - font-size: 100%; - font-weight: 500; -} - -#g-tag-cloud-html5-page-tags ul li.size4 a { - color: #369; - font-size: 110%; - font-weight: 700; -} - -#g-tag-cloud-html5-page-tags ul li.size5 a { - color: #0e2b52; - font-size: 120%; - font-weight: 900; -} - -#g-tag-cloud-html5-page-tags ul li.size6 a { - color: #0e2b52; - font-size: 130%; - font-weight: 900; -} - -#g-tag-cloud-html5-page-tags ul li.size7 a { - color: #0e2b52; - font-size: 140%; - font-weight: 900; -} - -#g-tag-cloud-html5-page-tags ul li a:hover { - color: #f30; - text-decoration: underline; -} +/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* comment out this first block to make the inline tags appear if the cloud doesn't load */ +#g-tag-cloud-html5-tags { + display: none; +} + +#g-tag-cloud-html5-tags ul { + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li { + display: inline; + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page ul li a:hover { + text-decoration: underline; +} + +/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-tag-cloud-html5-page-canvas { + display: block; + margin: 0 auto; +} + +#g-tag-cloud-html5-page-tags ul { + font-size: 1.2em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li { + display: inline; + line-height: 1.5em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-page-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page-tags ul li.size0 a { + color: #9cf; + font-size: 70%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size1 a { + color: #9cf; + font-size: 80%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size2 a { + color: #69f; + font-size: 90%; + font-weight: 300; +} + +#g-tag-cloud-html5-page-tags ul li.size3 a { + color: #69c; + font-size: 100%; + font-weight: 500; +} + +#g-tag-cloud-html5-page-tags ul li.size4 a { + color: #369; + font-size: 110%; + font-weight: 700; +} + +#g-tag-cloud-html5-page-tags ul li.size5 a { + color: #0e2b52; + font-size: 120%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size6 a { + color: #0e2b52; + font-size: 130%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size7 a { + color: #0e2b52; + font-size: 140%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li a:hover { + color: #f30; + text-decoration: underline; +} diff --git a/modules/.unused/tag_cloud_html5/helpers/tag_cloud_html5_installer.php b/modules/.unused/tag_cloud_html5/helpers/tag_cloud_html5_installer.php index 9d843d6..4b2914d 100755 --- a/modules/.unused/tag_cloud_html5/helpers/tag_cloud_html5_installer.php +++ b/modules/.unused/tag_cloud_html5/helpers/tag_cloud_html5_installer.php @@ -1,177 +1,177 @@ - 0.05, - "deadZone" => 0.25, - "initial" => array(0.8,-0.3), - "initialDecel" => true, - "zoom" => 1.25, - "depth" => 0.5, - "outlineMethod" => "colour", - "outlineOffset" => 8, - "outlineColour" => "#eeeeee", - "textColour" => "", - "textFont" => "", - "textHeight" => 12, - "frontSelect" => true, - "wheelZoom" => false, - "shape" => "sphere", - "lock" => "", - "stretchX" => 1.0, - "stretchY" => 1.0, - "decel" => 0.92, - "physModel" => true, - "maxInputZone" => 0.25, - "minSpeed" => 0.002 - ))); - - module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array( - "maxSpeed" => 0.05, - "deadZone" => 0.25, - "initial" => array(0.8,-0.3), - "initialDecel" => true, - "zoom" => 1.25, - "depth" => 0.5, - "outlineMethod" => "colour", - "outlineOffset" => 8, - "outlineColour" => "#eeeeee", - "textColour" => "", - "textFont" => "", - "textHeight" => 13, - "frontSelect" => true, - "wheelZoom" => false, - "shape" => "sphere", - "lock" => "", - "stretchX" => 1.0, - "stretchY" => 1.0, - "decel" => 0.92, - "physModel" => true, - "maxInputZone" => 0.15, - "minSpeed" => 0.002 - ))); - - module::set_version("tag_cloud_html5", 7); - } - - static function upgrade() { - if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) || - is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) || - (module::get_version("tag_cloud_html5") < 1) ) { - - module::install("tag_cloud_html5"); - } - if (module::get_version("tag_cloud_html5") < 2) { - // added wheelZoom, which is not accessible from admin menu - $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); - $options["wheelZoom"] = false; - module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); - - $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); - $options["wheelZoom"] = false; - module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); - } - if (module::get_version("tag_cloud_html5") < 3) { - // added deadZone, initial, and initialDecel - - module::set_var("tag_cloud_html5", "show_add_tag_form", true); - - $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); - $options["deadZone"] = 0.25; - $options["initial"] = array(0.8,-0.3); - $options["initialDecel"] = true; - module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); - - $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); - $options["deadZone"] = 0.25; - $options["initial"] = array(0.8,-0.3); - $options["initialDecel"] = true; - module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); - } - if (module::get_version("tag_cloud_html5") < 4) { - // added height_sidebar, then scaled back zoom and textHeight for consistency - module::set_var("tag_cloud_html5", "height_sidebar", 0.8); - - $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); - $options["zoom"] = $options["zoom"] / 0.8; - $options["textHeight"] = $options["textHeight"] * 0.8; - module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); - } - if (module::get_version("tag_cloud_html5") < 5) { - // added lots of options that are on admin menu - // added physModel, lock, and initialDecel as options not on admin menu - // (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_wholecloud", 0.95); - module::set_var("tag_cloud_html5", "height_wholecloud", 0.75); - - $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); - $options["deadZone"] = $options["deadZone"]; - $options["shape"] = "sphere"; - $options["lock"] = ""; - $options["stretchX"] = 1.0; - $options["stretchY"] = 1.0; - $options["decel"] = 0.92; - $options["physModel"] = true; - $options["maxInputZone"] = 0.25; - $options["minSpeed"] = 0.002; - $options["initialDecel"] = true; - module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); - - $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); - $options["deadZone"] = $options["deadZone"]; - $options["shape"] = "sphere"; - $options["lock"] = ""; - $options["stretchX"] = 1.0; - $options["stretchY"] = 1.0; - $options["decel"] = 0.92; - $options["physModel"] = true; - $options["maxInputZone"] = 0.15; - $options["minSpeed"] = 0.002; - $options["initialDecel"] = true; - module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); - } - // note: there are no variable changes for v6 and v7 upgrades - module::set_version("tag_cloud_html5", 7); - } - - static function uninstall() { - module::clear_all_vars("tag_cloud_html5"); - } - -} + 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 12, + "frontSelect" => true, + "wheelZoom" => false, + "shape" => "sphere", + "lock" => "", + "stretchX" => 1.0, + "stretchY" => 1.0, + "decel" => 0.92, + "physModel" => true, + "maxInputZone" => 0.25, + "minSpeed" => 0.002 + ))); + + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array( + "maxSpeed" => 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 13, + "frontSelect" => true, + "wheelZoom" => false, + "shape" => "sphere", + "lock" => "", + "stretchX" => 1.0, + "stretchY" => 1.0, + "decel" => 0.92, + "physModel" => true, + "maxInputZone" => 0.15, + "minSpeed" => 0.002 + ))); + + module::set_version("tag_cloud_html5", 7); + } + + static function upgrade() { + if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) || + is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) || + (module::get_version("tag_cloud_html5") < 1) ) { + + module::install("tag_cloud_html5"); + } + if (module::get_version("tag_cloud_html5") < 2) { + // added wheelZoom, which is not accessible from admin menu + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["wheelZoom"] = false; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); + $options["wheelZoom"] = false; + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); + } + if (module::get_version("tag_cloud_html5") < 3) { + // added deadZone, initial, and initialDecel + + module::set_var("tag_cloud_html5", "show_add_tag_form", true); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["deadZone"] = 0.25; + $options["initial"] = array(0.8,-0.3); + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); + $options["deadZone"] = 0.25; + $options["initial"] = array(0.8,-0.3); + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); + } + if (module::get_version("tag_cloud_html5") < 4) { + // added height_sidebar, then scaled back zoom and textHeight for consistency + module::set_var("tag_cloud_html5", "height_sidebar", 0.8); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["zoom"] = $options["zoom"] / 0.8; + $options["textHeight"] = $options["textHeight"] * 0.8; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + } + if (module::get_version("tag_cloud_html5") < 5) { + // added lots of options that are on admin menu + // added physModel, lock, and initialDecel as options not on admin menu + // (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_wholecloud", 0.95); + module::set_var("tag_cloud_html5", "height_wholecloud", 0.75); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["deadZone"] = $options["deadZone"]; + $options["shape"] = "sphere"; + $options["lock"] = ""; + $options["stretchX"] = 1.0; + $options["stretchY"] = 1.0; + $options["decel"] = 0.92; + $options["physModel"] = true; + $options["maxInputZone"] = 0.25; + $options["minSpeed"] = 0.002; + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); + $options["deadZone"] = $options["deadZone"]; + $options["shape"] = "sphere"; + $options["lock"] = ""; + $options["stretchX"] = 1.0; + $options["stretchY"] = 1.0; + $options["decel"] = 0.92; + $options["physModel"] = true; + $options["maxInputZone"] = 0.15; + $options["minSpeed"] = 0.002; + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); + } + // note: there are no variable changes for v6 and v7 upgrades + module::set_version("tag_cloud_html5", 7); + } + + static function uninstall() { + module::clear_all_vars("tag_cloud_html5"); + } + +} diff --git a/modules/.unused/tag_cloud_html5/libraries/MY_Form_Input.php b/modules/.unused/tag_cloud_html5/libraries/MY_Form_Input.php index e67eab2..c191dcc 100755 --- a/modules/.unused/tag_cloud_html5/libraries/MY_Form_Input.php +++ b/modules/.unused/tag_cloud_html5/libraries/MY_Form_Input.php @@ -1,58 +1,58 @@ -value)) { - if (!is_null($min) && ($this->value < $min)) { - // below min - $this->errors['numrange'] = true; - $this->error_messages['numrange'] = t('Value is below minimum of').' '.$min; - } elseif (!is_null($max) && ($this->value > $max)) { - // above max - $this->errors['numrange'] = true; - $this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;; - } - } else { - // not numeric - $this->errors['numrange'] = true; - $this->error_messages['numrange'] = t('Value is not numeric'); - } - } - - /** - * Custom validation rule: color - * returns no error if string is formatted as #hhhhhh OR if string is empty - * to exclude the empty case, add "required" as another rule - */ - protected function rule_color() { - if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) { - $this->errors['color'] = true; - $this->error_messages['color'] = t('Color is not in #hhhhhh format'); - } - } +value)) { + if (!is_null($min) && ($this->value < $min)) { + // below min + $this->errors['numrange'] = true; + $this->error_messages['numrange'] = t('Value is below minimum of').' '.$min; + } elseif (!is_null($max) && ($this->value > $max)) { + // above max + $this->errors['numrange'] = true; + $this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;; + } + } else { + // not numeric + $this->errors['numrange'] = true; + $this->error_messages['numrange'] = t('Value is not numeric'); + } + } + + /** + * Custom validation rule: color + * returns no error if string is formatted as #hhhhhh OR if string is empty + * to exclude the empty case, add "required" as another rule + */ + protected function rule_color() { + if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) { + $this->errors['color'] = true; + $this->error_messages['color'] = t('Color is not in #hhhhhh format'); + } + } } \ No newline at end of file diff --git a/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_block.html.php b/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_block.html.php index 80360fe..a0f1e72 100755 --- a/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_block.html.php +++ b/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_block.html.php @@ -30,7 +30,7 @@
- +
diff --git a/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_embed.html.php b/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_embed.html.php index 99e5af4..48b2d10 100755 --- a/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_embed.html.php +++ b/modules/.unused/tag_cloud_html5/views/tag_cloud_html5_embed.html.php @@ -51,7 +51,7 @@
- +
- +
diff --git a/modules/captionator/views/captionator_dialog.html.php b/modules/captionator/views/captionator_dialog.html.php index 2b2f0e2..a81ecf5 100755 --- a/modules/captionator/views/captionator_dialog.html.php +++ b/modules/captionator/views/captionator_dialog.html.php @@ -24,7 +24,7 @@ %album_title", array("album_title" => $album->title)) ?> - viewable()->children() as $child): ?> + viewable()->children() as $child): ?>
@@ -40,12 +40,12 @@ - +
  • - +
  • @@ -58,7 +58,7 @@
  • - +
    "/> diff --git a/modules/latestupdates/controllers/latestupdates.php b/modules/latestupdates/controllers/latestupdates.php index fb9a8f2..798e829 100755 --- a/modules/latestupdates/controllers/latestupdates.php +++ b/modules/latestupdates/controllers/latestupdates.php @@ -116,11 +116,11 @@ class latestupdates_Controller extends Controller { // Set up the previous and next page buttons. if ($page > 1) { $previous_page = $page - 1; - $view->previous_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$previous_page}"); +# $view->previous_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$previous_page}"); } if ($page < $max_pages) { $next_page = $page + 1; - $view->next_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$next_page}"); +# $view->next_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$next_page}"); } // Set up and display the actual page. @@ -201,11 +201,11 @@ class latestupdates_Controller extends Controller { // Set up the previous and next page buttons. if ($page > 1) { $previous_page = $page - 1; - $view->previous_page_link = url::site("latestupdates/albums/{$item->id}?page={$previous_page}"); +# $view->previous_page_link = url::site("latestupdates/albums/{$item->id}?page={$previous_page}"); } if ($page < $max_pages) { $next_page = $page + 1; - $view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}"); +# $view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}"); } // Set up breadcrumbs. @@ -290,11 +290,11 @@ class latestupdates_Controller extends Controller { // Set up the previous and next page buttons. if ($page > 1) { $previous_page = $page - 1; - $view->previous_page_link = url::site("latestupdates/updates?page={$previous_page}"); +# $view->previous_page_link = url::site("latestupdates/updates?page={$previous_page}"); } if ($page < $max_pages) { $next_page = $page + 1; - $view->next_page_link = url::site("latestupdates/updates?page={$next_page}"); +# $view->next_page_link = url::site("latestupdates/updates?page={$next_page}"); } // Set up and display the actual page. @@ -430,7 +430,6 @@ class latestupdates_Controller extends Controller { $count = $item ->viewable() ->where("type", "!=", "album") - ->order_by("created", "DESC") ->descendants_count(); } else { $count = ORM::factory("item") @@ -525,7 +524,6 @@ class latestupdates_Controller extends Controller { ->viewable() ->merge_where($str_where) ->where($str_orderby_field, ">", $item->$str_orderby_field) - ->order_by($str_orderby_field, "DESC") ->count_all(); } else { if ($str_display_type == "descendants") { @@ -534,7 +532,6 @@ class latestupdates_Controller extends Controller { ->viewable() ->where("type", "!=", "album") ->where("created", ">", $item->created) - ->order_by("created", "DESC") ->descendants_count(); } else { $position = ORM::factory("item") @@ -542,7 +539,6 @@ class latestupdates_Controller extends Controller { ->where("owner_id", "=", $user_id) ->merge_where($str_where) ->where($str_orderby_field, ">", $item->$str_orderby_field) - ->order_by($str_orderby_field, "DESC") ->count_all(); } } diff --git a/modules/latestupdates/views/latestupdates_block.html.php b/modules/latestupdates/views/latestupdates_block.html.php index b1dd907..a666fcb 100755 --- a/modules/latestupdates/views/latestupdates_block.html.php +++ b/modules/latestupdates/views/latestupdates_block.html.php @@ -1,10 +1,10 @@
      - $url): ?> + $url): ?>
    • - +
    diff --git a/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php b/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php index 1a3ada2..1b3bda3 100755 --- a/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php +++ b/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php @@ -1,7 +1,7 @@ - +
    - + - +

    - +

    - +

    @@ -55,5 +55,5 @@
    Save - +
    diff --git a/modules/moduleorder/views/admin_moduleorder_blocks.html.php b/modules/moduleorder/views/admin_moduleorder_blocks.html.php index b7d9458..7144a52 100755 --- a/modules/moduleorder/views/admin_moduleorder_blocks.html.php +++ b/modules/moduleorder/views/admin_moduleorder_blocks.html.php @@ -1,10 +1,10 @@ - - $text): ?> - -name == ""): ?> + + $text): ?> + +name == ""): ?>
  • - +
  • name ?>
  • - - + + diff --git a/modules/movie_tools/views/admin_movie_tools.html.php b/modules/movie_tools/views/admin_movie_tools.html.php index 5e9e8d1..bd47cb2 100755 --- a/modules/movie_tools/views/admin_movie_tools.html.php +++ b/modules/movie_tools/views/admin_movie_tools.html.php @@ -23,13 +23,13 @@ Description Formats - $data): ?> + $data): ?> - +

    diff --git a/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php b/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php index acd31ed..b245555 100755 --- a/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php +++ b/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php @@ -7,14 +7,14 @@

    - + @@ -26,10 +26,10 @@ - +
    count_all()); ?>
    - + dynamic_bottom() ?> diff --git a/modules/user_info/views/admin_block_user_info.html.php b/modules/user_info/views/admin_block_user_info.html.php index 1123110..1e886fd 100755 --- a/modules/user_info/views/admin_block_user_info.html.php +++ b/modules/user_info/views/admin_block_user_info.html.php @@ -11,19 +11,19 @@ - 0) { ?> + 0) { ?> $number_of_records)) ?> - + - + - + - + @@ -36,19 +36,19 @@ - 0) { ?> - + 0) { ?> + - id ?> + id ?> - user_id ?> + user_id ?> - user_id){ ?> + user_id){ ?> user_id") ?>" target="_blank">user_name) ?> - - user_name ?>
    - + + user_name ?>
    + @@ -56,9 +56,9 @@ - + time_stamp) ?> - time_stamp); } @@ -66,7 +66,7 @@ - action) { case "Failed Login": @@ -107,12 +107,12 @@ ?> - - + +
    - +