Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on April 04, 2008, 01:05:48 PM

Title: Thumbnail on Topic Listing
Post by: SMFHacks.com Team on April 04, 2008, 01:05:48 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=1151)

This modification takes a thumbnail attachment attached to the first post of the topic and shows this thumbnail on the topic listing page of a forum.

Version 4.2.1
!Group by fixes for SMF 2.1.x

Version 4.2
!Fixes for image distortion and styling for SMF 2.1.X thanks to @rjen

Version 4.1
!Hide thumbnail column if users don't have permissions to view attachments

Version 4.0
!Fixed a case where if you are just using linked images the column for thumbnail topic will not appear

Version 3.0.1
!Fixed bug SMF 2.0.x not saving new board thumbnail topic settings

Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails

Version 2.0
Big thanks to dougiefresh for this update.
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.

Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.
Title: Re: Thumbnail on Topic Listing
Post by: dannbass on April 04, 2008, 01:47:21 PM
Great! thanks for the mod! I have an idea, how about making it a board-based mod, so there one can choose where to put it in the ?action=manageboards section.

Great mod!
Title: Re: Thumbnail on Topic Listing
Post by: RoarinRow on April 04, 2008, 04:35:54 PM
Dang that is cool.  I'm just afraid what picture I'd see.  Knowing my members they will start a topic and put a funky picture up just to mess with me   >:(
Title: Re: Thumbnail on Topic Listing
Post by: GliG on April 04, 2008, 04:38:21 PM
Great modification. Thank you vbgamer45...

Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 04, 2008, 05:16:35 PM
Just what I was almost looking for.  I think im gonna try it.  Just how bad does the server resources take a hit because of all of the queries??

How would one modify this to pick up hot linked images?
This is what im truly looking for ;D
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 04, 2008, 06:52:34 PM
one more thing.  Where in the script can i adjust the thumbnail size? They are quite large :)
Title: Re: Thumbnail on Topic Listing
Post by: dannbass on April 04, 2008, 07:11:54 PM
For that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

That should do it.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 04, 2008, 10:01:14 PM
Quote from: dannbass on April 04, 2008, 07:11:54 PM
For that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

That should do it.

Hummm, that didnt work :(

It changed the size of the thumbnails inside  the thread but not outside.  Is this how you did it (assuming that you have this mod)?
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 04, 2008, 10:17:33 PM
NM, it works now.  Just took a bit  ;D
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 04, 2008, 10:25:58 PM
Quote from: dannbass on April 04, 2008, 01:47:21 PM
Great! thanks for the mod! I have an idea, how about making it a board-based mod, so there one can choose where to put it in the ?action=manageboards section.

Great mod!
That's planned for the next release.
Title: Re: Thumbnail on Topic Listing
Post by: dannbass on April 04, 2008, 10:34:53 PM
Quote from: vbgamer45 on April 04, 2008, 10:25:58 PM
That's planned for the next release.

Fabulous! For now I'll get by with conditionals and $context['current_board'] and so on!

Thanks vbgamer45!
Title: Re: Thumbnail on Topic Listing
Post by: drHaus on April 06, 2008, 07:54:16 PM
I have eror

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 11



when write this line modifitacion:
IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
            IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 06, 2008, 08:16:49 PM
I would need to see the whole query to see what is causing that error.
Title: Re: Thumbnail on Topic Listing
Post by: drHaus on April 06, 2008, 08:29:55 PM
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 11
File: /home/phonedat/public_html/upoznavanje/Sources/MessageIndex.php
Line: 459

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.





this si cod , where is problem on messageindex.php:


mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName,
            mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName,IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
            IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys


Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 06, 2008, 08:32:09 PM
Change this part

IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys

To

IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight,
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys


Title: Re: Thumbnail on Topic Listing
Post by: drHaus on April 06, 2008, 08:45:41 PM
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 12
File: /home/phonedat/public_html/upoznavanje/Sources/MessageIndex.php
Line: 459

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php




part of cod:

mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName,
            mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName,IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight,
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys


Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 06, 2008, 08:48:02 PM
You have the same code repeated remove one of the

LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys
Title: Re: Thumbnail on Topic Listing
Post by: drHaus on April 06, 2008, 08:55:44 PM
it is work, you are best
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 06, 2008, 08:57:06 PM
Vbgamer,

Do you know what would cause this glitch?  When i uninstall the mod the posts show up, but if i reapply it they disappear.   If i do a search for these missing posts they do show up though.

(http://img212.imagevenue.com/img.php?image=29743_untitled_122_260lo.JPG)
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 06, 2008, 08:59:09 PM
Quote from: madman71 on April 06, 2008, 08:57:06 PM
Vbgamer,

Do you know what would cause this glitch?  When i uninstall the mod the posts show up, but if i reapply it they disappear.   If i do a search for these missing posts they do show up though.

(http://img212.imagevenue.com/img.php?image=29743_untitled_122_260lo.JPG)
Not sure yet would need to do some more testing like what is contained in those posts?
Title: Re: Thumbnail on Topic Listing
Post by: drHaus on April 06, 2008, 09:03:19 PM
vbgamer45,
can is  posible, if i post image like link , example /img/http://www.example.com/1.gif/img,
and this image to be thumbnail like atachment?
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 06, 2008, 09:05:10 PM
A  jpeg attachement and a zip file.


on another issue/note, I noticed that some of the  thumbnails do not appear IF there is both a jpg and a zip file attached in the sampe post.


Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 06, 2008, 09:12:52 PM
Quote from: drHaus on April 06, 2008, 09:03:19 PM
vbgamer45,
can is  posible, if i post image like link , example /img/http://www.example.com/1.gif/img,
and this image to be thumbnail like atachment?
Not without out a lot of work.
Title: Re: Thumbnail on Topic Listing
Post by: Natz on April 06, 2008, 09:39:59 PM
Hi I am also having problems with this mod.  I got a test failed with the messageindex.template.php file so i attempted to fix it manually and it seems to be clashing with my sticky mod (we think)  I took the sticky code out which fixed the tables but only some images were showing up but in full size not thumb size (i changed the size to 150 x 150).

I also had a problem when i went to view some threads they were missing.  But after searching for them i could find them but couldnt see them within the board.  I uninstalled the mod and all the threads were visable again.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 06, 2008, 10:46:28 PM
Quote from: Natz on April 06, 2008, 09:39:59 PM


I also had a problem when i went to view some threads they were missing.  But after searching for them i could find them but couldnt see them within the board.  I uninstalled the mod and all the threads were visable again.

Yep! that's exactly what i experienced.  I did notice one thing that's unrelated to this issue.  If you attach a non jpg file first  followed by a jpg , the thumbnail will not show up.

It seems that you have to attach a jpg first.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 06, 2008, 10:50:04 PM
Quote from: madman71 on April 06, 2008, 10:46:28 PM
Quote from: Natz on April 06, 2008, 09:39:59 PM


I also had a problem when i went to view some threads they were missing.  But after searching for them i could find them but couldnt see them within the board.  I uninstalled the mod and all the threads were visable again.

Yep! that's exactly what i experienced.  I did notice one thing that's unrelated to this issue.  If you attach a non jpg file first  followed by a jpg , the thumbnail will not show up.

It seems that you have to attach a jpg first.
Hmm will take a look at that.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 06, 2008, 10:53:05 PM
thanks Vb.  We appreciate it.

You mod is a big hit on my board  :D
Title: Re: Thumbnail on Topic Listing
Post by: dgandy on April 07, 2008, 12:12:54 PM
Quote from: Natz on April 06, 2008, 09:39:59 PM

I also had a problem when i went to view some threads they were missing.  But after searching for them i could find them but couldnt see them within the board.  I uninstalled the mod and all the threads were visable again.

This is the exact problem I was having. I hope you can get it sorted out because i really LOVE this mod. Thank you for your hard work on it.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 07, 2008, 08:54:53 PM

Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.
Title: Re: Thumbnail on Topic Listing
Post by: dgandy on April 07, 2008, 09:53:06 PM
I tried the revised mod and still no go. It's not showing all the posts. Do you think it has something to do with using utf8? Maybe I need to do something more?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 07, 2008, 10:13:19 PM
Not sure really it makes two small additions to the query but do not see how it would affect it


<file name="$sourcedir/MessageIndex.php">

<operation>
<search position="before"><![CDATA[LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys]]></search>
<add><![CDATA[, IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight]]></add>
</operation>
<operation>
<search position="before"><![CDATA[FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf)]]></search>
<add><![CDATA[
LEFT JOIN {$db_prefix}attachments AS big ON (big.ID_MSG = mf.ID_MSG AND big.attachmentType = 0)
LEFT JOIN {$db_prefix}attachments AS thn ON (thn.ID_ATTACH = big.ID_THUMB)]]></add>
</operation>
Title: Re: Thumbnail on Topic Listing
Post by: dgandy on April 08, 2008, 01:29:49 PM
I don't know enough about scripts to even say I know anything so, I'm afraid I'm not much help.
When I installed it the first time, there were some random topics missing on the list. For instance, on page 1 of the listing, it showed 6 topics even though it was set to show 15 per page. If I looked at page 2 there were 15 listed that started after the last one that didn't show on page 1. If I clicked the next link, it would show but, just not on the listing.

When I installed the modified version, it only showed one page and one topic listed.
Don't know if that will help any.
Title: Re: Thumbnail on Topic Listing
Post by: Nyx on April 08, 2008, 08:10:44 PM
amazing! I was looking for a mod like this, but my forum is 2.0 beta 3  :'( :'( :'( :'(
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 11, 2008, 05:02:15 PM
vb im sure you are aware, but yes, some posts are still missing.  Im gonna reinstall the mod again this weeked.

thanks again
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on April 13, 2008, 02:33:07 AM
Vb, I did more tests with uninstalling and reinstalling the updated mod and im still getting the same results. I even tried it on the default theme that comes with SMF.

On one board I had 60 posts with the mod turned off.  When i turned back on there was only about 28 showing with the rest showing empty boxes where links should go.  I know this doesn't tell you much but it does show over half are missing. :(


------------------------
on a different topic:

I had a user inform me of the hoverlink popup mod that has not been written yet for SMF.  it's the one that dispalys thumbnails of external links when you hover on links.  I've mentioned it here: http://www.simplemachines.org/community/index.php?topic=227723.0


He got his friend to give us the code. (not sure if it's complete) This code is for the






function make_preview_images($getpostimages,$maximages)
{
preg_match_all('^\[URL=(.+?)\](.+?)\[/URL\]^im', $getpostimages, $url_matches);
preg_match_all('/\[IMG\](.*?)\[\/IMG\]/si', $getpostimages, $img_matches);
if(!$url_matches[1] OR !$img_matches[1]){
preg_match_all('^\[url=(.+?)\](.+?)\[/url\]^im', $getpostimages, $url_matches);
preg_match_all('/\[img\](.*?)\[\/img\]/si', $getpostimages, $img_matches);
}

$getpostimages = "";
for ($i=0; $i< $maximages; $i++) {
if(isset($url_matches[1][$i])){
   $getpostimages .= "[URL=". $url_matches[1][$i]."][IMG]". $img_matches[1][$i]."[/IMG][/URL]";
   }
}
    return $getpostimages;
}


USEAGE: echo make_preview_images($POST_DATA_FROM_DATABASE,10);
for the rest he should find some 'tooltip' javascript...
-----------------------------------
the above code and instructions is what his friend sent us. I do not know much about programming but I thought maybe this might help you if you decide to make that thumbnail mod that displays EXTERNAL links and not attached files.
I know you said that it's a lot of work but maybe the code above will make it easier. I dont know.


cheers!

madman
Title: Re: Thumbnail on Topic Listing
Post by: samurai-lupin on April 14, 2008, 08:17:55 PM
Hello,

this is a really great mod! I wanted to integrate it, but it doesn't integrate into my MessageIndex.template.php

I have tried to add the code manually but it will keep on producing errors.

Could someone maybe please kindly make the neccessary changes to my MessageIndex.template.php for me?

Any help would be much appreciated. Thank you!

<?php
// Version: 1.1; MessageIndex

function template_main()
{
global $context$settings$options$scripturl$modSettings$txt;
//Display Ads on the Message index
if (function_exists("show_threadindexAds"))
{
$ads show_threadindexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


echo '
<div style="margin-bottom: 2px;"><a name="top"></a>'
theme_linktree(), '</div>';

if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder" style="margin-bottom: 3ex; '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
<tr>
<td colspan="5" class="catbg">'
$txt['parent_boards'], '</td>
</tr>'
;

foreach ($context['boards'] as $board)
{
echo '
<tr>
<td ' 
, !empty($board['children']) && !$modSettings['display_childboards'] && !$modSettings['disable_avatar'] ? 'rowspan="2"' '1' ' class="windowbg" width="6%" align="center" valign="top"><a href="'$scripturl'?action=unread;board='$board['id'], '.0">';

if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="'$board_new_img,'" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="'$childboard_new_img,'" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="'$board_nonew_img,'" alt="'$txt[334], '" title="'$txt[334], '" border="0" />';
}


echo '</a>
</td>
<td class="windowbg2" valign=top>
'
,$board['viewer_text'],'<span class="largetext"><a href="'$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a></span><br />
'
$board['description'];

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;"><small><i>'
count($board['moderators']) == $txt[298] : $txt[299], ': 'implode(', '$board['link_moderators']), '</i></small></div>';


// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="top" align="center" style="width: 12ex;"><small>
'
$board['posts'], '<br>'$txt[21], '<br />
'
$board['topics'],'<br>'$txt[330], '</small>
</td>'
;
if (!$modSettings['disable_avatar'])
echo '
<td width="'
$modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
'
$board['last_post']['member']['avatar'], '
</td>'
;
echo '
<td class="windowbg2" valign="middle" width="22%"><small>'
;

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<b>'
$txt[22], '</b> '$txt[525], ' '$board['last_post']['member']['link'] , '<br />
'
$txt['smf88'], ' '$board['last_post']['link'], '<br />
'
$txt[30], ' '$board['last_post']['time'];

echo '</small>
</td>
</tr>'
;

// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']) && !$modSettings['display_childboards'])
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' $txt[330] . ': ' $child['topics'] . ', ' $txt[21] . ': ' $child['posts'] . $child['viewer_text'] . ')">' $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' $child['link'] . '</b>' $child['link'];
}

echo '
<tr>
<td colspan="'
, !$modSettings['display_childboards'] ? '4' '1''" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' '''">
<small><b>'
$txt['parent_boards'], '</b>: 'implode(', '$children), '</small>
</td>
</tr>'
;
}
}

echo '
</table>
</div>'
;

//Display Ads on the Message index
if (function_exists("show_underchildren"))
{
$ads show_underchildren();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

}


if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '
<table width="100%" cellpadding="6" cellspacing="1" border="0" class="tborder" style="padding: 0; margin-bottom: 2ex;">
<tr>
<td class="titlebg2" width="100%" height="24" style="border-top: 0;">
<small>'
$context['description'], '</small>
</td>
</tr>
</table>'
;
}

// Create the button set...
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new''text' => 'smf258''image' => 'new_topic.gif''lang' => true'url' => $scripturl '?action=post;board=' $context['current_board'] . '.0'),
'post_poll' => array('test' => 'can_post_poll''text' => 'smf20''image' => 'new_poll.gif''lang' => true'url' => $scripturl '?action=post;board=' $context['current_board'] . '.0;poll'),
'markread' => array('text' => 'mark_read_short''image' => 'markread.gif''lang' => true'url' => $scripturl '?action=markasread;sa=board;board=' $context['current_board'] . '.0;sesc=' $context['session_id']),
'notify' => array('test' => 'can_mark_notify''text' => 125'image' => 'notify.gif''lang' => true'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"''url' => $scripturl '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';board=' $context['current_board'] . '.' $context['start'] . ';sesc=' $context['session_id']),
'post_smfbuy' => array('test' => 'can_post_smfbuy''text' => 'new_smfbuy''image' => 'auction.gif''lang' => true'url' => $scripturl '?action=post;board=' $context['current_board'] . '.0;smfbuy'),
);

// They can only mark read if they are logged in and it's enabled!
if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
unset($normal_buttons['markread']);

if (!$context['no_topic_listing'])
{
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="middletext">'
$txt[139], ': '$context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><b>' $txt['topbottom5'] . '</b></a>' '''</td>
<td align="right" style="padding-right: 1ex;">
<table cellpadding="0" cellspacing="0">
<tr>
'
template_button_strip($normal_buttons'bottom'), '
</tr>
</table>
</td>
</tr>
</table>'
;

// If Quick Moderation is enabled start the form.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<form action="'
$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], '" method="post" accept-charset="'$context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">';

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' '''>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr>'
;

// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2" class="catbg3"></td>

<td class="catbg3"><b><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="" />' '''</a></b></td>

<td class="catbg3" width="11%"><b><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="" />' '''</a></b></td>

<td class="catbg3" width="4%" align="center"><b><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="" />' '''</a></b></td>

<td class="catbg3" width="4%" align="center"><b><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="" />' '''</a></b></td>

<td class="catbg3" width="22%"><b><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="" />' '''</a></b></td>';

// Show a "select all" box for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<td class="catbg3" 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 class="catbg3" width="4%" valign="middle" align="center"></td>'
;
}
// No topics.... just say, "sorry bub".
else
echo '
<td class="catbg3" width="100%" colspan="7"><b>'
$txt[151], '</b></td>';

echo '
</tr>'
;

if (!empty($settings['display_who_viewing']))
{
echo '
<tr class="windowbg2">
<td colspan="' 
, !empty($options['display_quick_mod']) ? '8' '7' '"><small>';
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' 'count($context['view_members']) == $txt['who_member'] : $txt[19];
else
echo empty($context['view_members_list']) ? '0 ' $txt[19] : implode(', '$context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' ' (+ ' $context['view_num_hidden'] . ' ' $txt['hidden'] . ')');
echo $txt['who_and'], $context['view_num_guests'], ' '$context['view_num_guests'] == $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
</small></td>
</tr>'
;
}

foreach ($context['topics'] as $topic)
{
// Do we want to seperate the sticky and lock status out?
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
$topic['class'] = substr($topic['class'], 0strrpos($topic['class'], '_sticky'));
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
$topic['class'] = substr($topic['class'], 0strrpos($topic['class'], '_locked'));

echo '
<tr>

'
;
if(isset($topic['is_buddy']) && empty($options['show_buddy_highlight']))
echo '<td bgcolor="',$modSettings['color_buddylist'],'" valign="middle" align="center" width="5%">';
else
echo '<td class="windowbg2" valign="middle" align="center" width="5%">';
echo 
'
<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>
<td class="windowbg' 
, !empty($settings['seperate_sticky_lock']) && $topic['is_sticky'] ? '3' '' '" valign="top" ', (!empty($topic['quick_mod']['remove']) ? 'id="topic_' $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' $topic['id'] . '\', \'' $topic['first_post']['id'] . '\', \'' $context['session_id'] . '\');"' ''), '>';

if (!empty($settings['seperate_sticky_lock']))
echo '
$topic['is_locked'] ? '<img src="' $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" id="lockicon' $topic['first_post']['id'] . '" style="margin: 0;" />' '' '
$topic['is_sticky'] ? '<img src="' $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" id="stickyicon' $topic['first_post']['id'] . '" style="margin: 0;" />' '';

echo '
'
$topic['is_sticky'] ? '<b>' '' '<span title="'$topic['first_post']['preview'], '"><span id="msg_' $topic['first_post']['id'] . '">'$topic['first_post']['link'], '</span></span>'$topic['is_sticky'] ? '</b>' '';



// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="'
$topic['new_href'], '" id="newicon' $topic['first_post']['id'] . '"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="'$txt[302], '" /></a>';
$preLength $modSettings['previewLength'];
$oldPreview $topic['first_post']['preview'];
$newPreview wordwrap($oldPreview$preLength"\n"1);
echo'<span class="smalltext"><br />'$newPreview '</span><br />';



echo '
<small id="pages' 
$topic['first_post']['id'] . '">'$topic['pages'], '</small>
</td>
<td class="windowbg2" style="padding: 0px;" align="center"  valign="middle" width="17%">'
;
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($modSettings['enable_mini_avatars']))
echo '<table width="100%" cellpadding="0" cellspacing="2px" border="0"><tr><td class="windowbg2" width="30%" align="center">
'
$topic['first_post']['member']['avatar'],'</td><td class="windowbg2" width="70%">';
echo'
'
$topic['first_post']['member']['link'], '</td>';

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($modSettings['enable_mini_avatars']))
echo '</tr></table></td>';
echo'

<td class="windowbg' 
$topic['is_sticky'] ? '3' '' '" valign="middle" width="4%" align="center">
'
$topic['replies'], '
</td>
<td class="windowbg' 
$topic['is_sticky'] ? '3' '' '" valign="middle" width="4%" align="center">
'
$topic['views'], '
</td>
<td class="windowbg2" valign="middle" width="22%">
<a href="'
$topic['last_post']['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="'$txt[111], '" title="'$txt[111], '" style="float: right;" /></a>
<span class="smalltext">
'
$topic['last_post']['time'], '<br />
'
$txt[525], ' '$topic['last_post']['member']['link'], '
</span>
</td>'
;

// Show the quick moderation options?
if (!empty($options['display_quick_mod']))
{
echo '
<td class="windowbg' 
$topic['is_sticky'] ? '3' '' '" valign="middle" align="center" width="4%">';
if ($options['display_quick_mod'] == 1)
echo '
<input type="checkbox" name="topics[]" value="'
$topic['id'], '" class="check" />';
else
{
// Check permissions on each and show only the ones they are allowed to use.
if ($topic['quick_mod']['remove'])
echo '<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=remove;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_remove.gif" width="16" alt="'$txt[63], '" title="'$txt[63], '" /></a>';

if ($topic['quick_mod']['lock'])
echo '<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=lock;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_lock.gif" width="16" alt="'$txt['smf279'], '" title="'$txt['smf279'], '" /></a>';

if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
echo '<br />';

if ($topic['quick_mod']['sticky'])
echo '<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=sticky;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="'$txt['smf277'], '" title="'$txt['smf277'], '" /></a>';

if ($topic['quick_mod']['move'])
echo '<a href="'$scripturl'?action=movetopic;board='$context['current_board'], '.'$context['start'], ';topic='$topic['id'], '.0"><img src="'$settings['images_url'], '/icons/quick_move.gif" width="16" alt="'$txt[132], '" title="'$txt[132], '" /></a>';
}
echo '</td>';
}
echo '
</tr>'
;
}

if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == && !empty($context['topics']))
{
echo '
<tr class="catbg">
<td colspan="8" align="right">
<select name="qaction"'
$context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' '''>
<option value="">--------</option>
'
$context['can_remove'] ? '<option value="remove">' $txt['quick_mod_remove'] . '</option>' '''
'
$context['can_lock'] ? '<option value="lock">' $txt['quick_mod_lock'] . '</option>' '''
'
$context['can_sticky'] ? '<option value="sticky">' $txt['quick_mod_sticky'] . '</option>' '''
'
$context['can_move'] ? '<option value="move">' $txt['quick_mod_move'] . ': </option>' '''
'
$context['can_merge'] ? '<option value="merge">' $txt['quick_mod_merge'] . '</option>' '''
<option value="markread">'
$txt['quick_mod_markread'], '</option>
</select>'
;

if ($context['can_move'])
{
echo '
<select id="moveItTo" name="move_to" disabled="disabled">'
;

foreach ($context['jump_to'] as $category)
foreach ($category['boards'] as $board)
{
if (!$board['is_current'])
echo '
<option value="'
$board['id'], '"', !empty($board['selected']) ? ' selected="selected"' '''>'str_repeat('-'$board['child_level'] + 1), ' '$board['name'], '</option>';
}
echo '
</select>'
;
}
echo '
<input type="submit" value="'
$txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\''$txt['quickmod_confirm'], '\');" />
</td>
</tr>'
;
}

echo '
</table>
</div>
<a name="bot"></a>'
;

// Finish off the form - again.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<input type="hidden" name="sc" value="' 
$context['session_id'] . '" />
</form>'
;

echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="middletext">'
$txt[139], ': '$context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><b>' $txt['topbottom4'] . '</b></a>' '''</td>
<td align="right" style="padding-right: 1ex;">
<table cellpadding="0" cellspacing="0">  <tr>
'
template_button_strip($normal_buttons'top'), '
</tr>
</table>
</td>
</tr>
</table>'
;
}


// Show breadcrumbs at the bottom too?
echo '
<div>'
theme_linktree(), '<br /></div>';

echo '
<div class="tborder">
<table cellpadding="8" cellspacing="0" width="100%" class="titlebg2">
<tr>'
;

if (!$context['no_topic_listing'])
echo '
<td style="padding-top: 2ex;" class="smalltext">'
, !empty($modSettings['enableParticipation']) ? '
<img src="' 
$settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' $txt['participation_caption'] . '<br />' '''
<img src="' 
$settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' $txt[457] . '<br />
<img src="' 
$settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' $txt[454] . '<br />
<img src="' 
$settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' $txt[455] . '
</td>
<td valign="top" style="padding-top: 2ex;" class="smalltext">
<img src="' 
$settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' '
<img src="' 
$settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' $txt['smf96'] . '<br />' '') . ($modSettings['pollMode'] == '1' '
<img src="' 
$settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' $txt['smf43'] : '') . '
</td>
</tr>'
;

echo '
<tr>
<td colspan=2 align="'
, !$context['right_to_left'] ? 'right' 'left''" valign="middle">
<form action="'
$scripturl'" method="get" accept-charset="'$context['character_set'], '" name="jumptoForm">
<span class="smalltext"><label for="jumpto">' 
$txt[160] . '</label>:</span>
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
<option value="">' 
$txt[251] . ':</option>';

// Show each category - they all have an id, name, and the boards in them.
foreach ($context['jump_to'] as $category)
{
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#'
$category['id'], '">'$category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>'
;

/* Now go through each board - they all have:
id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
foreach ($category['boards'] as $board)
{
// Show some more =='s if this is a child, so as to make it look nice.
echo '
<option value="?board='
$board['id'], '.0"'$board['is_current'] ? ' selected="selected"' '''> 'str_repeat('=='$board['child_level']), '=> '$board['name'], '</option>';
}
}

echo '
</select>&nbsp;
<input type="button" value="'
$txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \''$scripturl'\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
</form>
</td>
</tr>
</table>
</div>'
;

// Javascript for inline editing.
echo '
<script language="JavaScript" type="text/javascript" src="' 
$settings['default_theme_url'] . '/xml_board.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

// Hide certain bits during topic edit.
hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");

// Use it to detect when we\'ve stopped editing.
document.onclick = modify_topic_click;

var mouse_on_div;
function modify_topic_click()
{
if (in_edit_mode == 1 && mouse_on_div == 0)
modify_topic_save("'
$context['session_id'], '");
}

function modify_topic_keypress(oEvent)
{
if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
{
modify_topic_save("'
$context['session_id'], '");
if (typeof(oEvent.preventDefault) == "undefined")
oEvent.returnValue = false;
else
oEvent.preventDefault();
}
}

// For templating, shown when an inline edit is made.
function modify_topic_show_edit(subject)
{
// Just template the subject.
setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 99%;"  maxlength="80" onkeypress="modify_topic_keypress(event)" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
}

// And the reverse for hiding it.
function modify_topic_hide_edit(subject)
{
// Re-template the subject!
setInnerHTML(cur_subject_div, \'<a href="'
$scripturl'?topic=\' + cur_topic_id + \'.0">\' + subject + \'</a>\');
}

// ]]></script>'
;
}

function 
theme_show_buttons()
{
global $context$settings$options$txt$scripturl;

$buttonArray = array();

// If they are logged in, and the mark read buttons are enabled..
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' $scripturl '?action=markasread;sa=board;board=' $context['current_board'] . '.0;sesc=' $context['session_id'] . '">' $txt['mark_read_short'] . '</a>';

// If the user has permission to show the notification button... ask them if they're sure, though.
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' $scripturl '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';board=' $context['current_board'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');">' $txt[125] . '</a>';

// Are they allowed to post new topics?
if ($context['can_post_new'])
$buttonArray[] = '<a href="' $scripturl '?action=post;board=' $context['current_board'] . '.0">' $txt['smf258'] . '</a>';

// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' $scripturl '?action=post;board=' $context['current_board'] . '.0;poll">' $txt['smf20'] . '</a>';

return implode(' &nbsp;|&nbsp; '$buttonArray);
}

?>
Title: Re: Thumbnail on Topic Listing
Post by: samurai-lupin on April 15, 2008, 07:57:43 PM
Will there soon be a release where one can specify the boards on which to use this mod? Thanks!
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 15, 2008, 08:07:25 PM
Quote from: samurai-lupin on April 15, 2008, 07:57:43 PM
Will there soon be a release where one can specify the boards on which to use this mod? Thanks!
That's a planned upgrade.
Title: Re: Thumbnail on Topic Listing
Post by: samurai-lupin on April 15, 2008, 10:05:53 PM
Thanks! Can't wait for it!
Title: Re: Thumbnail on Topic Listing
Post by: samozin on April 25, 2008, 12:46:25 PM
  great mod   thanx vbgamer45
  do me afav vbgamer45  plz  iam using ur mod could u give acode  for for viewing  the leastes 

attached  pictures   to put on tp block
 
u  know u gave that code for the leastes(random)  pictures  from the gallery
can u  make that code shows the athumbnails   attached

  the i dea is to make something like mp3 portal on  tp   shows  leastes albums   from  the

aspesific board when   user  clicks on  apicture   goes to the  the topic where that pic attached
plzzzzzzzz  i  know can  do it 
Title: Re: Thumbnail on Topic Listing
Post by: samurai-lupin on April 25, 2008, 10:06:15 PM
How can I manually define boards on which the mod should not be applied? What code would I need to add?

Thank you
Title: Re: Thumbnail on Topic Listing
Post by: sophi on April 26, 2008, 07:56:56 AM
This is a really nice mod!

I have installed version of the Thumbnail Topic Mod 1.1.

But;

When I am logged out there are missing thumbnails like this



In the posts the attachment is not showing either


When I am logged in I can see it all.

I would very much be able to see the thumbnails even when I am logged out.
How is it possible?
Title: Re: Thumbnail on Topic Listing
Post by: niko on April 26, 2008, 08:31:24 AM
Quote from: sophi on April 26, 2008, 07:56:56 AM
This is a really nice mod!

I have installed version of the Thumbnail Topic Mod 1.1.

But;

When I am logged out there are missing thumbnails like this



In the posts the attachment is not showing either


When I am logged in I can see it all.

I would very much be able to see the thumbnails even when I am logged out.
How is it possible?

I think it maybe because guest doesn't have permission to see attachements. So adding that permission would fix it.
Title: Re: Thumbnail on Topic Listing
Post by: samurai-lupin on April 26, 2008, 10:22:07 AM
The the mod will need to be changed in a future release so it will display a blank image instead. I also do not allow visitors to view pictures as it takes away a lot of traffic.
Title: Re: Thumbnail on Topic Listing
Post by: Nyx on May 01, 2008, 06:53:14 PM
Quote from: vbgamer45 on April 15, 2008, 08:07:25 PM
Quote from: samurai-lupin on April 15, 2008, 07:57:43 PM
Will there soon be a release where one can specify the boards on which to use this mod? Thanks!
That's a planned upgrade.

smf 2.0? please  :'( :'(
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 01, 2008, 07:39:35 PM
Once SMF 2.0 final is released.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on May 02, 2008, 01:27:31 AM
Vb,

Do you plan on fixing the missing posts/thumbnail  bug for your first version of this mod?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 02, 2008, 08:29:32 AM
I would if I could figure out what causes it.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on May 02, 2008, 09:28:41 PM
thanks
VB :)
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on May 03, 2008, 02:43:01 AM
For those that want this  mod to work (show ALL the posts), there's an alternative for now.  Go here:
http://www.simplemachines.org/community/index.php?topic=133417.msg888234#msg888234


As Vbgamer said, his Thumbnail topic was inspired by Nickos unofficial mod. While Vbgamer looks for a fix to get rid of the missing posts, follow the above link.  Just follow the steps carefully.  Im using Niko's hack and now all of my posts are appearing :)


And Vbgamer, you may or may have not seen this (you proably did) but it appears that Niko's hack had the same bug that you are experiencing (missing posts) and he got the fix for it.

It's explained here:
http://www.simplemachines.org/community/index.php?topic=133417.msg888293#msg888293

maybe or maybe not this will help you troubleshoot this bug.


Im still hoping for a fix and plan on upgrading to VBs mod,  but in the mean time im happy with the other hack.

madman

Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 03, 2008, 08:54:26 AM
Fixed the bug with not all posts appearing thanks to madman71 and Niko for the fix!
Title: Re: Thumbnail on Topic Listing
Post by: dgandy on May 03, 2008, 10:04:00 AM
Thank you! Thank you! Thank you! It's like Christmas. :D I have wanted something like this and it is now working perfectly.
Thank you vbgamer! and also madman71 and Niko
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on May 04, 2008, 05:30:09 PM
Glad i could help guys. I really wanted this mod to work  :D
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on May 04, 2008, 07:56:19 PM
I run a little Art Forum, and this is a great addition for it.
Many Thanks.
Title: Re: Thumbnail on Topic Listing
Post by: Bancherd on May 25, 2008, 12:02:25 AM
I am having problems with damaged package.  Could someone please confirm?

Thanks.
Title: Re: Thumbnail on Topic Listing
Post by: Marcus Forsberg on May 30, 2008, 10:31:26 AM
Could you just attah the edited MessageIndex.template.php and MessageIndex.php for me, so that I can upload them to my server, couse my Package Manager don't work on my server, and I suck at installing manually..
Title: Re: Thumbnail on Topic Listing
Post by: Marcus Forsberg on May 31, 2008, 10:41:27 AM
Freaky O.o
Suuently the Pmanger works :)
Don't need help, anyway!
Title: Re: Thumbnail on Topic Listing
Post by: improv on July 18, 2008, 08:36:18 AM
Quote from: samurai-lupin on April 25, 2008, 10:06:15 PM
How can I manually define boards on which the mod should not be applied? What code would I need to add?

Thank you

Is it possible to do this ?
I really like your mods vbgamer :)
Title: Re: Thumbnail on Topic Listing
Post by: DLB923 on August 20, 2008, 10:03:20 AM
I installed this mod on my forum and it works great, except for one problem.  I use multiple images in a thread and I can't seem to figure out how to set things up so it will distinguish the jpeg I want to use for the "main" preview pic.

For example, if I have 3 images in a thread numbered "image_1, image_2 and image_3," instead of getting image_1 as the main thumbnail (showing on the preview page) I get image_2 (or image_3) instead.

Is there any other way to designate which image will appear first?

Edit: Finally got the thumbnails to appear in the proper order through a lot of trial and error (which wasn't easy), but I'm still experiencing a problem when adding a rar file to some threads.  Doing so causes the thumbnail to disappear altogether.
Title: Re: Thumbnail on Topic Listing
Post by: NicolasB on August 21, 2008, 11:07:34 AM
Hello,

Cool script !!

Is there any way to keep the attachment image at the original size into the topic self and to have the self image resized as a thumbnail on the topic listing ?

Lot of thanks

Nicolas
Title: Re: Thumbnail on Topic Listing
Post by: locau on August 28, 2008, 04:23:34 PM
Quote from: NicolasB on August 21, 2008, 11:07:34 AM
Hello,

Cool script !!

Is there any way to keep the attachment image at the original size into the topic self and to have the self image resized as a thumbnail on the topic listing ?

Lot of thanks

Nicolas


I'm also looking for this modification, is possible to make the size of the thumbnail on topic listing using other sizes instead of smf thumbnail size?
What happen is that on listing i get a cool small thumb but inside the topic i prefer a larger thumb.

Can thisbe done ?
Title: Re: Thumbnail on Topic Listing
Post by: samurai-lupin on September 06, 2008, 11:27:38 AM
I would apprecaite this, too!
Title: Re: Thumbnail on Topic Listing
Post by: spikeweb on October 05, 2008, 04:18:05 PM
I am very disapointed as I would like to use the mod which sounds great but after installing the mod, I get the following error message when displaying a board :
Not unique table/alias: 'big'
Fichier: /myserver/mydirectory/.../Sources/MessageIndex.php
Ligne: 484

Any idea ?? Thanks in advance

I use SMF 1.1.6 ...
Title: Re: Thumbnail on Topic Listing
Post by: Adalla on October 12, 2008, 03:18:36 AM
Great mod, however when I try to install i get:

QuoteInstalling this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/MessageIndex.php Test successful
2. Execute Modification ./Themes/default/MessageIndex.template.php Test failed

SMF version 1.1.6 as well. It says on the mod page it should be compatible...but I dont want to risk it.

Any insights are appreciated
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 12, 2008, 10:42:36 AM
Quote from: Adalla on October 12, 2008, 03:18:36 AM
Great mod, however when I try to install i get:

QuoteInstalling this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/MessageIndex.php Test successful
2. Execute Modification ./Themes/default/MessageIndex.template.php Test failed

SMF version 1.1.6 as well. It says on the mod page it should be compatible...but I dont want to risk it.

Any insights are appreciated
Most likely need to install it manually. Another modification has modified that file in the same place  and would need to be looked at.
Title: Re: Thumbnail on Topic Listing
Post by: webking on October 20, 2008, 01:57:56 AM
Version 2 beta 4 ???
Title: Re: Thumbnail on Topic Listing
Post by: kassie on October 20, 2008, 05:42:57 AM
Mine is failing on MessageIndex.template.php also
For me its the Sticky First Post (extends sticky topic) mod which has replaced the first 'Find' needed in the MessageIndex.template.php
What can I do to get this to work?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 20, 2008, 09:50:14 PM
You can try to modify the code manually and add it before or after the sticky first post mod.
Title: Re: Thumbnail on Topic Listing
Post by: MarkS on October 22, 2008, 04:46:30 PM
any news on updates for this mod please

like changing the thum size with out it changing the attached image

and for it to show thums from all other post even with out side links


thanks mark
Title: Re: Thumbnail on Topic Listing
Post by: webking on October 22, 2008, 11:47:34 PM
How do I use this mod with SSI.php ?

I m pulling recentposts function in SSI and wish to use this mod to pull attachment image. How can I accomplish this?

I also like to pull the image, topic title, and a couple lines of content in SSI like wordpress.

Thank you.

I
Title: Request new feature
Post by: fotografo74 on October 24, 2008, 03:23:43 AM
New feature: if a user doesn't add a thumbnail, is possible to have automatically a thumbnail like attached image?
Thanks!
Antonio
Title: Re: Thumbnail on Topic Listing
Post by: webking on November 01, 2008, 07:23:04 PM
Please assist with version 2 beta 4 please please please. Everyone desperately needs it. I m one of them.
Title: Re: Thumbnail on Topic Listing
Post by: HR on November 05, 2008, 07:57:02 AM
Oddly there are some boards wher the attachments are there and it isnt listing...
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on November 05, 2008, 09:39:23 PM
It only checks the very first attachment of each post.
Title: Re: Thumbnail on Topic Listing
Post by: HR on November 06, 2008, 11:04:36 PM
Quote from: vbgamer45 on November 05, 2008, 09:39:23 PM
It only checks the very first attachment of each post.
If this is the case (1.1.6) then why is the displayed thumb random? 8 images on the thread and it displays 6 or anything but #1
Title: Re: Thumbnail on Topic Listing
Post by: webking on November 11, 2008, 10:06:13 PM
It is almost a year and no update for version 2 beta 4? That's awful.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on November 11, 2008, 10:07:59 PM
Not really most mod authors are waiting for a final release of SMF 2.0 before porting mods over.
Title: Re: Thumbnail on Topic Listing
Post by: nzmacro on November 16, 2008, 03:47:08 PM
Sorry to add to this VB, it is an excellent mod and great work from both of you.

So this mod always takes the image as being square or a horizontal, is that right ???. So if we have a vertical image, it gets squashed into a horizontal or square type image. Is it possible to add to this so that a vertical image stays vertical and horizontal stays horizontal ??

Next question. The thumbnail seems to be the same file size in KB as the original inside the post. Can compression be added to that thumbnail.

I can imagine they are not easy tasks to do, but I have to ask :). BTW, I do have one more question that you might not have thought of doing with this mod, but maybe you have ;)

Thanks for your time and effort.

Danny.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on November 20, 2008, 12:39:50 PM
VB,

Quick question:

I have over 2000 attached images on my forum now with your mod running just fine.  However, i just got a nasty gram from my web host saying im using to much CPU (yeah, shared hosting).  Im thinking it might be this mod because it displays about 25 images per page. So, i need to do some trial and error testing.

If i remove this mod and then reinstall it later will the mod remember all of the posts with attachments?
I know the mod does not detect older attached images prior to installing this mod.


thanks agian.  And i hope it's not your mod.  If it is, i have to pay big $$ to get a VPN account and get off of the shared hosting plan that i have.

Im willing to pay the big bucks to keep this awesome mod on my board.


thanks again.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on November 21, 2008, 08:29:32 AM
It should not really hurt performance if I remember it is just adding one left join to find out the image.

Should remember all attachments since the mod is not storing any information and is going by the first image inside each topic.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on November 21, 2008, 09:23:18 AM
thanks Vb :)
Title: Re: Thumbnail on Topic Listing
Post by: vdubbia on November 22, 2008, 07:57:17 PM
does this need an image physically uploaded as an attachment?  Or if someone posts an image using photobucket or imageshack, will a thumb also be created?
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on November 22, 2008, 08:14:09 PM
yep! physically attached is the only way it works.

I only wished it could detect free hosting site links like Imagevenue, photobucket, etc.

I know Vbulliten has a mod that does that.
Title: Re: Thumbnail on Topic Listing
Post by: HR on December 01, 2008, 03:37:51 PM
I posted in vb's inspirational thread to see if it could be altered to reflect avatar height/width rather than attachment but for the time being in messages index Ive simply altered:


'width' => $row['thnWidth']/3,
'height' => $row['thnHeight']/3


so it scales it to 1/3 of the attachment size on display. Makes it a lil more conforming... I did get it humming but the posts where zips are loaded before the images are still not showing in topics.. trying to trace down the code for that aspect and going cross-eyed
Title: Re: Thumbnail on Topic Listing
Post by: nzmacro on December 02, 2008, 05:00:56 AM
 ;) HR, a HUGE thanks and now I'm on the right track. Wonderful and can't thank you enough  ;D

Danny.
Title: Re: Thumbnail on Topic Listing
Post by: nzmacro on December 02, 2008, 06:15:50 AM
I would love to get this to scale correctly for both horizontal and vertical images. If we take a scale for a photograph at 640 x 480 in the horizontal, to get a thumb at 64 x 48 is easy and it shows correctly, but when we go to a vertical shot it seems to squash it into an almost square and the scale is way off for a vertical thumb of 48 x 64. To find a fix for this would be perfect.

Similar to what VB has for the SMF gallery (yes bought and paid for  :) ) would be ideal if that could be adapted for this mod.

Anyway, thanks for your time HR, I'm looking deeper into it now.

Danny.   
Title: Re: Thumbnail on Topic Listing
Post by: HR on December 02, 2008, 07:28:47 AM
Quote from: nzmacro on December 02, 2008, 05:00:56 AM
;) HR, a HUGE thanks and now I'm on the right track. Wonderful and can't thank you enough  ;D

Danny.
Welcome, now if we just had the thing look at all the attachments and show only the first jpg it'd be gold OR.. a lil plugin like the buddy mod where you can move an attachment up or down the list..

So so.. this is me rambling but I get the ID.ATTACH reference and what not (for the most part) perhaps it should be tweaked (if I knew how I would) so that its looking in height & width for anything that is not null.. zips and the like record a value of '0' in the database so perhaps if it hits the first attachment and its height or width in the database (attachments table) in not '0' then stop and display the thing else go on to the next and compare.

I know.. this might seem pointless to you but I will most likely look back at this later and figure a way to bandaid it and make it work
Title: Re: Thumbnail on Topic Listing
Post by: kassie on January 17, 2009, 05:48:32 PM
I have a new forum installed only weeks old. With a few other mods installed. This mod is working in the SMF default theme but not in a custom theme I'm using.
I tried to manually code my themed MessageIndex.template.php but the codes I need to find just aren't in there.
If I attach the MessageIndex.template.php here could someone fix it for me please?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on January 18, 2009, 03:21:02 PM
Might but if it is too different then it may be difficiult
Title: Re: Thumbnail on Topic Listing
Post by: kassie on January 18, 2009, 04:52:49 PM
Quote from: vbgamer45 on January 18, 2009, 03:21:02 PM
Might but if it is too different then it may be difficiult

I have attached it. ..... thank you for giving it a go :)


EDIT: never mind I got it to work YAY!
Title: Re: Thumbnail on Topic Listing
Post by: aw06 on January 22, 2009, 03:19:21 PM
Few question ..

Can the thumbnail size be adjusted?
Does it Show a thumbnail if and external image is linked and not attached?
Do you get a admin panel?
can you specify which boards to use this mod?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on January 22, 2009, 08:15:38 PM
Quote from: aw06 on January 22, 2009, 03:19:21 PM
Few question ..

Can the thumbnail size be adjusted?
Does it Show a thumbnail if and external image is linked and not attached?
Do you get a admin panel?
can you specify which boards to use this mod?

None of the above are built in.
Title: Re: Thumbnail on Topic Listing
Post by: aw06 on January 22, 2009, 10:45:11 PM
ok, so how can i change thumbnail size .. and also how do i make it see external images.
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on January 22, 2009, 10:47:55 PM
It's not coded to grab external images unfortunately :(

Im hoping one day it will
Title: Re: Thumbnail on Topic Listing
Post by: aw06 on January 22, 2009, 11:09:07 PM
Quote from: madman71 on January 22, 2009, 10:47:55 PM
It's not coded to grab external images unfortunately :(

Im hoping one day it will

bummer .. all my images are external .. so this mod wont work ...

Any other mods that may get this done ??
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on January 22, 2009, 11:10:43 PM
no, there's no mod for SMF that will do this.  There is one for VB forums though.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on January 22, 2009, 11:11:50 PM
Quote from: aw06 on January 22, 2009, 11:09:07 PM
Quote from: madman71 on January 22, 2009, 10:47:55 PM
It's not coded to grab external images unfortunately :(

Im hoping one day it will

bummer .. all my images are external .. so this mod wont work ...

Any other mods that may get this done ??
How would that work for external images?
Since they have no thumbnails plus the mod would have to scan the post for valid image links
Title: Re: Thumbnail on Topic Listing
Post by: aw06 on January 22, 2009, 11:45:01 PM
can it not display a pic of the first image found in a img tag ...  :-\
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on January 22, 2009, 11:49:51 PM
Could but the image could really be really really big
Title: Re: Thumbnail on Topic Listing
Post by: madman71 on January 22, 2009, 11:59:16 PM
Most of the free image hosts that use the IMG tag are for displaying thumbnails.

such as this link:
[URL=http://img127.imagevenue.com/img.php?image=86608_P1010360_5Large6_122_806lo.JPG][IMG]http://img127.imagevenue.com/loc806/th_86608_P1010360_5Large6_122_806lo.JPG[/IMG][/URL]

The first part of the link leads to the full size image, the second part will display the thumb
Title: Re: Thumbnail on Topic Listing
Post by: aw06 on January 23, 2009, 12:01:06 AM
Quote from: vbgamer45 on January 22, 2009, 11:49:51 PM
Could but the image could really be really really big

yeah, which it why you dont display it at the original size ... set it to display at say 60x60px .. or a user customisable size

Its php codeing ,, anything is possible   :P
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on February 08, 2009, 10:03:49 PM
I'm about to upgrade to SMF 2 RC1, and really miss this mod on my forum.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on February 08, 2009, 10:21:37 PM
Maybe sometime this week
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on February 09, 2009, 12:34:55 AM
Fantastic
I'll keep watching this thread for your announcement. :D
Title: Re: Thumbnail on Topic Listing
Post by: Angelotus on February 09, 2009, 06:01:02 AM
Cool mod, 2 questions:

Is it possible for SMF 2.0 x
and can you attach a SSI function for this aswell?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on February 09, 2009, 08:11:47 PM
Yes maybe this weekend for 2.0

What kind of SSI function you need?
Title: Re: Thumbnail on Topic Listing
Post by: Angelotus on February 10, 2009, 05:13:46 AM
Well, I would like to have an output similar like ssi_boardnews but with the topic picture. And the picture should be floated left or right, or centered if possible (just like in a newsitem). Thanx in advance!!!
Title: Re: Thumbnail on Topic Listing
Post by: qtime on February 14, 2009, 12:05:28 PM
I like to use this mod, is it possible to use when the in line attachment mod is installed?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on February 14, 2009, 12:18:57 PM
How would it know to find the smaller image? Or find the large image from the small one of an external image.
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on February 15, 2009, 06:42:04 PM
vbgamer45
I see you've been busy updating some of your other mods this weekend.

Is this one far off for RC1?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on February 15, 2009, 08:39:12 PM
Probably in a couple weeks
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on February 15, 2009, 11:18:59 PM
Quote from: vbgamer45 on February 15, 2009, 08:39:12 PM
Probably in a couple weeks

No Probs.
I look forward to using this mod again. :D
Title: Re: Thumbnail on Topic Listing
Post by: Mavvic on February 19, 2009, 04:14:54 AM
i am waiting for this mod to work with external links such as the ones coming from imageshack & photobucket.

it would be nice if this mod can scan the first images posted on a post using the [img] tags.

Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on February 21, 2009, 05:36:37 PM
Quote from: pinoysim on February 19, 2009, 04:14:54 AM
i am waiting for this mod to work with external links such as the ones coming from imageshack & photobucket.

it would be nice if this mod can scan the first images posted on a post using the [img] tags.


That won't happen
Title: Re: Thumbnail on Topic Listing
Post by: Mavvic on February 22, 2009, 11:33:57 PM
Quote from: vbgamer45 on February 21, 2009, 05:36:37 PM
Quote from: pinoysim on February 19, 2009, 04:14:54 AM
i am waiting for this mod to work with external links such as the ones coming from imageshack & photobucket.

it would be nice if this mod can scan the first images posted on a post using the [img] tags.


That won't happen

oh ok. but i wish that someone might make a feature like that, i just wish that this mod can work on imageshack links. i would surely buy or pay for a mod that can work on imageshack links on the first post.
Title: Re: Thumbnail on Topic Listing
Post by: kiwiol on March 02, 2009, 06:11:36 PM
Quote from: Angelotus on February 10, 2009, 05:13:46 AM
Well, I would like to have an output similar like ssi_boardnews but with the topic picture. And the picture should be floated left or right, or centered if possible (just like in a newsitem). Thanx in advance!!!

Ditto. Any chance we can get the code to add to the SSI.php file to have the thumbnails called on an external page for the 'SSI_recentTopics' function? Would be greatly appreciated. Cheers.
Title: Re: Thumbnail on Topic Listing
Post by: improv on March 03, 2009, 03:06:28 PM
I'd really like to see a selection for it, so you can choose the boards in which this mod applies :).

But I respect your work vbgamer45, in hope that I'll see more awesome stuff !
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 04, 2009, 10:54:24 PM
Quote from: improv on March 03, 2009, 03:06:28 PM
I'd really like to see a selection for it, so you can choose the boards in which this mod applies :).

But I respect your work vbgamer45, in hope that I'll see more awesome stuff !
Add it to my feature request tracker on smfhacks.com
Title: Re: Thumbnail on Topic Listing
Post by: andyv123 on March 11, 2009, 03:14:47 AM
I had this on a forum with the smf version being 1.1.7 and it worked great. Now that I'm using 1.1.8 the thumbnails don't show - it's as if I didn't install the mod at all. I tried it on a fresh install of 1.1.8 and same problem.
Title: Re: Thumbnail on Topic Listing
Post by: illmakeyouscream on March 19, 2009, 11:42:06 AM
Love it.

Are you able to like make the picture in the topic with the topic name.
But not make the picture clickable?
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on March 28, 2009, 11:23:21 PM
vbgamer45

Have you had a chance to update this mod?  :)
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 28, 2009, 11:23:56 PM
Not had a chance most likely now for RC2
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on March 29, 2009, 01:45:15 AM
Thanks
I'll keep watching with fingers crossed for the RC2.
Title: Re: Thumbnail on Topic Listing
Post by: spikeweb on April 06, 2009, 12:17:57 PM
Back again with a new question : the thumbnail in topic view is fine but when the image is displayed into the post, it is still seen as a thumbnail and not as the original large image.

What would be the setting/modification to apply in order to get it working as mentionned ??

THX
Title: Re: Thumbnail on Topic Listing
Post by: hexad3cimal on April 15, 2009, 09:08:09 AM
plz can u update it for rc2?
plz
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 15, 2009, 08:49:57 PM
Will update it for SMF 2.0 final
Title: Re: Thumbnail on Topic Listing
Post by: Tanks on May 07, 2009, 06:52:01 AM
Why do all mod authors say they will wait for 2.0 Final ?

Who knows when that will be ?!? We are here now.. we are live.. we have needs.. and we are all on RC1

Please, if it's not to big a deal can you make this for RC1 ?

That way your mod will also almost be ready for final when that time comes.

Cheers,

Knat
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 07, 2009, 08:13:45 PM
Because there are many release like RC2 ..etc ... final. Takes time to support each one.
Title: Re: Thumbnail on Topic Listing
Post by: Tanks on May 08, 2009, 02:50:17 AM
Ok.

But it's only modification on two files. would be sweet if you had the time to do it.

It's a nice mod, thanks for your hard work :)
Title: Re: Thumbnail on Topic Listing
Post by: improv on May 14, 2009, 01:26:13 PM
And where could I change the size of the thumbnails?
Apparently I can't find it for some kind of reason.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 14, 2009, 11:29:23 PM
It is controlled by the attachment settings I beilve.
Title: Re: Thumbnail on Topic Listing
Post by: improv on May 15, 2009, 07:06:55 AM
Hmm yes somehow they are,
But if I change the size of the image it needs to be previewed first until the height and width are increased or decreased.

Pretty odd..
Title: Re: Thumbnail on Topic Listing
Post by: Özgür on May 29, 2009, 07:57:45 PM
vbgamer45 are you think add compability 2.0 for this mod?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 29, 2009, 08:23:36 PM
Planned for 2.0 final
Title: Re: Thumbnail on Topic Listing
Post by: Garry1953 on May 29, 2009, 10:04:03 PM
I'm looking forward to using this mod again when 2.00 is final.
Title: Re: Thumbnail on Topic Listing
Post by: Mack450 on June 01, 2009, 07:58:04 AM
Can you make this work with only specific forums?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 04, 2009, 01:33:59 PM
Possible maybe in a future release will add some settings which you can toggle this feature on or off for a forum.
Title: Re: Thumbnail on Topic Listing
Post by: qtime on June 12, 2009, 03:14:21 PM
Quote from: vbgamer45 on June 04, 2009, 01:33:59 PM
Possible maybe in a future release will add some settings which you can toggle this feature on or off for a forum.
that should be very nice!
I hope you will play with this mod, like move the mouse over and show full preview etc.
Title: Re: Thumbnail on Topic Listing
Post by: Chaos Dragon on June 23, 2009, 11:05:42 PM
Installed the Thumbnail In Topic Mod and thumbnails are not showing in Topic just the same ol same ol....Why would this be?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 24, 2009, 09:08:19 PM
Could be the theme I believe it only works on the default theme.
Title: Re: Thumbnail on Topic Listing
Post by: Chaos Dragon on June 25, 2009, 04:14:07 PM
I am using the default theme. It will be the only theme I will be using.
Title: Re: Thumbnail on Topic Listing
Post by: berko on July 07, 2009, 08:08:58 PM
Hello
I have a couple of questions regarding this mode:

Is it possible to use as thumbnail something other then attached image?
Because I will want to use forum for commenting images in site-s gallery, and I will want to make it something like this:
Topic listing:
http://forums.cgsociety.org/forumdisplay.php?f=121

Single topic:
http://forums.cgsociety.org/showthread.php?f=121&t=771681

When user will upload image to his gallery, automatically will be created new topic for that image, and in first post will be scaled down image (witch will be also link for full preview) and description. I don't want to put image as attachment, becouse that way I will have to upload original image twice on my site. I want to use already made thumbnail (by site-s gallery) and scale down version of image in post (not as attachment).
So basically, I just need to know if is possible to change witch image will be shown as topic thumbnail.

And second question; I'm using custom theme on forum... is this a problem?
Title: Re: Thumbnail on Topic Listing
Post by: SilverKnight on July 12, 2009, 09:27:39 AM
Great mod, but there should be a feature which forces users to upload a picture, and maybe a way to moderate out bad pictures.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on July 19, 2009, 12:05:05 PM
Updated!

Added support for SMF 2.0
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: Garry1953 on July 19, 2009, 03:25:54 PM
Quote from: vbgamer45 on July 19, 2009, 12:05:05 PM
Updated!

Added support for SMF 2.0

Thanks  :D
Title: Thumbnail on topic problem
Post by: TDNY on July 28, 2009, 09:38:51 AM
Hi,
Thanks for looking I hope you can help.

  I have your mod 1.1.1 and the default theme with vers. 1.1.10 and the problem is when the sticky post has an image.
  If the sticky post has an image the color on the right in the "last post" section is gray. you can see that example on my site here:
http://treasuredigging.com/welcome/
The element that is affected is titlebg, it looks like a windowbg2 element is created on sticky posts with an image.

  If the sticky topic has no image all is well as seen on my site here:
http://treasuredigging.com/site-feedback/

TDNY
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: qtime on July 28, 2009, 11:07:46 AM
Quote from: vbgamer45 on July 19, 2009, 12:05:05 PM
Updated!

Added support for SMF 2.0
thanks, nice work!!!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: TDNY on July 28, 2009, 12:40:37 PM
Quote from: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.

I'm pretty sure I posted in the right spot, your mod works fine except when the topic is a sticky with an image. Did you look at the 2 links I posted? If I need to post somewhere else I'm all ears. I appreciate the help 8)
TDNY
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: TDNY on July 29, 2009, 08:33:21 AM
Quote from: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.

You're right, this has been fixed.

  It was a problem with another mod that we installed manually and wasn't added to the list.

Sorry for the trouble but it did look like a problem when an image was posted in a topic and it was stickied.

TDNY
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: qtime on July 29, 2009, 10:27:11 AM
Quote from: TDNY on July 29, 2009, 08:33:21 AM
Quote from: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.

You're right, this has been fixed.

  It was a problem with another mod that we installed manually and wasn't added to the list.

Sorry for the trouble but it did look like a problem when an image was posted in a topic and it was stickied.

TDNY
can you tell me how you fixed it, because I have the same problem.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: TDNY on July 29, 2009, 01:45:49 PM
Quote from: qtime on July 29, 2009, 10:27:11 AM
can you tell me how you fixed it, because I have the same problem.

Sure,
Open up your themes Messageindex.template.php and find this
$stickybar = false;
$normalbar = false;
foreach($context['topics'] as $topic)
{
if($topic['is_sticky'] && !$stickybar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"><b>Important Topics</b></td></tr>';
$stickybar = true;
}
else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"><b>Normal Topics</b></td></tr>';
$normalbar = true;
}



Replace it with this$stickybar = false;
$normalbar = false;
foreach($context['topics'] as $topic)
{
if($topic['is_sticky'] && !$stickybar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '8' : '9', '"><b>Important Topics</b></td></tr>';
$stickybar = true;
}
else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '8' : '9', '"><b>Normal Topics</b></td></tr>';
$normalbar = true;
}


Good Luck,
TDNY
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: Harvester on August 08, 2009, 11:00:29 PM
I set my attachment size in ?action=manageattachments  but the thumbnails on the topic list are still huge...

what could be doing this?

Title: Re: Thumbnail on Topic Listing
Post by: Harvester on August 08, 2009, 11:03:11 PM
Quote from: improv on May 15, 2009, 07:06:55 AM
Hmm yes somehow they are,
But if I change the size of the image it needs to be previewed first until the height and width are increased or decreased.

Pretty odd..

I am experiencing same issue... using SMF 1.1.10
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: iosys on August 13, 2009, 10:16:17 AM
Default thumbnail where no attachment exists

Ok firstly thanks for this great mod!  I searched around for an extra feature which I couldnt find so I made a small change myself.  What I wanted was for those posts that dont have any attached images to show a default thumbnail in the message index.  Let me just say Im in no way a PHP programmer so this is hardcoded but at least it works!  The defaultthumbnail.jpg I manually sized as 100x100.

In MessageIndex.template.php

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


add after
// MOD to show default thumnail image
else
{
echo '<img src="http://www.site.com/defaultthumbnail.jpg">';
$imagefound = true;
}
// END MOD to show default thumbnail image
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on August 13, 2009, 11:02:50 AM
Nice maybe I can add it to next release
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: Tanks on August 14, 2009, 11:27:01 AM
Thanks for updating this to 2.0 ;)

I might use it on a new board i have planned.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: fmsllc on August 30, 2009, 03:18:32 PM
thanks for that code iosys.

my question is rather simple, but unfortunately, I haven't been able to find a solution. I'd like to give the column a title, where as it is currently blank. On the same top bar as menu, started by, etc... I'd like to put "Thread Preview" on the descriptive column at the top of the thumbnails.

**never mind. I found the code in the messageindextemplate file. I'm just having trouble positioning the text above that column.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: iosys on August 30, 2009, 10:18:18 PM
Quote from: fmsllc on August 30, 2009, 03:18:32 PM
thanks for that code iosys.

my question is rather simple, but unfortunately, I haven't been able to find a solution. I'd like to give the column a title, where as it is currently blank. On the same top bar as menu, started by, etc... I'd like to put "Thread Preview" on the descriptive column at the top of the thumbnails.

**never mind. I found the code in the messageindextemplate file. I'm just having trouble positioning the text above that column.

When you figure it out post how you did it because thats something Id use too
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on August 30, 2009, 10:21:10 PM
It would probably be in an empty <td> tag in the main header of the messageindex.template.php
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: iosys on September 03, 2009, 11:29:58 PM
Yeah there is two different areas I think.  I played around with it for a while but got annoyed.  I want to have the first two columns removed.  I could get the header columns removed but when I tried to do the same with the content columns it screwed up the formatting.  I had other things to do so left it for now.  Would love to know if someone has got this to work
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: fmsllc on September 09, 2009, 04:48:54 PM
i attached a pic of what i did.

in that same messageindextemplate file....I used this

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

if you do not have a thread with an attachment on that page though, it comes out looking weird.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: diontoradan on September 17, 2009, 12:58:23 AM
This mod is very nice. Im using it with SMF 2RC. Something i wanna ask :

1. Can i select particular board to display this mod? i dont want to display it in all boards, just the events page.
2. How can i resize the thumbnail? it would be great if we can select the size. i got the picture in 100% in all of the topics...

there's a good php thumbnailer, if youre interested in using it : http://phpthumb.sourceforge.net/
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on September 17, 2009, 01:05:20 AM
1. Not at this time
2. This is determined by the attachment settings it uses those sizes as its base.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: the-punisher on September 17, 2009, 05:48:04 PM
Thanks Dude Very Very Much  :P
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on September 17, 2009, 06:04:42 PM
Glad you enjoy the mod
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: SilverKnight on September 25, 2009, 08:40:04 PM
I like this option, but there needs to be a option to "enforce" it on a board, so people cannot make a thread without a image, so maybe make a seperate box which they have to upload the image to, it's more direct than attachments.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: fmsllc on October 08, 2009, 03:16:22 PM
Quote from: iosys on August 13, 2009, 10:16:17 AM
Default thumbnail where no attachment exists

Ok firstly thanks for this great mod!  I searched around for an extra feature which I couldnt find so I made a small change myself.  What I wanted was for those posts that dont have any attached images to show a default thumbnail in the message index.  Let me just say Im in no way a PHP programmer so this is hardcoded but at least it works!  The defaultthumbnail.jpg I manually sized as 100x100.

In MessageIndex.template.php

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


add after
// MOD to show default thumnail image
else
{
echo '<img src="http://www.site.com/defaultthumbnail.jpg">';
$imagefound = true;
}
// END MOD to show default thumbnail image


just want to say thanks for this add on. It makes the forum look a lot cleaner now.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 13, 2009, 07:39:50 PM
Looks like a good feature may add an interface for it in the future.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: javierjp on October 16, 2009, 07:20:13 PM
Im trying to have a thumb in listing and the original large image inside the topic.




example 1: "Resize images when showing under posts" is OFF in admin panel.

Result: When I attach a image to a topic it show the original large image in listing and inside the topic.




example 2: "Resize images when showing under posts" is ON in admin panel.

Result: When I attach a image to a topic it show the thumb in listing. But inside the topic it show a clickeable thumb to enlarge to the original image size.




All i want its a thumb in listing and the larger image inside the topic without have to click, its that possible?

excuse my english.
grettings and thanks in advance.


Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: samurai-lupin on October 20, 2009, 05:25:57 PM
Can this mod also be adjusted in order to work with the recent replies / postings pages?
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on October 25, 2009, 04:09:37 PM
For my custom theme, I tried editing the messageindex.template.php myself but I get a syntax error.

Could you be so kind to take a look @ the file and see if you could fix it for me?

TIA!

Edit: Success at last! found it myself. Great mod!!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 26, 2009, 07:31:52 AM
Hi,
great mod but on SMF 2.0 RC1.2 in MessageIndex.php I can't find this code:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

But this:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)

If I try to replace with this, I have blank page:

LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

Thank You very much!! :)



Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 27, 2009, 05:36:30 PM
Quote from: JulesW on October 25, 2009, 04:09:37 PM
For my custom theme, I tried editing the messageindex.template.php myself but I get a syntax error.

Could you be so kind to take a look @ the file and see if you could fix it for me?

TIA!

Edit: Success at last! found it myself. Great mod!!

I think that is my same problem....
How have you fix it?

Thank You!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on October 27, 2009, 05:40:28 PM
I found the error in the code, there was a piece of the code that wasn't in the right spot...

If you attach your messageindex.template.php I can take a look if I can fix it for ya...

Edit: I must add that I use smf 1.1.10 and not 2.0, so I'm not sure I can help!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 27, 2009, 05:57:06 PM
OK!
Say me what do you have change in the code please...

Thanks....  :)
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on October 27, 2009, 06:17:19 PM
I've made all the necessary edits in this file. Was this the file from your server or did you attach a clean copy of the file. In this file there were no edits at all and for the mod to work, the  MessageIndex.php file also needs to be editted.

new file is attached. Hope it works for you!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 28, 2009, 08:16:19 AM
Ok I attack also the messageindex.php..
In this file I can't find this code:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

But this:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)

Thanks Very Very Much!



Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on October 28, 2009, 03:17:16 PM
OK, try this one and let me know if it works. I do not use the smf 2.0 RC2 version, so I cannot test it for you.

If it does not work, I can't help you any further, and you should find someone else or the creator of the mod. The
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

is part of the SMF 2 rc1 code, and apparently that has changed in the RC2 version.

modified file is attached.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 28, 2009, 06:57:51 PM
Thanks You Julesw for your Help  ;)

In 2.0 RC1.2 this mod don't work also I use Julesw's file :(

Bye!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 28, 2009, 07:42:12 PM
Might need to do a manual install seems to be a bug with SMF's package parser.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 28, 2009, 07:58:57 PM
Quote from: NeoXII on October 26, 2009, 07:31:52 AM
Hi,
great mod but on SMF 2.0 RC1.2 in MessageIndex.php I can't find this code:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

But this:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)

If I try to replace with this, I have blank page:

LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

Thank You very much!! :)

Hi Vbgamer45,
yes I think so but I have problem above...

Thank You!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 28, 2009, 08:08:26 PM
Change

LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

To

LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 28, 2009, 08:57:13 PM
ok...

this is the error message after your tips...

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN smf_messages AS ml ON (ml.id_msg = t.id_last_msg)
INNER JOIN smf_' at line 17
File: /MessageIndex.php
Riga: 428
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 28, 2009, 08:59:02 PM
Can you attach the file? Are you using MySQL?
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 28, 2009, 09:02:07 PM
Yes I have mysql on my server.....
In Smf 1.1.10 your mod work perfectly!

Ok I attach the file..
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 28, 2009, 09:20:21 PM
Fixed file attached
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: samurai-lupin on October 29, 2009, 09:09:32 AM
Hello, can this mod also be adjusted so it will display a thumbnail on the new posts / replies index page?
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on October 29, 2009, 02:59:20 PM
Ok Vgamer45, now mod work perfect!!
   
Thanks for your help... ;)

How can I do to have not only the first attached on Thumbnail but also other attached in Topic?
My curiosity is because I have a forum of Computer Graphics.
Users open work in progress and it would be interesting to have a preview of the work...

Thank you... excuse me if my english is not very good.  :)
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on October 29, 2009, 03:04:14 PM
QuoteChange
Code: [Select]
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
To
Code: [Select]
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)

Strange, that's what I did as well... must have made a mistake somewhere.

A well, glad you got it sorted!
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 29, 2009, 07:28:59 PM
Yeah look at the file that I fixed and compare it to see if you made any differences.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on October 30, 2009, 09:50:02 AM
This Mod is exactly what I am looking for on my forum.   :D  Its why I decided to stay with SMF  ;D

Im using SMF 2.0 RC1.2

I uploaded it and it installed with no errors but Im not sure where to go to turn on the option (from reading this thread, it looks like you turn something on).

Anyway, not sure what I need to do or where to go in the Admin section.

Thanks
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on October 30, 2009, 12:30:43 PM
There is no settings in the admin panel.

If you are using a custom theme it will require an edit to a file in the custom theme.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on October 30, 2009, 12:59:35 PM
Quote from: vbgamer45 on October 30, 2009, 12:30:43 PM
There is no settings in the admin panel.

If you are using a custom theme it will require an edit to a file in the custom theme.

Ok, ummmmm what file would I edit and exactly what do I need to edit?  Or where do I find the information to edit.

Im computer illiterate most of the time  :P

Thanks Bunches  :D
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on October 30, 2009, 01:34:00 PM
QuoteOk, ummmmm what file would I edit and exactly what do I need to edit?  Or where do I find the information to edit.

you can use a package parser to check which files you need to edit, you can also parse the installation instructions at the download site of the mod
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: NeoXII on November 04, 2009, 05:57:41 PM
How can I modify your code to see the last attachments in topic?
Complicated?

Thank You  :)
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on November 04, 2009, 07:53:09 PM
Little bit you can check out the install instructions and try to modify it except going to be hard to figure out what the last attachment is probably another sql query is needed. or if you can get the last attachment id somehow.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: samurai-lupin on November 05, 2009, 02:13:49 PM
Hello, can this mod also be adjusted so it will display a thumbnail on the new posts / replies index page?
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: vbgamer45 on November 05, 2009, 08:07:44 PM
Probably don't know the code to do it though.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on November 10, 2009, 12:31:42 PM
Quote from: JulesW on October 30, 2009, 01:34:00 PM
QuoteOk, ummmmm what file would I edit and exactly what do I need to edit?  Or where do I find the information to edit.

you can use a package parser to check which files you need to edit, you can also parse the installation instructions at the download site of the mod

I just tried opening the parse instructions for RC1.2 and they said it wasnt compatible and wont show the instructions for manual install.

Not sure what to do now.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on November 10, 2009, 01:25:16 PM
QuoteI just tried opening the parse instructions for RC1.2 and they said it wasnt compatible and wont show the instructions for manual install.

Not sure what to do now.

MessageIndex.template.php
Find:

<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>


Replace:

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


Find:
echo '

<tr>

<td class="windowbg2 icon1">

<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />

</td>

<td class="windowbg2 icon2">

<img src="', $topic['first_post']['icon_url'], '" alt="" />

</td>

Replace:
echo '

<tr>

<td class="windowbg2 icon1">

<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />

</td>

<td class="windowbg2 icon2">

<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 '
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on November 10, 2009, 02:16:25 PM
Ok, I found this info under MessageIndex.php
and this is all I found...
Quote// Grab the appropriate topic information...
   if (!$pre_query || !empty($topic_ids))
   
   // Thumbnail Topic Mod
   if (isset($modSettings['photo_boards']))
      $modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
   else
      $modSettings['photo_boards'] = array($board);
   
   // Used to decide if we thumbnails are shown on this topic listing page
   $context['show_thumbnails'] = false;
   
   // End Thumbnail Topic Mod


   {
      // For search engine effectiveness we'll link guests differently.

I cant seem to find a MessageIndex.Templete.php
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on November 10, 2009, 02:30:23 PM
QuoteI cant seem to find a MessageIndex.Templete.php

Its in the theme folder.(themes/themename) Could be that your theme doesn't have its own file, but then the default file would be used, and that one should be edited when you installed the mod through. What theme are you using?
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on November 10, 2009, 02:39:42 PM
Quote from: JulesW on November 10, 2009, 02:30:23 PM
QuoteI cant seem to find a MessageIndex.Templete.php

Its in the theme folder.(themes/themename) Could be that your theme doesn't have its own file, but then the default file would be used, and that one should be edited when you installed the mod through. What theme are you using?

Im using BacknBlack by Crip

Update:  I just checked my default template and the thumbnail is not working in that either.  So Im going to look and see if I can find the info in the messageindex.template.php
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on November 10, 2009, 02:54:14 PM
I saw that your theme does not have its own messageindex.template file, so the edits should be present in the default template file.

The mods shows the first attachment to a post, so that should be an image file. It does not show the first image in the post (just making sure you have a image file attached)

I did not have to switch it on (I'm using 1.1.10, not sure that makes a difference)
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on November 10, 2009, 03:01:07 PM
Quote from: JulesW on November 10, 2009, 02:54:14 PM
I saw that your theme does not have its own messageindex.template file, so the edits should be present in the default template file.

The mods shows the first attachment to a post, so that should be an image file. It does not show the first image in the post (just making sure you have a image file attached)

I did not have to switch it on (I'm using 1.1.10, not sure that makes a difference)

Oh, I think I put just an image and not an image attachment.  Now I feel really stupid  :-[

Now I have to figure out how to attach an image.
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on November 10, 2009, 03:12:59 PM
It should be under "aditional options" when you reply to a post (not quick reply)

In admin panel you have to check if you allow users to post attachments. Its in the Attachments and avatar section of the admin panel
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: The Goblin on November 10, 2009, 03:16:52 PM
Quote from: JulesW on November 10, 2009, 03:12:59 PM
It should be under "aditional options" when you reply to a post (not quick reply)

In admin panel you have to check if you allow users to post attachments. Its in the Attachments and avatar section of the admin panel

Got it!   ;D  Though I do feel like a moron.  Yes, I missed somewhere that it has to be an attachement.  Plus I had disabled attachments, so that didnt help in the least.

Thank you sooo much for the help.  Sometimes its just so simple yet we cant see it  ::)
Title: Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
Post by: JulesW on November 10, 2009, 03:18:49 PM
Glad I could help! Glad you got it sorted!

J
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on November 10, 2009, 10:55:07 PM
Updated for SMF 2.0 RC2!
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: javierjp on November 11, 2009, 04:17:45 AM
Hi, i have a problem with this mod, I attached a large image to a topic, in listing the image is large too, not a thumb, any idea?

edit: The image is large only when i have "Resize images when showing under posts" OFF in admin panel.
However if i turn on these option, the listing show a thumb but inside the topic it show a clickeable thumb too!

Exist any way to show a large image inside the topic? not a "click to enlarge" thumb?

Somebody have this problem too?

excuse my english.
grettings and thanks in advance.
Javier


Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Tanks on November 11, 2009, 10:24:11 AM
Works just fine on my SMF 2.0 RC2.

I was wondering if there was any way to have this work for show posts since last visit ?

(/index.php?action=unread)

Cheers,

Tanks
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: JulesW on November 11, 2009, 01:24:40 PM
QuoteExist any way to show a large image inside the topic? not a "click to enlarge" thumb?

Upload the pic to photobucket (or any other picturehosting website and put the link between [img] tags in the post or am I thinking too simple now?
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: javierjp on November 11, 2009, 04:29:54 PM
Hi, thanks for reply,
Not sense to me, the propose of this mod its just to show a thumb of a attached image in listing.
My english language its  not good, so i will try to explain with images:


The thing its the smf configuration affect the way this mod works, a little Example:

Case 1 - "Resize images when showing under posts" is OFF in admin panel



The result its:

Inside the topic it show the attached image in original size: (correct)


BUT it show in  the listing the image in the original size too! (incorrect)





Case 1 - "Resize images when showing under posts" is ON in admin panel




The mod take the  200 pixels x 200 pixels config.
The result its:


So in listing it show the correct thumb size (200x200) (correct)



BUT Inside the topic now it show the attached image in clickeable thumb size:  (incorrect, i would like a original size image not a 200x200 clickeable thumb, its thats possible? just as vbulletin)


vbgamer45 thanks a lot, you made a very good job with this mod.

thanks in advance, grettings.
Javier
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: JulesW on November 11, 2009, 04:45:57 PM
What I always do is attach an image and show that as a thumbnail, ( with resize images when showing under posts ON) so on the topic listing it shows the thumbnail as you showed. Next, when you upload your image to i.e. photobucket, or imageshack you can put the link to the image between [img] [ /img]  so it shows the image in the post as a large image.
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Tanks on November 12, 2009, 10:46:07 AM
A quick question :)

Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: gwuix2 on November 13, 2009, 07:32:16 PM
I have the following error:
Not unique table/alias: 'big'
Fájl: /public_html/Sources/MessageIndex.php
Sor: 446


I have mods installed but as i saw none of them have modified Sources/MessageIndex.php.
I have no idea what to do.

I made a test forum and on that forum it works perfect.
Btw i have modified it a little bit: http://teszt.rapszajt.com/index.php?board=1.0 (http://teszt.rapszajt.com/index.php?board=1.0)
cool :D

Help me pls, thx.
I attached the .php file.

EDIT: I solved this, i dunno what was the problem, i simply overwrited the file with the working one form the test forum ( barbarian huh? ) :)
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Liam. on November 15, 2009, 08:26:01 AM
Could there be an option of which thumbnail to show? That'd be epic!

Quote from: Tanks on November 12, 2009, 10:46:07 AM
A quick question :)

Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??

It only does every so often for me. Strange :/
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Tanks on November 15, 2009, 09:44:22 AM
Quote from: iKorp on November 15, 2009, 08:26:01 AM
Could there be an option of which thumbnail to show? That'd be epic!

Quote from: Tanks on November 12, 2009, 10:46:07 AM
A quick question :)

Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??

It only does every so often for me. Strange :/

Yeah it only happens sometimes, very strange bug ay ? :D
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Ryan on November 24, 2009, 09:36:51 PM
I love this mod, but as requested in 2008 by sombody else, this mod definately needs a option to turn it on in selected boards, it can be a bit messy, round whole forum, especialy on boards that dont contain many attachments, but i realy do want this mod, as theres plenty of boards which are used mainly to attach images, just wis i could select them boards for it to be activated on..

I believe last time i used this mod i set boards to use a different theme, and only installed the mod on that theme, but thats one hella annoying way todo it lol.

Do you think this feature will be far along?

Thanks for all the work you do its a great mod!
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on November 24, 2009, 09:43:08 PM
Probably a couple months away before adding more features.
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: SilverKnight on December 10, 2009, 05:06:56 AM
Quote from: vbgamer45 on November 24, 2009, 09:43:08 PM
Probably a couple months away before adding more features.

Aww... I was kinda hoping you would do it by at least January :P

Features id like to see:
-Option to enforce uploading image (from thread, not attachment)
-Option to place a template over the image (watermarks)
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: TDNY on December 10, 2009, 01:22:56 PM
I have smf default core vers. 1.1.11, Here is a link to a problem I had when I changed permissions. When I made it so guests can't view attachments, there were problems logging in on any board that had thumbnails on the topic. I removed the mod and do not have the problem anymore. Here is the thread.
http://www.simplemachines.org/community/index.php?topic=351366.0 (http://www.simplemachines.org/community/index.php?topic=351366.0)
TDNY
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: pequepsp on December 13, 2009, 05:52:40 AM
Hello,

how can i put your mod here?
http://i50.tinypic.com/2q0nlsw.png

thanks you
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on December 13, 2009, 11:35:27 AM
You would have to modify the MessageIndex.template.php and change the order of the columns
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: diontoradan on December 15, 2009, 10:54:56 AM
this mod is what i need...

i just want it to have some function like selecting particular boards and the ability to set thumbnail size in topic listing.

please update thanks
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on December 15, 2009, 03:25:37 PM
Size is controlled by your attachment and avatars settings
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: blokey on December 15, 2009, 05:35:51 PM
i am having a similar prob put 20 by 20 in attachments settings yet still 100 by 100

just checked my server and my gif  has become a binary file as attached is this right



Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: blokey on December 17, 2009, 06:14:59 AM
Quote from: vbgamer45 on December 15, 2009, 03:25:37 PM
Size is controlled by your attachment and avatars settings


ok I will ask the question again,,,,,,,,,,,


whatever size attachment i upload it does not resize it, is it this mod or something else,,,,

If it is this then please explain how I overcome these issues.


If not then where do I go?
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on December 17, 2009, 09:17:45 AM
That's the only place for settings. This mod does not add any settings to control sizes. You might have to edit the source of MessageIndex.template or MessageIndex.php to get the size needed
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: blokey on December 17, 2009, 11:38:25 AM
Thanks

Foubd This

'width' => $row['thn_width'],            
'height' => $row['thn_height']

Do not understand syntax THn


Akhhhh Think I have found it

Sorry to be a pain but just trying to sort it,,, I know you are all busy, but hey it teaches me????

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



Ha haaaaaaa found it and done it thanks


Its in the message index template.



Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on December 17, 2009, 08:45:36 PM
Glad you got it!
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: ScopeXL on December 22, 2009, 06:21:47 PM
Cool mod, thing to make it work better is selecting which boards to show a thumbnail and the others remain the same. Otherwise great mod!
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: mikeymx5 on January 03, 2010, 01:53:14 PM
Any chance on adding the core into your code, I dont like doing manual editing of files and I have no intention of using the crappy curve theme.

its very easy to do.

in themes/core/MessageIndex.template.php

Find
<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>
replace with
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding">&nbsp;</th>

Find
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>

Replace with
<td class="', $alternate_class, ' icon2">
<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 '
</td>



Please add this to your install file
Thanks
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on January 03, 2010, 01:59:24 PM
What does it do?
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: mikeymx5 on January 03, 2010, 09:53:54 PM
Quote from: vbgamer45 on January 03, 2010, 01:59:24 PM
What does it do?

This is just what needs to be replaced so that the CORE theme in RC2 will show previews just like the CURVE theme does.
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: blokey on January 06, 2010, 10:47:40 AM
Have just noticed something,,,,
When you create a new topic pictures work fine.
When it is an old topic before install of this mod and you add a pic it does not show?
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Smoki1988 on January 06, 2010, 12:12:01 PM
i installed the mod and went to a topic and added a attachment but it doesn't show in the forum that the topic exists..but is shows in the topic itself..any idea??
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: blokey on January 06, 2010, 12:18:55 PM
bet if you create a new topic it works
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: Smoki1988 on January 06, 2010, 12:22:43 PM
Nop i tried to create a new topic but still it doesn't show still..
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: mikeymx5 on February 23, 2010, 05:18:18 PM
Is it possible to make the first image show up in the calendar is it is linked to a post as an event? O:)
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: vbgamer45 on February 23, 2010, 05:19:51 PM
Not currently.
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: sinnedobi on February 25, 2010, 09:37:10 AM
Hello,
I have install this mod but it don't work on my site, i have a buy and sell site and using smf. I want to make some cahnges to my site and if you can help me tell me how much is the damage,  and my e-mail [email protected] thank you

Dennis
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: sinnedobi on March 05, 2010, 05:09:32 AM
Hello

I need a modification for my site ******blerje.info, if you can t see the link search on google Gazeta ******blerje all i need is a modification to display thumbnail on board where topics are listed, Can any one help me, my e-mail is [email protected] and i can pay something for this mod.

Thank you

Ps I have try all modifications on modifications section but they don t workon my site
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on March 08, 2010, 07:50:05 PM
Updated for SMF 2.0 RC3!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: carajo on March 14, 2010, 04:10:23 AM
work's perfect in RC3,

  Thanks for this mod!!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on March 14, 2010, 10:46:22 AM
No problem glad you enjoy it.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: Tanks on March 29, 2010, 08:20:06 AM
Quote from: Constantin Os on March 29, 2010, 06:59:00 AM
is there possibility to fix thumbnail size, as example 80*80? may be change some thing in code ?

It will output the same thumbnail size as you the attachment thumbnails that are shown below a post.

Best thing is to set a fixed width and leave the height alone. this will look best in your design.

You can change the thumbnail size under #  Administration Center »  Attachments and Avatars » Attachment Settings
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on March 29, 2010, 11:06:56 AM
Can anyone give me some assistance?

Im running SMF 2.0 RC3 with a custom theme (BlackRain2)

This theme has it's own Messageindex.Template  file.  I can not locate the code in it to replace.

Can i have a second set of eyes look at mine (attached) to verify that im not going blind?

thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on March 29, 2010, 02:56:57 PM
All is well now.
I just followed these instructions

http://www.simplemachines.org/community/index.php?topic=232539.msg2350858#msg2350858
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: flashsteam on April 20, 2010, 04:22:34 PM
I need some help with this mod,

In trying to find (from comment #6) in the script

QuoteFor that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

That should do it.

Where exactly do I look for this. Im trying to control the size of the images in the topic list, to 50 pixels height and 60 width. Ive made this type of change before, but I just cant seem to locate /index.php?action=manageattachments  My forum version is 1.1.11

Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: iosys on April 20, 2010, 06:03:54 PM
To change the maximum size of posted images:
As an Administrator » Configuration » Features and Options » Basic Features

To change the maximum size of attached images:
As an Administrator » Forum » Attachments and Avatars Manager » Attachment Settings

I remember I had to have a tradeoff with the attached images mod but cant remember which of these I had to set.  Anyway try them and you should be right.

The online manual for smf is here:
http://docs.simplemachines.org/index.php?board=7.0
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: flashsteam on April 20, 2010, 08:20:57 PM
Hi iosys,

Thanks for the reply. Ya, last night I was all over the ACP. Before I go any further I should mention that I had to install a mod a while back, in order to use inline attachments. The link to my topic in 1.x support is here-

http://www.simplemachines.org/community/index.php?topic=364410.0

After the mod was installed, there was a problem with the images mirroring under the post's. So inturn I had to change the script a little. Actually the change was very minor. It was changing this- if ($attachment['is_image'])  to this- if ($attachment['is_image'] && 1 != 1) pretty simple, I used ftp to do it.

However I do not believe this is causing my problem. But it could be related.

I must keep the box checked "Display image attachments as pictures under post: "  in "Attachment Settings" in order to see the inline attachments at all, or they will disppear without that box checked.

Here's whats acting weird, in "attachment settings" if I check the box for "Resize images when showing under posts: " Then if I click on those images with that box checked, in the topic list, both the inline attachments and the images will be set to what I have set in "Attachment Settings" under max height and width of thumbnails. Then once I veiw both images (from topic list and inline, then uncheck that box [resize under posts]) the topic list images will stay at my thumbnail setting, and the inline attachments will be full size as they should be. Im other words, everything looks how I would like, after I do that. like I said, weird.

For what is worth I would still like to find the script that-

QuoteFor that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

That should do it.

I just need to be able to find it with ftp, which directory its in, etc.

Best

Jeremy

 
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: Snogmarr on April 20, 2010, 09:07:59 PM
Can somebody alter my php file attached it causes errors in my forum because i have different code and when I edit it; it will not work.

Never mind I have done it!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: Snogmarr on April 20, 2010, 09:22:57 PM
Quote from: iosys on April 20, 2010, 06:03:54 PM
To change the maximum size of posted images:
As an Administrator » Configuration » Features and Options » Basic Features

To change the maximum size of attached images:
As an Administrator » Forum » Attachments and Avatars Manager » Attachment Settings

I remember I had to have a tradeoff with the attached images mod but cant remember which of these I had to set.  Anyway try them and you should be right.

The online manual for smf is here:
http://docs.simplemachines.org/index.php?board=7.0





this  is fine but if you wish to enlarge the size of the posted image then the image in the topic enlarges as well

the best way is to open the message index template php in themes your theme  and find this

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



and simply replace to the size you wish,, this way it stays fixed

so replace with this

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



Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: flashsteam on April 20, 2010, 10:23:37 PM
Ahhh, not to sure about that.

Im looking for

Quote/index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

Also I am using a custom theme, never the less, im looking in the "default" theme for this code, a simple confermation that its there would be nice. I plan on going thru the whole file/script tommorrow, looking for it. After that im not sure where to look.

In doing what I mentioned above, I am getting the result I want, so I may just do nothing, I checked my forum on a remote/different computer and the forum looks good/ sofar the change seems to stick.. So, I do have a work-around at this time. Just being nitpicky I guess. I had a guy make my custom theme as a gift, for my forum, he has both Admin and ftp access, nice fellow, can't thank him enough. He's also been helping me with a gif animation control slider, and possibly a flash animation fer my main site.

Best

Jeremy
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: iosys on April 21, 2010, 02:37:10 AM
Yeah Id leave it alone for two reasons.  1. If it aint broke dont try to fix it and 2. I have done a number of different smf sites now in 1.1.x and 2.0 and Ive come to the conclusion that custom coding isnt the way to go unless youre fully committed to the extra time and headaches.  The first site I did I custom coded everything but then any mod I wanted to install after that came up with errors cause the code had changed lines.  Anyway if you can achieve the result without touching the back end thats ideal.  :)  happy days
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: Snogmarr on April 21, 2010, 04:24:07 AM
QuoteIm looking for

index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

Also I am using a custom theme, never the less, im looking in the "default" theme for this code,

This is not a piece of code and in relation to this mod it exists nowhere apart from inside somebody's head.

this is a link into the admin panel.
Ie admin manage attachments change size.

If you really want to find this then look in manageattachments.php
heaven knows what you are going to do when you find it,,,, have fun!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: ajrl on June 09, 2010, 07:43:07 PM
I agree with a comment above.  This is a good mod, but it would be so much better if you could choose which boards get the thumbnails.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on June 09, 2010, 08:08:36 PM
Maybe one day
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: improv on June 20, 2010, 07:20:16 PM
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!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on June 20, 2010, 08:08:12 PM
No time to add it been focusing on other projects. Not really extending my mods mostly just doing bug fixes.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: Klauser on July 28, 2010, 10:19:20 AM
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 '


Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: improv on August 04, 2010, 11:08:18 AM
Yay I found out how to use it on specific board.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on September 07, 2010, 01:27:08 PM
Quote from: improv on August 04, 2010, 11:08:18 AM
Yay I found out how to use it on specific board.

Why not share
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: jasumi on September 18, 2010, 06:01:24 PM
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:
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: allylaurente on October 08, 2010, 03:07:59 PM
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.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on October 08, 2010, 03:11:27 PM
Are the images showing up?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: allylaurente on October 08, 2010, 03:33:57 PM
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.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on October 08, 2010, 03:36:12 PM
Go and attach an image to a new post and see if it show up
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: allylaurente on October 08, 2010, 03:42:25 PM
I just did but still nothing happens.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on October 08, 2010, 03:44:25 PM
See if the mod is working under the default theme
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: allylaurente on October 08, 2010, 03:54:11 PM
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.

Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on October 08, 2010, 03:55:59 PM
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.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: allylaurente on October 08, 2010, 04:24:16 PM
Its working on default theme.  ;)

I thought it will also show on Insert Image on the topic :-[
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on October 08, 2010, 04:53:25 PM
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.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: madman71 on October 08, 2010, 04:55:44 PM
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.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: 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.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: Shades. on November 14, 2010, 07:13:03 PM
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! :)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: thomasjensen on December 15, 2010, 06:14:18 AM
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 ?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: NHWD on January 17, 2011, 06:15:08 PM
i like this but i prefer not to let my member upload attachments (space and safety issues)
is there any way i can just add a custom field on the post template where they insert a url to an image and it shows on the message index?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on January 17, 2011, 06:17:16 PM
That's a possiblitiy but wouldn't be in this mod cause this mod goes off the attachment table.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: NHWD on January 17, 2011, 07:26:06 PM
do you think you can make one like that?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: City Builder on February 12, 2011, 03:52:33 AM
Hi,

I don't think this is working correctly:
Quote!Fixed showing an image if there was another attachment of a different type before it.

On my forums many members upload a .schematic file before their images, and so if they did that, then the image doesn't show up in the index.  Also I've seen some threads that have a .zip file attached first and they also don't show the image that is next in the attachment list to display on the index, so I don't think it's a matter of what type of file is first, just if an image is not first then it's not going to show an image in the index list.

Can I find out how to fix this maybe?

Thanks,

SMF 2.0 RC4 default theme
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: jacqpinks on March 15, 2011, 09:40:32 AM
Quote from: City Builder on February 12, 2011, 03:52:33 AM
Hi,

I don't think this is working correctly:
Quote!Fixed showing an image if there was another attachment of a different type before it.

On my forums many members upload a .schematic file before their images, and so if they did that, then the image doesn't show up in the index.  Also I've seen some threads that have a .zip file attached first and they also don't show the image that is next in the attachment list to display on the index, so I don't think it's a matter of what type of file is first, just if an image is not first then it's not going to show an image in the index list.

Can I find out how to fix this maybe?

Thanks,

SMF 2.0 RC4 default theme

I am in the same boat and would really love a solution to this prob I would really like to use this mod.  I have a theme also Pinst theme
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: City Builder on March 15, 2011, 04:48:21 PM
Im guessing since I wrote that nearly a month ago, that there is no more support for this mod.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on March 15, 2011, 04:54:31 PM
Haven't had time to look at maybe in a couple months only focused on major issues/problems.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC3 Support Added!)
Post by: dougiefresh on March 19, 2011, 07:59:53 PM
Okay, I figured out how to make this mod board-specific.  Here are my changes:

In Themes/default/MessageIndex.template.php, this:

// Thumbnail Topic Mod
if ($context['show_thumbnails'])
should be changed to:
// Thumbnail Topic Mod
if ($context['show_thumbnails'] && @in_array($context['current_board'], $modSettings['photo_boards']))



// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="', $context['show_thumbnails'], $modSettings['photo_boards']) ? 3 : 2, '">&nbsp;</th>
shoud be changed to:
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="', $context['show_thumbnails'] && @in_array($context['current_board'], $modSettings['photo_boards']) ? 3 : 2, '">&nbsp;</th>


In Sources/ManageSettings.php, look for:

// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.
and add the following after it:
array('text', 'photo_boards', '30'),
'',


In Themes/default/languages/Modifications.english.php, add this to the bottom:

$txt['photo_boards'] = 'Enable Thumbnails to be shown on specific boards';


You should now have a new setting in Administration Center » Modification Settings » Miscellaneous.  Leaving it blank will disable it for all boards.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 RC4 Support Added!)
Post by: javierjp on May 17, 2011, 07:06:52 AM
Hi, exist any way to use this with external urls instead attachments?  if not, exist any way to modify the script for that? 

I mean something like a "external url field" in post template (only for the topic list thumb) that url is saved to the DB, and after that the script take these url from the DB and show in topic list.
I mean something very simple,  basically:

-Add a external image url (thumb) to the database.   (no related with topic contents, simply a image url for show as thumb)
-Display these url/image in topic listing.

Would be a great add, i remember the old CMS PHPNuke days, their download module had something similar in add file template, the user had 2 options, one for attach a file and add to the download list, and other for add a external url and use as download link, this would be similar but with images.

excuse my english.
grettings
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on June 15, 2011, 08:24:40 PM
Thank you for the wonderful mod!  I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods.  This mod installed without issues and without emulation.  Hope this info helps someone!

EDIT: Oops... Didn't realize until I viewed the mod download page that this mod was already 2.0 compliant.... and still no way to make it board-specific....  So sad.... :-[
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: crafterschat on June 26, 2011, 03:45:47 PM
I installed the thumbnail on topic listing through the package installer but it doesnt seem to be working.  My forum is located at crafterschat.com.  Any ideas how i can get it to work. Thanks :)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on June 27, 2011, 08:49:22 AM
Is there any chance that this mod will be modified to become board-specific straight out the box?  I posted some info on how to make this mod board-specific a few posts back.....
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 27, 2011, 09:14:17 AM
Quote from: dougiefresh on June 27, 2011, 08:49:22 AM
Is there any chance that this mod will be modified to become board-specific straight out the box?  I posted some info on how to make this mod board-specific a few posts back.....
Maybe at some point just don't have any time at the moment so I doubt it.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on June 27, 2011, 11:07:32 AM
Would it be okay if I made the modifications to the package and sent it to you?  Or I could write a modification for your modification to add that setting to the admin panel's modification settings page.....

Please let me know because this is a feature that would be very nice to have, but not all over the board....
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 27, 2011, 11:11:34 AM
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on July 23, 2011, 04:33:20 PM
Quote from: vbgamer45 on June 27, 2011, 11:11:34 AM
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
I'm sorry.... I won't be able to work with the mod as work is picking up significantly...
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: infoseeker on August 22, 2011, 08:34:35 AM
Thanks a lot for creating this great mod.
Its working perfectly in all my themes. I like this Thumbnail topic mod more than smf gallery.

Good job brother

Wish you all the best.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 22, 2011, 01:51:14 PM
Glad you enjoy the mod!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: apnart on October 30, 2011, 04:49:10 PM
This mod is exactly what I need for my board (dedicated to photography), but I did'nt found the way to reduce thumbnail on topic list. Maybe I missed it in this tread, if you would be kind to help me... it wil be great !


Many thanks !
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: fotografo74 on March 03, 2012, 08:50:02 AM
Quote from: apnart on October 30, 2011, 04:49:10 PM
This mod is exactly what I need for my board (dedicated to photography), but I did'nt found the way to reduce thumbnail on topic list. Maybe I missed it in this tread, if you would be kind to help me... it wil be great !


Many thanks !
In attachments settings, set max width and height of attachments :)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: natasa (NT) on March 22, 2012, 06:53:34 AM
Hello!
Is it possible to change image backgrounds (on topic list)
of sticky and locked topics in corresponding colors?
If it is possible, how can I do that?
Thanks.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: City Builder on April 01, 2012, 07:21:47 PM
Quote from: vbgamer45 on March 15, 2011, 04:54:31 PM
Haven't had time to look at maybe in a couple months only focused on major issues/problems.

Any chance of getting this fixed now?  I still get no image for the topics that do NOT have an image as the first attachment and so don't use the mod but really really want to use it, but it just looks too sloppy when some topic rows have an image and some don't.

Would be really great if you can get some time to make this mod pull the first image in the attachments instead of only trying to pull the first attachment to display on the index.  Or maybe make it so that if it can't find an image in the first attachment slot, then it gets a generic image of our own choosing and displays that instead.  Although it would be preferable for it to pull the first available image attachment instead of giving up and displaying none if an image isn't the first attachment.

Thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: afcbob on April 11, 2012, 03:14:08 PM
Got it sorted now great Mod
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on April 14, 2012, 04:28:56 PM
What if there are multiple attachments, could you limit it to the first one?

Answer: Only the first one!

Excellent modification, my topics look so colourful now ;)

http://biology-forums.com/index.php?board=17.40
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: mageguild on April 17, 2012, 07:53:21 AM
In the MessageIndex.template, I would prefer to show all attached images on the thread instead of just one.  What's the best way to support this?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on April 17, 2012, 11:43:26 AM
Currently doesn't support that. You would have to loop though all the image attachments in the topic and echo each one.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: City Builder on April 17, 2012, 07:25:26 PM
Okay, so is there anybody around that can mod this mod so that it pulls the first image in a list of attachmenents instead of only looking at the first attachment to see if it's an image?  Basically have it display the first image that are attached to a topic, instead of not displaying anything if the first attachment on a topic isn't an image?

Thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on April 17, 2012, 09:05:32 PM
Quote from: City Builder on April 17, 2012, 07:25:26 PM
Okay, so is there anybody around that can mod this mod so that it pulls the first image in a list of attachmenents instead of only looking at the first attachment to see if it's an image?  Basically have it display the first image that are attached to a topic, instead of not displaying anything if the first attachment on a topic isn't an image?

Thanks

That's interesting, never knew of this limitation. You could put a notice to all your members so that if someone is uploading a file and they want their image displayed in the message board, then post the image first and all other files after.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: City Builder on April 17, 2012, 09:25:47 PM
Quote from: Liam_michael on April 17, 2012, 09:05:32 PM
Quote from: City Builder on April 17, 2012, 07:25:26 PM
Okay, so is there anybody around that can mod this mod so that it pulls the first image in a list of attachmenents instead of only looking at the first attachment to see if it's an image?  Basically have it display the first image that are attached to a topic, instead of not displaying anything if the first attachment on a topic isn't an image?

Thanks

That's interesting, never knew of this limitation. You could put a notice to all your members so that if someone is uploading a file and they want their image displayed in the message board, then post the image first and all other files after.
One of the problems with that is we've already got over 10,000 topics with images and other files attached.  The other problem is that when you have over 100,000 members, you find that there is a huge amount of people that can't figure out how to follow instructions, always best to try to fool proof the system to help those that have a hard time following instructions, even something as simple as saying, Upload your images files first, then your other files.

I'd use it the way that it is, but it really just makes the topic indexes look too sloppy with so many missing thumbnail images.  I'm not ocd or anything like that but it just drives me batty to see so many missing thumbnail images.  Which is why it would also be nice if this mod were to use an image that the admin can choose in the admin settings somewhere that could use a default image for those topics that don't have any images attached.  On some of those 10,000 topics there are no images, just other files attached, so while they are not that many, to keep things neat with this mod it would be good to have a default image as well.


Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:

http://biology-forums.com/index.php?board=17.0

When there is no image uploaded, it gives the original icon.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: SMFHacks.com Team on May 12, 2012, 11:39:38 AM
Quote from: Liam_michael on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:

http://biology-forums.com/index.php?board=17.0

When there is no image uploaded, it gives the original icon.
Good idea put it done as feature request.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: City Builder on May 12, 2012, 12:12:10 PM
Quote from: Liam_michael on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:

http://biology-forums.com/index.php?board=17.0

When there is no image uploaded, it gives the original icon.
The thing is that it works well on your forum as your image icons are not much larger than the forums icons, so it looks right at home, but we need to have image icons that people can at least get an idea for what the image is else theres no point to having the image there at all.  I was trying to have images on the index to be about the same size as the users avatars which I think at the time that I was trying to get this to work were about 100x100 or 150x150
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on May 12, 2012, 12:17:09 PM
Quote from: City Builder on May 12, 2012, 12:12:10 PM
Quote from: Liam_michael on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:

http://biology-forums.com/index.php?board=17.0

When there is no image uploaded, it gives the original icon.
The thing is that it works well on your forum as your image icons are not much larger than the forums icons, so it looks right at home, but we need to have image icons that people can at least get an idea for what the image is else theres no point to having the image there at all.  I was trying to have images on the index to be about the same size as the users avatars which I think at the time that I was trying to get this to work were about 100x100 or 150x150

Then what you could do it have a tooltip where if a member moves the mouse over the image, it enlarges it in a popup.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Fearless Freap on February 19, 2013, 03:17:59 PM
I am experiencing an odd occurrence with this mod... First off, let me say... I love it... it is essential for my forum. 

Here's my problem... 

I run a website featuring cheerleaders, and squad rosters.  I want the group photo 1st to become the topic thumbnail, I then post all the individual cheerleaders afterwards.  When I have to finish the post, the thumbnail changes from the group photo to one of the individual photos.

Link to thumbnail : http://www.myfavoritecheerleader.com/index.php?board=179.0

Is there a way to keep it the first file regardless of the number of attachments or modifications to the starting topic?

Thanks,

-Steve
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: LadyAngel on April 16, 2013, 03:25:43 AM
My space and bandwidth are severely limited...is there a way to take the first linked image and show this instead of an attachment?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on April 16, 2013, 08:58:36 AM
Quote from: ladyengland on April 16, 2013, 03:25:43 AM
My space and bandwidth are severely limited...is there a way to take the first linked image and show this instead of an attachment?
Not at the moment.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Neol on April 26, 2013, 05:31:53 AM
Would be possible to show the thumnails on boardindex instead on topic listing?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on April 26, 2013, 11:23:38 AM
Not built into the mod.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Neol on April 26, 2013, 06:49:58 PM
Quote from: vbgamer45 on April 26, 2013, 11:23:38 AM
Not built into the mod.

That's why I asked "Would be possible"!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on April 26, 2013, 06:50:58 PM
Sure it can be done but would need to be coded.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Neol on April 27, 2013, 07:11:14 PM
Quote from: vbgamer45 on April 26, 2013, 06:50:58 PM
Sure it can be done but would need to be coded.

If you code this and sell it as a paid mod, I will buy it. Others should be interested too.

Regards
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: sanax on May 20, 2013, 05:53:36 PM
I installed a new 2.0.4 and install the latest version of this mod but no images are showing up. I checked the files manually and all the changes have been made. Any ideas?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 20, 2013, 05:59:21 PM
Do you have an extra column in your boards where the image would be?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: sanax on May 20, 2013, 06:06:21 PM
Quote from: vbgamer45 on May 20, 2013, 05:59:21 PM
Do you have an extra column in your boards where the image would be?

No. It seems to me the column was never created.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 20, 2013, 06:47:25 PM
And your topics do have an image attachment in the first post?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: sanax on May 20, 2013, 09:06:36 PM
Thanks gamer... seems to me there was a gremlin in the works. Fine now!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 20, 2013, 10:16:31 PM
Glad you have it working!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: iDoiStuff on June 14, 2013, 04:31:18 PM
It doesn't always choose the first attachment. How can I change this? It's vital.

Thanks!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Draffi on July 28, 2013, 03:46:14 PM
It is maybe a good idea, to make a "per-Board"-setting...
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on July 28, 2013, 09:43:19 PM
I have thought about it per board. Someone did make an edit so it only shows on some boards and not others.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on October 25, 2013, 07:25:50 PM
Quote from: vbgamer45 on June 27, 2011, 11:11:34 AM
Quote from: dougiefresh on June 27, 2011, 11:07:32 AM
Would it be okay if I made the modifications to the package and sent it to you?  Or I could write a modification for your modification to add that setting to the admin panel's modification settings page.....

Please let me know because this is a feature that would be very nice to have, but not all over the board....
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
I know it's been a few years, but I finally decided to sit down and write a user interface for both SMF 2.0 and SMF 1.1 for this mod....  Please note that this is pretty much just a checkbox on the admin screen where you modify the board.  It took me about a day to write.  So I thought I'd share my little bit of work with you and the world.... 

@vbgamer45: Thanks again for this wonderful mod.  Please feel free to use my modifications and/or screenshots as you see fit....  (I dubbed this version 2.0....  Hope that's okay!)  I hope this is helpful....

EDIT: Please note I checked to make sure the code worked on a clean copy of SMF v2.0.6 and v1.1.19.   I haven't checked older versions....
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on October 26, 2013, 02:29:36 AM
Nice!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 26, 2013, 05:02:27 PM
Version 2.0 Released!!!
Big thanks to dougiefresh for this update!
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on October 26, 2013, 05:52:58 PM
I forgot to modify the Thumbnail.xml, Thumbnail2.xml and Thumbnail2rc2.xml files to make the same changes as I did to Thumbnail2rc4.xml.....  I realized this earlier today.... Tomorrow, I'll fix this issue.  I apologize about this.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on October 27, 2013, 08:09:24 AM
I downloaded the new mod from the customization site, just to make sure that it was the same as the one I had (mostly because I screwed up my copy  ::) ).  It wasn't, as my changes to the Thumbnail files weren't present..... :o  So I added in the changes necessary to make it board-specific .  I apologize about this.

Version 2.1
!Fixed a BIG bug where the new photo_boards array was always ignored.
+Some speed-related changes to keep from searching the photo_boards array multiple times
+Added max width/height settings to the Modifications Settings area as suggested here (http://www.simplemachines.org/community/index.php?topic=232539.msg1680633#msg1680633) (SMF 2.0 Only)
+Modified code to produce a "no picture" image as suggested here (http://www.simplemachines.org/community/index.php?topic=232539.msg2210634#msg2210634) (SMF 2.0 Only)
+Added support for the Core theme as suggested here (http://www.simplemachines.org/community/index.php?topic=232539.msg2435536#msg2435536)

@vbgamer45: I would like to suggest changing the topic and/or mod name to something like "Thumbnail on Topic Listing (SMF 2.0 and Per-Board Support Added!)"....  Would get more hits from those people that think this mod has no per-board support in it....  Just a thought....  8)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: overscan on December 07, 2013, 07:11:06 AM
Nice mod - I'm trying out on my beta forum at present. The alternate image setting was awesome, thanks. However the size limits don't function as I expect.

If I have put in

Width: 150
Height: 90

I expect the image to be no wider than 150 and also no taller than 90. This is how the size limits on SMF thumbnails work.

Example: I have a thumbnail 300 x 108 in topic first post.

I get, in the website code:

<img src="blahblah" width="218" height="90" alt="">

This is actually wider than my setting of 150 and so makes the thumbnails look ragged and unattractive.

I would expect, given the settings input above, that the image would be shown as 150 x 54 (smaller than limit size in both axes).

Thanks for the mod, hope this is constructive feedback ;)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: overscan on December 07, 2013, 07:34:05 AM
In fact, I just put my attachment size to 300 x 300, left mod limits at 150 and 90, and I'm getting


<img src="blahblah" width="300" height="196" alt="">


300 x 196 is the full size of the attachment. So it seems to not be resizing correctly at all.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: makv on January 15, 2014, 11:34:46 AM
Quote from: dougiefresh on October 25, 2013, 07:25:50 PM
Quote from: vbgamer45 on June 27, 2011, 11:11:34 AM
Quote from: dougiefresh on June 27, 2011, 11:07:32 AM
Would it be okay if I made the modifications to the package and sent it to you?  Or I could write a modification for your modification to add that setting to the admin panel's modification settings page.....

Please let me know because this is a feature that would be very nice to have, but not all over the board....
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
I know it's been a few years, but I finally decided to sit down and write a user interface for both SMF 2.0 and SMF 1.1 for this mod....  Please note that this is pretty much just a checkbox on the admin screen where you modify the board.  It took me about a day to write.  So I thought I'd share my little bit of work with you and the world.... 

@vbgamer45: Thanks again for this wonderful mod.  Please feel free to use my modifications and/or screenshots as you see fit....  (I dubbed this version 2.0....  Hope that's okay!)  I hope this is helpful....

EDIT: Please note I checked to make sure the code worked on a clean copy of SMF v2.0.6 and v1.1.19.   I haven't checked older versions....

dougiefresh, I'm on 2.0.6 and have installed the mod. I have used the checkbox on some boards but not others, but the settings seems to be ignored and all boards are displaying thumbnails. Any thoughts?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: crimpson on March 12, 2014, 06:28:27 PM
Is there any way (manually or otherwise) to fix the background of the sticky topics where it's broken by the extra table cell?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: crimpson on March 12, 2014, 07:52:42 PM
Is there a way to link the thumbnail directly to the image instead of the thread?
Would it also be possible to add the img tag to the thumbnail so that fancybox would work on the thumbnails?
fancybox (http://custom.simplemachines.org/mods/index.php?mod=3303)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: 2greedy on March 23, 2014, 12:15:27 AM
Hi guy's
Could this be made to pull images from imagehost's as well? what i mean is i have postimage.org as my images host, can it be made to pull the first image of the post as topic pic?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on March 23, 2014, 12:42:21 AM
It could be but currently does not.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: 2greedy on March 24, 2014, 04:18:53 PM
would be good if you could vbgamer
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on March 24, 2014, 04:22:38 PM
No time maybe paid job.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on March 27, 2014, 04:16:48 PM
How do I prevent a broken image from showing up if I've uploaded an SWF file?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: mossite on May 11, 2014, 07:46:53 PM
i could not install this mod, it says
Error in Package Installation
3.    Execute Modification    ./index.php    Test failed
1.    Replace    ./index.php    Test failed

please who can assist me to install it
thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Biology Forums on June 05, 2014, 09:49:05 PM
In my forum, swf files are permitted for upload. This shows as a broken image in the board. What should I do to correct this?

Found a solution:

Change

elseif ($row['bigId'] != 0 && $row['bigWidth'] > 0 && $row['bigHeight'] > 0)

To

elseif ($row['bigId'] != 0 && $row['bigWidth'] > 0 && $row['bigHeight'] > 0 && strpos($row['thnFilename'],'swf') !== false)
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: brigcam on June 22, 2014, 09:10:11 AM
Quote from: Tanks on November 11, 2009, 10:24:11 AM
I was wondering if there was any way to have this work for show posts since last visit ?

(/index.php?action=unread)

I second this, I'd like to make it work on that page too.

Everything else, great mod :) I'd pay for it too!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: mossite on July 15, 2014, 04:25:29 AM
Can anyone install this cool mod for me and the fee
thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: radu81 on July 15, 2014, 05:29:39 AM
https://www.youtube.com/watch?v=Xsqrrg6wuZA

it's very easy to install a mod on SMF, you can do it by yourself. The mod is working fine with the latest version of SMF.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: mossite on July 15, 2014, 04:55:39 PM
i got Error in Package Installation when i tried to install it. what can i do
3.    Execute Modification    ./index.php    Test failed
1.    Replace    ./index.php    Test failed
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Cmely on August 04, 2014, 06:41:12 PM
Thank you very much for this mod !  :D
I strongly appreciate it, especially because I'm running a photography forum ! It is a great addition to the forum !
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 04, 2014, 07:29:34 PM
Glad you enjoyt it!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Cmely on August 07, 2014, 01:30:39 PM
Quote from: vbgamer45 on March 24, 2014, 04:22:38 PM
No time maybe paid job.

Are talking about adding the "[img]" feature Vbgamer ?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 07, 2014, 02:23:54 PM
Yeah but at the moment I am extremely busy.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Cmely on August 07, 2014, 03:00:20 PM
Quote from: vbgamer45 on August 07, 2014, 02:23:54 PM
Yeah but at the moment I am extremely busy.

Please let me know when you think you'll have time. I'm interested by this addition.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: dougiefresh on August 11, 2014, 07:28:43 PM
@SMFHacks.com Team: If you are interested, I'd be willing to maintain this mod for/with you.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 11, 2014, 08:21:43 PM
Quote from: dougiefresh on August 11, 2014, 07:28:43 PM
@SMFHacks.com Team: If you are interested, I'd be willing to maintain this mod for/with you.
I generally like to keep mods just since used for traffic purposes.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: mossite on October 11, 2014, 04:59:28 AM
The image size too big just as posted not thumbnail.
can anyone help
thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: LadyAngel on October 26, 2014, 08:17:17 AM
I love this mod, but for some reason, even then the box is unchecked for a forum, the thumbnail still shows. Also, it won't work on child boards, just the main ones. :(
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: thananit on October 29, 2014, 12:33:34 AM
I'm sorry,my Englisg is not good but I try to explain.
I need help and suggestion.
I used SMF2.0.9 and download package of Thumbnail on Topic Listing's mod but index.php was fail.(I used mod of Pretty url before the Thumbnail on Topic Listing )
And I try to mod by manual that follow a guideline http://custom.simplemachines.org/mods/index.php?action=parse (http://custom.simplemachines.org/mods/index.php?action=parse).
But the index page not run, it's blank page.
Please help to see my code in index.php, how to edit it to correct?
$context = array('pretty' => array(
   'action_array' => unserialize($modSettings['pretty_action_array']),
   'board_urls' => unserialize($modSettings['pretty_board_urls']),
   $context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 29, 2014, 09:45:17 AM
Change to

$context = array('pretty' => array(
   'action_array' => unserialize($modSettings['pretty_action_array']),
   'board_urls' => unserialize($modSettings['pretty_board_urls'])
);

$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: thananit on October 29, 2014, 11:05:15 AM
Quote from: vbgamer45 on October 29, 2014, 09:45:17 AM
Change to

$context = array('pretty' => array(
   'action_array' => unserialize($modSettings['pretty_action_array']),
   'board_urls' => unserialize($modSettings['pretty_board_urls'])
);

$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();


Thank you vey much.
:) :) :)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 29, 2014, 11:05:44 AM
Glad to help
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: tdguchi on December 17, 2014, 01:49:54 PM
hi, is there any way to modify this mod to use the first  [ img ] [ /img ] instead of the attachment?

thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on December 17, 2014, 01:57:20 PM
Not at the moment.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: tdguchi on December 17, 2014, 02:08:28 PM
ok....well i needed it, im using createpost to add posts to my forum.... and i dont know how to add attachments.... (i have read createttachment() but that is not working.... i will wait them to modify to use an img instead of attachment...
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on December 18, 2014, 08:54:36 AM
Img part is somewhat tough...Since you have the scan the post for all the image tags which is harder/slower than attachments since attachments can easily be linked.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: tdguchi on December 18, 2014, 09:21:03 AM
a quick solution is to download the image (via script) and autoattach it to the newly created post automatically... do yo know how to attach via script a local file on the srrver?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Arantor on December 18, 2014, 09:31:23 AM
That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: tdguchi on December 18, 2014, 12:17:56 PM
Quote from: Arantor on December 18, 2014, 09:31:23 AM
That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.

ok... then I will wait for them to write the functionality to find the first image of the post ....
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: br360 on January 29, 2015, 02:03:58 AM
Quote from: tdguchi on December 17, 2014, 01:49:54 PM
hi, is there any way to modify this mod to use the first  [ img ] [ /img ] instead of the attachment?

thanks

That seems to be one of the most requested features to add to this mod, and something I would really like to see added as well.

@vbgamer45, I would be happy to pay for this addition to the mod. Please feel free to pm me with costs if this is something you would be willing to do.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on January 29, 2015, 09:43:53 AM
The issue with this is much slower to process. I would have to scan the post for the image.  Or when the post is created add the image into a table.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: br360 on January 29, 2015, 02:09:47 PM
When you say much slower to process, are you referring to it becoming more resource heavy when pages are loaded? Maybe an option to enable or disable this feature for those that wouldn't want to use the extra resources and would be happy with just thumbnails?

I know this has been done and there are mods for this on vbulletin, xenforo and even phpbb. ( it shows the first pic in a topic on forum index, no matter if it's an img or attachment )

If you did have some time and were able to accept an offer for me to pay you to add this; maybe you could look at the coding for any of those mods to see how they were able to accomplish this, and if there was an easier way?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on January 29, 2015, 03:05:16 PM
Yes when ever the message index is loaded. I would have to grab the first post from the database. Search it for the first image tag extract that tag then place it on the message index quick and dirty I can do that for $75
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: br360 on January 29, 2015, 03:16:38 PM
That'll work. Can I pm you about specifics and such?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on January 29, 2015, 03:18:47 PM
Sure.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: roshaoar on April 27, 2015, 08:36:21 PM
Quote from: br360 on January 29, 2015, 02:03:58 AMThat seems to be one of the most requested features to add to this mod, and something I would really like to see added as well. @vbgamer45, I would be happy to pay for this addition to the mod. Please feel free to pm me with costs if this is something you would be willing to do.

Maybe I've misunderstood this (I'm new here, sorry), but if it's for public offering I'd happy to chip in half as I'm in the long winded process of thrashing out a photography forum and, well, this could be rather nice... could it be a function that looks at the post and either posts the first image (if there's one) or if there's an attached image, post that thumbnail instead?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: roshaoar on May 01, 2015, 04:51:59 AM
Just an addendum to this, and my offer still stands vbgamer45 :) Something I'm starting to learn as I play around with SMF is that the order of installing mods makes a difference. I couldn't for the life of me get this to work on my 5th testsmf install. But I now realise that some of the other mods had changed something that this mod looks for to pass its tests. On this install I stuck to much simpler mods and this installed just fine. Thanks again vbgamer45

Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 01, 2015, 08:59:44 AM
At this time I am very busy with other projects not looking to take on any other work.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: roshaoar on May 04, 2015, 02:31:52 PM
Can I ask - is the thumbnail retrieved from a saved copy, or is it regenerated each time?

Thanks
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 04, 2015, 02:43:39 PM
If it is remote it is fetched each time.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: roshaoar on May 04, 2015, 03:12:07 PM
Thanks VB. Sorry I should have been more specific. For attachments - they're local, so presumably it's a stored thumb somewhere right?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 04, 2015, 03:25:30 PM
Yeah I belive so
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: roshaoar on May 04, 2015, 03:49:24 PM
Ta, thought so. Btw very easy to make thumbs here, and just here, smaller. I added a non-existent class into the img tag, and added max-width css against that class.

Also fwiw, this will need a little tweak for use with responsive curve. RC looks for "<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>" but I think it's this mod that added the switch and replaced it with "<th scope="col" class="first_th" width="8%" colspan="', $context['show_thumbnails'] ? 3 : 2, '">&nbsp;</th>" -- also beyond that since there's now an extra column, the colspan css that hides stuff with responsive is a bit out. I'm sure you'll see when you get to it :)
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: roshaoar on May 05, 2015, 05:48:22 AM
I was thinking that a nice way to have this for images added using [img] without any performance hit might be to use an image proxy like this post - http://www.simplemachines.org/community/index.php?topic=527996.0

One of the parameters you can input is width - so if you added the thumbnail width size as the parameter that'd get a nice quick thumbnail without any processing on the forum server's end. Of yourse you still have to look through that first post, find first image and then create the url for the thumbnail version to post on the topic listing. If anyone has any snippets that look through the first topics like this does, that I could adapt to mod my mod, that'd be very cute...

-Johan
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Blue-Suit on May 17, 2015, 11:06:12 AM
Ok when i try to install this I get the following


QuoteExpression #18 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'fac-forum.att.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

This I think is because I am running mysql 5.7

Any advice?

Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 18, 2015, 01:16:35 AM
Not sure
try disabling only_full_group_by in MySQL?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Blue-Suit on May 19, 2015, 05:51:27 AM
Hmm I am not very clever with mysql, in fact stupid would be a great word to use,

so I did this

SET sql_mode = ''

And i still got the same results?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 19, 2015, 10:07:49 AM
I don't know as well this is something new I would check out some mysql forums or sites and post a topic on that.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: Blue-Suit on May 28, 2015, 12:19:41 PM
Well I went on the oracle forums and after 12 posts arguing between themselves on what I should do, I gave up. lol
I truly thought that after 18 months 5.7 would be out by now. Anyway I decided to install 5.6.23 as well as my 5.7 dev and uploaded the db after some twiddling it worked

Thanks!!!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on May 28, 2015, 01:42:48 PM
Glad you have it working now!
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: wzol on July 24, 2015, 12:57:49 AM
Is it possible for the thumbnail to show not the first, but the last/newest attached image?
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: vbgamer45 on July 24, 2015, 08:55:43 AM
Not currently you would need to modify the sql statement.
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: wzol on July 24, 2015, 09:06:22 AM
If you can tell me what to change, I will do it - but I suppose it is not as easy as replace ASC to DESC. :(
Title: Re: Thumbnail on Topic Listing
Post by: Yahmez on October 06, 2015, 04:01:08 PM
Hello,

I am having no luck disabling the thumbnail on certain/any boards. When inspecting the new setting it is unchecked for all boards yet displays on all the boards. I tried checking one, saving it, no luck. Then un-checking it and got the same results, thumbnails no matter what.

I am using version 2 of this mod which installed cleanly on SMF 2.0.11.

Thanks a lot for your time.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 06, 2015, 09:42:23 PM
Can you attach your sources/messageindex.php file.
Title: Re: Thumbnail on Topic Listing
Post by: Yahmez on October 06, 2015, 10:10:50 PM
Sure, here you go.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 06, 2015, 10:37:06 PM
Attached
messageindex
Title: Re: Thumbnail on Topic Listing
Post by: Yahmez on October 07, 2015, 02:25:50 PM
Thanks vbgamer45.

OK, I replaced my MessageIndex.php file with your version, it removed all of the thumbnails from the topics, yet did not allow turning them back on. Same problem I had before (no control of which boards use the mod) but this time with them all not displaying thumbnails instead of displaying them. Any other ideas?

Thanks for your help.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 07, 2015, 02:58:28 PM
Attached updated file.
Title: Re: Thumbnail on Topic Listing
Post by: nend on October 07, 2015, 04:25:44 PM
Wow, if I knew this existed before, lol.

Just got finished finalizing my source and theme edits and came on SMF to see the recent topics and seen this.

Mines a little different first I started off with Aeva images, then I had to keep going as you can see.
// Thumbnails
if (preg_match('[smg id=([0-9]+)(.*)]', $row['first_body'], $match)) {
$row['aeva_thumb'] = $scripturl . '?action=media;sa=media;in='.$match[1].';thumb';
} else if (!empty($row['id_thumb']) && $row['id_thumb'] != 0) {
$row['aeva_thumb'] = $scripturl . '?action=dlattach;topic='.$row['id_topic'].';attach='.$row['id_thumb'].';image';
} else if (preg_match('#\[img(.*)\](.*)\[\/img\]#Ui', $row['first_body'], $match)) {
$row['aeva_thumb'] = $match[2];
} else if (!empty($row['filename'])) {
$row['aeva_thumb'] = $modSettings['custom_avatar_url'] . '/' . $row['filename'];
} else if (!empty($row['avatar'])) {
$row['aeva_thumb'] = $row['avatar'] = 'gravatar' ? get_gravatar($row['email_address']) : $row['avatar'];
}


First load Aeva, if none then load attachment thumb, if none then load first image in the post, if none then load gravatar, if none then just fall through to the user avatar. Then in the template if nothing back then just display the generic board icon.
Title: Re: Thumbnail on Topic Listing
Post by: Yahmez on October 07, 2015, 05:21:05 PM
Quote from: vbgamer45 on October 07, 2015, 02:58:28 PM
Attached updated file.
That did it! Thanks.

I am going to update my copy of the mod now.

I really appreciate your help. Kudos.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 07, 2015, 05:59:14 PM
Looks good nend what site do you use it on?
Title: Re: Thumbnail on Topic Listing
Post by: nend on October 08, 2015, 01:33:11 AM
On a old site I started fresh again.

Here is one of the boards.
http://www.sicomm.us/photography/
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 08, 2015, 10:26:24 AM
Wow that is amazing you really did customize it. I can't even tell it is SMF based. Well that shows you the power of the SMF core. I myself use it for whole websites I make or parts.
Title: Re: Thumbnail on Topic Listing
Post by: Yahmez on October 13, 2015, 10:10:15 AM
Hello again vbgamer,

I reinstalled your new update to this mod (October 7th update) and love how it now grabs images that are not attached, but the images are all huge (ones not attached) and are breaking the layout of the forum. Is there an option to limit the size of these images on the topic listing?

Thanks,
Yahmez
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 13, 2015, 11:07:03 AM
There is no setting for that
Title: Re: Thumbnail on Topic Listing
Post by: Yahmez on October 13, 2015, 11:18:04 AM
There actually is a setting for this, I just found it in mod settings.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on January 11, 2016, 06:50:45 AM
Thank you SO MUCH for this mod!! It's absolutely fantastic! :D
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on January 11, 2016, 09:18:10 AM
Glad you enjoy it.
Title: Re: Thumbnail on Topic Listing
Post by: assemblytube on March 01, 2016, 06:25:09 AM
Parsing Problems with Version 1.2 of this mod.

I want to uninstall version 1.2 of this mod so that I can install the latest version. I get errors with running uninstall so I tried parsing the mod to do a manual removal.
When I try parsing it I get lots of errors like this:

Warning: SimpleXMLElement::__construct(): Entity: line 34: parser error : Opening and ending tag mismatch: file line 7 and operation in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200

Warning: SimpleXMLElement::__construct(): </operation> in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200

Warning: SimpleXMLElement::__construct(): ^ in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200

and no details of the file edits appear.

I attach the version I am trying to parse. Can anyone advise me on how to parse this old version of the mod?

Thank you.
Title: Re: Thumbnail on Topic Listing
Post by: Kindred on March 01, 2016, 08:30:24 AM
When you see the errors in the uninstall screen, there will be a little pencil icon next to each edit... click the icon for the sections that have errors in the auto-process...   fix those and then finish the package manager uninstall to get the rest.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 01, 2016, 08:55:13 AM
Also assemblytube that is a very old version. Check out the latest one is version 3.0.
Title: Re: Thumbnail on Topic Listing
Post by: assemblytube on March 01, 2016, 09:00:22 AM
Thanks for the tip Kindred. I didn't realise you could do that.

Thanks for the feedback vbgamer45. I was intending to use the latest version of the mod but I could not uninstall the old version due to not being able to parse the code of the old mod to carry out the manual edits needed. If I can do the uninstall I will use the new version. Thanks.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 01, 2016, 09:21:05 AM
The edits should be nearly the same check new version for the parse instructions.
Title: Re: Thumbnail on Topic Listing
Post by: assemblytube on March 01, 2016, 09:22:47 AM
Thank you. Will give it a go.
Title: Re: Thumbnail on Topic Listing
Post by: Biology Forums on March 01, 2016, 09:29:50 AM
How does the new version differ from the old?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 01, 2016, 11:26:05 AM
List of changes from all versions
Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails

Version 2.0
Big thanks to dougiefresh for this update.
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.

Version 1.1.1
!Fixed a bug with multiple attachments in a post not showing all topics in a forum

Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.

Version 1.0 Intial Release
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on March 01, 2016, 12:48:52 PM
Wow I have the worst timing. I just edited this mod significantly to make it more gallery like on my forum.

What do you mean by posts disappearing?
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on March 01, 2016, 01:01:03 PM
Did you make any changes to the message index? Can I just overwrite the existing files with what's in the zip?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 01, 2016, 01:25:02 PM
Yeah I think there are edits to the message index.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on March 01, 2016, 01:26:47 PM
Dammet. I definitely have the worst timing ever XD.

Is there an easy way for me to do some sort of compare so I can manually update it? If not I will just have to compare the files in the mod individually and see how I fare that way lol.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 01, 2016, 01:31:59 PM
Beyond compare is a tool that I use to find file differences works great.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on March 01, 2016, 11:51:07 PM
Thanks VB! Appreciate the update too :D.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on March 06, 2016, 01:23:27 AM
Did you upload the new version here?

Last Modified:
10:07 am Thursday, October 8, 2015
Latest Version:
2.0
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 06, 2016, 06:50:22 AM
Reuploaded just in case. I think i just forgot to update version number
Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails
Title: Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
Post by: thegymforum on March 26, 2016, 01:39:01 AM
Quote from: Blue-Suit on May 17, 2015, 11:06:12 AM
Ok when i try to install this I get the following

QuoteExpression #18 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'fac-forum.att.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

This I think is because I am running mysql 5.7

Any advice?
I know this is a little late to the game, but this was the right question and the next post had the right answer by vbgamer (http://www.simplemachines.org/community/index.php?topic=232539.msg3812722#msg3812722). Good job sir

I ran into the same situation today on my Mac 10.11 (El Capitan) and this is the complete solution

Since newer mysql and simple machine forum... errors on some queries with
QuoteExpression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'smf_gym.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

I logged into mysql command line:

mysql> [b]SHOW VARIABLES like '%sql_mode%';[/b]
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value                                                                                                                                     |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| sql_mode      | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+


So, to remove ONLY_FULL_GROUP_BY, I used the commands:

mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> exit;

and it works.  Hope someone running into the same scenario as I did and found it in this thread, find the complete answer here now.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on June 02, 2016, 09:39:12 AM
So I found a couple of bugs...I would really appreciate some love on this one so I can get it working! :D

1. When I create a new board and tick the thumbnail box it doesn't save the checkbox. It ONLY saves it if I am modifying a board. Does that make sense?

2. If I have a board with no attached images, only images in the topic it won't work no matter what. If I move a topic in there with an attached image it shows all the others right away. You can see that here:
http://www.colormeforum.com/color-me-palettes/ (thumbnails are on, but no attached images means it's not showing anything). Since stickying a topic with an attached image on it to get the thumbs to display would only show the first pages thumbs and look really messy I would love so much if you could look into this :D.

I'm using 3.0 on 2.0.11 :).
Title: Re: Thumbnail on Topic Listing
Post by: SMFHacks.com Team on June 02, 2016, 11:43:50 AM
Fixed one of the two issues
Version 3.0.1
!Fixed bug SMF 2.0.x not saving new board thumbnail topic settings
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on June 03, 2016, 03:31:20 AM
Thank you!

Is the other one an easy fix or is there anything I can do to help?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 03, 2016, 06:16:40 AM
Second doesn't seem to be easy to fix.
Title: Re: Thumbnail on Topic Listing
Post by: biggbigg on June 04, 2016, 05:09:25 AM
I installed the mod on the MinDI theme but cant find the manual edit for $context = array();  in the messageindeex template any help appreciated.

Thanks in advance
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 04, 2016, 08:36:11 AM
That edit is found in the index.php in the root of your forum.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on June 12, 2016, 06:43:28 PM
Quote from: vbgamer45 on June 03, 2016, 06:16:40 AM
Second doesn't seem to be easy to fix.

I don't understand it myself but someone I have been working with says that the logic is off...it's searching for attachments and then running the script....so maybe just make it run the script if it's turned on in the board and also has the box checked for using the image in the first post? :D
Title: Re: Thumbnail on Topic Listing
Post by: JF3000 on June 15, 2016, 04:27:13 AM
So for an image to be displayed you've to attach an image to the post is that right?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 15, 2016, 09:21:19 AM
Quote from: JF3000 on June 15, 2016, 04:27:13 AM
So for an image to be displayed you've to attach an image to the post is that right?
Yes in the first post of the topic.
Or a linked image
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on June 15, 2016, 07:03:38 PM
Quote from: vbgamer45 on June 15, 2016, 09:21:19 AM
Quote from: JF3000 on June 15, 2016, 04:27:13 AM
So for an image to be displayed you've to attach an image to the post is that right?
Yes in the first post of the topic.
Or a linked image

But it will only display a linked image if there's one attached image post in the board you're looking at.
Title: Re: Thumbnail on Topic Listing
Post by: JF3000 on June 16, 2016, 03:07:59 AM
Well I tried a linked image and nothing showed up. Seems redudent showing an image if one is attached. If attachments are disabled this mod doesn't work at all.
Title: Re: Thumbnail on Topic Listing
Post by: biggbigg on June 16, 2016, 04:20:05 AM
Thanks VBGamer got it working kind of.  It shows the thumbs now but its a skews the template of the forum a bit and the section where the thumb is massive and compress the rest and they no longer line up i will attach a sample. Any help appreciated.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on June 16, 2016, 10:14:01 PM
Quote from: JF3000 on June 16, 2016, 03:07:59 AM
Well I tried a linked image and nothing showed up. Seems redudent showing an image if one is attached. If attachments are disabled this mod doesn't work at all.

Yeah you have to have an uploaded image in the board to show them.
Title: Re: Thumbnail on Topic Listing
Post by: Jade Elizabeth on June 17, 2016, 11:13:10 PM
Another bug....if the image isn't the first thing you attach it wont show no matter what :(.
Title: Re: Thumbnail on Topic Listing
Post by: tanawat on March 19, 2017, 03:35:09 PM
if i won't show picture from attachment.
but use from Photo Sharing Websites.

how to modify code.


i see this web
http://aqua.c1ub.net/forum/index.php?board=5.0
can do.

plese
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 19, 2017, 09:10:41 PM
If one is found over the other it would use that instead.
Title: Re: Thumbnail on Topic Listing
Post by: tanawat on March 19, 2017, 11:43:24 PM
ohh Thankyou.  :D

i'm not observe.
this mod so cool.
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on August 07, 2017, 10:34:18 AM
Can an edit be made to this mod so that it creates a thumbnail based on any images within the first post instead of adding an attachment?

So if you add an image in the [img][/img] tags or any image file via attachment, it crops it and places it in the thumbnail section. If no image exists in the topic at creation, it uses the default image icons (or default thumbnail etc.).

Could that adjustment be made?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 07, 2017, 11:04:55 AM
I think someone did that before check all topics of this page.
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on August 07, 2017, 02:41:00 PM
Quote from: vbgamer45 on August 07, 2017, 11:04:55 AM
I think someone did that before check all topics of this page.

There are issues in my MessageIndex.template.php after install:


Database Error
Expression #31 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'assembly.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /var/www/vhosts/cajican.org/httpdocs/Sources/MessageIndex.php
Line: 464


Here is the aforementioned line (and 5 lines below/above it):

echo '
<script type="text/javascript"><!-- // --><![CDATA[
if (typeof(window.XMLHttpRequest) != "undefined")
aJumpTo[aJumpTo.length] = new JumpTo({
sContainerId: "message_index_jump_to",
sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
iCurBoardId: ', $context['current_board'], ',
iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
sCurBoardName: "', $context['jump_to']['board_name'], '",
sBoardChildLevelIndicator: "==",
sBoardPrefix: "=> ",
sCatSeparator: "-----------------------------",
sCatPrefix: "",
sGoButtonLabel: "', $txt['quick_mod_go'], '"
});
// ]]></script>


The section I'm referring to is:
sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 07, 2017, 03:16:50 PM
You have to change your mysql mode
sql_mode=only_full_group_by
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on August 07, 2017, 03:21:30 PM
What is it set to by default when SMF makes the database?

EDIT: The answer is this:
sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

I'm not confident in mysql so I won't alter it until I understand the reason why the mode needs to be changed, just in case it breaks the forum.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 07, 2017, 03:29:49 PM
I am not certain as well check on google. It shouldn't break anything though
Title: Re: Thumbnail on Topic Listing
Post by: tanawat on August 14, 2017, 04:56:09 AM
i wont to set display Thumbnail (for each boards) in database
I can not find it.  Could you tell me whare is it?

(Usually i will seting in database Because a lots of boards.)

Thank.  :D

Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 14, 2017, 08:29:10 AM
There is an entry in the smf_setings table

When you modify each board there is an option on that page.
Title: Re: Thumbnail on Topic Listing
Post by: wzol on August 17, 2017, 01:07:26 AM
I use a responsive them with divs without tables: https://custom.simplemachines.org/themes/index.php?lemma=2873

Could you help me to add this mod to this theme - I have tried my best, but it seems too hard for me  :-[
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 17, 2017, 01:41:00 AM
I am not good at that either. It really would be a per theme edit.
Title: Re: Thumbnail on Topic Listing
Post by: wzol on August 19, 2017, 12:43:11 AM
I see, could you at least tell me what is that two replace modifications doing in the theme? The second bigger seems like doing the main picture placement, but what is the first?
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on August 23, 2017, 02:31:03 AM
I have an issue with this mod (again). Completely different to the last time I tried to install it.


         LIMIT ' . ($pre_query ? '' : '{int:start}, ') . '{int:maxindex}',
458: array(
459: 'current_board' => $board,
460: 'current_member' => $user_info['id'],
461: 'topic_list' => $topic_ids,
462: 'is_approved' => 1,
463: 'find_set_topics' => implode(',', $topic_ids),
464: 'topic_prefix' => (isset($_REQUEST['prefix']) ? $_REQUEST['prefix'] : ''),
465: 'clone_topics' => $clone_topics,
466: 'start' => $start,
==>467: 'maxindex' => $maxindex,


Line 467 has an error for some reason.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 23, 2017, 09:07:57 AM
Whats the error you might have to do a manual install if the code is different.
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on August 23, 2017, 10:16:44 AM
Quote from: vbgamer45 on August 23, 2017, 09:07:57 AM
Whats the error you might have to do a manual install if the code is different.

Probably will do that at a later date.
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on August 27, 2017, 03:44:23 AM
I manually installed the mod and it didn't break the forum. That's progress I guess.

However, it doesn't display any images. I don't have attachments on, so the only way this would work is if I have the "[img][/img]" tag version working correctly.

Also, the message index table is borked, so I need to use CSS to fix it, though I haven't seen a new column added where the images are supposed to go.
Title: Re: Thumbnail on Topic Listing
Post by: confuseamuse on November 04, 2017, 05:43:09 PM
I did manage to get this working on my forum. The functionality to add thumbnails from [img] tags didn't work, but it does for attachments.

Is there a way to add an NSFW tag to attachments? People like to take liberties on the internet.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on November 04, 2017, 06:02:58 PM
There is not. This mod just focuses on attachments and image tags in posts.
Title: Re: Thumbnail on Topic Listing
Post by: natasa (NT) on May 25, 2018, 08:48:15 AM
I can not see thumbnails on mobile phone, only empty spaces?
How can I fix that?
Thanks.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 25, 2018, 10:40:06 AM
It should work do you have a responsive mode installed?
Title: Re: Thumbnail on Topic Listing
Post by: natasa (NT) on May 26, 2018, 12:15:18 AM
Yes, I have responsive mode installed, and there was a little problem with Thumbnail on topic listing package when installed,
I have to change peace of code manually, on: Themes/default/MessageIndex.template.php, maybe I did that wrong?

Before installing mods it looked like:


// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>


now it is:


// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th hidden" width="8%" colspan="', $context['show_thumbnails'] ? 3 : 2, '">&nbsp;</th>
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 26, 2018, 12:21:59 AM
Yeah it's hidden now with that responsive mod.
"hidden" if you take that part out it will appear.
Title: Re: Thumbnail on Topic Listing
Post by: natasa (NT) on May 29, 2018, 01:56:05 AM
I removed 'hidden' but images did not appear ...
Any other suggestion?
Thanks.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 29, 2018, 08:01:27 AM
I would also check the td
Title: Re: Thumbnail on Topic Listing
Post by: natasa (NT) on May 29, 2018, 08:26:48 AM
Which td?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 29, 2018, 08:34:21 AM
The one with the thumbnail code
Title: Re: Thumbnail on Topic Listing
Post by: natasa (NT) on May 30, 2018, 02:42:05 AM
I create new test subdomain with new installation (smf-2-0-15) and only two mods: Responsive curve and Thumbnail Topic Mod.
I only removed 'hidden' and did not change anything else, and still do not see thumbnail images on mobile.
I am not programmer, and do not know how to fix this :P ..
Title: Re: Thumbnail on Topic Listing
Post by: natasa (NT) on May 30, 2018, 05:29:03 AM
Images appeared, later, ... for some reason  ::)
Title: Re: Thumbnail on Topic Listing
Post by: rubbishnor on June 04, 2018, 05:22:42 AM
please help me

smf version 2.0.15

i cannot find 

$context = array();

on index.php then can not replace with

$context = array();
$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();




Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 04, 2018, 08:20:32 AM
Find

// Unserialize the array of pretty board URLs
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls']),
'db_count' => 0,
));

Add after

$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Title: Re: Thumbnail on Topic Listing
Post by: rubbishnor on June 05, 2018, 04:47:37 AM
 vbgamer45

thank you very much for your kindly support
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 05, 2018, 06:28:11 AM
Glad to help.
Title: Re: Thumbnail on Topic Listing
Post by: jafonseca on June 05, 2018, 01:00:40 PM
Error in database when I go to board


Expression #30 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hdclasic.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Archivo: /home/uhdcl/public_html/Sources/MessageIndex.php
Línea: 421

mysql v5.7
Title: Re: Thumbnail on Topic Listing
Post by: Shambles on June 05, 2018, 01:17:00 PM
^ search other posts in this topic - it's been covered before.
Title: Re: Thumbnail on Topic Listing
Post by: jafonseca on June 06, 2018, 04:06:00 AM
Ok, Itry with this

remove ONLY_FULL_GROUP_BY, I used the commands:

mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> exit;

but  then Forum cant conect to database   :-\ :-\
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 06, 2018, 08:19:03 AM
I generally edit it from the my.cnf file or my.ini
Title: Re: Thumbnail on Topic Listing
Post by: jafonseca on June 06, 2018, 02:05:05 PM
Nothing at all, cant connect to database
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 06, 2018, 02:10:50 PM
Undo what you changed
Title: Re: Thumbnail on Topic Listing
Post by: jafonseca on June 06, 2018, 02:18:47 PM
Quote from: vbgamer45 on June 06, 2018, 02:10:50 PM
Undo what you changed
teh same


Expression #30 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hdclasic.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Archivo: /home/uhdcl/public_html/Sources/MessageIndex.php
Línea: 421

well I think new versions of mysql are incompatible with some mods
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 06, 2018, 02:19:36 PM
That is true. I would have to redo the queries to make it work.
Title: Re: Thumbnail on Topic Listing
Post by: jafonseca on June 06, 2018, 02:26:46 PM
Quote from: vbgamer45 on June 06, 2018, 02:19:36 PM
That is true. I would have to redo the queries to make it work.

Thanks !! :) :)
Title: Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
Post by: MamaTea on June 25, 2018, 10:48:40 PM
Quote from: mikeymx5 on January 03, 2010, 01:53:14 PM
Any chance on adding the core into your code, I dont like doing manual editing of files and I have no intention of using the crappy curve theme.

its very easy to do.

in themes/core/MessageIndex.template.php

Find
<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>
replace with
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding">&nbsp;</th>

Find
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>

Replace with
<td class="', $alternate_class, ' icon2">
<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 '
</td>



Please add this to your install file
Thanks



SOO, I followed this in my custom theme in 2.0.15..  I understood that it may not work since this post is so old and I do not know much about coding- or what has changed in the SMF code over the years.


So, while it did make the mod work,  it made my theme all shotty- a lot of the colors set behind words are gone and this type of thing.  Any suggestions?

Here is the original:
<th scope="col" class="first_th" style="width: 8%;" colspan="2">&nbsp;</th>


Here is my updated bit:
<th scope="col" class="first_th" style="width: 8%;" colspan="', $context['show_thumbnails'] ? 3 : 2, '">&nbsp;</th>


Here is the original:
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>


Here is my updated bit:
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<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 '
</td>



Attached below are both of these files as a whole
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 25, 2018, 10:58:15 PM
Looks ok I would change class="windowbg2"
Title: Re: Thumbnail on Topic Listing
Post by: MamaTea on June 26, 2018, 01:24:43 AM
Quote from: vbgamer45 on June 25, 2018, 10:58:15 PM
Looks ok I would change class="windowbg2"


Thanks for your input!! 

Do you mean to change class in one of these examples, both of them, throughout the entire file, or...?

I really appreciate it.  I'm glad to be learning more on this every day...
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 26, 2018, 08:12:33 AM
Just in your example for echo '<td class="windowbg2" valign="middle" align="center">';
Title: Re: Thumbnail on Topic Listing
Post by: MamaTea on June 26, 2018, 08:59:04 AM
Ok, after messing with that code a bit and nothing changing, I downloaded the original again.. and there was something wrong with it.  so it doesn't actually have to do with this code.  thank you though.
Title: Re: Thumbnail on Topic Listing
Post by: DreadPirateRoberts on April 24, 2020, 06:34:01 PM
This mod works great but for some reason this mod works for every board except one? im using smf 2.0.17 I need help
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 24, 2020, 06:47:13 PM
What's the board id? How many boards do you have?
Title: Re: Thumbnail on Topic Listing
Post by: DreadPirateRoberts on April 24, 2020, 08:54:07 PM
Quote from: vbgamer45 on April 24, 2020, 06:47:13 PM
What's the board id? How many boards do you have?

The board id is 26 and I have 11 boards ( I know its weird but I have made and delete boards in the past). I seemed to have fix it by creating a new board and moving all topics to that board. Then I toggled "thumbnails" on the board modifications and moved all the topics back and it seems to have worked.

However there is a new problem. It works on the first page but not in any pages after that
Title: Re: Thumbnail on Topic Listing
Post by: SMFHacks.com Team on April 25, 2020, 06:39:49 AM
Update
Version 4.0
!Fixed a case where if you are just using linked images the column for thumbnail topic will not appear
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 25, 2020, 06:41:02 AM
@DreadPirateRoberts I did fix one bug I saw in the mod above.
Note the column only appears if there is an image found in the first post. either attached or linked


Title: Re: Thumbnail on Topic Listing
Post by: pocttopus on April 25, 2020, 12:03:04 PM
Hello there.
I am trying to update this mod so I cannot find these lines in ./Sources/ManageSettings.php to remove before uninstalling 3.0.1 version.
How can I solve this issue?

Code: (Find) [Select]
// Thumbnail Topic Mod: Update the database setting for "photo_boards"
$photo_board = isset($_POST['thumbnail']);
if ($photo_board && !in_array($_POST['boardid'], $context['photo_boards']))
$context['photo_boards'][] = $_POST['boardid'];
else if (!$photo_board && in_array($_POST['boardid'], $context['photo_boards']))
{
foreach ($context['photo_boards'] as $id => $board)
{
if ($_POST['boardid'] == $board)
unset($context['photo_boards'][$id]);
}
}
updateSettings( array( 'photo_boards' => implode(',', $context['photo_boards']) ) );

// Create a new board...


Code: (Replace) [Select]

// Create a new board...
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 25, 2020, 12:07:23 PM
That should be in ManageBoards.php I belive
Title: Re: Thumbnail on Topic Listing
Post by: pocttopus on April 25, 2020, 03:04:13 PM
Oh... but why is it saying that I need to remove those lines from ManageSettings.php instead of ManageBoards.php?
Sorry but I'm little confused.  :o ???




EDIT  O:) !Somehow I have managed to uninstall the previous version without removing lines from any file and installed the latest 4.0 version without issues.


Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on April 25, 2020, 04:29:20 PM
Test failed  above says for this code

<file name="$sourcedir/ManageSettings.php">
<operation>
<search position="before"><![CDATA[// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!]]></search>
<add><![CDATA[
'',
// Thumbnail Topic Settings
array('int', 'topic_thumb_height'),
array('int', 'topic_thumb_width'),
]]></add>
</operation>
</file>
Title: Re: Thumbnail on Topic Listing
Post by: pocttopus on May 20, 2020, 08:15:51 AM
Hello,

This is a nice mod, is there any chance to be available for 2.1rc2 version?
I am testing a new forum and I was curious about this mod.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 20, 2020, 09:26:16 AM
Maybe but generally waiting for 2.1 final
Title: Re: Thumbnail on Topic Listing
Post by: pocttopus on May 20, 2020, 10:26:52 AM
Thanks @vbgamer45 for your response too... you are very kind.
I am testing on localhost RC2 for my new forum so suddenly everyone is starting to write about RC3 and here about final version.

My (next) question is simple, can I wait a little bit more for the release of final or RC3 version before going live with my new forum?

Thanks.  :)
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 20, 2020, 10:31:16 AM
There has been a good amount of changes since RC2
1311 commits to release-2.1 since this release

Most people we  recommend grabing the github release. I would just wait for RC3. Just note changes that you make to forum when goes final will not be carried over you will need to uninstall/reinstall mods etc
Title: Re: Thumbnail on Topic Listing
Post by: pocttopus on May 20, 2020, 10:42:49 AM
Thanks @vbgamer45, this is the link from github to download with the latest changes?
https://github.com/SimpleMachines/SMF2.1

Sorry for the offtopic, you may delete my messages if they are not in proper place.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on May 20, 2020, 10:45:37 AM
Yes it is.
Title: Re: Thumbnail on Topic Listing
Post by: tonywells82 on October 05, 2020, 02:52:50 PM
I had to reinstall my Forum on a completely new ISP.

I just successfully installed the MessageIndex mod but I don't think I have my Icons folder in the correct place because none of the thumbnails appear.

Right now I have my Icons folder directly under my SMS Folder. Can anyone tell me where I should move it to:

http://www.tseatc.com/smf/index.php

Thank you,
TW
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 05, 2020, 05:03:29 PM
One issue I see is guests don't have permissions to view attachments
So you can't see the images as guest on a forum such as http://www.tseatc.com/smf/index.php/board,25.0.html
Title: Re: Thumbnail on Topic Listing
Post by: tonywells82 on October 05, 2020, 11:57:58 PM
OK.. I changed that now to allow guests permission to view attachements.

I'm the Admin.. and I can't see any of the Thumbnails on Topic Listing.

Also, no attachments appear. Only their file name and when you click on it you get 404 - Attachment Not Found

TW

Quote from: vbgamer45 on October 05, 2020, 05:03:29 PM
One issue I see is guests don't have permissions to view attachments
So you can't see the images as guest on a forum such as http://www.tseatc.com/smf/index.php/board,25.0.html
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 06, 2020, 12:08:09 AM
There is something wrong with your attachment setup.
I can't view them on a normal post either http://www.tseatc.com/smf/index.php?action=dlattach;topic=3241.0;attach=17873
From this post http://www.tseatc.com/smf/index.php/topic,3241.0.html
Title: Re: Thumbnail on Topic Listing
Post by: Arantor on October 06, 2020, 03:45:55 AM
When you moved servers, did you use FileZilla to download the attachments?
Title: Re: Thumbnail on Topic Listing
Post by: tonywells82 on October 06, 2020, 12:25:26 PM
No. I used the Coffee Cup Visual Site Designer software to build and their ftp to upload the data. Uploads went to the direct IP address given to me by HostGator. That's why I don't believe everything went into the correct place.

I can use cPanel now to move things around but I'm not exactly sure where the Icons folder goes.

Currently, it is here: public_html/smf/icons

Quote from: Arantor on October 06, 2020, 03:45:55 AM
When you moved servers, did you use FileZilla to download the attachments?
Title: Re: Thumbnail on Topic Listing
Post by: Arantor on October 06, 2020, 01:29:01 PM
But this mod uses attachments, are you using that icons folder for all attachments to posts?
Title: Re: Thumbnail on Topic Listing
Post by: tonywells82 on October 06, 2020, 02:19:20 PM
Yes I am. I have 52 folders. Each folder has 3 png files inside them.

Like I mentioned, everything was previously working fine on my previous ISP.. that all changed when I had to recently change ISP's. Now it's not working at all. No thumbnail on topic listing images appear anymore.
TW

Quote from: Arantor on October 06, 2020, 01:29:01 PM
But this mod uses attachments, are you using that icons folder for all attachments to posts?
Title: Re: Thumbnail on Topic Listing
Post by: Arantor on October 06, 2020, 02:32:38 PM
Then you're not using this mod, you're using a different mod, this mod loads the first attachment in a topic and uses that as an image...

Sounds to me like you need the cbi mod.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 06, 2020, 02:54:29 PM
If you moved servers run the repair_settings.php tool
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Title: Re: Thumbnail on Topic Listing
Post by: Kindred on October 06, 2020, 04:41:31 PM
sounds like you are actually using this mod

https://custom.simplemachines.org/mods/index.php?mod=511
Title: Re: Thumbnail on Topic Listing
Post by: tonywells82 on October 07, 2020, 01:52:53 AM
You are absolutely correct. Unfortunately, it doesn't seem to work with the latest version of 2.0.17

TW

Quote from: Kindred on October 06, 2020, 04:41:31 PM
sounds like you are actually using this mod

https://custom.simplemachines.org/mods/index.php?mod=511
Title: Re: Thumbnail on Topic Listing
Post by: Kindred on October 07, 2020, 09:19:49 AM
it should work just fine....   I suspect that your images are in the wrong location.   Ask in the support thread for that mod.
Title: Re: Thumbnail on Topic Listing
Post by: tonywells82 on October 07, 2020, 11:56:01 AM
OK. I'll ask. Thanks.
TW

Quote from: Kindred on October 07, 2020, 09:19:49 AM
it should work just fine....   I suspect that your images are in the wrong location.   Ask in the support thread for that mod.
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on March 08, 2021, 10:05:40 AM
Newbie here when it comes to themes etc.

I am changing forum theme to "Studio."

I no longer have the topic thumbnails showing when installing the new theme.

So I uninstalled Thumbnail Topic mod, and I went to install it again.   I get this error message which confuses me.  It appears to be the exact same file name that fails and also passes. 

Because I do not know what I am doing, I stopped at this point.

Recommendations will be very much appreciated.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 08, 2021, 10:30:53 AM
It is the new theme that the coding is different. You would need to make that 1st edit to Studio messageindex.template.php
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on March 08, 2021, 11:12:35 AM
Fixed
Done

THANK YOU !
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on March 08, 2021, 11:45:23 AM
Glad to help
Title: Re: Thumbnail on Topic Listing
Post by: shadav on March 08, 2021, 11:50:47 AM
also any other mods that you have installed you will need to either uninstall and reinstall or use the parse button on the mod's pages and do all the template edits manually to the new theme.
Title: Re: Thumbnail on Topic Listing
Post by: Auto Man on May 10, 2021, 08:13:39 PM
It is a very nice mod. I have been using it for two years on smf2.0.13 but suddenly it doesn't show effect. I tried to chase the check but still the same.

   I have put a file from another good working website. But still the same.

   I have two attachments. This will be able to see if there are any errors or if there are other related files.

    Thanks in advance.

(auto-nkp.com)
Title: Re: Thumbnail on Topic Listing
Post by: Auto Man on June 12, 2021, 05:31:09 AM
Quote from: Auto Man on May 10, 2021, 08:13:39 PM
It is a very nice mod. I have been using it for two years on smf2.0.13 but suddenly it doesn't show effect. I tried to chase the check but still the same.

   I have put a file from another good working website. But still the same.

   I have two attachments. This will be able to see if there are any errors or if there are other related files.

    Thanks in advance.

(auto-nkp.com)

Fixed it...

(http://picture.in.th/id/309d31f53b0c7bb2758410f010b2c81c)
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on June 12, 2021, 08:35:37 AM
Glad you have it working.
Title: Re: Thumbnail on Topic Listing
Post by: aegersz on June 14, 2021, 12:17:48 AM
I was trying this mod out but instead of thumbnail sized entries, it actually puts the full size whole image in (whether it's an inline image or a large attachment), as shown below:

The mod also works without checking the box on the Admin > Boards > Modify Boards UNTIL I checked at least one - is that right ?

It's a neat mod if only the images were all the same size - how can I set them to one particular size ?
Title: Re: Thumbnail on Topic Listing
Post by: aegersz on June 14, 2021, 01:24:28 AM
I figured it out - I had to set it via Admin »Modification Settings »Miscellaneous to:

Thumbnail Topic Height: 23

Thumbnail Topic Width:  22

I suggest that you put this in the mod description as a settings that you will need to review.

Also (again), the Thumbnails check box is inconsistent - it only starts working when at least one board is checked.
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on February 18, 2022, 05:16:34 PM
I just upgraded to SMF 2.1.1   

I really miss this great mod  :-[

Many of us will be very happy when you update it for 2.1.1     :D
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on February 18, 2022, 07:39:19 PM
Its on my to do list at some point. Hoping to make hooks based.
Title: Re: Thumbnail on Topic Listing
Post by: WarlockWeary on July 02, 2022, 08:25:29 PM
Quote from: AlanDewey on February 18, 2022, 05:16:34 PMI just upgraded to SMF 2.1.1   
I really miss this great mod  :-[
Many of us will be very happy when you update it for 2.1.1     :D

This is main reason I am still on SMF 2.0.19 !
Hope you guys make this for 2.1.1  :)
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 07, 2022, 05:29:28 PM
Added support for SMF 2.1.x
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 08, 2022, 06:39:12 AM
Quote from: vbgamer45 on July 07, 2022, 05:29:28 PMAdded support for SMF 2.1.x

Hmm, installs without errors on 2.1.2 and then errors on the Messageindex...

Unknown column 'memf.real_name' in 'field list'
Bestand: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Regel: 361

Something is not quite right here...
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on July 08, 2022, 07:21:07 AM
Quote from: @rjen on July 08, 2022, 06:39:12 AMHmm, installs without errors on 2.1.2 and then errors on the Messageindex...

Unknown column 'memf.real_name' in 'field list'
Bestand: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Regel: 361

Something is not quite right here...

I could reproduce this as well. To fix it change the whole query starting from line 361 till 397 of the aforementioned file, with the following code:

$result = $smcFunc['db_query']('substring', '
SELECT
t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board,
' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from,
' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in,
' : '') . '
t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic,
ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon,
ml.poster_name AS last_member_name, ml.id_member AS last_id_member,' . (!empty($settings['avatars_on_indexes']) ? ' meml.avatar, meml.email_address, memf.avatar AS first_member_avatar, memf.email_address AS first_member_mail, COALESCE(af.id_attach, 0) AS first_member_id_attach, af.filename AS first_member_filename, af.attachment_type AS first_member_attach_type, COALESCE(al.id_attach, 0) AS last_member_id_attach, al.filename AS last_member_filename, al.attachment_type AS last_member_attach_type,' : '') . '
COALESCE(meml.real_name, ml.poster_name) AS last_display_name, t.id_first_msg,
mf.poster_time AS first_poster_time, mf.subject AS first_subject, mf.icon AS first_icon,
mf.poster_name AS first_member_name, mf.id_member AS first_id_member,
COALESCE(memf.real_name, mf.poster_name) AS first_display_name, ' . (!empty($modSettings['preview_characters']) ? '
SUBSTRING(ml.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS last_body,
SUBSTRING(mf.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS first_body,' : '') . 'ml.smileys_enabled AS last_smileys, mf.smileys_enabled AS first_smileys, IFNULL(big.id_attach, 0) AS big_id, big.filename AS big_filename, big.width AS big_width, big.height AS big_height,
IFNULL(thn.id_attach, 0) AS thn_id, thn.filename AS thn_filename, thn.width AS thn_width, thn.height AS thn_height, IFNULL(thn.id_attach, mf.body) AS mainpost, t.id_board
' . (!empty($message_index_selects) ? (', ' . implode(', ', $message_index_selects)) : '') . '
FROM (' . $sort_table . ') as st
JOIN {db_prefix}topics AS t ON (st.id_topic = t.id_topic)
JOIN {db_prefix}messages AS ml ON (ml.id_msg = st.id_last_msg)
JOIN {db_prefix}messages AS mf ON (mf.id_msg = st.id_first_msg)

LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
    LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)' . (!empty($settings['avatars_on_indexes']) ? '
LEFT JOIN {db_prefix}attachments AS af ON (af.id_member = memf.id_member)
LEFT JOIN {db_prefix}attachments AS al ON (al.id_member = meml.id_member)' : '') . '' . ($user_info['is_guest'] ? '' : '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = {int:current_board} AND lmr.id_member = {int:current_member})') . '
' . (!empty($message_index_tables) ? implode("\n\t\t\t\t", $message_index_tables) : '') . '
' . (!empty($message_index_wheres) ? ' WHERE ' . implode("\n\t\t\t\tAND ", $message_index_wheres) : '') . '
GROUP BY t.id_topic, big.id_attach, thn.id_attach, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board, lt.id_msg, lmr.id_msg, t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time,
t.id_redirect_topic, ml.id_msg_modified, ml.subject, ml.icon, ml.poster_name, ml.id_member, meml.real_name, t.id_first_msg, mf.poster_time, mf.subject, mf.icon, mf.poster_name, mf.id_member, memf.real_name, ml.smileys_enabled,
mf.smileys_enabled, big.filename, big.width, .big.height, thn.filename, thn.width, thn.height, mf.body, id_board
ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC'),
$message_index_parameters
);

Quote from: WarlockWeary on July 02, 2022, 08:25:29 PMThis is main reason I am still on SMF 2.0.19 !
Hope you guys make this for 2.1.1  :)

@vbgamer45 has updated this to work with the 2.1.x branch as well. Now you can upgrade your forum to 2.1.2 :)
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 08, 2022, 08:14:42 AM
Quote from: Doug Heffernan on July 08, 2022, 07:21:07 AMI could reproduce this as well. To fix it change the whole query starting from line 361 till 397 of the aforementioned file, with the following code:

I'll just wait for the mod to be updated  ;)
Title: Re: Thumbnail on Topic Listing
Post by: Steve on July 08, 2022, 10:25:33 AM
But if it's a mod you like, why wait?  :P
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 08, 2022, 10:45:07 AM
Quote from: Steve on July 08, 2022, 10:25:33 AMBut if it's a mod you like, why wait?  :P

Because I like it when a mod can be installed and removed without having to make code changes myself
Title: Re: Thumbnail on Topic Listing
Post by: Steve on July 08, 2022, 11:55:46 AM
Ah ... I'm the same way, despite what I posted.  ;D
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on July 08, 2022, 12:13:02 PM
Quote from: @rjen on July 08, 2022, 10:45:07 AMBecause I like it when a mod can be installed and removed without having to make code changes myself

That is the best way to go about it imo.

The code I posted was for temporarily use till the new package is officially uploaded.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 08, 2022, 12:25:33 PM
Fixed. Did the full query change was hoping not to.
Was odd since it worked fine on my test site without that on mysql 5.7
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on July 08, 2022, 12:35:52 PM
Quote from: vbgamer45 on July 08, 2022, 12:25:33 PMFixed. Did the full query change was hoping not to.
Was odd since it worked fine on my test site without that on mysql 5.7

Beside the error reported by @@rjen, I got the column this and that isn't in GROUP BY type of error. I think that the reason you could not reproduce it is because the ONLY_FULL_GROUP_BY must be disabled on your mysql config, which makes said issue go unnoticed.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 08, 2022, 12:40:00 PM
Ah, yeah I was kind of surprised in my testing. was thinking i had to have to all the columns listed in the group by which I still think is strange.
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 08, 2022, 03:25:07 PM
Yep, now it is giving this error... so still not OK..

'smf2.ml.body' isn't in GROUP BY
File: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Line: 361
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on July 08, 2022, 04:18:49 PM
Quote from: @rjen on July 08, 2022, 03:25:07 PMYep, now it is giving this error... so still not OK..

'smf2.ml.body' isn't in GROUP BY
File: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Line: 361

I do not get that error on my testing on a brand new forum. Anyways, the thing is that all mods that add to the topic message index by way of queries, all their custom fieldSs) must be added to the GROUP BY clause in the query I posted above.

As it happens, a while ago I got the same issue with another mod that I was testing. What mods do you have that add to the topic message index list if I may ask?
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 08, 2022, 04:28:37 PM
@@rjen  check if this version helps
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 08, 2022, 04:52:27 PM
Quote from: vbgamer45 on July 08, 2022, 04:28:37 PM@rjen  check if this version helps


That fixes the errors.

But tbh I have some concerns with regard to the thumbnail sizes and margings...
Image are being distorted. I think a height:"auto"  would be better... and some margin on the right to separate the text from the images...

Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 08, 2022, 05:54:18 PM
Let me know what style to apply and can set a style tag on the images.
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 09, 2022, 03:49:30 PM
Quote from: vbgamer45 on July 08, 2022, 05:54:18 PMLet me know what style to apply and can set a style tag on the images.

Sorry, had a quick look but since I am not planning to use the Mod myself I will leave it up to you...

By the way: there is more that needs attention:
The option to activate the icons in the boards setting is not functional:
 
Thumbnails:
Display an thumbnail attachment that is attached to the first post of a topic

All boards are showing thumbnails on install, and the option is not set...
Trying to set the option does not work: the setting is not saved...
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 09, 2022, 04:38:44 PM
4.0A
!Fixed in SMF 2.1.x setting to stay checked when enabling thumbnails on a board.
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on July 10, 2022, 07:26:37 AM
:-( 

SMF 2.1.2

from the admin error log....

QuoteDatabase Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.big.height, thn.filename, thn.width, thn.height, mf.body, id_board
            ORDER BY ' at line 38

MYSQL80
version 8.0.15
compiled for Win64

Other mods installed:
       google analytics  1.6
    Image for Anti-Spam Verification Questions  1.2
       Simple Audio Video Embedder    6.0.6

After running "uninstall" everything is back to normal.

Your mod worked fantastic with 2.0.18 etc
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 10, 2022, 09:21:19 AM
Posted another update hopefully fixes it @AlanDewey
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on July 10, 2022, 12:11:42 PM
Working perfectly now.

THANK YOU !
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on July 10, 2022, 03:54:13 PM
Ooops.... spoke too soon.

It works perfectly when I am logged in.

When not logged in, people get http 500 errors

error log....

Quotec79435b8e30163aaabf06d4bf38508ae
https://www.ccsforum.com/index.php?board=32.0
C:/inetpub/wwwroot/www.ccsforum.com/Sources/MessageIndex.php (Line 397)


Database Error: Unknown column 'lt.id_msg' in 'group statement'

Uninstall went flawlessly.  Forum working fine without the mod.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 10, 2022, 04:48:16 PM
Fixed that bug and

Version 4.1
!Hide thumbnail column if users don't have permissions to view attachments
Title: Re: Thumbnail on Topic Listing
Post by: AlanDewey on July 11, 2022, 08:39:13 AM
Working perfectly now.   :)  :D  ;D  :laugh:
Title: Re: Thumbnail on Topic Listing
Post by: @rjen on July 11, 2022, 12:11:37 PM
Just did some checking on SMF2.1 because the images were getting distorted all the time.
It seems that you have ported some 2.0 behaviour regarding sizes of the images that does not work in 2.1.

First it did not allow me to set all images to a fixed width without setting a fixed height too, causing all images to be disorted.

Then on smaller screens is would always distort images and on mobile the images would be hidden.

Changed this code in MessageIndex.template.php

// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
global $modSettings;
echo '<div class="lastpost">';

$imagefound = false;

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

if (isset($image['id']))
{
if (empty($modSettings['topic_thumb_width']) || empty($modSettings['topic_thumb_height']))
{
if ($image['bbcimg'] == false)
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
else
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
}
else
{

echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';

}

$imagefound = true;
}

}

echo '</div>';
}

// End Thumbnail Topic Mod

To this...
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
global $modSettings;
echo '<div style="margin-right:5px;">';

$imagefound = false;

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

if (isset($image['id']))
{
if (empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
}
if (empty($modSettings['topic_thumb_width']) && !empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
if (!empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" alt="" /></a>';
}
else
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}

$imagefound = true;
}

}

echo '</div>';
}

// End Thumbnail Topic Mod

Now the images will always keep their aspect ratio, unless you specifically set the width AND height in the settings.

Secondly if you want all images to have the same width, only set the width and leave the height 0.
Setting a fixed height works the same way

... the messageindex does not leave empty space on the topics without images

and it also sjhows on mobile...


Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on July 11, 2022, 01:24:19 PM
Posted update with the fix. I am not great with styling/css mainly copy and paste what I see works and use that.

Version 4.2
!Fixes for image distortion and styling for SMF 2.1.X thanks to @rjen
Title: Re: Thumbnail on Topic Listing
Post by: Diego Andrés on August 08, 2022, 06:35:54 PM
It's missing some columns in the group by for the attachments.

On any theme even without adding the logic for the avatars, set
$settings['avatars_on_indexes'] = true;
 and the mod will fail in the messageindex.

Reported here (https://www.simplemachines.org/community/index.php?topic=583206.msg4132232#msg4132232) by @rjen

I added af.id_attach and al.id_attach and it fixed it, not sure if that's it.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 08, 2022, 09:54:19 PM
Ah ok will take a look
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on August 08, 2022, 11:18:10 PM
Update
Version 4.2.1
!Group by fixes for SMF 2.1.x
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 11:40:46 AM
Hello, please tell me how do I make it work in my current theme. It only works in the default SMF theme. My current theme is BootBuff.
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 04, 2022, 11:52:51 AM
You would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 12:08:40 PM
Quote from: vbgamer45 on October 04, 2022, 11:52:51 AMYou would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.

I'm sorry I don't understand I'm new here. Can you tell me step by step where can I find the "theme edit" and what should I do? And where is the mod site page. I succesfully installed this Thumbnail package but it only shows while I'm in SMF default theme. My current theme is BootBuff (https://www.simplemachines.org/community/index.php?topic=582255.0)
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on October 04, 2022, 12:13:06 PM
On the packages tab under https://custom.simplemachines.org/index.php?mod=1151
Get the manual install instructions.
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on October 04, 2022, 12:14:49 PM
Quote from: Rgvill on October 04, 2022, 12:08:40 PM
Quote from: vbgamer45 on October 04, 2022, 11:52:51 AMYou would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.

I'm sorry I don't understand I'm new here. Can you tell me step by step where can I find the "theme edit" and what should I do? And where is the mod site page. I succesfully installed this Thumbnail package but it only shows while I'm in SMF default theme. My current theme is BootBuff (https://www.simplemachines.org/community/index.php?topic=582255.0)

Put the mod through the Parser and then apply all the edits displayed manually to your theme.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 12:43:26 PM
I still don't get it.
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on October 04, 2022, 12:48:06 PM
Quote from: Rgvill on October 04, 2022, 12:43:26 PMI still don't get it.

Under Packages tab at the Mod Download section, there is a section just under the mod package that says: Manual installation info and a button that says Parse.

Select your forum version and hit the Parse Button. All manual edits will be displayed then.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 12:57:42 PM
Could you just do it for me.
My site

(No worry this is just a test site)
(Please delete this reply when you're done)
Title: Re: Thumbnail on Topic Listing
Post by: Diego Andrés on October 04, 2022, 01:24:33 PM
You could uninstall the mod, and install it again but mark the other themes during installation.
Title: Re: Thumbnail on Topic Listing
Post by: Doug Heffernan on October 04, 2022, 01:51:49 PM
Quote from: Rgvill on October 04, 2022, 12:57:42 PMCould you just do it for me.
My site

It is better if you do it yourself. Like that you learn on how to take care of things, should the situation repeat itself again in the future.

Anyways, try Diego 's advice above first.
Title: Re: Thumbnail on Topic Listing
Post by: Kindred on October 04, 2022, 02:32:12 PM
... and we could not do it for you anyway, since we don't have access to edit your files.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 07:12:18 PM
1.   Execute Modification   ./Sources/MessageIndex.php   Test successful
*   2.   Execute Modification   H:\root\home\rgvill-001\www\etcflix/Themes/default/MessageIndex.template.php   Test successful
*   3.   Execute Modification   ./index.php   Test successful
*   4.   Execute Modification   H:\root\home\rgvill-001\www\etcflix/Themes/default/ManageBoards.template.php   Test successful
*   5.   Execute Modification   H:\root\home\rgvill-001\www\etcflix/Themes/default/languages/ManageBoards.english.php   Test successful
*   6.   Execute Modification   H:\root\home\rgvill-001\www\etcflix/Themes/default/languages/Modifications.english.php   Test successful
7.   Execute Modification   H:\root\home\rgvill-001\www\etcflix/Themes/default/languages/Modifications.english-utf8.php   Skipping file
*   8.   Execute Modification   ./Sources/ManageBoards.php   Test successful
*   9.   Execute Modification   ./Sources/ManageSettings.php   Test successful
10.   Execute Code   db2.php   
Install in other themes
To use this modification in themes other than the default, the package manager needs to make additional changes to the other themes. If you'd like to install this modification in the other themes, please select these themes below.
   BootBuff
   Execute Modification   ./Themes/BootBuff/MessageIndex.template.php   Test failed
1.   Replace   ./Themes/BootBuff/MessageIndex.template.php   Test successful
2.   Replace   ./Themes/BootBuff/MessageIndex.template.php   Test failed
3.   Replace   ./Themes/BootBuff/MessageIndex.template.php   Test failed
   Execute Modification   ./Themes/BootBuff/ManageBoards.template.php   Test successful
1.   Replace   ./Themes/BootBuff/ManageBoards.template.php   Test successful


Wh
Quote from: Diego Andrés on October 04, 2022, 01:24:33 PMYou could uninstall the mod, and install it again but mark the other themes during installation.

It says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
Title: Re: Thumbnail on Topic Listing
Post by: Steve on October 04, 2022, 07:17:37 PM
Quote from: Rgvill on October 04, 2022, 07:12:18 PMIt says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
If you click on the little clipboard icon at the left of the line that indicates the error, what does it tell you?
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 07:24:16 PM
Quote from: Steve on October 04, 2022, 07:17:37 PM
Quote from: Rgvill on October 04, 2022, 07:12:18 PMIt says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
If you click on the little clipboard icon at the left of the line that indicates the error, what does it tell you?

I followed Diego's instructions and when I checked the box to apply it to another theme, that's what I get.
Title: Re: Thumbnail on Topic Listing
Post by: Steve on October 04, 2022, 07:36:51 PM
Before you click 'Install', there should be a line in red that shows you where the test failed. Clicking on the icon I mentioned will tell you what it was expecting to find but didn't.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 04, 2022, 07:46:16 PM
Ok no line in red no such icon.
What should I do now (I'm sorry if having a hard time understanding everyone, english is not my native tounge) I was trying to get it to work by myself with no luck.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 05, 2022, 12:19:40 AM
I figured it out. It needs me to add this two codes. But I need help implementing it. What is the correct format? When I added each code it works fine. But when I added them together I got an error.

<div class="board_icon"></div>', $context['show_thumbnails'] ? '<div class="lastpost"></div>' : '', '

<div class="board_icon">
                        <img src="', $topic['first_post']['icon_url'], '" alt="">
                        ', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', '
                    </div>';

                // Thumbnail Topic Mod
                if ($context['show_thumbnails'])
                {
                    global $modSettings;
                    echo '<div style="margin-right:5px;">';

                        $imagefound = false;

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

                            if (isset($image['id']))
                            {
                                if (empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
                                {
                                        echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
                                }
                                if (empty($modSettings['topic_thumb_width']) && !empty($modSettings['topic_thumb_height']))
                                {
                                        echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
                                }
                                if (!empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
                                {
                                        echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" alt="" /></a>';
                                }
                                else
                                {
                                    echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
                                }

                                $imagefound = true;
                            }

                        }

                    echo '</div>';
                }

                // End Thumbnail Topic Mod

               
echo '
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 05, 2022, 02:28:19 AM
Quote from: Steve on October 04, 2022, 07:17:37 PM
Quote from: Rgvill on October 04, 2022, 07:12:18 PMIt says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
If you click on the little clipboard icon at the left of the line that indicates the error, what does it tell you?



2. Replace Error

Code (Find)
// Are there actually any topics to show?Code (Replace)
    // thumbnail topic mod
    if (!allowedTo('view_attachments'))
        $context['show_thumbnails'] = false;
    //end thumbnail topic

    // Are there actually any topics to show?



3. Replace Error

Code (Find)
<div class="board_icon">
                        <img src="', $topic['first_post']['icon_url'], '" alt="">
                        ', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', '
                    </div>
Code (Replace)
<div class="board_icon">
                        <img src="', $topic['first_post']['icon_url'], '" alt="">
                        ', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', '
                    </div>';

                // Thumbnail Topic Mod
                if ($context['show_thumbnails'])
                {
                    global $modSettings;
                    echo '<div style="margin-right:5px;">';

                        $imagefound = false;

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

                            if (isset($image['id']))
                            {
                                if (empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
                                {
                                        echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
                                }
                                if (empty($modSettings['topic_thumb_width']) && !empty($modSettings['topic_thumb_height']))
                                {
                                        echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
                                }
                                if (!empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
                                {
                                        echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" alt="" /></a>';
                                }
                                else
                                {
                                    echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
                                }

                                $imagefound = true;
                            }

                        }

                    echo '</div>';
                }

                // End Thumbnail Topic Mod

               
echo '



Both code do not exist on Themes/BootBuff/MessageIndex.template.php   


This is what inside of Themes/BootBuff/MessageIndex.template.php (http://www.etcflix.com/Themes/BootBuff/MessageIndex.template.txt)
Title: Re: Thumbnail on Topic Listing
Post by: Steve on October 05, 2022, 07:31:02 AM
The first one is there but I can't find anything close to the second one. Hopefully the mod author (@SMFHacks.com Team) or someone with more coding skills than I will respond.

Keep in mind that massive amounts of code were removed in MessageIndex.template.php for simplicity's sake in the BootBuff theme, including the code the second error is looking for.


@vbgamer45 - do you have anything to do with this mod?
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 05, 2022, 08:31:18 AM
Quote from: Steve on October 05, 2022, 07:31:02 AMThe first one is there but I can't find anything close to the second one. Hopefully the mod author (@SMFHacks.com Team) or someone with more coding skills than I will respond.

I'm sorry I wasn't right on the first one. This is the error I get.

Code (Find)
<div class="board_icon"></div>

Code (Replace)
<div class="board_icon"></div>', $context['show_thumbnails'] ? '<div class="lastpost"></div>' : '', '
Title: Re: Thumbnail on Topic Listing
Post by: Steve on October 05, 2022, 10:41:50 AM
Either way my comment still holds true on the second:

Quote from: Steve on October 05, 2022, 07:31:02 AMKeep in mind that massive amounts of code were removed in MessageIndex.template.php for simplicity's sake in the BootBuff theme, including the code the second error is looking for.
Title: Re: Thumbnail on Topic Listing
Post by: Rgvill on October 16, 2022, 02:16:25 AM
Is it possible to set a default thumbnail for topic that has no image? I want my message index to look even. This is a great mod btw.
Title: Re: Thumbnail on Topic Listing
Post by: LuciferMorningstar on December 13, 2023, 01:23:47 PM
Hello,
I have installed this mod but I can no longer open any section of the forum.
I receive this error:
You cannot view this attachment.

My version of SMF is 2.1.4
Title: Re: Thumbnail on Topic Listing
Post by: vbgamer45 on December 13, 2023, 01:31:17 PM
Uninstall the mod. strange i don't think we add email_address as a column.
Title: Re: Thumbnail on Topic Listing
Post by: LuciferMorningstar on December 13, 2023, 01:48:45 PM
Quote from: vbgamer45 on December 13, 2023, 01:31:17 PMUninstall the mod. strange i don't think we add email_address as a column.

I have a local version of my forum in which the mod works but breaks down the graphics.
Note the difference between the information underlined in blue and the green one, which characterizes the topics with the thumbnail.
Even if I reduce the size of the thumbnails, the problem remains.



But the biggest problem, at the moment, is not even being able to see the various sections in my "public" forum.

I have already unistalled the mod from my public forum.