From a587ad4ed1867743ea9e698f98a156f4f763e86a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 3 Oct 2009 18:53:57 +0000 Subject: added plugin hook for image links - allows people to do creative things --- views/default/object/image.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'views/default/object/image.php') diff --git a/views/default/object/image.php b/views/default/object/image.php index ae652fdfd..01beb25f6 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -146,15 +146,24 @@
\"{$title}\""; + $image_link = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&view=inline&__elgg_token={$token}&__elgg_ts={$ts}"; + } + // 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 "\"{$title}\""; } else { + // no link for this image echo "\"{$title}\""; } - ?> + ?>