Advertisement:

Author Topic: Custom View of Attachments  (Read 25980 times)

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Custom View of Attachments
« on: January 19, 2011, 10:19:22 PM »
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).

Offline Spoogs

  • SMF Hero
  • ******
  • Posts: 1,676
  • Gender: Male
Re: Custom View of Attachments
« Reply #1 on: January 19, 2011, 10:24:15 PM »
Nice  8)

Offline lala1

  • Semi-Newbie
  • *
  • Posts: 40
    • Zana Maseluta
Re: Custom View of Attachments
« Reply #2 on: January 23, 2011, 04:03:57 AM »
great mod! thank you!

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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #3 on: January 23, 2011, 04:59:50 AM »
Try updated version.
« Last Edit: January 24, 2011, 05:50:29 AM by Bugo »

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #4 on: February 12, 2011, 06:10:01 AM »
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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #5 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 ;)

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #6 on: February 12, 2011, 06:54:02 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

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #7 on: February 12, 2011, 10:17:31 AM »
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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #8 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).

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #9 on: February 12, 2011, 10:32:32 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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #10 on: February 12, 2011, 10:35:28 AM »
I think you have to read info about Firebug... at first.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #11 on: February 12, 2011, 10:44:18 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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #12 on: February 12, 2011, 11:23:02 AM »
Use Firebug...

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #13 on: February 12, 2011, 11:26:55 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

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #14 on: February 12, 2011, 11:33:20 AM »
Can i not add a hmtl space code [ ] or a padding somewhere in the code below ???

Code: [Select]
// 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'], '">';
« Last Edit: February 12, 2011, 12:19:48 PM by aw06 »
:: 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

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #15 on: February 12, 2011, 12:52:29 PM »
OK, this line seems to control what i want to edit ..

Code: [Select]
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

Code: [Select]
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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #16 on: February 12, 2011, 01:10:57 PM »
Sorry, I don't want to support SMF 1.1.x anymore. But you can update your forum to SMF 2.0 RC5 ;)

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Custom View of Attachments
« Reply #17 on: February 12, 2011, 01:17:45 PM »
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

Offline lala1

  • Semi-Newbie
  • *
  • Posts: 40
    • Zana Maseluta
Re: Custom View of Attachments
« Reply #18 on: February 15, 2011, 04:46:05 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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,580
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • My patreon page
Re: Custom View of Attachments
« Reply #19 on: February 15, 2011, 04:57:15 AM »
You can use Resize Attached Images for it.