aboutsummaryrefslogtreecommitdiff
path: root/views/default/object
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-12-13 00:49:02 +0000
committerCash Costello <cash.costello@gmail.com>2009-12-13 00:49:02 +0000
commitb1f340a7041a92541b4e4220fa6c780f596dcc39 (patch)
tree701666f80aeae5daeed3025a4642088594cfc775 /views/default/object
parentf743d5a49af135d647243861b1c7e546f8b4c200 (diff)
downloadelgg-b1f340a7041a92541b4e4220fa6c780f596dcc39.tar.gz
elgg-b1f340a7041a92541b4e4220fa6c780f596dcc39.tar.bz2
improved the plugin hooks
Diffstat (limited to 'views/default/object')
-rw-r--r--views/default/object/image.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 02444eaad..ee81d800f 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -69,7 +69,7 @@
<?php
// plugins can override the image link to add lightbox code here
$image_html = false;
- $image_html = trigger_plugin_hook('tp_thumbnail_link', 'image', array('image' => $image), $image_html);
+ $image_html = trigger_plugin_hook('tp_thumbnail_link', 'album', array('image' => $image), $image_html);
if ($image_html) {
echo $image_html;
@@ -161,20 +161,17 @@
<div id="tidypics_image_wrapper">
<?php
// this code controls whether the photo is a hyperlink or not and what it links to
- $image_link = false;
if (get_plugin_setting('download_link', 'tidypics') != "disabled") {
// admin allows downloads so default to inline download link
- $image_link = $vars['url'] . "pg/photos/download/{$image_guid}/inline/";
- }
- // does any plugin want to override the link
- $image_link = trigger_plugin_hook('tp_image_link', 'image', $image, $image_link);
- // add link if set
- if ($image_link) {
- echo "<a href=\"{$image_link}\" title=\"{$title}\"><img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&amp;size=large\" alt=\"{$title}\" /></a>";
+ $image_html = "<a href=\"{$vars['url']}pg/photos/download/{$image_guid}/inline/\" title=\"{$title}\" >";
+ $image_html .= "<img id=\"tidypics_image\" src=\"{$vars['url']}pg/photos/thumbnail/{$image_guid}/large/\" alt=\"{$title}\" />";
+ $image_html .= "</a>";
} else {
- // no link for this image
- echo "<img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&amp;size=large\" alt=\"{$title}\" />";
+ $image_html = "<img id=\"tidypics_image\" src=\"{$vars['url']}pg/photos/thumbnail/{$image_guid}/large/\" alt=\"{$title}\" />";
}
+ // does any plugin want to override the link
+ $image_html = trigger_plugin_hook('tp_thumbnail_link', 'image', array('image' => $image), $image_html);
+ echo $image_html;
?>
<div class="clearfloat"></div>
</div>