diff --git a/modules/embedlinks/helpers/embedlinks_block.php b/modules/embedlinks/helpers/embedlinks_block.php new file mode 100644 index 00000000..44539854 --- /dev/null +++ b/modules/embedlinks/helpers/embedlinks_block.php @@ -0,0 +1,55 @@ + t("Embed Links Dialog"), "embed_links_album" => t("Embed Links Album")); + } + + static function get($block_id, $theme) { + $block = ""; + + switch ($block_id) { + case "embed_links_dialog": + // If displaying links in a dialog box is enabled then + // insert buttons into the bottom of the side bar + // to open up the dialog window. + if (module::get_var("embedlinks", "DialogLinks") && $theme->item()) { + $block = new Block(); + $block->css_id = "g-embed-links-sidebar"; + $block->title = t("Link To This Page"); + $block->content = new View("embedlinks_sidebar.html"); + } + break; + + case "embed_links_album": + // If the current item is an album and if "In Page" links are enabled then + // display links to the current album in the theme sidebar. + if ($theme->item()->is_album() && module::get_var("embedlinks", "InPageLinks")) { + $block = new Block(); + $block->css_id = "g-embed-links-album-sidebar"; + $block->title = t("Links"); + $block->content = new View("embedlinks_album_block.html"); + } + break; + } + + return $block; + } +} diff --git a/modules/embedlinks/helpers/embedlinks_theme.php b/modules/embedlinks/helpers/embedlinks_theme.php index 251b7e5c..c6d9cf92 100644 --- a/modules/embedlinks/helpers/embedlinks_theme.php +++ b/modules/embedlinks/helpers/embedlinks_theme.php @@ -18,31 +18,6 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class embedlinks_theme_Core { - static function sidebar_blocks($theme) { - // If the current item is an album and if "In Page" links are enabled then - // display links to the current album in the theme sidebar. - if ($theme->item()->is_album() && module::get_var("embedlinks", "InPageLinks")) { - $block = new Block(); - $block->css_id = "g-metadata"; - $block->title = t("Links"); - $block->content = new View("embedlinks_album_block.html"); - return $block; - } - } - - static function sidebar_bottom($theme) { - // If displaying links in a dialog box is enabled then - // insert buttons into the bottom of the side bar - // to open up the dialog window. - if (module::get_var("embedlinks", "DialogLinks")) { - $block = new Block(); - $block->css_id = "g-metadata"; - $block->title = t("Link To This Page:"); - $block->content = new View("embedlinks_sidebar.html"); - return $block; - } - } - 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/modules/embedlinks/module.info b/modules/embedlinks/module.info index de716d1a..a2917bcd 100644 --- a/modules/embedlinks/module.info +++ b/modules/embedlinks/module.info @@ -1,3 +1,3 @@ -name = EmbedLinks -description = Display BBCode and HTML code to embed links to albums/images into other web pages. +name = "EmbedLinks" +description = "Display BBCode and HTML code to embed links to albums/images into other web pages." version = 1 diff --git a/modules/embedlinks/views/embedlinks_htmldialog.html.php b/modules/embedlinks/views/embedlinks_htmldialog.html.php index 5847e8cc..46537754 100644 --- a/modules/embedlinks/views/embedlinks_htmldialog.html.php +++ b/modules/embedlinks/views/embedlinks_htmldialog.html.php @@ -5,7 +5,7 @@ input[type="text"] { }

-
+