From f7a720d2e827925f6fbae4981e2a17fd79eb31f6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 8 Jun 2009 23:17:28 -0700 Subject: Rename main_element_attributes() callback to body_attributes() to be more intuitive for themers. --- modules/gallery/libraries/MY_View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index bd2794a0..96dcc71b 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -44,7 +44,7 @@ class View extends View_Core { } } - public function main_element_attributes() { + public function body_attributes() { if (locale::is_rtl()) { return 'class="rtl"'; } -- cgit v1.2.3 From 90244e17053ed005643537acca6c475d133cb591 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 9 Jun 2009 13:25:11 -0700 Subject: fix typo: "the the" -> "the" --- modules/gallery/js/l10n_client.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'modules') diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index efd956e2..89c4a57d 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -35,20 +35,20 @@ jQuery.extend(Gallery, { if(userSelection.length > 0) { Gallery.l10nClient.filter(userSelection); Gallery.l10nClient.toggle(1); - $('#l10n-client #gL10nSearch').focus(); + $('#l10n-client #gL10nSearch').focus(); } else { if($('#l10n-client').is('.hidden')) { Gallery.l10nClient.toggle(1); if(!$.browser.safari) { $('#l10n-client #gL10nSearch').focus(); } - } else { + } else { Gallery.l10nClient.toggle(0); } } break; case 'clear': - this.filter(false); + this.filter(false); break; } } @@ -61,7 +61,7 @@ jQuery.extend(Gallery, { $('#l10n-client .labels .toggle').text('X'); /* * This CSS clashes with Gallery's CSS, probably due to - * YUI's grid / floats. + * YUI's grid / floats. if(!$.browser.msie) { $('body').css('border-bottom', '22em solid #fff'); } @@ -79,7 +79,7 @@ jQuery.extend(Gallery, { } */ $.cookie('Gallery_l10n_client', '0', {expires: 7, path: '/'}); - break; + break; } } // Get a string from the DOM tree @@ -124,7 +124,7 @@ jQuery.extend(Gallery, { $('#l10n-edit-translation').removeClass('hidden'); } } - // Filter the the string list by a search string + // Filter the string list by a search string this.filter = function(search) { if(search == false || search == '') { $('#l10n-client #l10n-search-filter-clear').focus(); @@ -153,7 +153,7 @@ Gallery.behaviors.l10nClient = function(context) { Gallery.l10nClient.toggle(0); break; } - + // If the selection changes, copy string values to the source and target fields. // Add class to indicate selected string in list widget. $('#l10n-client-string-select li').click(function() { @@ -173,7 +173,7 @@ Gallery.behaviors.l10nClient = function(context) { $('#l10n-client .labels .toggle').click(function() { if($('#l10n-client').is('.hidden')) { Gallery.l10nClient.toggle(1); - } else { + } else { Gallery.l10nClient.toggle(0); } }); @@ -184,7 +184,7 @@ Gallery.behaviors.l10nClient = function(context) { $.hotkeys.add(Gallery.l10nClient.keys['toggle'], function(){Gallery.l10nClient.key('toggle')}); $.hotkeys.add(Gallery.l10nClient.keys['clear'], {target:'#l10n-client #gL10nSearch', type:'keyup'}, function(){Gallery.l10nClient.key('clear')}); } - + // Custom listener for l10n_client livesearch $('#l10n-client #gL10nSearch').keyup(function(key) { Gallery.l10nClient.filter($('#l10n-client #gL10nSearch').val()); @@ -222,7 +222,7 @@ Gallery.behaviors.l10nClient = function(context) { // Clear the translation form fields Gallery.l10nClient.showSourceMessage('', false); $('#gL10nClientSaveForm #l10n-edit-translation').val(''); - + for (var i = 0; i < num_plural_forms; i++) { var form = plural_forms[i]; $('#gL10nClientSaveForm #l10n-edit-plural-translation-' + form).val(''); -- cgit v1.2.3 From a4a38ba76003f5ca8fec0f50b4a84b930c80dd20 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 10 Jun 2009 08:17:27 +0800 Subject: Created not_authorized.html.php which is a prettier login screen if the root album is not publicly browsable. Signed-off-by: Tim Almdal --- modules/gallery/controllers/albums.php | 10 ++-------- themes/default/views/page.html.php | 7 ------- 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 0fd89f05..9b837442 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -26,14 +26,8 @@ class Albums_Controller extends Items_Controller { $page_size = module::get_var("gallery", "page_size", 9); if (!access::can("view", $album)) { if ($album->id == 1) { - $template = new Theme_View("page.html", "album"); - $template->set_global("page_size", $page_size); - $template->set_global("item", $album); - $template->set_global("children", array()); - $template->set_global("children_count", 0); - $template->set_global("parents", $album->parents()); - $template->unauthorized = true; - $template->content = new View("album.html"); + $template = new Theme_View("not_authorized.html", "album"); + $template->content = new View("login_page.html"); print $template; return; } else { diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index a17b643d..6c77fb72 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -52,13 +52,6 @@ head() ?> - - - main_element_attributes() ?>> -- cgit v1.2.3 From b276eaa68beca1266bf8fd83625ddfad73f44420 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 10 Jun 2009 08:38:21 +0800 Subject: Add some window dressing to login_page.html in order to make it more in line with the overall look of the Gallery3 theme Signed-off-by: Tim Almdal --- modules/gallery/controllers/albums.php | 4 +- themes/default/views/login_page.html.php | 48 ++++++++++++++++++- themes/default/views/not_authorized.html.php | 69 ---------------------------- 3 files changed, 47 insertions(+), 74 deletions(-) delete mode 100644 themes/default/views/not_authorized.html.php (limited to 'modules') diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 9b837442..f37609e6 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -26,9 +26,7 @@ class Albums_Controller extends Items_Controller { $page_size = module::get_var("gallery", "page_size", 9); if (!access::can("view", $album)) { if ($album->id == 1) { - $template = new Theme_View("not_authorized.html", "album"); - $template->content = new View("login_page.html"); - print $template; + print new Theme_View("login_page.html"); return; } else { access::forbidden(); diff --git a/themes/default/views/login_page.html.php b/themes/default/views/login_page.html.php index 27f8571e..c4880727 100644 --- a/themes/default/views/login_page.html.php +++ b/themes/default/views/login_page.html.php @@ -7,11 +7,55 @@ <?= t("Please Login to Gallery") ?> + " type="image/x-icon" /> + " + media="screen,print,projection" /> + " + media="screen" /> + " + media="screen,print,projection" /> " media="screen,print,projection" /> + + + + + + + + + + + + head() ?> - - + main_element_attributes() ?>> + page_top() ?> +
+ site_status() ?> +
+ display("header.html") ?> +
+
+
+
+
+ messages() ?> + +
+
+
+
+
+
+
+ display("footer.html") ?> +
+
+ page_bottom() ?> diff --git a/themes/default/views/not_authorized.html.php b/themes/default/views/not_authorized.html.php deleted file mode 100644 index d009a4ac..00000000 --- a/themes/default/views/not_authorized.html.php +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - <? if (empty($page_title)): ?> - <?= t("Gallery3 Login") ?> - <? if (!empty($item)): ?> - :: <?= p::clean($item->title) ?> - <? endif ?> - <? else: ?> - <?= $page_title ?> - <? endif ?> - <?= $theme->page_type ?> - - " type="image/x-icon" /> - " - media="screen,print,projection" /> - " - media="screen" /> - " - media="screen,print,projection" /> - " - media="screen,print,projection" /> - - - - - - - - - - - - head() ?> - - - main_element_attributes() ?>> - page_top() ?> -
- site_status() ?> -
- display("header.html") ?> -
-
-
-
-
- messages() ?> - -
-
-
-
-
-
-
- display("footer.html") ?> -
-
- page_bottom() ?> - - -- cgit v1.2.3 From 79d526f1faccb2f929f00c296cb22941d74b8eb2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 9 Jun 2009 18:58:40 -0700 Subject: Put in a placeholder link to click on if there's no value for a setting. --- modules/gallery/views/admin_advanced_settings.html.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules') diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 77aff050..34abadea 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -25,7 +25,11 @@ module_name/" . p::clean($var->name)) ?>" class="gDialogLink" title=" p::clean($var->name), "module_name" => $var->module_name)) ?>"> + value): ?> value) ?> + + + -- cgit v1.2.3 From d0b25445119274760af40722eaa95279c2942a89 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 9 Jun 2009 18:59:53 -0700 Subject: Check in /usr/local/bin for ffmpeg, and create the setting even if its empty (to make it easier for folks to change it in Admin > Settings > Advanced) --- modules/gallery/helpers/movie.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 3aa40dc9..986d5f62 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -142,10 +142,12 @@ class movie_Core { if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) { if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); - if ($ffmpeg_path) { - module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); - } } + + if (empty($ffmpeg) && @file_exists("/usr/local/bin/ffmpeg")) { + $ffmpeg_path = "/usr/local/bin/ffmpeg"; + } + module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); } return $ffmpeg_path; } -- cgit v1.2.3