Custom View of Attachments

Started by Bugo, January 19, 2011, 10:19:22 PM

Previous topic - Next topic

Bugo

Link to Mod

This mod adds two new methods of placing of thumbnails under posts: in line (with names) and in line (w/o names).

Spoogs


lala1

great mod! thank you!

there is one little problem with the attachment positioning, see image

Bugo

#3
Try updated version.

aw06

Yesterday i see where this mod could work on 1.1.x ,, now i come to download and install it i see only 2.0 supported  :-\ can you please provide the edits for manual install on 1.1.13 please ...
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Bugo

Sorry, I don't want to support SMF 1.1.x anymore. But you can update your forum to SMF 2.0 RC5 ;)

aw06

Quote from: Bugo on February 12, 2011, 06:40:38 AM
Sorry, I don't want to support SMF 1.1.x anymore. But you can update your forum to SMF 2.0 RC5 ;)

Trust mi,... That is not an option right now or any time soon

All i need is the edits to install it .. it could be installed on 1.1.x up  to yesterday, i am sorry i never saved the edits in a notepad file or something ..

Please assist, i really need this installed on my 1.1.x forum ASAP

Could you perhaps send me that version [Although i downloaded it yesterday, just never had the time to install it] with instructions via pm .. or leave it on the mod site and mark as outdated..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

I managed to get it installed as i had downloaded the version for 1.1.x .. how do i get a space between the images like you have it in the example ?? My images are touching..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Bugo

Have you seen settings of this mod? Screenshot from SMF 2, although...
You can change a space between the images manually, with option "padding" (see CSS rules).

aw06

Quote from: Bugo on February 12, 2011, 10:28:54 AM
Have you seen settings of this mod? Screenshot from SMF 2, although...
You can change a space between the images manually, with option "padding" (see CSS rules).

in which css file do i add that rule ? and how ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Bugo

I think you have to read info about Firebug... at first.

aw06

Quote from: Bugo on February 12, 2011, 10:35:28 AM
I think you have to read info about Firebug... at first.

Ok, it pointed me to style.css in my theme .. where do i add the padding to put the space between the images ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Bugo


aw06

Quote from: Bugo on February 12, 2011, 11:23:02 AM
Use Firebug...

:( FireBug confusing me ... not really showing me how to do it
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

#14
Can i not add a hmtl space code [ ] or a padding somewhere in the code below ???

// Custom View of Attachments
if (!empty($modSettings['custom_view_attachments'])) {
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb']) {
// Begin
echo '', ($modSettings['custom_view_attachments'] != 0) ? '<div style="float: left; min-height: ' . ($modSettings['attachmentThumbHeight'] - 10) . 'px; padding-top: 0.1em">' : '';

// Highslide Image Viewer Installed?
if (function_exists('highslide_images'))
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" class="highslide" rel="highslide"><img src="', $attachment['thumbnail']['href'], '" alt="', $attachment['name'], '" id="thumb_', $attachment['id'], '"', ($modSettings['custom_view_attachments'] != 0) ? ' title="' . $attachment['size'] . ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' (' . $txt['custom_view_attachments_views'] . $attachment['downloads'] . ')' . '"' : '',' border="0" /></a><br /><div class="highslide-heading">', $context['subject'], '</div>';
// Simple Mode
else
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="' , ($context['user']['is_logged']) ? $attachment['thumbnail']['javascript'] : "alert('" . $txt['logintoviewimg'] . "'); return false;" , '"><img src="', $attachment['thumbnail']['href'], '" alt="', $attachment['name'], '" id="thumb_', $attachment['id'], '"', ($modSettings['custom_view_attachments'] != 0) ? ' title="'. $attachment['size']. ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' (' . $txt['custom_view_attachments_views'] . $attachment['downloads'] . ')' . '"' : '',' border="0" /></a>&nbsp;<br />';

}
else
echo '
<div style="float: left; padding-top: 0.1em"><img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';

if ($modSettings['custom_view_attachments'] != 2)
echo '
<img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;<a href="' . $attachment['href'] . '" title="' . $attachment['title'] . '">' . $attachment['name'] . '</a> ';
}
else
echo '
<div style="clear: both"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;<a href="' . $attachment['href'] . '" ' , ($context['user']['is_logged']) ? '' : 'onclick="alert(' . "'" . $txt['login2download'] . "'); return false; " . '"' , '>' . $attachment['name'] . '</a> ';

if ($attachment['is_image'] && ($modSettings['custom_view_attachments'] != 0))
echo '&nbsp;</div>';
else
echo '(' . $attachment['size'] . ' ~ ' . (!$attachment['is_image'] ? $txt['custom_view_attachments_downloads'] : $txt['custom_view_attachments_views']) . $attachment['downloads'] . ')</div>';
}
else {

{

if ($attachment['thumbnail']['has_thumb'])

echo '

<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" class="highslide" rel="highslide"><img src="', $attachment['thumbnail']['href'], '" alt="' , $attachment['name'] , '" id="thumb_', $attachment['id'], '" border="0" /></a><br /><div class="highslide-heading">' , $context['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" />&nbsp;' . $attachment['name'] . '</a> (' . $attachment['size'] . ' ~ ' . (!$attachment['is_image'] ? $txt['custom_view_attachments_downloads'] : $txt['custom_view_attachments_views']) . $attachment['downloads'] . ')<br />';} // Happy End ~ Custom View of Attachments

}



echo '

</div>';

}



echo '

</td>

</tr><tr>

<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">';
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

OK, this line seems to control what i want to edit ..

echo '', ($modSettings['custom_view_attachments'] != 0) ? '<div style="float: left; min-height: ' . ($modSettings['attachmentThumbHeight'] - 10) . 'px; padding-top: 0.5em">' : '';

When i add a right padding i can no longer adjust the top padding ... please advise..

My code looks like this

echo '', ($modSettings['custom_view_attachments'] != 0) ? '<div style="float: left; min-height: ' . ($modSettings['attachmentThumbHeight'] - 10) . 'px; padding-top: 0.5em' . 'px; padding-right: 1.5em">' : '';
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Bugo

Quote from: Bugo on February 12, 2011, 06:40:38 AM
Sorry, I don't want to support SMF 1.1.x anymore. But you can update your forum to SMF 2.0 RC5 ;)

aw06

This is really a shame .. if i had only come for supprt a few days earlier .. tsk tsk
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

lala1

Quote from: Bugo on January 23, 2011, 04:59:50 AM
Try updated version.

Tried. Something changed for sure. Can you crop a part of the thumbnail in order to make them all same size? It should display it better then.

Thanks,
lala

Bugo


Advertisement: