From 200e17c884df8c2a265fab828be2ef869e580e35 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 23 Jun 2009 23:44:08 -0600 Subject: Use gMessage for "no paths defined" status message. --- modules/server_add/views/admin_server_add.html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php index 6f87c512..588a9fca 100644 --- a/modules/server_add/views/admin_server_add.html.php +++ b/modules/server_add/views/admin_server_add.html.php @@ -4,7 +4,10 @@
- +

+ -
style="display:none"> - -
-- cgit v1.2.3 From 292d216f7c133152cb921db1cbc7a0c4843a977a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 24 Jun 2009 18:02:36 -0700 Subject: Implement printing support on the photo page. I've used an icon that doesn't quite match the theme temporarily. I'm hoping to have a matching icon soon. --- modules/digibug/helpers/digibug_menu.php | 18 +++++++----------- modules/digibug/js/digibug.js | 4 ++++ themes/default/css/screen.css | 4 ++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php index 1ff0f6bf..6c466031 100644 --- a/modules/digibug/helpers/digibug_menu.php +++ b/modules/digibug/helpers/digibug_menu.php @@ -27,17 +27,13 @@ class digibug_menu { } static function photo($menu, $theme) { - } - - static function site($menu, $theme) { $item = $theme->item(); - - if ($item && access::can("edit", $item)) { - $options_menu = $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("digibug") - ->label(t("Peform Digibug Processing")) - ->url(url::site("digibug/index/$item->id"))); - } + $csrf = access::csrf_token(); + $menu + ->append(Menu::factory("link") + ->id("digibug") + ->label(t("Print with Digibug")) + ->url(url::site("digibug/print_photo/{$item->id}?csrf={$csrf}")) + ->css_id("gDigibugLink")); } } diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js index e9e8933e..837c8f7f 100644 --- a/modules/digibug/js/digibug.js +++ b/modules/digibug/js/digibug.js @@ -3,6 +3,10 @@ $(document).ready(function() { e.preventDefault(); queue_print(e); }); + $("#gDigibugLink").click(function(e) { + e.preventDefault(); + return queue_print(e); + }); }); function popUp(url, options) { diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index a450356c..8967efdf 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -665,6 +665,10 @@ form .gError, background-image: url('../images/ico-view-comments.png'); } +#gViewMenu #gDigibugLink { + background-image: url('../images/ico-print.png'); +} + /* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .gBreadcrumbs { -- cgit v1.2.3 From 2d97a9a8b6b3b45b3cfdc426f8c476dd1ef104d4 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 24 Jun 2009 18:04:02 -0700 Subject: The image didn't get picked up on the previous commit --- themes/default/images/ico-print.png | Bin 0 -> 4411 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 themes/default/images/ico-print.png diff --git a/themes/default/images/ico-print.png b/themes/default/images/ico-print.png new file mode 100644 index 00000000..087e6694 Binary files /dev/null and b/themes/default/images/ico-print.png differ -- cgit v1.2.3 From abbecb9e7e6e26d50cae0754d4c6320892b8def5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 21:19:05 -0700 Subject: Look in /opt/local/bin for binaries, too. Fixes ticket #423. --- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/helpers/movie.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 3f3317ae..71b8ddd8 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -331,7 +331,7 @@ class graphics_Core { if (!isset($gd["GD Version"])) { $gd["GD Version"] = false; } - putenv("PATH=" . getenv("PATH") . ":/usr/local/bin"); + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin"); return array("gd" => $gd, "imagemagick" => $exec ? dirname(exec("which convert")) : false, "graphicsmagick" => $exec ? dirname(exec("which gm")) : false); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 28c15d81..fcf1cc54 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -145,7 +145,7 @@ class movie_Core { static function find_ffmpeg() { if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) { - putenv("PATH=" . getenv("PATH") . ":/usr/local/bin"); + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin"); if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); } -- cgit v1.2.3 From 4384b67be1aedfbc71e3cb7e399df88fcb87ff9c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 21:30:48 -0700 Subject: Comment out [reply] and [edit] links because they're not implemented yet. This closes ticket #416, and I'll open a new ticket to implement these functions. --- modules/comment/views/admin_comments.html.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index e749fde0..86585c65 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -163,6 +163,7 @@ +
  • -- cgit v1.2.3 From 7347d1e50db102142f1c82bfeb70734475f58195 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 21:34:07 -0700 Subject: Use ENT_QUOTEs when decoding the $current_uri otherwise apostrophes are treated as ' which doesn't match in our relative_path_cache. --- modules/gallery/helpers/MY_url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gallery/helpers/MY_url.php b/modules/gallery/helpers/MY_url.php index 7bee70ca..c4967c52 100644 --- a/modules/gallery/helpers/MY_url.php +++ b/modules/gallery/helpers/MY_url.php @@ -58,7 +58,7 @@ class url extends url_Core { * Return the item that the uri is referencing */ static function get_item_from_uri($uri) { - $current_uri = html_entity_decode($uri); + $current_uri = html_entity_decode($uri, ENT_QUOTES); $item = ORM::factory("item")->where("relative_path_cache", $current_uri)->find(); if (!$item->loaded) { // It's possible that the relative path cache for the item we're looking for is out of date, -- cgit v1.2.3 From a5f1ef48498937621cd0ce4d0344650af2c580ec Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 21:47:47 -0700 Subject: Add support for mod_rewrite in the .htaccess file. There are now instructions for how to tweak RewriteBase correctly. Once that's done, index.php will automagically disappear. \o/ --- .htaccess | 22 ++++++++++++++++++++++ application/config/config.php | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 190ff745..e55165ff 100644 --- a/.htaccess +++ b/.htaccess @@ -6,3 +6,25 @@ php_value upload_max_filesize 20M php_value post_max_size 100M + +# You can use mod_rewrite to enable short urls in Gallery 3 (which +# gets rid of the "index.php" from your urls). To do this, you must +# properly configure the RewriteBase line in the block below. You +# just need to change RewriteBase line to match your installation. +# Here are some examples: +# +# Gallery3 URL RewriteBase line +# ============= ==================== +# http://example.com/gallery3 RewriteBase /gallery3 +# http://example.com/~bob/photos RewriteBase /~bob/photos +# http://gallery3.example.com/ RewriteBase / +# +# Then just use your Gallery 3 without the index.php in the url. + + RewriteEngine On + RewriteBase /~bharat/gallery3/ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L] + RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L] + diff --git a/application/config/config.php b/application/config/config.php index 2d66d1c0..e88958ed 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -54,7 +54,7 @@ $config["site_protocol"] = ""; * * This can be removed by using URL rewriting. */ -$config["index_page"] = "index.php"; +$config["index_page"] = isset($_GET["kohana_uri"]) ? "" : "index.php"; /** * Fake file extension that will be added to all generated URLs. Example: .html -- cgit v1.2.3 From 60442e170ba73641ce5545ca87de794b9fe98132 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 21:50:35 -0700 Subject: Oops, remove my own custom RewriteBase. I can see that this is going to be a problem with this approach. --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index e55165ff..0a9d6367 100644 --- a/.htaccess +++ b/.htaccess @@ -22,7 +22,7 @@ # Then just use your Gallery 3 without the index.php in the url. RewriteEngine On - RewriteBase /~bharat/gallery3/ + RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L] -- cgit v1.2.3 From a19dba9416516fffaa53b0c1955d625c60d7e557 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 22:01:08 -0700 Subject: Comment out the whole block; without proper configuration it breaks gallery3 if you don't specify index.php. --- .htaccess | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.htaccess b/.htaccess index 0a9d6367..3714aa64 100644 --- a/.htaccess +++ b/.htaccess @@ -9,22 +9,24 @@ # You can use mod_rewrite to enable short urls in Gallery 3 (which # gets rid of the "index.php" from your urls). To do this, you must -# properly configure the RewriteBase line in the block below. You -# just need to change RewriteBase line to match your installation. -# Here are some examples: +# uncomment the block below that starts with and ends with +# then properly configure the RewriteBase line in the +# block below. You just need to change RewriteBase line to match your +# Gallery 3 URL. Here are some examples: # -# Gallery3 URL RewriteBase line -# ============= ==================== -# http://example.com/gallery3 RewriteBase /gallery3 -# http://example.com/~bob/photos RewriteBase /~bob/photos -# http://gallery3.example.com/ RewriteBase / +# Gallery3 URL RewriteBase line +# ============= ==================== +# http://example.com/gallery3 RewriteBase /gallery3 +# http://example.com/~bob/photos RewriteBase /~bob/photos +# http://gallery3.example.com/ RewriteBase / # # Then just use your Gallery 3 without the index.php in the url. - - RewriteEngine On - RewriteBase / - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L] - RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L] - +# +# +# RewriteEngine On +# RewriteBase / +# RewriteCond %{REQUEST_FILENAME} !-f +# RewriteCond %{REQUEST_FILENAME} !-d +# RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L] +# RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L] +# -- cgit v1.2.3 From 766de009090cd1a49b6726e79bce7a69392491be Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Jun 2009 22:25:38 -0700 Subject: Turn off magic_quotes_sybase and magic_quotes_runtime. Fixes ticket #394. --- .htaccess | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.htaccess b/.htaccess index 3714aa64..79ba4be2 100644 --- a/.htaccess +++ b/.htaccess @@ -1,10 +1,12 @@ - php_value short_open_tag 1 - php_value magic_quotes_gpc 0 - php_value register_globals 0 - php_value session.auto_start 0 - php_value upload_max_filesize 20M - php_value post_max_size 100M + php_value short_open_tag 1 + php_value magic_quotes_gpc 0 + php_value magic_quotes_sybase 0 + php_value magic_quotes_runtime 0 + php_value register_globals 0 + php_value session.auto_start 0 + php_value upload_max_filesize 20M + php_value post_max_size 100M # You can use mod_rewrite to enable short urls in Gallery 3 (which -- cgit v1.2.3 From fae6d753e9107f16024e3de69483551a0bed2b59 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 24 Jun 2009 23:48:28 -0600 Subject: Group RTL styles together in their own section. --- themes/default/css/screen.css | 115 ++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 72 deletions(-) diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 8967efdf..0f2d504c 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -12,16 +12,13 @@ * 6) Navigation and menus * 7) Browser hacks * 8) jQuery and jQuery UI + * 9) Right-to-left language styles */ /** ******************************************************************* * 1) Basic HTML elements **********************************************************************/ -.rtl { - direction: rtl; -} - body, html { background-color: #ccc; font-family: 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; @@ -92,11 +89,11 @@ a:hover, margin: .3em 1em; } -#gForgotPasswordLink, .rtl #gDialog .gCancel { +#gForgotPasswordLink { float: right; } -#gDialog .gCancel, .rtl #gForgotPasswordLink { +#gDialog .gCancel { float: left; } @@ -115,11 +112,6 @@ th { text-align: left; } -.rtl caption, -.rtl th { - text-align: right; -} - th { font-weight: bold; } @@ -205,10 +197,6 @@ form ul ul li { float: left; } -.rtl form ul ul li { - float: right; -} - input, select, textarea { @@ -224,11 +212,6 @@ input[type="reset"] { float: left; } -.rtl input[type="submit"], -.rtl input[type="reset"] { - float: right; -} - /* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ .gValidationRule { @@ -385,10 +368,6 @@ form .gError, padding: .4em 0; } -.rtl .gShortForm li { - float: right; -} - .gShortForm label { display: none; } @@ -453,21 +432,12 @@ form .gError, margin: -4px 10px 0 0; } -.rtl #gHeader #gLogo { - float: right; -} - #gHeader #gQuickSearchForm { clear: right; float: right; margin: 1em 0; } -.rtl #gHeader #gQuickSearchForm { - clear: left; - float: left; -} - #gHeader #gQuickSearchForm input[type='text'] { width: 17em; } @@ -508,11 +478,6 @@ form .gError, width: 213px; } - -.rtl #gContent #gAlbumGrid .gItem { - float: right; -} - #gContent #gAlbumGrid .gItem h2 { margin: 5px 0; } @@ -618,10 +583,6 @@ form .gError, float: right; } -.rtl #gHeader #gLoginMenu { - float: left; -} - /* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #gSiteMenu { @@ -630,10 +591,6 @@ form .gError, padding: 0 20px 0 0; } -.rtl #gSiteMenu { - float: right; -} - #gSiteMenu ul { margin-bottom: 0; } @@ -685,10 +642,6 @@ form .gError, padding: 10px 6px 10px 16px !important; } -.rtl .gBreadcrumbs li { - float: right; -} - .gBreadcrumbs li.root { background: transparent; } @@ -789,10 +742,6 @@ form .gError, width: 30%; } -.rtl .gPager li { - float: right; -} - .gPager .gInfo { text-align: center; width: 40%; @@ -861,12 +810,6 @@ form .gError, text-align: left; } -.rtl #gDialog { - font-family: inherit; - font-size: inherit; - text-align: right; -} - #gDialog li { padding-left: 0; } @@ -908,10 +851,6 @@ form .gError, float: left; } -.rtl .gButtonSet li { - float: right; -} - .gButtonSet .gButtonLink { margin: 0; } @@ -921,19 +860,11 @@ form .gError, margin-right: .2em; } -.rtl .ui-icon-left .ui-icon { - float: right; -} - .ui-icon-right .ui-icon { float: right; margin-left: .2em; } -.rtl .ui-icon-right .ui-icon { - float: left; -} - .ui-icon-rotate-ccw { background-position: -192px -64px; } @@ -1105,3 +1036,43 @@ form .gError, margin-left: 20px; list-style-type: disc; } + +/* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ + +.rtl { + direction: rtl; +} + +.rtl caption, +.rtl th { + text-align: right; +} + +.rtl #gHeader #gQuickSearchForm, +.rtl #gForgotPasswordLink, +.rtl #gHeader #gLoginMenu, +.rtl .ui-icon-right .ui-icon { + clear: left; + float: left; +} + +.rtl #gDialog .gCancel, +.rtl form ul ul li, +.rtl input[type="submit"], +.rtl input[type="reset"], +.rtl .gShortForm li, +.rtl #gHeader #gLogo, +.rtl #gContent #gAlbumGrid .gItem, +.rtl #gSiteMenu, +.rtl .gBreadcrumbs li, +.rtl .gPager li, +.rtl .gButtonSet li, +.rtl .ui-icon-left .ui-icon { + float: right; +} + +.rtl #gDialog { + font-family: inherit; + font-size: inherit; + text-align: right; +} -- cgit v1.2.3 From ec67300f9628582bf735468c73aec3c01a6eb57f Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Thu, 25 Jun 2009 00:06:59 -0600 Subject: Cleanup pass. Fixed formatting, grouped a few selectors. Removed empty selectors. --- themes/default/css/screen.css | 82 +++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 54 deletions(-) diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 0f2d504c..c7918fc0 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -28,17 +28,11 @@ p { margin-bottom: 1em; } -strong { - font-weight: bold; -} - em { font-style: oblique; } -/* Headings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -h1, h2, h3, h4, h5 { +h1, h2, h3, h4, h5, strong, th { font-weight: bold; } @@ -50,6 +44,10 @@ h1 { margin-bottom: 1em; } +#gProgress h1 { + font-size: 1.1em; +} + h2 { font-size: 1.4em; } @@ -68,7 +66,8 @@ a, .gMenu a, #gDialog a, .gButtonLink, -.gButtonLink:hover { +.gButtonLink:hover, +.gButtonLink:active { color: #5382BF !important; text-decoration: none; -moz-outline-style: none; @@ -91,6 +90,7 @@ a:hover, #gForgotPasswordLink { float: right; + font-size: .9em; } #gDialog .gCancel { @@ -112,10 +112,6 @@ th { text-align: left; } -th { - font-weight: bold; -} - th, td { border: none; @@ -144,7 +140,9 @@ legend { #gHeader legend, #gSidebar legend, -#gContent #gSearchForm legend { +#gContent #gSearchForm legend, +input[type="hidden"], +.gShortForm label { display: none; } @@ -166,10 +164,6 @@ textarea { color: #333; } -input[type="hidden"] { - display: none; -} - textarea { width: 100%; height: 12em; @@ -368,10 +362,6 @@ form .gError, padding: .4em 0; } -.gShortForm label { - display: none; -} - .gShortForm input[type="text"] { color: #666; padding: .3em .6em; @@ -451,14 +441,6 @@ form .gError, padding-left: 1em; } -/* Album/Photo information ~~~~~~~~~~~~~~~ */ - -#gContent #gInfo { -} - -#gContent #gInfo .gDescription { -} - /* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ #gContent #gAlbumGrid { @@ -805,8 +787,6 @@ form .gError, } #gDialog { - font-family: inherit; - font-size: inherit; text-align: left; } @@ -884,6 +864,7 @@ form .gError, } /* Server Add */ + .gCheckboxTree input { display: inline; } @@ -922,7 +903,7 @@ form .gError, font-size: 1em; padding: 0; margin: 0; - border-top-width: 0px; + border-top-width: 0; } #gServerAdd p { @@ -933,10 +914,10 @@ form .gError, padding: 10px 6px 10px 16px; } - /* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gPermissions .gDenied, #gPermissions .gAllowed { +#gPermissions .gDenied, +#gPermissions .gAllowed { text-align: center; vertical-align: middle; } @@ -947,22 +928,18 @@ form .gError, background-color: #cfc; } - /*************** STUFF THAT NEEDS A HOME ****************/ -#gProgress h1 { - font-size: 1.1em; -} .gProgressBar { height: 1em; width: 100%; - margin-top: 0.5em; + margin-top: .5em; display: inline-block; } #gAddPhotos p { - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; } #gAddPhotosCanvas { @@ -1026,13 +1003,15 @@ form .gError, margin-bottom: 10px; } -#gAdminG2ImportNotes p, #gAdminG2ImportDetails .gInfo p { - padding: 0px; - margin: 0px; +#gAdminG2ImportNotes p, +#gAdminG2ImportDetails .gInfo p { + padding: 0; + margin: 0; } -#gAdminG2ImportNotes ul li, #gAdminG2Import .gInfo ul li { - padding-left: 0px; +#gAdminG2ImportNotes ul li, +#gAdminG2Import .gInfo ul li { + padding-left: 0; margin-left: 20px; list-style-type: disc; } @@ -1044,7 +1023,8 @@ form .gError, } .rtl caption, -.rtl th { +.rtl th, +.rtl #gDialog { text-align: right; } @@ -1069,10 +1049,4 @@ form .gError, .rtl .gButtonSet li, .rtl .ui-icon-left .ui-icon { float: right; -} - -.rtl #gDialog { - font-family: inherit; - font-size: inherit; - text-align: right; -} +} \ No newline at end of file -- cgit v1.2.3