The following tweak changes how attachment details (eg, name, size, dimensions, etc) are displayed so that they use less horizontal space (similar to Inline Attachments). This tweak also removes the 'downloaded/viewed' detail (seems a bit redundant for a PM attachment) and adds support for the Highslide viewer if it is installed.
In ./Themes/default/PersonalMessage.template.php
Find:
foreach ($message['attachment'] as $attachment)
{
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" /> ' . $attachment['name'] . '</a> ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}
Replace With:
foreach ($message['attachment'] as $attachment)
{
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'] . (function_exists('highslide_images') ? '" class="highslide" rel="highslide"' : '" onclick="' . $attachment['thumbnail']['javascript']) . '"><img src="', $attachment['thumbnail']['href'], '" alt="' , $attachment['name'] , '" id="thumb_', $attachment['id'], '" border="0" /></a><br />' . ($attachment['is_image'] && function_exists('highslide_images') ? '<div class="highslide-heading">' . $message['subject'] . '</div>' : '');
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" /> ' . $attachment['name'] . '</a>
<div style="padding-left:1.0em; margin-top:-0.5em;">(', $attachment['size'] . ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] : '') . ')</div>';
}
The attached images show the layout changes and the Highslide viewer working.