diff --git a/3.0/modules/batchtag/module.info b/3.0/modules/batchtag/module.info index 56e8691e..c1380ad4 100644 --- a/3.0/modules/batchtag/module.info +++ b/3.0/modules/batchtag/module.info @@ -1,7 +1,7 @@ name = "BatchTag" description = "Automatically apply a tag to the entire contents of an album." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:batchtag" -discuss_url = "http://gallery.menalto.com/forum_module_batchtag" +discuss_url = "http://gallery.menalto.com/node/101076" diff --git a/3.0/modules/calendarview/module.info b/3.0/modules/calendarview/module.info index 761eadab..f51f1625 100644 --- a/3.0/modules/calendarview/module.info +++ b/3.0/modules/calendarview/module.info @@ -1,7 +1,7 @@ name = "CalendarView" description = "View your photos by the date they were taken." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:calendarview" -discuss_url = "http://gallery.menalto.com/forum_module_calendarview" +discuss_url = "http://gallery.menalto.com/node/92405" diff --git a/3.0/modules/database_info/module.info b/3.0/modules/database_info/module.info index 536a4cab..8cc35d27 100644 --- a/3.0/modules/database_info/module.info +++ b/3.0/modules/database_info/module.info @@ -1,7 +1,7 @@ name = "Database Info" description = "View information about your Gallery 3 database on the admin dashboard." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:database_info" -discuss_url = "http://gallery.menalto.com/forum_module_database_info" +discuss_url = "http://gallery.menalto.com/node/95320" diff --git a/3.0/modules/displaytags/module.info b/3.0/modules/displaytags/module.info index 9765b7e1..20fba34b 100644 --- a/3.0/modules/displaytags/module.info +++ b/3.0/modules/displaytags/module.info @@ -1,7 +1,7 @@ name = "DisplayTags" description = "Display all tags for the current photo/album." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:displaytags" -discuss_url = "http://gallery.menalto.com/forum_module_displaytags" +discuss_url = "http://gallery.menalto.com/node/89093" diff --git a/3.0/modules/downloadfullsize/module.info b/3.0/modules/downloadfullsize/module.info index 078371a9..b2cc3915 100644 --- a/3.0/modules/downloadfullsize/module.info +++ b/3.0/modules/downloadfullsize/module.info @@ -1,7 +1,7 @@ name = "DownloadFullsize" description = "Displays a link to download the fullsize version of the current photo." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:downloadfullsize" -discuss_url = "http://gallery.menalto.com/forum_module_downloadfullsize" +discuss_url = "http://gallery.menalto.com/node/103278" diff --git a/3.0/modules/editcreation/module.info b/3.0/modules/editcreation/module.info index fef83519..926f9485 100755 --- a/3.0/modules/editcreation/module.info +++ b/3.0/modules/editcreation/module.info @@ -1,7 +1,7 @@ name = "Edit Creation" description = "Manually edit the creation date of an item in Gallery." version = 2 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:editcreation" -discuss_url = "http://gallery.menalto.com/forum_module_editcreation" +discuss_url = "http://gallery.menalto.com/node/90667" diff --git a/3.0/modules/embedlinks/controllers/admin_embedlinks.php b/3.0/modules/embedlinks/controllers/admin_embedlinks.php index f25f97e8..89d98dcd 100644 --- a/3.0/modules/embedlinks/controllers/admin_embedlinks.php +++ b/3.0/modules/embedlinks/controllers/admin_embedlinks.php @@ -39,7 +39,8 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { $BBCodeButton = false; $FullURLButton = false; $InPageLinks = false; - + $ToolbarLinks = false; + for ($i = 0; $i < count($linkOpts_array); $i++) { if ($linkOpts_array[$i] == "HTMLCode") { $HTMLButton = true; @@ -55,15 +56,19 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { if ($displayType_array[$i] == "InPageLinks") { $InPageLinks = true; } + if ($displayType_array[$i] == "ToolbarLinks") { + $ToolbarLinks = true; + } } - + // Save Settings. module::set_var("embedlinks", "HTMLCode", $HTMLButton); module::set_var("embedlinks", "BBCode", $BBCodeButton); module::set_var("embedlinks", "FullURL", $FullURLButton); module::set_var("embedlinks", "InPageLinks", $InPageLinks); + module::set_var("embedlinks", "ToolbarLinks", $ToolbarLinks); message::success(t("Your Selection Has Been Saved.")); - + // Load Admin page. $view = new Admin_View("admin.html"); $view->content = new View("admin_embedlinks.html"); @@ -83,7 +88,11 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { // Make an array for the different methods of displaying the links. $linkDisplays["InPageLinks"] = array(t("Show Links In The Actual Page"), module::get_var("embedlinks", "InPageLinks")); - + + // Make an array for the different methods of displaying the links. + $linkDisplays["InPageLinks"] = array(t("Show Links In The Actual Page"), module::get_var("embedlinks", "InPageLinks")); + $linkDisplays["ToolbarLinks"] = array(t("Display toolbar image for HTML/BBCode/URLs links"), module::get_var("embedlinks", "ToolbarLinks")); + // Setup a few checkboxes on the form. $add_links = $form->group("EmbedLinks"); $add_links->checklist("LinkCodeTypeOptions") @@ -97,4 +106,4 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { // Return the newly generated form. return $form; } -} \ No newline at end of file +} diff --git a/3.0/modules/embedlinks/controllers/embedlinks.php b/3.0/modules/embedlinks/controllers/embedlinks.php index 53db22a1..5a7b70cb 100644 --- a/3.0/modules/embedlinks/controllers/embedlinks.php +++ b/3.0/modules/embedlinks/controllers/embedlinks.php @@ -18,9 +18,15 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class EmbedLinks_Controller extends Controller { - /** - * Display the EXIF data for an item. - */ + public function showlinks($item_id) { + // Generate the Dialog Box for all HTML/BBCode/URLs available for $item. + $item = ORM::factory("item", $item_id); + access::required("view", $item); + $view = new View("embedlinks_alllinksdialog.html"); + $view->item_id = $item_id; + print $view; + } + public function showhtml($item_id) { // Generate the Dialog Box for HTML links. $item = ORM::factory("item", $item_id); @@ -31,21 +37,46 @@ class EmbedLinks_Controller extends Controller { $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkTitles[0] = array("Link To This Album:", 2); - + // If the item is a movie, don't display resize links, do display an embed link. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkTitles[0] = array("Link To This Page:", 2); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { $linkArray[2] = array("Text:", "file_url(true) . "">Click Here"); $linkArray[3] = array("Thumbnail:", "file_url(true) . "">thumb_url(true) . "">"); - $linkArray[4] = array("Embed:", "width . "" height="" . $item->height . "" data="" . url::abs_file("lib/flowplayer.swf") . "" type="application/x-shockwave-flash">"); - $linkTitles[1] = array("Link To The Video File:", 3); + + // Figure out what the path of the .flv file is. + $str_movie_path = $item->file_url(true); + if (module::is_active("videos")) { + $items_video = ORM::factory("items_video") + ->where("item_id", "=", $item->id) + ->find(); + if ($items_video->loaded()) { + if (file_exists($item->resize_path() . ".flv")) { + $str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true)); + } else { + $str_movie_path = ""; + } + } + } + + if ($str_movie_path != "") { + $linkArray[4] = array("Embed:", "width . "" height="" . $item->height . "">width . + "" height="" . $item->height . "" src="" . url::abs_file("lib/flowplayer.swf") . "" flashvars=" . + "'config={"clip":"" . $str_movie_path . ""}'/>"); + $linkTitles[1] = array("Link To The Video File:", 3); + } else { + $linkTitles[1] = array("Link To The Video File:", 2); + } } // Or else assume the item is a photo. @@ -61,7 +92,7 @@ class EmbedLinks_Controller extends Controller { $linkArray[4] = array("Thumbnail:", "resize_url(true) . "">thumb_url(true) . "">"); $linkArray[5] = array("Image:", "resize_url(true) . "">"); $linkTitles[1] = array("Link To The Resized Image:", 3); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { @@ -71,7 +102,7 @@ class EmbedLinks_Controller extends Controller { $linkTitles[2] = array("Link To The Full Size Image:", 3); } } - + $view = new View("embedlinks_htmldialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; @@ -80,22 +111,22 @@ class EmbedLinks_Controller extends Controller { public function showbbcode($item_id) { // Generate the Dialog Box for BBCode links. - $item = ORM::factory("item", $item_id); + $item = ORM::factory("item", $item_id); access::required("view", $item); - + // If the current page is an album, only display two links. if ($item->is_album()) { $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Album:", 2); - + // If the item is a movie, don't display resize links. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Page:", 2); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { @@ -103,7 +134,7 @@ class EmbedLinks_Controller extends Controller { $linkArray[3] = array("Thumbnail:", "[url=" . $item->file_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[1] = array("Link To The Video File:", 2); } - + // Or else assume the item is a photo. } else { // Link to the current page. @@ -117,7 +148,7 @@ class EmbedLinks_Controller extends Controller { $linkArray[4] = array("Thumbnail:", "[url=" . $item->resize_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkArray[5] = array("Image:", "[img]" . $item->resize_url(true) . "[/img]"); $linkTitles[1] = array("Link To The Resized Image:", 3); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { @@ -127,7 +158,7 @@ class EmbedLinks_Controller extends Controller { $linkTitles[2] = array("Link To The Full Size Image:", 3); } } - + $view = new View("embedlinks_bbcodedialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; @@ -136,9 +167,9 @@ class EmbedLinks_Controller extends Controller { public function showfullurl($item_id) { // Generate the Dialog Box for the URLs to the items thumb, resize and fullsize image. - $item = ORM::factory("item", $item_id); + $item = ORM::factory("item", $item_id); access::required("view", $item); - + // If the current page is an album, only display a URL and thumnail fields. if ($item->is_album()) { $linkArray[0] = array("Album URL:", url::abs_site("{$item->type}s/{$item->id}")); @@ -150,7 +181,7 @@ class EmbedLinks_Controller extends Controller { // Link to the current page. $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display its URL. if (access::can("view_full", $item)) { @@ -159,14 +190,14 @@ class EmbedLinks_Controller extends Controller { } else { $linkTitles[0] = array("URLs:", 2); } - + // Or else assume the item is a photo. } else { // Link to the current page. $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); $linkArray[2] = array("Resized:", $item->resize_url(true)); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display its URL. if (access::can("view_full", $item)) { @@ -176,11 +207,10 @@ class EmbedLinks_Controller extends Controller { $linkTitles[0] = array("URLs:", 3); } } - + $view = new View("embedlinks_fullurldialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; print $view; } - } diff --git a/3.0/modules/embedlinks/css/embedlinks_menu.css b/3.0/modules/embedlinks/css/embedlinks_menu.css new file mode 100644 index 00000000..6a4af408 --- /dev/null +++ b/3.0/modules/embedlinks/css/embedlinks_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-embedlinks-link { + background-image: url('../images/ico-view-embedlinks.png'); +} diff --git a/3.0/modules/embedlinks/helpers/embedlinks_block.php b/3.0/modules/embedlinks/helpers/embedlinks_block.php index 0985007e..4f35280d 100644 --- a/3.0/modules/embedlinks/helpers/embedlinks_block.php +++ b/3.0/modules/embedlinks/helpers/embedlinks_block.php @@ -47,7 +47,7 @@ class embedlinks_block_Core { $block->title = t("Links"); $block->content = new View("embedlinks_album_block.html"); } - break; + break; } return $block; diff --git a/3.0/modules/embedlinks/helpers/embedlinks_event.php b/3.0/modules/embedlinks/helpers/embedlinks_event.php index 69699a09..bafe383d 100644 --- a/3.0/modules/embedlinks/helpers/embedlinks_event.php +++ b/3.0/modules/embedlinks/helpers/embedlinks_event.php @@ -25,4 +25,43 @@ class embedlinks_event_Core { ->label(t("EmbedLinks")) ->url(url::site("admin/embedlinks"))); } + + static function album_menu($menu, $theme) { + // Display embedlinks toolbar icon, if the corresponding setting is enabled. + if (module::get_var("embedlinks", "ToolbarLinks") == true) { + $menu + ->append(Menu::factory("link") + ->id("embedlinks") + ->label(t("Link to this page")) + ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) + ->css_class("g-dialog-link") + ->css_id("g-embedlinks-link")); + } + } + + static function photo_menu($menu, $theme) { + // Display embedlinks toolbar icon, if the corresponding setting is enabled. + if (module::get_var("embedlinks", "ToolbarLinks") == true) { + $menu + ->append(Menu::factory("link") + ->id("embedlinks") + ->label(t("Link to this page")) + ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) + ->css_class("g-dialog-link") + ->css_id("g-embedlinks-link")); + } + } + + static function movie_menu($menu, $theme) { + // Display embedlinks toolbar icon, if the corresponding setting is enabled. + if (module::get_var("embedlinks", "ToolbarLinks") == true) { + $menu + ->append(Menu::factory("link") + ->id("embedlinks") + ->label(t("Link to this page")) + ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) + ->css_class("g-dialog-link") + ->css_id("g-embedlinks-link")); + } + } } diff --git a/3.0/modules/embedlinks/helpers/embedlinks_installer.php b/3.0/modules/embedlinks/helpers/embedlinks_installer.php new file mode 100644 index 00000000..3e98d59a --- /dev/null +++ b/3.0/modules/embedlinks/helpers/embedlinks_installer.php @@ -0,0 +1,42 @@ +css("embedlinks_menu.css"); + } + static function photo_bottom($theme) { // If the current item is a photo and displaying "In Page" links // is enabled, then insert HTML/BBCode links into the bottom diff --git a/3.0/modules/embedlinks/images/ico-view-embedlinks.png b/3.0/modules/embedlinks/images/ico-view-embedlinks.png new file mode 100644 index 00000000..c5a66dd8 Binary files /dev/null and b/3.0/modules/embedlinks/images/ico-view-embedlinks.png differ diff --git a/3.0/modules/embedlinks/module.info b/3.0/modules/embedlinks/module.info index c5eeb06b..e6b7f8bf 100644 --- a/3.0/modules/embedlinks/module.info +++ b/3.0/modules/embedlinks/module.info @@ -1,7 +1,7 @@ name = "EmbedLinks" description = "Display BBCode and HTML code to embed links to albums/images into other web pages." -version = 1 -author_name = "" -author_url = "" +version = 2 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:embedlinks" -discuss_url = "http://gallery.menalto.com/forum_module_embedlinks" +discuss_url = "http://gallery.menalto.com/node/88322" diff --git a/3.0/modules/embedlinks/views/embedlinks_alllinksdialog.html.php b/3.0/modules/embedlinks/views/embedlinks_alllinksdialog.html.php new file mode 100644 index 00000000..a1cd4035 --- /dev/null +++ b/3.0/modules/embedlinks/views/embedlinks_alllinksdialog.html.php @@ -0,0 +1,14 @@ + + +

+
+ +
diff --git a/3.0/modules/embedlinks/views/embedlinks_photo_block.html.php b/3.0/modules/embedlinks/views/embedlinks_photo_block.html.php index 97bb51c0..19d67596 100644 --- a/3.0/modules/embedlinks/views/embedlinks_photo_block.html.php +++ b/3.0/modules/embedlinks/views/embedlinks_photo_block.html.php @@ -57,10 +57,27 @@ input[type="text"] { is_movie()) { ?> - - - " type="application/x-shockwave-flash">" />" onclick="this.focus(); this.select();" readonly> - + file_url(true); + if (module::is_active("videos")) { + $items_video = ORM::factory("items_video") + ->where("item_id", "=", $item->id) + ->find(); + if ($items_video->loaded()) { + if (file_exists($item->resize_path() . ".flv")) { + $str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true)); + } else { + $str_movie_path = ""; + } + } + } + ?> + + + + " />width ?>" height="height ?>" src="" flashvars='config={"clip":""}'/>" onclick="this.focus(); this.select();" readonly> + + @@ -198,4 +215,4 @@ input[type="text"] { - \ No newline at end of file + diff --git a/3.0/modules/embedlinks/views/embedlinks_sidebar.html.php b/3.0/modules/embedlinks/views/embedlinks_sidebar.html.php index 21d8b7f3..0991382a 100644 --- a/3.0/modules/embedlinks/views/embedlinks_sidebar.html.php +++ b/3.0/modules/embedlinks/views/embedlinks_sidebar.html.php @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/3.0/modules/itemchecksum/module.info b/3.0/modules/itemchecksum/module.info index aa657bf9..d56f7b20 100644 --- a/3.0/modules/itemchecksum/module.info +++ b/3.0/modules/itemchecksum/module.info @@ -1,7 +1,7 @@ name = "ItemChecksum" description = "Display's a photo or video's MD5 and SHA-1 checksum." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:itemchecksum" -discuss_url = "http://gallery.menalto.com/forum_module_itemchecksum" +discuss_url = "http://gallery.menalto.com/node/90270" diff --git a/3.0/modules/language_flags/module.info b/3.0/modules/language_flags/module.info index 56fa94ab..d0ce676b 100644 --- a/3.0/modules/language_flags/module.info +++ b/3.0/modules/language_flags/module.info @@ -1,7 +1,7 @@ name = "Language Flags" description = "Replaces the language selection drop-down box with clickable flags." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:language_flags" -discuss_url = "http://gallery.menalto.com/forum_module_language_flags" +discuss_url = "http://gallery.menalto.com/node/94647" diff --git a/3.0/modules/nobots/module.info b/3.0/modules/nobots/module.info index 5a46e980..74f9bb3c 100644 --- a/3.0/modules/nobots/module.info +++ b/3.0/modules/nobots/module.info @@ -1,7 +1,7 @@ name = "NoBots" description = "Block web crawlers from indexing your Gallery." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:nobots" -discuss_url = "http://gallery.menalto.com/forum_module_nobots" +discuss_url = "http://gallery.menalto.com/node/88451" diff --git a/3.0/modules/tag_cloud_page/module.info b/3.0/modules/tag_cloud_page/module.info index aebb40cb..be9f6594 100644 --- a/3.0/modules/tag_cloud_page/module.info +++ b/3.0/modules/tag_cloud_page/module.info @@ -1,7 +1,7 @@ name = "Tag Cloud Page" description = "Displays a tag cloud of all tags used in the Gallery on a seperate page." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:tag_cloud_page" -discuss_url = "http://gallery.menalto.com/forum_module_tag_cloud_page" +discuss_url = "http://gallery.menalto.com/node/101279" diff --git a/3.0/modules/videodimensions/module.info b/3.0/modules/videodimensions/module.info index 3a8c101f..df1acc3d 100644 --- a/3.0/modules/videodimensions/module.info +++ b/3.0/modules/videodimensions/module.info @@ -1,7 +1,7 @@ name = "VideoDimensions" description = "Manually edit the dimensions of a video." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:videodimensions" -discuss_url = "http://gallery.menalto.com/forum_module_videodimensions" +discuss_url = "http://gallery.menalto.com/node/90069" diff --git a/3.1/modules/batchtag/module.info b/3.1/modules/batchtag/module.info index 56e8691e..c1380ad4 100644 --- a/3.1/modules/batchtag/module.info +++ b/3.1/modules/batchtag/module.info @@ -1,7 +1,7 @@ name = "BatchTag" description = "Automatically apply a tag to the entire contents of an album." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:batchtag" -discuss_url = "http://gallery.menalto.com/forum_module_batchtag" +discuss_url = "http://gallery.menalto.com/node/101076" diff --git a/3.1/modules/calendarview/module.info b/3.1/modules/calendarview/module.info index 761eadab..f51f1625 100644 --- a/3.1/modules/calendarview/module.info +++ b/3.1/modules/calendarview/module.info @@ -1,7 +1,7 @@ name = "CalendarView" description = "View your photos by the date they were taken." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:calendarview" -discuss_url = "http://gallery.menalto.com/forum_module_calendarview" +discuss_url = "http://gallery.menalto.com/node/92405" diff --git a/3.1/modules/database_info/module.info b/3.1/modules/database_info/module.info index 536a4cab..8cc35d27 100644 --- a/3.1/modules/database_info/module.info +++ b/3.1/modules/database_info/module.info @@ -1,7 +1,7 @@ name = "Database Info" description = "View information about your Gallery 3 database on the admin dashboard." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:database_info" -discuss_url = "http://gallery.menalto.com/forum_module_database_info" +discuss_url = "http://gallery.menalto.com/node/95320" diff --git a/3.1/modules/displaytags/module.info b/3.1/modules/displaytags/module.info index 9765b7e1..20fba34b 100644 --- a/3.1/modules/displaytags/module.info +++ b/3.1/modules/displaytags/module.info @@ -1,7 +1,7 @@ name = "DisplayTags" description = "Display all tags for the current photo/album." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:displaytags" -discuss_url = "http://gallery.menalto.com/forum_module_displaytags" +discuss_url = "http://gallery.menalto.com/node/89093" diff --git a/3.1/modules/downloadfullsize/module.info b/3.1/modules/downloadfullsize/module.info index 078371a9..b2cc3915 100644 --- a/3.1/modules/downloadfullsize/module.info +++ b/3.1/modules/downloadfullsize/module.info @@ -1,7 +1,7 @@ name = "DownloadFullsize" description = "Displays a link to download the fullsize version of the current photo." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:downloadfullsize" -discuss_url = "http://gallery.menalto.com/forum_module_downloadfullsize" +discuss_url = "http://gallery.menalto.com/node/103278" diff --git a/3.1/modules/editcreation/module.info b/3.1/modules/editcreation/module.info index fef83519..926f9485 100755 --- a/3.1/modules/editcreation/module.info +++ b/3.1/modules/editcreation/module.info @@ -1,7 +1,7 @@ name = "Edit Creation" description = "Manually edit the creation date of an item in Gallery." version = 2 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:editcreation" -discuss_url = "http://gallery.menalto.com/forum_module_editcreation" +discuss_url = "http://gallery.menalto.com/node/90667" diff --git a/3.1/modules/embedlinks/controllers/admin_embedlinks.php b/3.1/modules/embedlinks/controllers/admin_embedlinks.php index f25f97e8..89d98dcd 100644 --- a/3.1/modules/embedlinks/controllers/admin_embedlinks.php +++ b/3.1/modules/embedlinks/controllers/admin_embedlinks.php @@ -39,7 +39,8 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { $BBCodeButton = false; $FullURLButton = false; $InPageLinks = false; - + $ToolbarLinks = false; + for ($i = 0; $i < count($linkOpts_array); $i++) { if ($linkOpts_array[$i] == "HTMLCode") { $HTMLButton = true; @@ -55,15 +56,19 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { if ($displayType_array[$i] == "InPageLinks") { $InPageLinks = true; } + if ($displayType_array[$i] == "ToolbarLinks") { + $ToolbarLinks = true; + } } - + // Save Settings. module::set_var("embedlinks", "HTMLCode", $HTMLButton); module::set_var("embedlinks", "BBCode", $BBCodeButton); module::set_var("embedlinks", "FullURL", $FullURLButton); module::set_var("embedlinks", "InPageLinks", $InPageLinks); + module::set_var("embedlinks", "ToolbarLinks", $ToolbarLinks); message::success(t("Your Selection Has Been Saved.")); - + // Load Admin page. $view = new Admin_View("admin.html"); $view->content = new View("admin_embedlinks.html"); @@ -83,7 +88,11 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { // Make an array for the different methods of displaying the links. $linkDisplays["InPageLinks"] = array(t("Show Links In The Actual Page"), module::get_var("embedlinks", "InPageLinks")); - + + // Make an array for the different methods of displaying the links. + $linkDisplays["InPageLinks"] = array(t("Show Links In The Actual Page"), module::get_var("embedlinks", "InPageLinks")); + $linkDisplays["ToolbarLinks"] = array(t("Display toolbar image for HTML/BBCode/URLs links"), module::get_var("embedlinks", "ToolbarLinks")); + // Setup a few checkboxes on the form. $add_links = $form->group("EmbedLinks"); $add_links->checklist("LinkCodeTypeOptions") @@ -97,4 +106,4 @@ class Admin_EmbedLinks_Controller extends Admin_Controller { // Return the newly generated form. return $form; } -} \ No newline at end of file +} diff --git a/3.1/modules/embedlinks/controllers/embedlinks.php b/3.1/modules/embedlinks/controllers/embedlinks.php index 53db22a1..5a7b70cb 100644 --- a/3.1/modules/embedlinks/controllers/embedlinks.php +++ b/3.1/modules/embedlinks/controllers/embedlinks.php @@ -18,9 +18,15 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class EmbedLinks_Controller extends Controller { - /** - * Display the EXIF data for an item. - */ + public function showlinks($item_id) { + // Generate the Dialog Box for all HTML/BBCode/URLs available for $item. + $item = ORM::factory("item", $item_id); + access::required("view", $item); + $view = new View("embedlinks_alllinksdialog.html"); + $view->item_id = $item_id; + print $view; + } + public function showhtml($item_id) { // Generate the Dialog Box for HTML links. $item = ORM::factory("item", $item_id); @@ -31,21 +37,46 @@ class EmbedLinks_Controller extends Controller { $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkTitles[0] = array("Link To This Album:", 2); - + // If the item is a movie, don't display resize links, do display an embed link. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkTitles[0] = array("Link To This Page:", 2); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { $linkArray[2] = array("Text:", "file_url(true) . "">Click Here"); $linkArray[3] = array("Thumbnail:", "file_url(true) . "">thumb_url(true) . "">"); - $linkArray[4] = array("Embed:", "width . "" height="" . $item->height . "" data="" . url::abs_file("lib/flowplayer.swf") . "" type="application/x-shockwave-flash">"); - $linkTitles[1] = array("Link To The Video File:", 3); + + // Figure out what the path of the .flv file is. + $str_movie_path = $item->file_url(true); + if (module::is_active("videos")) { + $items_video = ORM::factory("items_video") + ->where("item_id", "=", $item->id) + ->find(); + if ($items_video->loaded()) { + if (file_exists($item->resize_path() . ".flv")) { + $str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true)); + } else { + $str_movie_path = ""; + } + } + } + + if ($str_movie_path != "") { + $linkArray[4] = array("Embed:", "width . "" height="" . $item->height . "">width . + "" height="" . $item->height . "" src="" . url::abs_file("lib/flowplayer.swf") . "" flashvars=" . + "'config={"clip":"" . $str_movie_path . ""}'/>"); + $linkTitles[1] = array("Link To The Video File:", 3); + } else { + $linkTitles[1] = array("Link To The Video File:", 2); + } } // Or else assume the item is a photo. @@ -61,7 +92,7 @@ class EmbedLinks_Controller extends Controller { $linkArray[4] = array("Thumbnail:", "resize_url(true) . "">thumb_url(true) . "">"); $linkArray[5] = array("Image:", "resize_url(true) . "">"); $linkTitles[1] = array("Link To The Resized Image:", 3); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { @@ -71,7 +102,7 @@ class EmbedLinks_Controller extends Controller { $linkTitles[2] = array("Link To The Full Size Image:", 3); } } - + $view = new View("embedlinks_htmldialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; @@ -80,22 +111,22 @@ class EmbedLinks_Controller extends Controller { public function showbbcode($item_id) { // Generate the Dialog Box for BBCode links. - $item = ORM::factory("item", $item_id); + $item = ORM::factory("item", $item_id); access::required("view", $item); - + // If the current page is an album, only display two links. if ($item->is_album()) { $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Album:", 2); - + // If the item is a movie, don't display resize links. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Page:", 2); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { @@ -103,7 +134,7 @@ class EmbedLinks_Controller extends Controller { $linkArray[3] = array("Thumbnail:", "[url=" . $item->file_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[1] = array("Link To The Video File:", 2); } - + // Or else assume the item is a photo. } else { // Link to the current page. @@ -117,7 +148,7 @@ class EmbedLinks_Controller extends Controller { $linkArray[4] = array("Thumbnail:", "[url=" . $item->resize_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkArray[5] = array("Image:", "[img]" . $item->resize_url(true) . "[/img]"); $linkTitles[1] = array("Link To The Resized Image:", 3); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { @@ -127,7 +158,7 @@ class EmbedLinks_Controller extends Controller { $linkTitles[2] = array("Link To The Full Size Image:", 3); } } - + $view = new View("embedlinks_bbcodedialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; @@ -136,9 +167,9 @@ class EmbedLinks_Controller extends Controller { public function showfullurl($item_id) { // Generate the Dialog Box for the URLs to the items thumb, resize and fullsize image. - $item = ORM::factory("item", $item_id); + $item = ORM::factory("item", $item_id); access::required("view", $item); - + // If the current page is an album, only display a URL and thumnail fields. if ($item->is_album()) { $linkArray[0] = array("Album URL:", url::abs_site("{$item->type}s/{$item->id}")); @@ -150,7 +181,7 @@ class EmbedLinks_Controller extends Controller { // Link to the current page. $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display its URL. if (access::can("view_full", $item)) { @@ -159,14 +190,14 @@ class EmbedLinks_Controller extends Controller { } else { $linkTitles[0] = array("URLs:", 2); } - + // Or else assume the item is a photo. } else { // Link to the current page. $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); $linkArray[2] = array("Resized:", $item->resize_url(true)); - + // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display its URL. if (access::can("view_full", $item)) { @@ -176,11 +207,10 @@ class EmbedLinks_Controller extends Controller { $linkTitles[0] = array("URLs:", 3); } } - + $view = new View("embedlinks_fullurldialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; print $view; } - } diff --git a/3.1/modules/embedlinks/css/embedlinks_menu.css b/3.1/modules/embedlinks/css/embedlinks_menu.css new file mode 100644 index 00000000..6a4af408 --- /dev/null +++ b/3.1/modules/embedlinks/css/embedlinks_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-embedlinks-link { + background-image: url('../images/ico-view-embedlinks.png'); +} diff --git a/3.1/modules/embedlinks/helpers/embedlinks_block.php b/3.1/modules/embedlinks/helpers/embedlinks_block.php index 0985007e..4f35280d 100644 --- a/3.1/modules/embedlinks/helpers/embedlinks_block.php +++ b/3.1/modules/embedlinks/helpers/embedlinks_block.php @@ -47,7 +47,7 @@ class embedlinks_block_Core { $block->title = t("Links"); $block->content = new View("embedlinks_album_block.html"); } - break; + break; } return $block; diff --git a/3.1/modules/embedlinks/helpers/embedlinks_event.php b/3.1/modules/embedlinks/helpers/embedlinks_event.php index 69699a09..bafe383d 100644 --- a/3.1/modules/embedlinks/helpers/embedlinks_event.php +++ b/3.1/modules/embedlinks/helpers/embedlinks_event.php @@ -25,4 +25,43 @@ class embedlinks_event_Core { ->label(t("EmbedLinks")) ->url(url::site("admin/embedlinks"))); } + + static function album_menu($menu, $theme) { + // Display embedlinks toolbar icon, if the corresponding setting is enabled. + if (module::get_var("embedlinks", "ToolbarLinks") == true) { + $menu + ->append(Menu::factory("link") + ->id("embedlinks") + ->label(t("Link to this page")) + ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) + ->css_class("g-dialog-link") + ->css_id("g-embedlinks-link")); + } + } + + static function photo_menu($menu, $theme) { + // Display embedlinks toolbar icon, if the corresponding setting is enabled. + if (module::get_var("embedlinks", "ToolbarLinks") == true) { + $menu + ->append(Menu::factory("link") + ->id("embedlinks") + ->label(t("Link to this page")) + ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) + ->css_class("g-dialog-link") + ->css_id("g-embedlinks-link")); + } + } + + static function movie_menu($menu, $theme) { + // Display embedlinks toolbar icon, if the corresponding setting is enabled. + if (module::get_var("embedlinks", "ToolbarLinks") == true) { + $menu + ->append(Menu::factory("link") + ->id("embedlinks") + ->label(t("Link to this page")) + ->url(url::site("embedlinks/showlinks/" . $theme->item()->id)) + ->css_class("g-dialog-link") + ->css_id("g-embedlinks-link")); + } + } } diff --git a/3.1/modules/embedlinks/helpers/embedlinks_installer.php b/3.1/modules/embedlinks/helpers/embedlinks_installer.php new file mode 100644 index 00000000..3e98d59a --- /dev/null +++ b/3.1/modules/embedlinks/helpers/embedlinks_installer.php @@ -0,0 +1,42 @@ +css("embedlinks_menu.css"); + } + static function photo_bottom($theme) { // If the current item is a photo and displaying "In Page" links // is enabled, then insert HTML/BBCode links into the bottom diff --git a/3.1/modules/embedlinks/images/ico-view-embedlinks.png b/3.1/modules/embedlinks/images/ico-view-embedlinks.png new file mode 100644 index 00000000..c5a66dd8 Binary files /dev/null and b/3.1/modules/embedlinks/images/ico-view-embedlinks.png differ diff --git a/3.1/modules/embedlinks/module.info b/3.1/modules/embedlinks/module.info index c5eeb06b..e6b7f8bf 100644 --- a/3.1/modules/embedlinks/module.info +++ b/3.1/modules/embedlinks/module.info @@ -1,7 +1,7 @@ name = "EmbedLinks" description = "Display BBCode and HTML code to embed links to albums/images into other web pages." -version = 1 -author_name = "" -author_url = "" +version = 2 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:embedlinks" -discuss_url = "http://gallery.menalto.com/forum_module_embedlinks" +discuss_url = "http://gallery.menalto.com/node/88322" diff --git a/3.1/modules/embedlinks/views/embedlinks_alllinksdialog.html.php b/3.1/modules/embedlinks/views/embedlinks_alllinksdialog.html.php new file mode 100644 index 00000000..a1cd4035 --- /dev/null +++ b/3.1/modules/embedlinks/views/embedlinks_alllinksdialog.html.php @@ -0,0 +1,14 @@ + + +

+
+ +
diff --git a/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php b/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php index 97bb51c0..19d67596 100644 --- a/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php +++ b/3.1/modules/embedlinks/views/embedlinks_photo_block.html.php @@ -57,10 +57,27 @@ input[type="text"] { is_movie()) { ?> - - - " type="application/x-shockwave-flash">" />" onclick="this.focus(); this.select();" readonly> - + file_url(true); + if (module::is_active("videos")) { + $items_video = ORM::factory("items_video") + ->where("item_id", "=", $item->id) + ->find(); + if ($items_video->loaded()) { + if (file_exists($item->resize_path() . ".flv")) { + $str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true)); + } else { + $str_movie_path = ""; + } + } + } + ?> + + + + " />width ?>" height="height ?>" src="" flashvars='config={"clip":""}'/>" onclick="this.focus(); this.select();" readonly> + + @@ -198,4 +215,4 @@ input[type="text"] { - \ No newline at end of file + diff --git a/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php b/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php index 21d8b7f3..0991382a 100644 --- a/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php +++ b/3.1/modules/embedlinks/views/embedlinks_sidebar.html.php @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/3.1/modules/itemchecksum/module.info b/3.1/modules/itemchecksum/module.info index aa657bf9..d56f7b20 100644 --- a/3.1/modules/itemchecksum/module.info +++ b/3.1/modules/itemchecksum/module.info @@ -1,7 +1,7 @@ name = "ItemChecksum" description = "Display's a photo or video's MD5 and SHA-1 checksum." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:itemchecksum" -discuss_url = "http://gallery.menalto.com/forum_module_itemchecksum" +discuss_url = "http://gallery.menalto.com/node/90270" diff --git a/3.1/modules/language_flags/module.info b/3.1/modules/language_flags/module.info index 56fa94ab..d0ce676b 100644 --- a/3.1/modules/language_flags/module.info +++ b/3.1/modules/language_flags/module.info @@ -1,7 +1,7 @@ name = "Language Flags" description = "Replaces the language selection drop-down box with clickable flags." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:language_flags" -discuss_url = "http://gallery.menalto.com/forum_module_language_flags" +discuss_url = "http://gallery.menalto.com/node/94647" diff --git a/3.1/modules/nobots/module.info b/3.1/modules/nobots/module.info index 5a46e980..74f9bb3c 100644 --- a/3.1/modules/nobots/module.info +++ b/3.1/modules/nobots/module.info @@ -1,7 +1,7 @@ name = "NoBots" description = "Block web crawlers from indexing your Gallery." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:nobots" -discuss_url = "http://gallery.menalto.com/forum_module_nobots" +discuss_url = "http://gallery.menalto.com/node/88451" diff --git a/3.1/modules/tag_cloud_page/module.info b/3.1/modules/tag_cloud_page/module.info index aebb40cb..be9f6594 100644 --- a/3.1/modules/tag_cloud_page/module.info +++ b/3.1/modules/tag_cloud_page/module.info @@ -1,7 +1,7 @@ name = "Tag Cloud Page" description = "Displays a tag cloud of all tags used in the Gallery on a seperate page." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:tag_cloud_page" -discuss_url = "http://gallery.menalto.com/forum_module_tag_cloud_page" +discuss_url = "http://gallery.menalto.com/node/101279" diff --git a/3.1/modules/videodimensions/module.info b/3.1/modules/videodimensions/module.info index 3a8c101f..df1acc3d 100644 --- a/3.1/modules/videodimensions/module.info +++ b/3.1/modules/videodimensions/module.info @@ -1,7 +1,7 @@ name = "VideoDimensions" description = "Manually edit the dimensions of a video." version = 1 -author_name = "" -author_url = "" +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" info_url = "http://codex.gallery2.org/Gallery3:Modules:videodimensions" -discuss_url = "http://gallery.menalto.com/forum_module_videodimensions" +discuss_url = "http://gallery.menalto.com/node/90069"