News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

Thumbnail on Topic Listing

Started by SMFHacks.com Team, April 04, 2008, 01:05:48 PM

Previous topic - Next topic

improv

Maybe sounds like forever, it has been months ago since I've asked for that function.
Is there any reason why you are not adding it?
Or would it become a premium version instead?
I would buy it!

vbgamer45

No time to add it been focusing on other projects. Not really extending my mods mostly just doing bug fixes.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Klauser

Hello,

how I get this working with the Babylon Theme ? I can not place the code without messing up the index  :P

Thank you and regards

MessageIndex.template.php


// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2"></td>
<td><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="24%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';

// Show a "select all" box for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<td width="24" valign="middle" align="center">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
</td>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($options['display_quick_mod']))
echo '
<td width="4%" valign="middle" align="center"></td>';
}
// No topics.... just say, "sorry bub".


Thumbnail on Topic Listing - Installation Instructions for 1.1.11


./Themes/default/MessageIndex.template.php
Find: [Select]

<td width="9%" colspan="2" class="catbg3"></td>

Replace With: [Select]

<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3"></td>


Find: [Select]

echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="5%">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>

Replace With: [Select]


echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="5%">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';

$imagefound = false;

foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;

if (isset($image['id']))
{

echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}

echo '</td>';
}

// End Thumbnail Topic Mod

echo '



improv



jasumi

Hello,

Firstly, thank you for the great mod, it's just what I needed. But, it is not functional on my custom theme. I have tried using my own substandard CSS scripting abilities and have come about nothing but trouble when trying to alter MessageIndex.template.php (SMF 1.1.11). All I intended for was to edit the Message Icon to display the thumbnail attachment, and have had nothing but strange display issues ???


Thanks in advance to anyone who responds, I attached the file below:

allylaurente

Tried to install this Mod in my SMF1.1.11 using extreme6 theme. Installing is successful but nothing happens. Any idea to modify?

Thanks in Advance.


allylaurente

Quote from: madman71 on October 08, 2010, 03:11:27 PM
Are the images showing up?

No images at all. Its like nothing happens after i install.

Please help.

madman71

Go and attach an image to a new post and see if it show up

allylaurente


madman71


allylaurente

I can't do it right now as people are accessing the site. Hoping someone tried this mod on SMF 1.1.11 using extreme6 theme.


madman71

#273
go into your profile and you can do it that way.  You changing the  theme that  you use in your profile does not affect your other users.

allylaurente

Its working on default theme.  ;)

I thought it will also show on Insert Image on the topic :-[

madman71

then you'll need to verify that the code was indeed written to your extreme6 theme files.  I suspect that it was not.

http://custom.simplemachines.org/mods/index.php?mod=1151

use the mod parser  (link above) to see the edits needed for your theme.

madman71

Does your extreme6 theme have a MessageIndex.template.php ? if so,  this looks like the only file you need to add the mod code to.

Evilboy23

@improv can you share how to enable this mod on specific boards? I would love to have this mod but I don't want it in all the boards.

Shades.

Quote from: Evilboy23 on October 19, 2010, 11:40:22 AM
@improv can you share how to enable this mod on specific boards? I would love to have this mod but I don't want it in all the boards.
Yes, please share! :)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

thomasjensen

I installed the mod succesfully and it´s working fine but...

when posting more than one attachment it will always show the image last ---> not showint the image but the standard paperclip.

Any idea why ?

Advertisement: