diff options
Diffstat (limited to 'mod/embed/views/default')
-rw-r--r-- | mod/embed/views/default/embed/embed.php | 3 | ||||
-rw-r--r-- | mod/embed/views/default/embed/item/gallery.php | 5 | ||||
-rw-r--r-- | mod/embed/views/default/embed/item/list.php | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php index 68c7cd5f5..e90d28005 100644 --- a/mod/embed/views/default/embed/embed.php +++ b/mod/embed/views/default/embed/embed.php @@ -95,7 +95,8 @@ if (!$sections) { 'section' => $active_section, 'item' => $item, 'ecml_enabled' => $ecml_enabled, - 'ecml_keyword' => ($ecml_valid_keyword) ? $active_section : 'entity' + 'ecml_keyword' => ($ecml_valid_keyword) ? $active_section : 'entity', + 'icon_size' => elgg_get_array_value('icon_size', $section_info, 'tiny'), ); $items_content .= elgg_view($view, $item_params); diff --git a/mod/embed/views/default/embed/item/gallery.php b/mod/embed/views/default/embed/item/gallery.php index a302412f6..09cab3cef 100644 --- a/mod/embed/views/default/embed/item/gallery.php +++ b/mod/embed/views/default/embed/item/gallery.php @@ -16,6 +16,7 @@ $item = $vars['item']; $section = $vars['section']; $target = $vars['target']; $ecml_keyword = (isset($vars['ecml_enabled']) && isset($vars['ecml_keyword'])) ? $vars['ecml_keyword'] : NULL; +$icon_size = $vars['icon_size']; // @todo add entity checking. @@ -31,7 +32,7 @@ if ($ecml_keyword) { $embed_code = "[$ecml_keyword guid={$item->getGUID()}]"; } else { // fallback to inserting a hard link to the object with its icon - $icon = "<img src=\"{$item->getIcon('medium')}\" />" . htmlentities($title, ENT_QUOTES, 'UTF-8'); + $icon = "<img src=\"{$item->getIcon($icon_size)}\" />" . htmlentities($title, ENT_QUOTES, 'UTF-8'); $embed_code = elgg_view('output/url', array( 'href' => $item->getURL(), @@ -41,7 +42,7 @@ if ($ecml_keyword) { )); } -$icon = "<img src=\"{$item->getIcon('medium')}\" />"; +$icon = "<img src=\"{$item->getIcon($icon_size)}\" />"; $info = htmlentities($title, ENT_QUOTES, 'UTF-8'); $listing = elgg_view('entities/gallery_listing', array('icon' => $icon, 'info' => $info)); diff --git a/mod/embed/views/default/embed/item/list.php b/mod/embed/views/default/embed/item/list.php index 259419df4..027d389bd 100644 --- a/mod/embed/views/default/embed/item/list.php +++ b/mod/embed/views/default/embed/item/list.php @@ -14,6 +14,7 @@ $item = $vars['item']; $section = $vars['section']; $target = $vars['target']; $ecml_keyword = (isset($vars['ecml_enabled']) && isset($vars['ecml_keyword'])) ? $vars['ecml_keyword'] : NULL; +$icon_size = $vars['icon_size']; // @todo add entity checking. @@ -29,7 +30,7 @@ if ($ecml_keyword) { $embed_code = "[$ecml_keyword guid={$item->getGUID()}]"; } else { // fallback to inserting a hard link to the object with its icon - $icon = "<img src=\"{$item->getIcon()}\" />" . htmlentities($title, ENT_QUOTES, 'UTF-8'); + $icon = "<img src=\"{$item->getIcon($icon_size)}\" />" . htmlentities($title, ENT_QUOTES, 'UTF-8'); $embed_code = elgg_view('output/url', array( 'href' => $item->getURL(), @@ -39,7 +40,7 @@ if ($ecml_keyword) { )); } -$icon = "<img src=\"{$item->getIcon('tiny')}\" />"; +$icon = "<img src=\"{$item->getIcon($icon_size)}\" />"; $info = htmlentities($title, ENT_QUOTES, 'UTF-8'); // @todo is this approach better than inline js? |