aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/viewalbum.php2
-rw-r--r--start.php2
-rw-r--r--views/default/object/image.php19
3 files changed, 10 insertions, 13 deletions
diff --git a/pages/viewalbum.php b/pages/viewalbum.php
index 9ebc31fae..050b124cb 100644
--- a/pages/viewalbum.php
+++ b/pages/viewalbum.php
@@ -33,7 +33,7 @@
}
// allow other plugins to override the slideshow
- $slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', $album, null);
+ $slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', array('album' => $album), null);
if ($slideshow_link) {
add_submenu_item(elgg_echo('album:slideshow'),
$slideshow_link,
diff --git a/start.php b/start.php
index f2732b3de..7b6e46805 100644
--- a/start.php
+++ b/start.php
@@ -401,7 +401,7 @@
* @param $hook - 'tidypics:slideshow'
* @param $entity_type - 'album'
* @param $returnvalue - if set, return because another plugin has used the hook
- * @param $params - album entity
+ * @param $params - arry containing album entity
* @return unknown_type
*/
function tidypics_slideshow($hook, $entity_type, $returnvalue, $params) {
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>